## A few constructions on constructors (2005)

### Cached

### Download Links

- [www.cs.ru.nl]
- [www.cs.st-andrews.ac.uk]
- [www.dcs.st-andrews.ac.uk]
- DBLP

### Other Repositories/Bibliography

Venue: | Types for Proofs and Programs |

Citations: | 7 - 5 self |

### BibTeX

@INPROCEEDINGS{Mcbride05afew,

author = {Conor Mcbride and Healfdene Goguen and James Mckinna},

title = {A few constructions on constructors},

booktitle = {Types for Proofs and Programs},

year = {2005},

pages = {30},

publisher = {Springer-Verlag}

}

### OpenURL

### Abstract

Abstract. We present four constructions for standard equipment which can be generated for every inductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a two-level approach—they require less work than the standard techniques which inspired them [11, 8]. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from dependently typed programs in pattern matching style [7] to the equivalent programs expressed in terms of induction principles [21] and as such play a crucial behind-the-scenes rôle in Epigram [25]. 1

### Citations

470 |
P.: Interactive Theorem Proving and Program Development. Coq’Art: The Calculus of Inductive Constructions
- Bertot, Castéran
- 2004
(Show Context)
Citation Context ... from its input. This sidesteps the problems of extending the ‘equality respects predecessors’ method of proving injectivity (automated for simple types by Cornes and Terrasse [8], and still standard =-=[4]-=-) to inductive families. It is, besides, rather neater. The refutation of cyclic equations is again presented as a single theorem for each datatype family. To our knowledge, it is entirely original.s2... |

108 |
Computation and Reasoning, A Type Theory for Computer Science
- Luo
- 1994
(Show Context)
Citation Context ...atatypes Before we begin, let us be clear about the data with which we deal and also introduce our notational conventions. We mean the strictly positive inductive families of datatypes from Luo’s UTT =-=[18]-=-. Modulo technical details, these correspond to the inductive families found in the Alf system [10], the Coq system [26] and Epigram [25]. The story we tell here is by no means specific to any one pre... |

93 |
The ALF proof editor and its proof engine
- Magnusson, Nordström
- 1994
(Show Context)
Citation Context ...usions and Further Work We have shown how to construct all the basic apparatus we need for structurally recursive programming with dependent families as proposed by Coquand [7] and implemented in Alf =-=[19]-=-. When pattern matching on an element from a specific branch of an inductive family, x : Fam�t, one may consider only the cases where the �t coincide with the indices of a constructor’s return type co... |

92 | The zipper
- Huet
- 1997
(Show Context)
Citation Context ...h �x �≤ �y being �x �< �y ∧ �x �= �y. This is a suitably heterogeneous notion of ‘not a (proper) subterm’, and it is entirely compatible 6 Readers interested in ‘constructor-form increments’ may find =-=[17, 1]-=- useful.swith the key lemmas—one for each recursive argument v i : ∀Ψ i ⇒ Fam �r i of each constructor con ∆ �v : Fam �s. ∀Ψ i ⇒ ∀ � b :〈Fam〉 ⇒ �r i; (v i Ψ i) �< � b → �s; (con ∆ �v) �≤ � b Note that... |

85 | Pattern matching with dependent types
- Coquand
- 1992
(Show Context)
Citation Context ...n of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from dependently typed programs in pattern matching style =-=[7]-=- to the equivalent programs expressed in terms of induction principles [21] and as such play a crucial behind-the-scenes rôle in Epigram [25]. 1 Introduction In this paper, we show how to equip induct... |

76 | Inductive sets and families in Martin-Löfs Type Theory and their set-theoretic semantics: An inversion principle for Martin-Löfs type theory
- Dybjer
- 1991
(Show Context)
Citation Context ...s expressed in terms of induction principles [21] and as such play a crucial behind-the-scenes rôle in Epigram [25]. 1 Introduction In this paper, we show how to equip inductive families of datatypes =-=[10]-=- with useful standard equipment. When you declare an inductive datatype, you expect to be able to write total programs over it by case analysis and structural recursion; you expect its constructors to... |

71 |
Codifying guarded definitions with recursive schemes
- Giménez
- 1994
(Show Context)
Citation Context ...nductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a two-level approach—they require less work than the standard techniques which inspired them =-=[11, 8]-=-. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from depen... |

70 | Dependently Typed Functional Programs and their Proofs
- McBride
- 1999
(Show Context)
Citation Context ...atypes. These constructions are vital components of the translation from dependently typed programs in pattern matching style [7] to the equivalent programs expressed in terms of induction principles =-=[21]-=- and as such play a crucial behind-the-scenes rôle in Epigram [25]. 1 Introduction In this paper, we show how to equip inductive families of datatypes [10] with useful standard equipment. When you dec... |

67 | An Analysis of Girard’s Paradox
- Coquand
- 1986
(Show Context)
Citation Context ... to the above criteria, some restriction must be made on the relative position of Fam and its contents in the universe hierarchy of types if paradox is to be avoided—we refer the interested reader to =-=[18, 6]-=- and leave universe levels implicit [14]. For any ∆, �v, i and �t : Ψ i, we say that v i �t is one step smaller than con ∆ �v. The usual notion of being guarded by constructors is just the transitive ... |

58 | Type-indexed data types
- HINZE, JEURING, et al.
- 2004
(Show Context)
Citation Context ...ols for such tasks [24], it would still be preferable to perform the constructions once, generically with respect to a universe of inductive families. Research adapting generic functional programming =-=[15]-=- for programs and proofs in Type Theory is showing early promise [3, 2].sMoreover, we might hope to exploit reflection to increase the size of each reasoning step. At the moment our ‘no confusion’ the... |

52 | Generic programming within dependently typed programming
- Altenkirch, McBride
- 2003
(Show Context)
Citation Context ...constructions once, generically with respect to a universe of inductive families. Research adapting generic functional programming [15] for programs and proofs in Type Theory is showing early promise =-=[3, 2]-=-.sMoreover, we might hope to exploit reflection to increase the size of each reasoning step. At the moment our ‘no confusion’ theorem computes how to simplify a single equation. This is used as a comp... |

52 |
A Typed Operational Semantics for Type Theory
- Goguen
- 1994
(Show Context)
Citation Context ...n principles—higherorder primitive recursion—yields a system which is strongly normalizing for well 4 Less is visible through a longer telescope, but we see it in more detail. · · · · · ·styped terms =-=[13]-=-. Moreover, they support large elimination—the computation of types by recursion, which we use extensively in this paper. Induction principles provide a sound and straightforward basis for programming... |

44 | Epigram: practical programming with dependent types, in - McBride - 2005 |

42 | Universes for generic programs and proofs in dependent type theory
- Benke, Dybjer, et al.
- 2003
(Show Context)
Citation Context ...constructions once, generically with respect to a universe of inductive families. Research adapting generic functional programming [15] for programs and proofs in Type Theory is showing early promise =-=[3, 2]-=-.sMoreover, we might hope to exploit reflection to increase the size of each reasoning step. At the moment our ‘no confusion’ theorem computes how to simplify a single equation. This is used as a comp... |

37 | Inductive families need not store their indices
- Brady, McBride, et al.
- 2004
(Show Context)
Citation Context ...ons can be elaborated. There is plenty of scope for exploiting the properties of indices to optimize the execution of induction principles and, by the same token, the representation of inductive data =-=[5]-=-. Proofs by Elimination. We present some of our constructions just by writing out the proof terms schematically. For the more complex constructions, this is impractical. Hence we sometimes give the hi... |

37 | Elimination with a motive
- McBride
- 2000
(Show Context)
Citation Context ...on these intuitive properties of datatypes implicitly as we go about our work. In prior publications, we have indeed relied implicitly on these properties. Both the ‘elimination with a motive’ tactic =-=[22]-=- and the Epigram programming language [25] make heavy use of this equipment, but the constructions themselves have only appeared in [21]. We hope that this paper will serve as a more accessible techni... |

32 | Structural recursive definitions in type theory
- Giménez
- 1998
(Show Context)
Citation Context ...usion’ result should extend readily to coinductive data as it relies only on case analysis. We should also seek an internal construction of guarded corecursion, underpinning the criteria in use today =-=[12]-=-. In the more distant future, we should like to see the computational power of our type systems working even harder for us: we have given the general form of our constructions, but they must still be ... |

25 |
The groupoid model refutes uniqueness of identity proofs
- Hofmann, Streicher
- 1994
(Show Context)
Citation Context ...[27] q : EqT P : EqT x x → ⋆ p : P (reflEqT x) K T x q P p : P q which is plainly the structural elimination rule for reflexive equations. Eq-with-K is known to be strictly stronger than Eq-without-K =-=[16]-=-. Heterogeneous equality and Eq-with-K are known have the same strength [21]. We shall not repeat the whole construction here, but merely observe that one may express a heterogeneous equation as a hom... |

24 | Type checking with universes
- Harper, Pollack
- 1991
(Show Context)
Citation Context ...st be made on the relative position of Fam and its contents in the universe hierarchy of types if paradox is to be avoided—we refer the interested reader to [18, 6] and leave universe levels implicit =-=[14]-=-. For any ∆, �v, i and �t : Ψ i, we say that v i �t is one step smaller than con ∆ �v. The usual notion of being guarded by constructors is just the transitive closure of this one step relation. Induc... |

13 |
D.: Automating inversion of inductive predicates in coq
- Cornes, Terrasse
- 1995
(Show Context)
Citation Context ...nductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a two-level approach—they require less work than the standard techniques which inspired them =-=[11, 8]-=-. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from depen... |

8 | Inverting inductively defined relations in LEGO
- McBride
- 1998
(Show Context)
Citation Context ...standard induction principles, together with heterogeneous equality. We represent the unification constraints as equational hypotheses �s = �t and reduce them where possible by the procedure given in =-=[20]-=-, which is complete for all first-order terms composed of constructors and variables. We have not shown here how to extend these constructions to mutual inductive definitions. These may always be simu... |

7 |
for data: derivatives of data structures
- Abbott, Altenkirch, et al.
(Show Context)
Citation Context ...h �x �≤ �y being �x �< �y ∧ �x �= �y. This is a suitably heterogeneous notion of ‘not a (proper) subterm’, and it is entirely compatible 6 Readers interested in ‘constructor-form increments’ may find =-=[17, 1]-=- useful.swith the key lemmas—one for each recursive argument v i : ∀Ψ i ⇒ Fam �r i of each constructor con ∆ �v : Fam �s. ∀Ψ i ⇒ ∀ � b :〈Fam〉 ⇒ �r i; (v i Ψ i) �< � b → �s; (con ∆ �v) �≤ � b Note that... |

3 |
Delphine Terrasse. Inverting Inductive Predicates in Coq
- Cornes
- 1995
(Show Context)
Citation Context ...nductive datatype: case analysis, structural recursion, no confusion, acyclicity. Our constructions follow a two-level approach—they require less work than the standard techniques which inspired them =-=[11, 8]-=-. Moreover, given a suitably heterogeneous notion of equality, they extend without difficulty to inductive families of datatypes. These constructions are vital components of the translation from depen... |

3 |
de Bruijn. Telescopic Mappings in Typed Lambda-Calculus
- Nicolas
- 1991
(Show Context)
Citation Context ...ections of inductive types, indexed by a given telescope, Θ data Θ Fam Θ where · · · ∆ · · · Ψ i v i Ψ i : Fam �r i con ∆ v 1 . . . v n : Fam �s Telescopes. We use Greek capitals to denote telescopes =-=[9]-=-—sequences of declarations x 1 : X 1; . . . x n : X n where later types may depend on earlier variables. We shall freely write iterated binders over telescopes λΘ ⇒T , and we shall also · · · · · ·sus... |