natural deduction metalanguage, practical foundations
type theory (dependent, intensional, observational type theory, homotopy type theory)
computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory
equality (definitional, propositional, computational, judgemental, extensional, intensional, decidable)
identity type, equivalence of types, definitional isomorphism
isomorphism, weak equivalence, homotopy equivalence, weak homotopy equivalence, equivalence in an (∞,1)-category
Examples.
In logic and type theory, definitional equality is the metatheoretic equivalence relation on syntactic expressions (types, terms, propositions, contexts, whatever) which states that two syntactic expressions are equivalent if they have the same meaning. Thus, definitional equality encompasses both syntactic equality and alpha-equivalence, as well as equivalence of abbreviations and so forth.
According to PML (1980), p. 31:
Definitional equality is intensional equality, or equality of meaning (synonymy). [] It is a relation between linguistic expressions [] Definitional equality is the equivalence relation generated by abbreviatory definitions, changes of bound variables and the principle of substituting equals for equals. [] Definitional equality can be used to rewrite expressions [].
on p. 60:
… intensional (sameness of meaning) …
Definitional equality is commonly written as $\equiv$, and is used to define certain symbols, abbreviations, and syntactical expressions as other syntactical expressions. For example, one might want to define the symbol $2$ as the syntactical expression $s(s(0))$ representing the successor of the successor of zero in the natural numbers; definitional equality makes it so that in the metatheory, $2 \equiv s(s(0))$.
In addition, definitions are made using the single assignment operator $\coloneqq$ in the metatheory, so one would write $2 \coloneqq s(s(0))$.
Even though definitional equality is defined on general syntactic expressions in the metatheory, for specific syntactic expressions, such as those for types and terms, it is possible to internalize the notion of definitional equality inside of the object theory itself. This is formalized by the use of equality with another term or type.
More specifically, every definition of a symbol $A$ comes with a formation rule for the symbol which states that it is a type or an introduction rule for the symbol which states that it is a term of a type, and a definition rule that the term or type $A$ is equal to some existing term or type $B$. The equality used in the definition rule is the internal definitional equality of the theory.
As documented in the article on equality, there are three notions of equality used in type theory: judgmental equality, propositional equality, and typal equality. All three notions of equality could be used as the internal definitional equality. In Martin-Löf type theory and cubical type theory, judgmental equality is used for the internal definitional equality. In ZFC and ETCS, propositional equality is used for the internal definitional equality, and in some objective type theories, typal equality is used for the internal definitional equality.
Returning back to the initial example given in the section above, one usually defines the symbol $2$ to be the term $s(s(0))$ in the type of natural numbers. The symbol $2$ is formally defined using the internal definitional equality as follows:
Similarly, the symbol $\mathrm{isProp}(A)$, which is usually defined as the type
This is formally defined using the internal definitional equality as follows:
The notion of definitional equality was introduced first in AUTOMATH. The following paper presents a suggestive explanation of this notion and how proof-checking was designed in this system (especially section 10):
On the roles of types in mathematics
The notion of definitional equality was later introduced by Per Martin-Löf, first in the context of normalization proofs for higher-order logic in the paper Hauptsatz for Intuitionistic Simple Type Theory and generalized in Type Theory. He discusses this notion in the paper About Models for Intuitionistic Type Theory and The notion of Definitional Equality.
The extension from AUTOMATH is that one adds the notion of data type (natural number), of constructors (zero and successor) and primitive recursion as definitional equality. The motivation is that one can consider the schema of primitive recursion as a definition of a function.
This was also influenced by natural deduction, where constructors correspond to introduction rules and the work of Gödel on system T.
With this extension, one obtains a programming language with dependent types and where computations correspond to unfolding of definitions (that can be primitive recursive definitions). This programming language has the feature that all computations terminate. This has been also considered in functional programming, see e.g. the discussion in this paper.
A description of the evaluation algorithm using techniques from functional programming can be found in this work of Gregoire and Leroy.
Historically in the dependent type theory community, the term definitional equality was used for judgmental equality. This was because in the most common model of dependent type theory, Martin-Löf type theory, judgmental equality was used for the internal definitional equality of the theory. However, we choose to make a distinction between definitional equality and judgmental equality, as not all type theories have judgmental equalities or internal definitional equalities: in particular, many objective type theories do not have judgmental equalities or an internal definitional equality, but nevertheless still have a metatheoretic definitional equality.
Even if we restrict to internal definitional equality, there is still a distinction between definitional equality and judgmental equality. First, the internal definitional equality is propositional equality in the most common foundations of mathematics, such as ZFC and ETCS, instead of judgmental equality. In addition, one could work in logic over dependent type theory and replace judgmental equality entirely by propositional equality throughout the type theory, resulting in a type theory which behaves almost identically to the original type theory, only that the internal definitional equality is a proposition instead of a judgment (see the second presentation of Martin-Löf type theory on that article). Finally, in the advent of objective type theory and other dependent type theories which lack judgmental equality entirely, it is typal equality which is used in the internal definitional equality.
The first paper to mention intensional equality (and the fact that it should be decidable) may be:
The distinction between definitional equality and “book” equality:
The notion of definitional equality in the context of (dependent) type theory:
specifically in the Coq proof assistant:
Last revised on May 26, 2023 at 22:26:54. See the history of this page for a list of all contributions to it.