Type theory MOC

Product type

Given types 𝐴 and 𝐵, the product type 𝐴 ×𝐵 contains ordered pairs (𝑎,𝑏) for 𝑎 :𝐴 and 𝑏 :𝐵, i.e. it generalizes the cartesian product. Under propositions as types, this corresponds to conjunction, since a proof of 𝐴 ×𝐵 gives a proof of 𝐴 and a proof of 𝐵.

Standard presentation

In the cartesian calculus of substitutions we can introduce product types with the following typing rules. The formation, introduction, and elimination rules are

Γ⊢𝐴Γ⊢𝐵Γ⊢𝐴×Γ𝐵(×)Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵Γ⊢⟨𝑎,𝑏⟩′Γ,𝐴,𝐵:𝐴×𝐵(×I) Γ⊢𝑝:𝐴×𝐵Γ⊢𝐟𝐬𝐭′Γ,𝐴,𝐵(𝑝):𝐴(×E1)Γ⊢𝑝:𝐴×𝐵Γ⊢𝐬𝐧𝐝′Γ,𝐴,𝐵(𝑝):𝐵(×E2)

while we also have the substitution naturality rules

Δ⊢𝛾:ΓΓ⊢𝐴Γ⊢𝐵Δ⊢(𝐴×𝐵)[𝛾]=𝐴[𝛾]×𝐵[𝛾](×-N) Δ⊢𝛾:ΓΓ⊢𝑎:𝐴Γ⊢𝑏:𝐵Δ⊢⟨𝑎,𝑏⟩′[𝛾]=⟨𝑎[𝛾],𝑏[𝛾]′⟩:𝐴[𝛾]×𝐵[𝛾](×I-N) Δ⊢𝛾:ΓΓ⊢𝑝:𝐴×𝐵Δ⊢𝐟𝐬𝐭′(𝑝)[𝛾]=𝐟𝐬𝐭′(𝑝[𝛾]):𝐴[𝛾](×E1-N) Δ⊢𝛾:ΓΓ⊢𝑝:𝐴×𝐵Δ⊢𝐬𝐧𝐝′(𝑝)[𝛾]=𝐬𝐧𝐝′(𝑝[𝛾]):𝐵[𝛾](×E2-N)

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

Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵Γ⊢𝐟𝐬𝐭′(⟨𝑎,𝑏⟩)′=𝑎:𝐴(×𝛽1) Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵Γ⊢𝐬𝐧𝐝′(⟨𝑎,𝑏⟩)′=𝑏:𝐵(×𝛽2) Γ⊢𝑝:𝐴×𝐵Γ⊢𝑝=⟨𝐟𝐬𝐭′(𝑝),𝐬𝐧𝐝′(𝑝)⟩′:𝐴×𝐵(×𝜂)

From Σ-types

In the Cartesian calculus of substitutions with Σ-types, it is not necessary to give separate typing rules to establish product types. Instead we have

Γ⊢𝐴Γ.𝐴⊢𝐩:Γ(W)Γ⊢𝐵Γ.𝐴⊢𝐵[𝐩]Γ⊢𝚺(𝐴,𝐵[𝐩])(Σ)

and so we can define 𝐴 ×Γ𝐵 :=𝚺Γ(𝐴,𝐵[𝐩]).

Derivation of above typing rules

For ×I, we have

Γ⊢𝑎:𝐴Γ⊢𝑏:𝐵Γ.𝐴⊢𝑏[𝐩]:𝐵[𝐩](W)Γ⊢⟨𝑎,𝑏[𝐩]⟩:𝚺(𝐴,𝐵[𝐩])

so we take ⟨𝑎,𝑏⟩′Γ,𝐴,𝐵 :=⟨𝑎,𝑏[𝐩]⟩Γ,𝐴,𝐵[𝐩].

For ×E1 we have

Γ⊢𝑝:𝚺(𝐴,𝐵[𝐩])Γ⊢𝐟𝐬𝐭(𝑝):𝐴

so we take 𝐟𝐬𝐭′Γ,𝐴,𝐵 :=𝐟𝐬𝐭Γ,𝐴,𝐵[𝐩].

For ×E2 we have

Γ⊢𝑝:𝚺(𝐴,𝐵[𝐩])Γ⊢𝐬𝐧𝐝(𝑝):𝐵[𝐩∘𝐢𝐝.𝐟𝐬𝐭(𝑝)]Γ⊢𝐬𝐧𝐝(𝑝):𝐵

so we take 𝐬𝐧𝐝′Γ,𝐴,𝐵 :=𝐬𝐧𝐝Γ,𝐴,𝐵[𝐩].

The equalities follow.

Internalizing judgemental structure

In terms of Internalizing judgemental structure, we have an operation

(×Γ):Ty⁡(Γ)×Ty⁡(Γ)→Ty⁡(Γ)

natural in Γ with a family of bijections

𝜄Γ,𝐴,𝐵:Tm⁡(Γ,𝐴×Γ𝐵)≅Tm⁡(Γ,𝐴)×Tm⁡(Γ,𝐵)

also natural in Γ.


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