Type theory MOC

Σ-types

𝚺-types, also known as dependent pair types or dependent sums, are motivated in several ways:

  1. 𝚺-types internalize context extension.
  2. 𝚺-types generize binary coproducts ( +) to a coproduct of a family of types indexed by another type.
  3. 𝚺-types generalize binary products ( ×) so that the type of the right element can depend on the type of the left input.
  4. 𝚺-types correspond to total spaces of a fibration.
  5. 𝚺-types correspond to existential quantification () over elements of some type.

The core idea is that given a type family (fibration) Γ,𝑥 :𝐴 𝐵(𝑥), a term

Γ𝑝:𝑥:𝐴𝐵(𝑥)

corresponds to a pair of terms Γ 𝐟𝐬𝐭(𝑝) :𝐴 and Γ 𝐬𝐧𝐝(𝑝) :𝐵(𝐟𝐬𝐭(𝑝)), and vice versa.

Standard presentation

Here 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 by1

Γ.𝐴𝐵Γ𝚺Γ(𝐴,𝐵)(Σ)Γ𝑎:𝐴Γ𝑏:𝐵[𝐢𝐝.𝑎]Γ𝑎,𝑏Γ,𝐴,𝐵:Σ(𝐴,𝐵)(ΣI) Γ𝑝:𝚺(𝐴,𝐵)Γ𝐟𝐬𝐭Γ,𝐴,𝐵(𝑝):𝐴(ΣE1)Γ𝑝:𝚺(𝐴,𝐵)Γ𝐬𝐧𝐝Γ,𝐴,𝐵(𝑝):𝐵[𝐢𝐝.𝐟𝐬𝐭(𝑝)](ΣE2)

while we also have the substitution naturality rules2

Δ𝛾:ΓΓ.𝐴𝐵Δ𝚺(𝐴,𝐵)[𝛾]=𝚺(𝐴[𝛾].𝐵[𝛾.𝐴])(𝚺-N) Δ𝛾:ΓΓ𝑎:𝐴Γ𝑏:𝐵[𝐢𝐝.𝑎]Δ𝑎,𝑏[𝛾]=𝑎[𝛾],𝑏[𝛾]:𝚺(𝐴,𝐵)[𝛾](ΣI-N) Δ𝛾:ΓΓ𝑝:𝚺(𝐴,𝐵)Δ𝐟𝐬𝐭(𝑝)[𝛾]=𝐟𝐬𝐭(𝑝[𝛾]):𝐴[𝛾](ΣE1-N) Δ𝛾:ΓΓ𝑝:𝚺(𝐴,𝐵)Δ𝐬𝐧𝐝(𝑝)[𝛾]=𝐬𝐧𝐝(𝑝[𝛾]):𝐵[𝐢𝐝.𝐟𝐬𝐭(𝑝)𝛾](ΣE2-N)

and judgemental equality rules for 𝛽-computation and 𝜂-unicity

Γ𝑎:𝐴Γ𝑏:𝐵[𝐢𝐝.𝑎]Γ𝐟𝐬𝐭(𝑎,𝑏)=𝑎:𝐴(Σ𝛽1)Γ𝑎:𝐴Γ𝑏:𝐵[𝐢𝐝.𝑎]Γ𝐬𝐧𝐝(𝑎,𝑏)=𝑏:𝐵[𝐢𝐝.𝑎](Σ𝛽2) Γ𝑝:𝚺(𝐴,𝐵)Γ𝑝=𝐟𝐬𝐭(𝑝),𝐬𝐧𝐝(𝑝):𝚺(𝐴,𝐵)(Σ𝜂)

Internalizing judgemental structure

In terms of Internalizing judgemental structure, we can formalize the correspondence described in the core idea with an operation

𝚺Γ:⎜ ⎜𝐴Ty(Γ)Ty(Γ.𝐴)⎟ ⎟Ty(Γ)

natural in Γ with a family of bijections

𝜄Γ,𝐴,𝐵:Tm(Γ,𝚺Γ(𝐴,𝐵))𝑎Tm(Γ,𝐴)Tm(Γ,𝐵[𝐢𝐝.𝑎])

also natural in Γ.


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

Footnotes

  1. For brevity and laziness, the premisses of the 𝚺 formation rule will be considered presuppositions.

  2. Where we invoke Substitution extension by a type.