General Recursion via Coinductive Types
Venanzio Capretta
Abstract
A fertile field of research in theoretical computer science investigates the representation of general recursive functions in intensional type theories. Among the most successful approaches are: the use of wellfounded relations, implementation of operational semantics, formalization of domain theory, and inductive definition of domain predicates. Here, a different solution is proposed: exploiting coinductive types to model infinite computations. To every type A we associate a type of partial elements Partial(A), coinductively generated by two constructors: the first, return(a) just returns an element a:A; the second, step(x), adds a computation step to a recursive element x:Partial(A). We show how this simple device is sufficient to formalize all recursive functions between two given types. It allows the definition of fixed points of finitary, that is, continuous, operators. We will compare this approach to different ones from the literature. Finally, we mention that the formalization, with appropriate structural maps, defines a strong monad.
Create a lesson
Related papers
Timed Games under Environmental Interference with Real-Time Objectives
Andrea Manini, Matteo Rossi, Pierluigi San Pietro
Executable Specifications in Transition Algebra
Daniel Găină, Adrián Riesco, Ionuţ Ţuţu
Essential Unitarity for Higher-Order Quantum Computation (Extended Abstract)
Samson Abramsky, Radha Jagadeesan
Sundance: A Simple SMT Solver for Program Verification
Amar Shah, Benjamin F. Jones, Can Cebeci et al.
Global Trace Condition for Injective Transition Graphs
Stefano Berardi, Ugo de'Liguoro, Daniel Osorio-Valencia
Aero-VPA: Few-Step Flow-Matching Control over Non-Reconstructive JEPA Latents for Agile Flight on Edge Hardware
Yeonseok Lee