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

Author(s):  
JESPER COCKX ◽  
DOMINIQUE DEVRIESE

AbstractDependently 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 asuniqueness of identity proofsandinjectivity 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 dependent pattern matching or other techniques relying on unification, and are as a result much harder to write, modify, and understand. This paper proposes a proof-relevant framework for reasoning formally about unification in a dependently typed setting. In this framework, unification rules compute not just a unifier but also a corresponding soundness proof in the form of anequivalencebetween two sets of equations. By rephrasing the standard unification rules in a proof-relevant manner, they are guaranteed to preserve soundness of the theory. In addition, it enables us to safely add new rules that can exploit the dependencies between the types of equations, such as rules for eta-equality of record types and higher dimensional unification rules for solving equations between equality proofs. Using our framework, we implemented a complete overhaul of the unification algorithm used by Agda. As a result, we were able to replace previousad-hocrestrictions with formally verified unification rules, fixing a substantial number of bugs in the process. In the future, we may also want to integrate new principles with pattern matching, for example, the higher inductive types introduced by homotopy type theory. Our framework also provides a solid basis for such extensions to be built on.

10.29007/tvpp ◽  
2018 ◽  
Author(s):  
Paventhan Vivekanandan

This paper investigates a preliminary application of homotopy type theory in cryptography. It discusses specifying a cryptographic protocol using homotopy type theory which adds the notion of higher inductive type and univalence to Martin-Lo ̈f’s intensional type theory. A higher inductive type specification can act as a front-end mapped to a concrete cryptographic implementation in the universe. By having a higher inductive type front-end, we can encode domain-specific laws of the cryptographic implementation as higher-dimensional paths. The higher inductive type gives us a graphical computational model and can be used to extract functions from underlying concrete implementation. Us- ing this model we can extend types to act as formal certificates guaranteeing on correctness properties of a cryptographic implementation.


Author(s):  
JESPER COCKX ◽  
DOMINIQUE DEVRIESE ◽  
FRANK PIESSENS

AbstractDependent pattern matching is an intuitive way to write programs and proofs in dependently typed languages. It is reminiscent of both pattern matching in functional languages and case analysis in on-paper mathematics. However, in general, it is incompatible with new type theories such as homotopy type theory (HoTT). As a consequence, proofs in such theories are typically harder to write and to understand. The source of this incompatibility is the reliance of dependent pattern matching on the so-called K axiom – also known as the uniqueness of identity proofs – which is inadmissible in HoTT. In this paper, we propose a new criterion for dependent pattern matching without K, and prove it correct by a translation to eliminators in the style of Goguen et al. (2006 Algebra, Meaning, and Computation). Our criterion is both less restrictive than existing proposals, and solves a previously undetected problem in the old criterion offered by Agda. It has been implemented in Agda and is the first to be supported by a formal proof. Thus, it brings the benefits of dependent pattern matching to contexts where we cannot assume K, such as HoTT.


Author(s):  
Cesare Gallozzi

Abstract We introduce a family of (k, h)-interpretations for 2 ≤ k ≤ ∞ and 1 ≤ h ≤ ∞ of constructive set theory into type theory, in which sets and formulas are interpreted as types of homotopy level k and h, respectively. Depending on the values of the parameters k and h, we are able to interpret different theories, like Aczel’s CZF and Myhill’s CST. We also define a proposition-as-hproposition interpretation in the context of logic-enriched type theories. The rest of the paper is devoted to characterising and analysing the interpretations considered. The formulas valid in the prop-as-hprop interpretation are characterised in terms of the axiom of unique choice. We also analyse the interpretations of CST into homotopy type theory, providing a comparative analysis with Aczel’s interpretation. This is done by formulating in a logic-enriched type theory the key principles used in the proofs of the two interpretations. Finally, we characterise a class of sentences valid in the (k, ∞)-interpretations in terms of the ΠΣ axiom of choice.


Author(s):  
David Corfield

In the Anglophone world, the philosophical treatment of geometry has fallen on hard times. This chapter argues that philosophy can come to a better understanding of mathematics by providing an account of modern geometry, including its development of new forms of space, both for mathematical physics and for arithmetic. It returns to the discussions of Weyl and Cassirer on geometry whose concerns are very much relevant today. A way of encompassing a great part of modern geometry via homotopy toposes is discussed, along with the `cohesive’ variant of their internal language, known as `homotopy type theory’. With these tools in place, we can now start to see what an adequate philosophical account of current geometry might look like.


2020 ◽  
pp. 77-106
Author(s):  
David Corfield

A further innovation is the introduction of an intensional type theory. Here one need not reduce equivalence to mere identity. How two entities are the same tells us more than whether they are the same. This is explained by the homotopical aspect of HoTT, where types are taken to resemble spaces of points, paths, paths between paths, and so on. This allows us to rethink Russell’s definite descriptions. Mathematicians use a ‘generalized the’ in situations where it appears that they might be talking about a multiplicity of instances, but there is essentially a unique instance. Taken together with the ‘univalence axiom’ there results a language in which anything that can be said of a type can be said of an equivalent type. This allows homotopy type theory to become the language of choice for a structuralist, avoiding the need for any kind of abstraction away from multiple instantiations.


2015 ◽  
Vol 23 (3) ◽  
pp. 386-406 ◽  
Author(s):  
James Ladyman ◽  
Stuart Presnell

Sign in / Sign up

Export Citation Format

Share Document