nLab type of finite types

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
introduction rule for implicationcounit for hom-tensor adjunctionlambda
elimination rule for implicationunit for hom-tensor adjunctionapplication
cut elimination for implicationone of the zigzag identities for hom-tensor adjunctionbeta reduction
identity elimination for implicationthe other zigzag identity 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 set (into subsingleton)internal hom (into subterminal object)function type (into h-proposition)
negationfunction set into empty setinternal hom into initial objectfunction type into empty type
universal quantificationindexed cartesian product (of family of subsingletons)dependent product (of family of subterminal objects)dependent product type (of family of h-propositions)
existential quantificationindexed disjoint union (support of)dependent sum ((-1)-truncation of)dependent sum type (bracket type of)
logical equivalencebijection setobject of isomorphismsequivalence type
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 dependent type theory, the type of finite types is the type universe FinType\mathrm{FinType} which contains the finite types of the type theory, in the sense of finite set in set theory. The type of finite types is important in the field of combinatorics, as well as for defining mathematical structures like finite-dimensional vector spaces.

Definition

In dependent type theory, given a type AA, there are many different ways of defining the mere proposition isFinite(A)\mathrm{isFinite}(A) which indicates that AA is a finite type.

isFinite(A)n:.AFin(n)\mathrm{isFinite}(A) \equiv \exists n:\mathbb{N}.A \simeq \mathrm{Fin}(n)
  • Given a type of propositions Prop\mathrm{Prop}, a type AA is finite if for all subtypes S:(AProp)PropS:(A \to \mathrm{Prop}) \to \mathrm{Prop} of the power set of AA, if the empty subtype λx:A.\lambda x:A.\bot is in SS, and for all subtypes P:APropP:A \to \mathrm{Prop} and Q:APropQ:A \to \mathrm{Prop} of AA such that PP being in SS, QQ being a singleton subtype, and PP and QQ being disjoint together imply that the union PQP \cup Q is in SS, then the improper subtype λx:A.\lambda x:A.\top is in SS.
isFinite(A) S:(AProp)Prop(((λx:A.)S)× P:AProp Q:AProp(PS) ×(!x:A.xQ)×(PQ= APropλx:A.)(PQS))((λx:A.)S) \mathrm{isFinite}(A) \equiv \begin{array}{c} \prod_{S:(A \to \mathrm{Prop}) \to \mathrm{Prop}} (((\lambda x:A.\bot) \in S) \times \prod_{P:A \to \mathrm{Prop}} \prod_{Q:A \to \mathrm{Prop}} (P \in S) \\ \times (\exists!x:A.x \in Q) \times (P \cap Q =_{A \to \mathrm{Prop}} \lambda x:A.\bot) \to (P \cup Q \in S)) \to ((\lambda x:A.\top) \in S) \end{array}
isFinite(A) S:(ABool)Bool(((λx:A.)S)× P:ABool Q:ABool(PS) ×(!x:A.xQ)×(PQ= ABoolλx:A.)(PQS))((λx:A.)S) \mathrm{isFinite}(A) \equiv \begin{array}{c} \prod_{S:(A \to \mathrm{Bool}) \to \mathrm{Bool}} (((\lambda x:A.\bot) \in S) \times \prod_{P:A \to \mathrm{Bool}} \prod_{Q:A \to \mathrm{Bool}} (P \in S) \\ \times (\exists!x:A.x \in Q) \times (P \cap Q =_{A \to \mathrm{Bool}} \lambda x:A.\bot) \to (P \cup Q \in S)) \to ((\lambda x:A.\top) \in S) \end{array}

The membership relation and the subtype operations used above are defined in the nLab article on subtypes.

The definitions of the various different types of finite types are agnostic regarding the definition of isFinite\mathrm{isFinite}, as they uses isFinite\mathrm{isFinite} directly rather than a particular definition.

The type of all finite types

Unlike the case for the type of all types Type\mathrm{Type}, the type of all finite types FinType\mathrm{FinType} doesn’t run into Girard's paradox, because neither FinType\mathrm{FinType} nor its set truncation is itself a finite type, and so isn’t an element of itself.

The type of all finite types FinType\mathrm{FinType} in a dependent type theory could be presented either as a Russell universe or a Tarski universe. The difference between the two is that in the former, every finite type in the type theory is literally an element of the type of finite types, while in the latter, elements of FinType\mathrm{FinType} are only indices of a type family El\mathrm{El}; every finite type in the type theory is only essentially FinType \mathrm{FinType} -small for weak Tarski universes or judgmentally equal to an El(P)\mathrm{El}(P) for P:FinTypeP:\mathrm{FinType} for strict Tarski universes.

As a strict Tarski universe

As a strict Tarski universe, the type of all finite types is given by the following natural deduction inference rules:

Formation rules for the type of all finite types:

ΓctxΓFinTypetype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{FinType} \; \mathrm{type}}

Introduction rules for the type of all finite types:

ΓAtypeΓtoElem A:isFinite(A)FinType\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{toElem}_A:\mathrm{isFinite}(A) \to \mathrm{FinType}}

Elimination rules for the type of all finite types:

ΓA:FinTypeΓEl(A)typeΓA:FinTypeΓfinWitn(A):isFinite(El(A))\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{El}(A) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{finWitn}(A):\mathrm{isFinite}(\mathrm{El}(A))}

Computation rules for the type of all finite types:

ΓAtypeΓp:isFinite(A)ΓEl(toElem A(p))Atype\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \mathrm{El}(\mathrm{toElem}_A(p)) \equiv A \; \mathrm{type}}
  • Judgmental computation rules:
ΓAtypeΓp:isFinite(A)ΓfinWitn(toElem A(p))p:isFinite(A)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \mathrm{finWitn}(\mathrm{toElem}_A(p)) \equiv p:\mathrm{isFinite}(A)}
  • Typal computation rules:
ΓAtypeΓp:isFinite(A)Γβ FinType finWitn,A(p):finWitn(toElem A(p))= isFinite(A)p\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \beta_\mathrm{FinType}^{\mathrm{finWitn},A}(p):\mathrm{finWitn}(\mathrm{toElem}_A(p)) =_{\mathrm{isFinite}(A)} p}

Uniqueness rules for the type of all finite types:

  • Judgmental computation rules:

    ΓA:FinTypeΓtoElem El(A)(finWitn(A))A:FinType\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{toElem}_{\mathrm{El}(A)}(\mathrm{finWitn}(A)) \equiv A:\mathrm{FinType}}
  • Typal computation rules:

    ΓA:FinTypeΓη FinType(A):toElem El(A)(finWitn(A))= FinTypeA\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \eta_{\mathrm{FinType}}(A):\mathrm{toElem}_{\mathrm{El}(A)}(\mathrm{finWitn}(A)) =_{\mathrm{FinType}} A}

Extensionality principle of the type of all finite types:

ΓA:FinTypeΓB:FinTypeΓext FinType(A,B):isEquiv(transport El(A,B))\frac{\Gamma \vdash A:\mathrm{FinType} \quad \Gamma \vdash B:\mathrm{FinType}} {\Gamma \vdash \mathrm{ext}_\mathrm{FinType}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}

As a weak Tarski universe

As a weak Tarski universe, the type of all finite types is given by the following natural deduction inference rules:

Formation rules for the type of all finite types:

ΓctxΓFinTypetype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{FinType} \; \mathrm{type}}

Introduction rules for the type of all finite types:

ΓAtypeΓtoElem A:isFinite(A)FinType\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{toElem}_A:\mathrm{isFinite}(A) \to \mathrm{FinType}}

Elimination rules for the type of all finite types:

ΓA:FinTypeΓEl(A)typeΓA:FinTypeΓfinWitn(A):isFinite(El(A))\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{El}(A) \; \mathrm{type}} \qquad \frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{finWitn}(A):\mathrm{isFinite}(\mathrm{El}(A))}

Computation rules for the type of all finite types:

ΓAtypeΓp:isFinite(A)Γβ FinType El,A(p):El(toElem A(p))Atype\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \beta_\mathrm{FinType}^{\mathrm{El}, A}(p):\mathrm{El}(\mathrm{toElem}_A(p)) \simeq A \; \mathrm{type}}
  • Judgmental computation rules:
ΓAtypeΓp:isFinite(A)Γcongform isFinite(β FinType El,A(p))(finWitn(toElem A(p)))p:isFinite(A)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \mathrm{congform}_\mathrm{isFinite}(\beta_\mathrm{FinType}^{\mathrm{El}, A}(p))(\mathrm{finWitn}(\mathrm{toElem}_A(p))) \equiv p:\mathrm{isFinite}(A)}
  • Typal computation rules:
ΓAtypeΓp:isFinite(A)Γβ FinType finWitn,A(p):congform isFinite(β FinType El,A(p))(finWitn(toElem A(p)))= isFinite(A)p\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \beta_\mathrm{FinType}^{\mathrm{finWitn},A}(p):\mathrm{congform}_\mathrm{isFinite}(\beta_\mathrm{FinType}^{\mathrm{El}, A}(p))(\mathrm{finWitn}(\mathrm{toElem}_A(p))) =_{\mathrm{isFinite}(A)} p}

where the equivalence

congform isFinite(β FinType El,A(p)):isFinite(El(toElem A(p)))isFinite(A)\mathrm{congform}_\mathrm{isFinite}(\beta_\mathrm{FinType}^{\mathrm{El}, A}(p)):\mathrm{isFinite}(\mathrm{El}(\mathrm{toElem}_A(p))) \simeq \mathrm{isFinite}(A)

can always be constructed in a type theory with dependent product types, dependent sum types, identity types, and a type of all propositions, as given types AA and BB and an equivalence e:ABe:A \simeq B, it is possible to form the equivalence congform isFinite(e):isFinite(A)isFinite(B)\mathrm{congform}_\mathrm{isFinite}(e):\mathrm{isFinite}(A) \simeq \mathrm{isFinite}(B) through application of equivalences to identifications and the typal congruence rules of function types, dependent product types, product types, and dependent sum types.

Uniqueness rules for the type of all finite types:

  • Judgmental computation rules:

    ΓA:FinTypeΓAtoElem El(A)(finWitn(A)):FinType\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash A \equiv \mathrm{toElem}_{\mathrm{El}(A)}(\mathrm{finWitn}(A)):\mathrm{FinType}}
  • Typal computation rules:

    ΓA:FinTypeΓη FinType(A):A= FinTypetoElem El(A)(finWitn(A))\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \eta_{\mathrm{FinType}}(A):A =_{\mathrm{FinType}} \mathrm{toElem}_{\mathrm{El}(A)}(\mathrm{finWitn}(A))}

Extensionality principle of the type of all finite types:

ΓA:FinTypeΓB:FinTypeΓext FinType(A,B):isEquiv(transport El(A,B))\frac{\Gamma \vdash A:\mathrm{FinType} \quad \Gamma \vdash B:\mathrm{FinType}} {\Gamma \vdash \mathrm{ext}_\mathrm{FinType}(A, B):\mathrm{isEquiv}(\mathrm{transport}^\mathrm{El}(A, B))}

As a Russell universe

As a Russell universe, the type of all finite types is given by the following natural deduction inference rules:

Formation rules for the type of all finite types:

ΓctxΓFinTypetype\frac{\Gamma \; \mathrm{ctx}}{\Gamma \vdash \mathrm{FinType} \; \mathrm{type}}

Introduction rules for the type of all finite types:

ΓAtypeΓtoElem A:isFinite(A)FinType\frac{\Gamma \vdash A \; \mathrm{type}}{\Gamma \vdash \mathrm{toElem}_A:\mathrm{isFinite}(A) \to \mathrm{FinType}}

Elimination rules for the type of all finite types:

ΓA:FinTypeΓAtypeΓA:FinTypeΓfinWitn(A):isFinite(A)\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash A \; \mathrm{type}} \qquad \frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{finWitn}(A):\mathrm{isFinite}(A)}

Computation rules for the type of all finite types:

ΓAtypeΓp:isFinite(A)ΓtoElem A(p)Atype\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \mathrm{toElem}_A(p) \equiv A \; \mathrm{type}}
  • Judgmental computation rules:
ΓAtypeΓp:isFinite(A)ΓfinWitn(toElem A(p))p:isFinite(A)\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \mathrm{finWitn}(\mathrm{toElem}_A(p)) \equiv p:\mathrm{isFinite}(A)}
  • Typal computation rules:
ΓAtypeΓp:isFinite(A)Γβ FinType finWitn,A(p):finWitn(toElem A(p))= isFinite(A)p\frac{\Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash p:\mathrm{isFinite}(A)}{\Gamma \vdash \beta_\mathrm{FinType}^{\mathrm{finWitn},A}(p):\mathrm{finWitn}(\mathrm{toElem}_A(p)) =_{\mathrm{isFinite}(A)} p}

Uniqueness rules for the type of all finite types:

  • Judgmental computation rules:

    ΓA:FinTypeΓtoElem A(finWitn(A))A:FinType\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \mathrm{toElem}_{A}(\mathrm{finWitn}(A)) \equiv A:\mathrm{FinType}}
  • Typal computation rules:

    ΓA:FinTypeΓη FinType(A):toElem A(finWitn(A))= FinTypeA\frac{\Gamma \vdash A:\mathrm{FinType}}{\Gamma \vdash \eta_{\mathrm{FinType}}(A):\mathrm{toElem}_{A}(\mathrm{finWitn}(A)) =_{\mathrm{FinType}} A}

Extensionality principle of the type of all finite types:

ΓA:FinTypeΓB:FinTypeΓext FinType(A,B):isEquiv(idToEquiv(A,B))\frac{\Gamma \vdash A:\mathrm{FinType} \quad \Gamma \vdash B:\mathrm{FinType}} {\Gamma \vdash \mathrm{ext}_\mathrm{FinType}(A, B):\mathrm{isEquiv}(\mathrm{idToEquiv}(A, B))}

Type of small finite types

Given an already existing Russell universe UU, the type of UU-small finite types is given by the dependent sum type

A:UisFinite(A)\sum_{A:U} \mathrm{isFinite}(A)

Similarly, given an already existing Tarski universe (U,T)(U, T), the type of UU-small finite types is given by the dependent sum type

A:UisFinite(T(A))\sum_{A:U} \mathrm{isFinite}(T(A))

Properties

Closure under type formers

The type of finite types is closed under the empty type, the unit type, function types, dependent product types, product types, dependent sum types, and sum types.

Relation to the natural numbers type

The natural numbers type is equivalent to the set truncation of the type of finite types:

[FinType] 0\mathbb{N} \simeq [\mathrm{FinType}]_0

This is the type theoretic analogue of the decategorification of the permutation category resulting in the set of natural numbers.

This also means that the axiom of infinity for a type universe UU could be defined as a resizing axiom similar to propositional resizing, since set truncations could be defined from Prop U\mathrm{Prop}_U the type of propositions in UU:

axinf U: :U[ A:UisFinite(A)] 0\mathrm{axinf}_U:\sum_{\mathbb{N}:U} \mathbb{N} \simeq \left[\sum_{A:U} \mathrm{isFinite}(A)\right]_0
axinf U: :UT()[ A:UisFinite(T(A))] 0\mathrm{axinf}_U:\sum_{\mathbb{N}:U} T(\mathbb{N}) \simeq \left[\sum_{A:U} \mathrm{isFinite}(T(A))\right]_0

The arithmetic operations and order relations on the natural numbers type can be defined by induction on set truncation:

For all finite types A:FinTypeA:\mathrm{FinType} and B:FinTypeB:\mathrm{FinType} and finite families C:AFinTypeC:A \to \mathrm{FinType}, we have

0= [] 01= [𝟙] 00 =_\mathbb{N} [\emptyset]_0 \quad 1 =_\mathbb{N} [\mathbb{1}]_0
[A] 0+[B] 0= [A+B] 0[A]_0 + [B]_0 =_\mathbb{N} [A + B]_0
x=1 [A] 0[C] 0(x)= [ x:AC(x)] 0\sum_{x = 1}^{[A]_0} [C]_0(x) =_\mathbb{N} \left[\sum_{x:A} C(x)\right]_0
[A] 0[B] 0= [A×B] 0[A]_0 \cdot [B]_0 =_\mathbb{N} [A \times B]_0
x=1 [A] 0[C] 0(x)= [ x:AC(x)] 0\prod_{x = 1}^{[A]_0} [C]_0(x) =_\mathbb{N} \left[\prod_{x:A} C(x)\right]_0
[B] 0 [A] 0= [AB] 0[B]_0^{[A]_0} =_\mathbb{N} [A \to B]_0
[A] 0= [B] 0[AB] (1)or[A= FinTypeB] (1)[A]_0 =_\mathbb{N} [B]_0 \coloneqq [A \simeq B]_{(-1)} \; \mathrm{or} \; [A =_\mathrm{FinType} B]_{(-1)}
[A] 0[B] 0[AB] (1)[A]_0 \leq [B]_0 \coloneqq [A \hookrightarrow B]_{(-1)}

Categorical semantics

The categorical semantics of the type of finite types is the finite object classifier, the object classifier which classifies finite objects of a category.

References

For the fact that binary sum types, finite dependent sum types, and binary product types of finite types are finite types, see section 16.3 of:

For the fact that function types between finite types are finite types, see Exercise 16.1 of the above reference. These imply that the type of finite types are closed under binary sum types, finite dependent sum types, binary product types, and function types.

Last revised on December 10, 2023 at 13:30:29. See the history of this page for a list of all contributions to it.