nLab type of propositions

Contents

Context

Universes

Type theory

natural deduction metalanguage, practical foundations

  1. type formation rule
  2. term introduction rule
  3. term elimination rule
  4. computation rule

type theory (dependent, intensional, observational type theory, homotopy type theory)

syntax object language

computational trinitarianism =
propositions as types +programs as proofs +relation type theory/category theory

logicset theory (internal logic of)category theorytype theory
propositionsetobjecttype
predicatefamily of setsdisplay morphismdependent type
proofelementgeneralized elementterm/program
cut rulecomposition of classifying morphisms / pullback of display mapssubstitution
cut elimination for implicationcounit for hom-tensor adjunctionbeta reduction
introduction rule for implicationunit for hom-tensor adjunctioneta conversion
truesingletonterminal object/(-2)-truncated objecth-level 0-type/unit type
falseempty setinitial objectempty type
proposition, truth valuesubsingletonsubterminal object/(-1)-truncated objecth-proposition, mere proposition
logical conjunctioncartesian productproductproduct type
disjunctiondisjoint union (support of)coproduct ((-1)-truncation of)sum type (bracket type of)
implicationfunction setinternal homfunction type
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian productdependent productdependent product type
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijectionisomorphism/adjoint equivalenceequivalence of types
support setsupport object/(-1)-truncationpropositional truncation/bracket type
n-image of morphism into terminal object/n-truncationn-truncation modality
equalitydiagonal function/diagonal subset/diagonal relationpath space objectidentity type/path type
completely presented setsetdiscrete object/0-truncated objecth-level 2-type/set/h-set
setset with equivalence relationinternal 0-groupoidBishop set/setoid with its pseudo-equivalence relation an actual equivalence relation
equivalence class/quotient setquotientquotient type
inductioncolimitinductive type, W-type, M-type
higher inductionhigher colimithigher inductive type
-0-truncated higher colimitquotient inductive type
coinductionlimitcoinductive type
presettype without identity types
set of truth valuessubobject classifiertype of propositions
domain of discourseuniverseobject classifiertype universe
modalityclosure operator, (idempotent) monadmodal type theory, monad (in computer science)
linear logic(symmetric, closed) monoidal categorylinear type theory/quantum computation
proof netstring diagramquantum circuit
(absence of) contraction rule(absence of) diagonalno-cloning theorem
synthetic mathematicsdomain specific embedded programming language

homotopy levels

semantics

Contents

Idea

In type theory a type of propositions PropProp or Ω\Omega corresponds roughly under categorical semantics to a subobject classifier. (To be precise, depending on the type theoretic rules and axioms this may not be quite true: one needs propositional resizing, propositional extensionality, and — in some type theories where “proposition” is not defined as an h-proposition, such as the calculus of constructions — the principle of unique choice.)

Its generalization from propositions to general types is the type universe.

Definition

The type of all propositions

The type of all propositions is given by the following rules:

Formation rules:

ΓctxΓΩtype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \Omega \; \mathrm{type}}

Type reflection:

ΓA:ΩΓEl(A)type\frac{\Gamma \vdash A:\Omega}{\Gamma \vdash El(A) \; \mathrm{type}}

Introduction rules:

ΓAtypeΓproptrunc A:isProp(A)ΓA Ω:Ω\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \mathrm{proptrunc}_A:\mathrm{isProp}(A)}{\Gamma \vdash A_\Omega:\Omega}
ΓAtypeΓproptrunc A:isProp(A)ΓEl(A Ω)A\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \mathrm{proptrunc}_A:\mathrm{isProp}(A)}{\Gamma \vdash El(A_\Omega) \equiv A}

Propositional truncation for each type reflection

ΓA:ΩΓproptrunc(A):isProp(El(A))\frac{\Gamma \vdash A:\Omega}{\Gamma \vdash \mathrm{proptrunc}(A):\mathrm{isProp}(El(A))}

Univalence:

ΓA:ΩΓB:ΩΓunivalence(A,B):isEquiv(transport El(A,B))\frac{\Gamma \vdash A:\Omega \quad \Gamma \vdash B:\Omega} {\Gamma \vdash \mathrm{univalence}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}

The type of all decidable propositions

The type of all decidable propositions is given by the following rules:

Formation rules:

ΓctxΓΩtype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \Omega \; \mathrm{type}}

Type reflection:

ΓA:ΩΓEl(A)type\frac{\Gamma \vdash A:\Omega}{\Gamma \vdash El(A) \; \mathrm{type}}

Introduction rules:

ΓAtypeΓproptrunc A:isProp(A)Γlem A:A¬AΓA Ω:Ω\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \mathrm{proptrunc}_A:\mathrm{isProp}(A) \quad \Gamma \vdash \mathrm{lem}_A:A \vee \neg A}{\Gamma \vdash A_\Omega:\Omega}
ΓAtypeΓproptrunc A:isProp(A)Γlem A:A¬AΓEl(A Ω)A\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash \mathrm{proptrunc}_A:\mathrm{isProp}(A) \quad \Gamma \vdash \mathrm{lem}_A:A \vee \neg A}{\Gamma \vdash El(A_\Omega) \equiv A}

Propositional truncation for each type reflection

ΓA:ΩΓproptrunc(A):isProp(El(A))\frac{\Gamma \vdash A:\Omega}{\Gamma \vdash \mathrm{proptrunc}(A):\mathrm{isProp}(El(A))}

Excluded middle for each type reflection

ΓA:ΩΓlem(A):El(A)¬El(A)\frac{\Gamma \vdash A:\Omega}{\Gamma \vdash \mathrm{lem}(A):El(A) \vee \neg El(A)}

Univalence:

ΓA:ΩΓB:ΩΓunivalence(A,B):isEquiv(transport El(A,B))\frac{\Gamma \vdash A:\Omega \quad \Gamma \vdash B:\Omega} {\Gamma \vdash \mathrm{univalence}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}

The type of booleans

The type of booleans or booleans type is given by the following rules:

Formation rules:

ΓctxΓbooltype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{bool} \; \mathrm{type}}

Type reflection:

ΓA:boolΓEl(A)type\frac{\Gamma \vdash A:\mathrm{bool}}{\Gamma \vdash El(A) \; \mathrm{type}}

Introduction rules:

ΓctxΓfalse:boolΓctxΓEl(false)𝟘\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{false}:\mathrm{bool}} \quad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash El(\mathrm{false}) \equiv \mathbb{0}}
ΓctxΓtrue:boolΓctxΓEl(true)𝟙\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{true}:\mathrm{bool}} \quad \frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash El(\mathrm{true}) \equiv \mathbb{1}}

Univalence:

ΓA:boolΓB:boolΓunivalence(A,B):isEquiv(transport El(A,B))\frac{\Gamma \vdash A:\mathrm{bool} \quad \Gamma \vdash B:\mathrm{bool}} {\Gamma \vdash \mathrm{univalence}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}

Unlike a generic two-valued type defined as the sum type of two copies of the unit type or directly defined in terms of natural deduction rules, having a type of booleans is inconsistent with every type being an h-proposition. If bool\mathrm{bool} were an h-proposition, that means that the identity type false=true\mathrm{false} = \mathrm{true} is pointed, and by transport across El\mathrm{El}, there is an equivalence between the empty type and the unit type, which is a contradiction.

Other types of propositions

We work in an intensional type theory with propositional truncations [T]\left[T\right] for types TT. A type of propositions is a type Ω\Omega with a type family TT such that

  • for every proposition P:ΩP:\Omega, the type T(P)T(P) is an h-proposition:
    P:Ω a:T(P) b:T(P)a= T(P)b\prod_{P:\Omega} \prod_{a:T(P)} \prod_{b:T(P)} a =_{T(P)} b
  • the transport function
    trans T(P,Q):P= ΩQ(T(P)T(Q))\mathrm{trans}^T(P, Q):P =_\Omega Q \to (T(P) \simeq T(Q))

    is an equivalence of types for all propositions P:ΩP:\Omega and Q:ΩQ:\Omega

    P:Ω Q:ΩisEquiv(trans T(P,Q))\prod_{P:\Omega} \prod_{Q:\Omega} \mathrm{isEquiv}(\mathrm{trans}^T(P, Q))
  • (Ω,T)(\Omega, T) is weakly closed under truth: there is an element Ω:Ω\top_\Omega:\Omega and an equivalence canonical :T( Ω)𝟙\mathrm{canonical}_\top: T(\top_\Omega) \simeq \mathbb{1}
  • (Ω,T)(\Omega, T) is weakly closed under conjunction: there is a function ()():Ω×ΩΩ(-)\wedge(-):\Omega \times \Omega \to \Omega and an equivalence canonical (P,Q):T(PQ)[T(P)×T(Q)]\mathrm{canonical}_\wedge(P, Q): T(P \wedge Q) \simeq \left[T(P) \times T(Q)\right]
  • (Ω,T)(\Omega, T) is weakly closed under implication: there is a function ()():Ω×ΩΩ(-)\implies(-):\Omega \times \Omega \to \Omega and an equivalence canonical (P,Q):T(PQ)[T(P)T(Q)]\mathrm{canonical}_\implies(P, Q): T(P \implies Q) \simeq \left[T(P) \to T(Q)\right]
  • (Ω,T)(\Omega, T) is weakly closed under falsehood: there is an element Ω:Ω\bot_\Omega:\Omega and an equivalence canonical :T( Ω)𝟘\mathrm{canonical}_\bot: T(\bot_\Omega) \simeq \mathbb{0}
  • (Ω,T)(\Omega, T) is weakly closed under disjunction: there is a function ()():Ω×ΩΩ(-)\vee(-):\Omega \times \Omega \to \Omega and an equivalence canonical (P,Q):T(PQ)[T(P)+T(Q)]\mathrm{canonical}_\vee(P, Q): T(P \vee Q) \simeq \left[T(P) + T(Q)\right]

These axioms imply that (Ω,T)(\Omega, T) satisfy propositional extensionality and that Ω\Omega is an h-set and a Heyting algebra.

Examples

The type of all internal propositions

A:UisProp(T(A))\sum_{A:U} \mathrm{isProp}(T(A))

in a Tarski universe (U,T)(U, T) is a type of propositions.

References

Detailed discussion of the type of propositions in Coq is in

Last revised on December 1, 2022 at 16:02:34. See the history of this page for a list of all contributions to it.