## Eliminating dependent pattern matching (2006)

### Cached

### Download Links

- [www.cs.nott.ac.uk]
- [strictlypositive.org]
- [static.googleusercontent.com]
- [www.cs.ru.nl]
- [www.strictlypositive.org]
- [www.e-pig.org]
- [www.cs.st-andrews.ac.uk]
- DBLP

### Other Repositories/Bibliography

Venue: | of Lecture Notes in Computer Science |

Citations: | 9 - 4 self |

### BibTeX

@INPROCEEDINGS{Goguen06eliminatingdependent,

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

title = {Eliminating dependent pattern matching},

booktitle = {of Lecture Notes in Computer Science},

year = {2006},

pages = {521--540},

publisher = {Springer}

}

### OpenURL

### Abstract

Abstract. This paper gives a reduction-preserving translation from Coquand’s dependent pattern matching [4] into a traditional type theory [11] with universes, inductive types and relations and the axiom K [22]. This translation serves as a proof of termination for structurally recursive pattern matching programs, provides an implementable compilation technique in the style of functional programming languages, and demonstrates the equivalence with a more easily understood type theory. Dedicated to Professor Joseph Goguen on the occasion of his 65th birthday. 1

### Citations

261 |
Programming in Martin-Lof 's Type Theory | An Introduction, volume 7
- Nordstrom, Petersson, et al.
- 1990
(Show Context)
Citation Context ...↦→ leqs (trans p ′ q ′ ) 4 Here we write as subscripts arguments which are usually inferrable; informally, and in practice, we omit them entirely.sThere is no such luxury in a traditional type theory =-=[14, 20]-=-, where a datatype is equipped only with an elimination constant whose type expresses its induction principle and whose operational behaviour is primitive recursion. This paper provides a translation ... |

163 |
Solving equations in abstract algebras: a rulebased survey of uni
- Jouannaud, Kirchner
- 1991
(Show Context)
Citation Context ... where c is a constructor and σ is the specialising substitution which unifies the datatype indices of x and c �y. We fix unification to be first-order with datatype constructors as the rigid symbols =-=[10]-=-—we have systematically shown constructors to be injective and disjoint, and that inductive families do not admit cyclic terms [17]. Accordingly, we have a terminating unification procedure for two ve... |

153 |
The view from the left
- McBride, McKinna
(Show Context)
Citation Context ...ant of) K is sufficient to bridge the gap: it lets us encode the constructor-based unification which Coquand built directly into his rules. Our translation here deploys similar techniques to those in =-=[18]-=-, but we now ensure both that the translated pattern matching equations hold as reductions in the target theory and that the equations can be given a conventional operational semantics [1] directly, p... |

108 |
Computation and Reasoning, A Type Theory for Computer Science
- Luo
- 1994
(Show Context)
Citation Context ...ngham 3 School of Computer Science, University of St Andrews Abstract. This paper gives a reduction-preserving translation from Coquand’s dependent pattern matching [4] into a traditional type theory =-=[11]-=- with universes, inductive types and relations and the axiom K [22]. This translation serves as a proof of termination for structurally recursive pattern matching programs, provides an implementable c... |

93 |
The ALF proof editor and its proof engine
- Magnusson, Nordström
(Show Context)
Citation Context ... equations can be given a conventional operational semantics [1] directly, preserving termination and confluence. By doing so, we justify pattern matching as a language construct, in the style of ALF =-=[13]-=-, without compromising the rôle of the elimination constant in characterising the meaning of data. An early approximant of our translation was added to the Lego system [12] and demonstrated at ‘Types ... |

89 | Proving properties of programs by structural induction
- Burstall
- 1969
(Show Context)
Citation Context ...more easily understood type theory. Dedicated to Professor Joseph Goguen on the occasion of his 65th birthday. 1 Introduction Pattern matching is a long-established notation in functional programming =-=[3, 19]-=-, combining discrimination on constructors and selection of their arguments safely, compactly and efficiently. Extended to dependent types by Coquand [4], pattern matching becomes still more powerful,... |

84 | Pattern matching with dependent types
- Coquand
- 1992
(Show Context)
Citation Context ...ion Technology, University of Nottingham 3 School of Computer Science, University of St Andrews Abstract. This paper gives a reduction-preserving translation from Coquand’s dependent pattern matching =-=[4]-=- into a traditional type theory [11] with universes, inductive types and relations and the axiom K [22]. This translation serves as a proof of termination for structurally recursive pattern matching p... |

82 |
Compiling pattern matching
- Augustsson
- 1985
(Show Context)
Citation Context ...o those in [18], but we now ensure both that the translated pattern matching equations hold as reductions in the target theory and that the equations can be given a conventional operational semantics =-=[1]-=- directly, preserving termination and confluence. By doing so, we justify pattern matching as a language construct, in the style of ALF [13], without compromising the rôle of the elimination constant ... |

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 ...more powerful, managing more complexity as we move from simple inductive datatypes, like Nat defined as follows, Nat : ⋆ = zero : Nat | suc (n :Nat) : Nat to work with inductive families of datatypes =-=[6]-=- like Fin, which is indexed over Nat (Fin n is an n element enumeration), or Fin’s ordering relation, ≤, indexed over indexed data. 4 Fin (n :Nat) : ⋆ = fzn : Fin (suc n) | fsn(i :Fin n) : Fin (suc n)... |

70 |
Codifying guarded definitions with recursive schemes
- Giménez
- 1994
(Show Context)
Citation Context ...l need in the constructions to come. To summarise, caseD is just eD weakened by dropping the inductive hypotheses. BelowD(P : D → ⋆1; D) : ⋆1 is the ‘course of values’, defined inductively by Giménez =-=[7]-=-; simulated via ED, BelowD P Ξ z computes an iterated tuple type asserting P for every value structurally smaller than z. For Nat we get BelowNat P zero ↦→ 1 BelowNat P (suc n) ↦→ BelowNat P n × P nsb... |

70 | Dependently Typed Functional Programs and their Proofs
- McBride
- 1999
(Show Context)
Citation Context ...f the elimination constant in characterising the meaning of data. An early approximant of our translation was added to the Lego system [12] and demonstrated at ‘Types 1998’. To date, McBride’s thesis =-=[15]-=- is the only account of it, but there the treatment of the empty program is unsatisfying, the computational behaviour is verified only up to conversion, and the issue of unmatched but trusted terms in... |

65 | An intuitionistic theory of types
- Martin-Löf
- 1972
(Show Context)
Citation Context ...↦→ leqs (trans p ′ q ′ ) 4 Here we write as subscripts arguments which are usually inferrable; informally, and in practice, we omit them entirely.sThere is no such luxury in a traditional type theory =-=[14, 20]-=-, where a datatype is equipped only with an elimination constant whose type expresses its induction principle and whose operational behaviour is primitive recursion. This paper provides a translation ... |

52 |
A Typed Operational Semantics for Type Theory
- Goguen
- 1994
(Show Context)
Citation Context ...rtant to distinguish between the framework and object levels. There is no proof of the standard metatheoretic properties for the theory UTT plus K that we take as our target language. Goguen’s thesis =-=[8]-=- establishes the metatheory for a sub-calculus of UTT with the Logical Framework, a singlesuniverse and higher-order inductive types but not inductive families or the K combinator. Walukiewicz-Chrzasz... |

39 | A coverage checking algorithm for LF
- Schürmann, Pfenning
- 2003
(Show Context)
Citation Context ...(both, in fact, but one is enough), so the function is total. However, if we take a ‘program’ just to be a set of definitional equations, even this recognition problem is well known to be undecidable =-=[4, 15, 21]-=-. The difficulty for the recognizer is the advantage for the programmer: specialisation can prune the tree! Above, we can see that q must be split to account for (leqsq ′ ),sand having split q, we can... |

37 | Inductive families need not store their indices
- Brady, McBride, et al.
- 2004
(Show Context)
Citation Context ... and those which merely report specialisation. We shall show how to translate the terms on the left-hand sides of definitional equations written by the programmer into patterns which, following Brady =-=[2]-=-, augment the usual linear constructor forms with a representation for the arbitrary terms reported by specialisation and presupposed to match. Definition 1 (Patterns) pat := x ⌈x⌉=⇒ x av(x) =⇒ {x} | ... |

37 | Elimination with a motive
- McBride
- 2000
(Show Context)
Citation Context ...verified only up to conversion, and the issue of unmatched but trusted terms in pattern matching rules is barely considered. Our recent work describes the key equipment. The account of elimination in =-=[16]-=- uses a heterogeneous equality to express unification constraints over dependently typed data. Hence where Coquand’s pattern matching invokes an external notion of unification and of structural recurs... |

36 |
Proof Development System: User’s Manual
- LEGO
- 1992
(Show Context)
Citation Context ...struct, in the style of ALF [13], without compromising the rôle of the elimination constant in characterising the meaning of data. An early approximant of our translation was added to the Lego system =-=[12]-=- and demonstrated at ‘Types 1998’. To date, McBride’s thesis [15] is the only account of it, but there the treatment of the empty program is unsatisfying, the computational behaviour is verified only ... |

25 |
The groupoid model refutes uniqueness of identity proofs
- Hofmann, Streicher
- 1994
(Show Context)
Citation Context ...iom ‘uniqueness of identity proofs’ [22]. Coquand observed that his rules admit K; Hofmann and Streicher have shown that K does not follow from the usual induction principle for the identity relation =-=[9]-=-. We show that (a variant of) K is sufficient to bridge the gap: it lets us encode the constructor-based unification which Coquand built directly into his rules. Our translation here deploys similar t... |

11 |
Investigations into intensional type theory. Habilitiation Thesis
- Streicher
- 1993
(Show Context)
Citation Context ...ct. This paper gives a reduction-preserving translation from Coquand’s dependent pattern matching [4] into a traditional type theory [11] with universes, inductive types and relations and the axiom K =-=[22]-=-. This translation serves as a proof of termination for structurally recursive pattern matching programs, provides an implementable compilation technique in the style of functional programming languag... |

8 |
Termination of Rewriting in the Calculus of Constructions
- Walukiewicz-Chrząszcz
- 2003
(Show Context)
Citation Context ...tablishes the metatheory for a sub-calculus of UTT with the Logical Framework, a singlesuniverse and higher-order inductive types but not inductive families or the K combinator. Walukiewicz-Chrzaszcz =-=[23]-=- shows that certain higher-order rewrite rules are terminating in the Calculus of Constructions, including inductive families and the K combinator, but the rewrite rules do not include higher-order in... |

7 | A few constructions on constructors
- McBride, Goguen, et al.
(Show Context)
Citation Context ...nstraints over dependently typed data. Hence where Coquand’s pattern matching invokes an external notion of unification and of structural recursion, we have built the tools we need within type theory =-=[17]-=-. Now, finally, we assemble these components to perform dependent pattern matching by elimination. Overview The rest of the paper is organised as follows. Section 2 examines pattern matching with depe... |

7 |
An intuitionistic theory of types. manuscript
- Martin-Löf
- 1971
(Show Context)
Citation Context ...↦→ leqs (trans p ′ q ′ ) 4 Here we write as subscripts arguments which are usually inferrable; informally, and in practice, we omit them entirely.sThere is no such luxury in a traditional type theory =-=[14, 20]-=-, where a datatype is equipped only with an elimination constant whose type expresses its induction principle and whose operational behaviour is primitive recursion. This paper provides a translation ... |

4 |
Computer Aided Manipulation of Symbols
- McBride
- 1970
(Show Context)
Citation Context ...more easily understood type theory. Dedicated to Professor Joseph Goguen on the occasion of his 65th birthday. 1 Introduction Pattern matching is a long-established notation in functional programming =-=[3, 19]-=-, combining discrimination on constructors and selection of their arguments safely, compactly and efficiently. Extended to dependent types by Coquand [4], pattern matching becomes still more powerful,... |

3 | de Bruijn. Telescopic Mappings in Typed Lambda-Calculus - Nicolas - 1991 |