In dependent type theory, propositional equality and definitional equality are distinct concepts, even for closed terms. However, there is a close relationship between them, which can sometimes create the impression that they coincide in certain contexts. Let’s carefully examine these two notions and their relationship.
1. Definitional Equality
Definitional equality is a judgmental notion internal to the type theory. It is decidable and checked by the type checker. Two terms t1 and t2 are definitionally equal if they reduce to the same normal form under the operational semantics of the type theory (e.g., beta-reduction, eta-expansion, etc.).
-
Definitional equality is written as:
t1≡t2
This means t1 and t2 are considered "the same" by the type theory's computation rules.
-
For closed terms, definitional equality is straightforward: if t1 and t2 reduce to identical terms after all possible reductions, they are definitionally equal.
2. Propositional Equality
Propositional equality, on the other hand, is a type within the theory. It is expressed as a type IdA(t1,t2) or , where is the type of and . To prove propositional equality, one must construct an inhabitant of this type, often using reflexivity or other proof principles.
3. Relationship Between the Two
The key relationship between definitional and propositional equality is that definitional equality implies propositional equality. If two terms t1 and t2 are definitionally equal (t), then there is always a canonical proof of their propositional equality ().
However, the converse does not hold: propositional equality does not imply definitional equality. Two terms can be propositionally equal (i.e., there exists a proof p:t1=At2) without being definitionally equal.
4. For Closed Terms
For closed terms, the distinction remains. Even though closed terms have no free variables, their behavior under computation determines whether they are definitionally equal. Propositional equality, however, allows for more flexibility because it can involve reasoning steps or proofs that go beyond what is captured by definitional equality.
Example:
Consider the identity function λx.x and the Church numeral for 1, λf.λx.f(x). These two terms may be propositionally equal (under certain interpretations), but they are not definitionally equal because they do not reduce to the same normal form.
Final Answer:
No, propositional equality and definitional equality are not the same for closed terms.