[Paper Review] Foundational Extensible Corecursion
This paper presents a foundational, trustable framework for defining corecursive functions in total functional programming using corecursion up-to and relational parametricity. It introduces a general corecursor that safely permits corecursive calls under well-behaved operations—including constructors—by relying on semantic well-behavedness rather than syntactic guards, enabling extensible, expressive corecursive definitions without new axioms or logic extensions.
This paper presents a formalized framework for defining corecursive functions safely in a total setting, based on corecursion up-to and relational parametricity. The end product is a general corecursor that allows corecursive (and even recursive) calls under well-behaved operations, including constructors. Corecursive functions that are well behaved can be registered as such, thereby increasing the corecursor's expressiveness. The metatheory is formalized in the Isabelle proof assistant and forms the core of a prototype tool. The corecursor is derived from first principles, without requiring new axioms or extensions of the logic.
Motivation & Objective
- To provide a trustable, foundational method for defining corecursive functions in proof assistants based on higher-order logic, avoiding reliance on syntactic guards.
- To enable corecursive definitions under well-behaved operations (including constructors) while ensuring productivity and consistency.
- To formalize a corecursor that dynamically extends its expressiveness as new well-behaved functions are registered.
- To achieve this without adding new axioms or extending the underlying logic, ensuring soundness and compatibility with existing systems.
- To bridge the gap between the flexibility of semantic criteria and the practicality of foundational definitional principles in proof assistants.
Proposed method
- The framework derives a general corecursor from first principles using corecursion up-to, based on the idea that well-behaved functions preserve corecursive structure.
- It leverages relational parametricity to ensure that well-behaved functions do not interfere with corecursive productivity.
- Well-behaved functions are registered as such, allowing the corecursor to safely invoke them within corecursive calls.
- The corecursor is constructed via fixpoint semantics over functors on the category of sets, ensuring foundational soundness.
- The entire metatheory is formalized in Isabelle/HOL, using only standard logical constructs and no new axioms.
- The approach supports both corecursive and recursive functions under well-behaved operations, extending expressiveness incrementally.
Experimental results
Research questions
- RQ1How can corecursive functions be defined safely in a total setting without relying on syntactic guards?
- RQ2What semantic criterion ensures that corecursive calls under operations remain productive and consistent?
- RQ3Can a corecursor be made extensible by registering new well-behaved functions without re-proving its soundness?
- RQ4Is it possible to achieve greater expressiveness than syntactic guardedness while maintaining foundational trustworthiness?
- RQ5How can corecursion up-to and relational parametricity be combined to support constructors and other well-behaved operations?
Key findings
- The framework enables corecursive definitions under well-behaved operations—including constructors—without requiring syntactic guards or new axioms.
- Well-behaved functions can be registered to incrementally extend the corecursor’s expressiveness, enabling compositional corecursion.
- The corecursor is formally derived from first principles using fixpoint constructions, ensuring foundational soundness in Isabelle/HOL.
- The approach achieves a 'sweet spot' between expressiveness and simplicity: it supports richer contexts than syntactic guards but avoids the complexity of sized types or clock variables.
- The method is compatible with existing proof assistants based on higher-order logic and can be integrated into systems like Coq as a lightweight alternative to type-level annotations.
- The formalization in Isabelle/HOL demonstrates that the corecursor can be implemented as a trusted, extensible mechanism for productive coprogramming.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.