In intuitionistic type theory (ITT), a discipline within mathematical logic, induction-recursion is a feature for simultaneously declaring a type and function on that type. It allows the creation of larger types than inductive types, such as universes. The types created still remain predicative inside ITT.

An inductive definition is given by rules for generating elements of a type. One can then define functions from that type by induction on the way the elements of the type are generated. Induction-recursion generalizes this situation since one can simultaneously define the type and the function, because the rules for generating elements of the type are allowed to refer to the function.[1]

Induction-recursion can be used to define large types including various universe constructions. It increases the proof-theoretic strength of type theory substantially. Nevertheless, inductive-recursive definitions are still considered predicative.

Background

edit

Induction-recursion came out of investigations into the rules of Martin-Löf's intuitionistic type theory. The type theory has a number of "type formers" and four kinds of rules for each one. Martin-Löf had hinted that the rules for each type former followed a pattern, which preserved the properties of the type theory (e.g., strong normalization, predicativity). Researchers started looking for the most general description of the pattern, since that would tell what kinds of type formers could be added (or not added!) to extend the type theory.

The "universe" type former was the most interesting, because when the rules were written "à la Tarski", they simultaneously defined the "universe type" and a function that operated on it. This eventually lead Dybjer to induction-recursion.

Dybjer's initial papers called induction-recursion a "schema" for rules. It stated what type formers could be added to the type theory. Later, he and Setzer would write a new type former with rules that allowed new inductive-recursive definitions to be made inside the type theory.[2] This was added to the Half proof assistant (a variant of Alf).

The idea

edit

Before covering inductive-recursive types, the simpler case is inductive types. Constructors for inductive types can be self-referential, but in a limited way. The constructor's parameters must be "positive":

  • not refer to the type being defined
  • be exactly the type being defined, or
  • be a function that returns the type being defined.

With inductive types, a parameter's type can depend on earlier parameters, but they cannot refer to ones of the type being defined. Inductive-recursive types go further: a parameter's types can refer to earlier parameters that use the type being defined. These must be "half-positive":

  • be a function depending on an earlier parameter if that parameter is wrapped in the function being defined.

So, if is the type being defined and is the function being (simultaneously) defined, these parameter declarations are positive:

  • (Depends on earlier parameters, none of which are type .)

This is half-positive:

  • (Depends on parameter of type but only through call to .)

These are not positive nor half-positive:

  • ( is a parameter to the function.)
  • (The parameter takes a function that returns , but returns itself.)
  • (Depends on of type , but not through the function .)

Universe example

edit

A simple common example is the type former for a universe à la Tarski. It consists of a type and a function such that there is an element of for every type in the type theory (except itself!), and the function maps the elements of to the associated type.

The type has a constructor (or introduction rule) for each type former in the type theory. The one for dependent functions would be:

That is, it takes an element of type that will map to the type of the parameter, and a function such that for all values , maps to the return type of the function (which is dependent on the value of the parameter, ). (The final says that the result of the constructor is an element of type .)

The reduction (or computation rule) says that reduces to .

After reduction, the function is operating on a smaller part of the input. If that holds when is applied to any constructor, then will always terminate.

Usage

edit

Induction-recursion is implemented in Agda and Idris.[3]

See also

edit

References

edit
  1. ^ Dybjer, Peter (June 2000). "A general formulation of simultaneous inductive-recursive definitions in type theory" (PDF). Journal of Symbolic Logic. 65 (2): 525–549. CiteSeerX 10.1.1.6.4575. doi:10.2307/2586554. JSTOR 2586554. S2CID 18271311.
  2. ^ Dybjer, Peter (1999). "A Finite Axiomatization of Inductive-Recursive Definitions". Typed Lambda Calculi and Applications. Lecture Notes in Computer Science. Vol. 1581. pp. 129–146. CiteSeerX 10.1.1.219.2442. doi:10.1007/3-540-48959-2_11. ISBN 978-3-540-65763-7.
  3. ^ Bove, Ana; Dybjer, Peter; Norell, Ulf (2009). "A Brief Overview of Agda – A Functional Language with Dependent Types". In Berghofer, Stefan; Nipkow, Tobias; Urban, Christian; Wenzel, Makarius (eds.). Theorem Proving in Higher Order Logics. Lecture Notes in Computer Science. Vol. 5674. Berlin, Heidelberg: Springer. pp. 73–78. doi:10.1007/978-3-642-03359-9_6. ISBN 978-3-642-03359-9.
edit

📚 Artikel Terkait di Wikipedia

Transfinite induction

induction, we may treat different types of ordinals separately: another formulation of transfinite recursion is the following: Transfinite Recursion Theorem

Well-founded relation

successor function x ↦ x+1. Then induction on S is the usual mathematical induction, and recursion on S gives primitive recursion. If we consider the order relation

Recursion

Recursion occurs when the definition of a concept or process depends on a simpler or previous version of itself. Recursion is used in a variety of disciplines

Inductive type

defined simultaneously. Universe types can be defined using induction-recursion. Induction-induction allows definition of a type and a family of types at the

Recursion (disambiguation)

Mathematical induction, a method of proof also called "proof by recursion" Recursion, a 2004 science fiction novel by Tony Ballantyne Recursion (Crouch novel)

Transfinite recursion theorem

Transfinite recursion is an instance of transfinite induction and the latter works over a well-ordered set (in fact, the feasibility of such an induction is equivalent

Structural induction

mathematical induction over natural numbers and can be further generalized to arbitrary Noetherian induction. Structural recursion is a recursion method bearing

Recursion (computer science)

recursion is a method of solving a computational problem where the solution depends on solutions to smaller instances of the same problem. Recursion solves