2018
DOI: 10.1017/s095679681800014x
|View full text |Cite
|
Sign up to set email alerts
|

Proof-relevant unification: Dependent pattern matching with only the axioms of your type theory

Abstract: Dependently typed languages such as Agda, Coq, and Idris use a syntactic first-order unification algorithm to check definitions by dependent pattern matching. However, standard unification algorithms implicitly rely on principles such as uniqueness of identity proofs and injectivity of type constructors. These principles are inadmissible in many type theories, particularly in the new and promising branch known as homotopy type theory. As a result, programs and proofs in these new theories cannot make use of de… Show more

Help me understand this report

Search citation statements

Order By: Relevance

Paper Sections

Select...
1
1
1
1

Citation Types

1
8
0

Year Published

2019
2019
2022
2022

Publication Types

Select...
4
1

Relationship

1
4

Authors

Journals

citations
Cited by 7 publications
(9 citation statements)
references
References 27 publications
1
8
0
Order By: Relevance
“…To illustrate how to handle transpX elements, let us look at an artificially constrained proof of symmetry: sym0 : (x : N) → Eq x 0 → Eq 0 x sym0 .0 reflEq = reflEq Ideally, we would only have to handle the following extra clause involving transpX: sym0 x (transpX p r t) = ?0 However, we find ourselves stuck because t has type Eq x (p i0) so we cannot recurse with sym0 x t, as that is not well typed. To get around this, we can match with reflEq against t, which gives us this clause: sym0 x (transpX p r reflEq) = ?0 Now we know from the typing that p is a path connecting x to 0, so we can use it to solve our goal with a transport: ?0 := transp (λi → Eq 0 (p (~i))) r (sym0 0 reflEq) It is not by chance that we were able to rely on the value of sym0 at reflEq to solve this goal, but rather an instance of the specialization by unification technique which is used to translate, under certain conditions, definitions by clauses into functions defined solely by eliminators (Cockx & Devriese, 2018). We refer to the algorithm in Section 4.3.3 for the general case, including how to handle remaining patterns transpX p r (hcomp s w w 0 ) and transpX p r (transpX q s t 1 ).…”
Section: Elaboration By Examplementioning
confidence: 99%
See 1 more Smart Citation
“…To illustrate how to handle transpX elements, let us look at an artificially constrained proof of symmetry: sym0 : (x : N) → Eq x 0 → Eq 0 x sym0 .0 reflEq = reflEq Ideally, we would only have to handle the following extra clause involving transpX: sym0 x (transpX p r t) = ?0 However, we find ourselves stuck because t has type Eq x (p i0) so we cannot recurse with sym0 x t, as that is not well typed. To get around this, we can match with reflEq against t, which gives us this clause: sym0 x (transpX p r reflEq) = ?0 Now we know from the typing that p is a path connecting x to 0, so we can use it to solve our goal with a transport: ?0 := transp (λi → Eq 0 (p (~i))) r (sym0 0 reflEq) It is not by chance that we were able to rely on the value of sym0 at reflEq to solve this goal, but rather an instance of the specialization by unification technique which is used to translate, under certain conditions, definitions by clauses into functions defined solely by eliminators (Cockx & Devriese, 2018). We refer to the algorithm in Section 4.3.3 for the general case, including how to handle remaining patterns transpX p r (hcomp s w w 0 ) and transpX p r (transpX q s t 1 ).…”
Section: Elaboration By Examplementioning
confidence: 99%
“…The rule CTSPLITEQ allows splitting on Eq B u v only when u and v can be unified by some substitution ρ, so that refl will be typeable at Eq Bρ uρ vρ. Cockx & Devriese (2018) define a proof-relevant notion of unification, where most general unifiers are equivalences of the form (x : Id B u v)…”
Section: Unification: Splitting On the Inductive Equality Typementioning
confidence: 99%
“…This criterion uses the general methodology of proof-relevant unification and dependent pattern matching [Cockx and Devriese 2018;Cockx et al 2014]. Our presentation is not specific to any particular type theory, which is shown by an implementation both in Coq, using an impredicative proof-irrelevant sort, and in Agda, using a hierarchy of predicative proof-irrelevant sorts.…”
Section: :5mentioning
confidence: 99%
“…To justify this criterion, we provide a general translation from any inductive type satisfying this criterion to an equivalent type defined as a fixpoint, using ideas coming from dependent pattern matching [Cockx and Devriese 2018;Cockx et al 2014]. Indeed, looking at the inductive definition from right (its conclusion) to left (its arguments) allows us to construct a case tree similarly to what is done with a definition by pattern matching.…”
Section: Dependent Pattern Matching To the Rescuementioning
confidence: 99%
“…6 RELATED AND FUTURE WORK 6.1 Related Work Cockx and Devriese [2018] present an improvement on the simplification of unification constraints for indexed datatypes avoiding more uses of UIP, and the resolution of higher-dimensional equations, implemented in Agda. We reproduced its proof in Coq and are looking at ways to integrate it during simplification.…”
Section: Elimination Principlementioning
confidence: 99%