Type theory MOC

Extensional equality type

So-called 𝐄𝐪-types, also known as extensional equality types, are perhaps the simplest form of propositional equality one can add to a type theory. The idea is, given terms Γ 𝑥,𝑦 :𝐴, we have a term Γ 𝐫𝐞𝐟𝐥 :𝐄𝐪(𝐴,𝑥,𝑦) iff we have the judgemental equality Γ 𝑥 =𝑦 :𝐴. Thus 𝐄𝐪-types internalize the equality judgement.

A type theory with 𝐄𝐪-types is called extensional, the canonical example being ETT. Despite its friendly appearance, equality reflection has far-reaching consequences which make the type theory very badly behaved — See ETT has undecidable equality.

Standard presentation

We give a formal presentation of 𝐄𝐪-types in the cartesian calculus of substitutions, following Principles of dependent type theory. #m/def/type The formation, introduction, and elimination rules are given by

Γ𝑎,𝑏:𝐴Γ𝐄𝐪(𝐴,𝑎,𝑏)(Eq)Γ𝑎:𝐴Γ𝐫𝐞𝐟𝐥:𝐄𝐪(𝐴,𝑎,𝑎)(EqI) Γ𝑝:𝐄𝐪(𝐴,𝑎,𝑏)Γ𝑎=𝑏:𝐴(EqE)

where the elimination rule is called equality reflection. We also have a substitution naturality rule

Δ𝛾:ΓΓ𝑎,𝑏:𝐴Δ𝐄𝐪(𝐴,𝑎,𝑏)[𝛾]=𝐄𝐪(𝐴[𝛾],𝑎[𝛾],𝑏[𝛾])(Eq-N)

and an 𝜂-unicity rule

Γ𝑝:𝐄𝐪(𝐴,𝑎,𝑏)Γ𝑝=𝐫𝐞𝐟𝐥:𝐄𝐪(𝐴,𝑎,𝑏)(Eq𝜂)

validating Uniqueness of identity proofs and removing the need for separate naturality rules for EqI.

Internalizing judgemental structure

The manner in which 𝐄𝐪-types internalize judgemental structure is straightforward: We have an operation

𝐄𝐪Γ:⎜ ⎜𝐴Ty(Γ)Tm(Γ,𝐴)×Tm(Γ,𝐵)⎟ ⎟Ty(Γ)

natural in Γ with a family of bijections

𝜄Γ,𝐴,𝑎,𝑏:Tm(Γ,𝐄𝐪(𝐴,𝑎,𝑏)){::𝑎=𝑏}

also natural in Γ.


#state/tidy | #lang/en | #SemBr