nLab heterogeneous identity type

Contents

Context

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, given a type AA, a type family x:AB(x)x:A \vdash B(x), terms a 0:Aa_0:A, a 1:Aa_1:A, and an identification p:a 0= Aa 1p:a_0 =_A a_1, a dependent heterogeneous identity type between two elements b 0:B(a 0)b_0: B(a_0) and b 1:B(a 1)b_1:B(a_1) is a type whose elements witness that b 0b_0 and b 1b_1 are “equal” over or modulo the identification pp.

There is also a non-dependent heterogeneous identity type where we allow the type family to be a constant type family BB. Non-dependent heterogeneous identity types are not the same as normal identity types because they still depend on the terms a 0:Aa_0:A and a 1:a_1:A and the identification p:a 0= Aa 1p:a_0 =_A a_1, as evidenced by the introduction rules for non-dependent heterogeneous identity types, which is function application to identifications rather than reflexivity.

Note on terminology

There are many different names used for this particular dependent type, as well as many different names used for the terms of this dependent type. These include the following:

name of typename of terms
heterogeneous identity typeheterogeneous identities
heterogeneous path typeheterogeneous paths
heterogeneous identification typeheterogeneous identifications
heterogeneous equality typeheterogeneous equalities

These four names have different reasons behind the use of the name:

  • The name “heterogeneous identity type” comes from the fact that the dependent identity type is the canonical one-to-one correspondence x:B(a),y:B(b)Id B p(x,y)x:B(a), y:B(b) \vdash \mathrm{Id}_B^p(x, y) of the transport equivalence tr B p:B(a)B(b)\mathrm{tr}_B^p:B(a) \simeq B(b) on a type family x:AB(x)x:A \vdash B(x) and an identification p:a= Abp:a =_A b, which is the dependent/heterogeneous version of the identity type for the identity equivalence id A:AA\mathrm{id}_A:A \simeq A

  • The name “heterogeneous path type” comes from either the fact that every term in the heterogeneous identity type is represented by a dependent function from the interval type, the dependent version of the path type.

Definitions

Heterogeneous identity types, like function types and pair types, come in dependent and non-dependent flavors. This is because the usual natural deduction rules for dependent heterogeneous identity types require a type AA and a type family x:AB(x)x:A \vdash B(x); the non-dependent version is for a constant family BB, which is just a type BB; the dependent function f: x:AB(x)f:\prod_{x:A} B(x) in the rules for the dependent heterogeneous identity type becomes the non-dependent function f:ABf:A \to B in the non-dependent heterogeneous identity types.

The introduction rules for dependent and non-dependent heterogeneous identity types result in the dependent function application to identifications and non-dependent function application to identifications respectively, in the same way that the introduction rules for identity types result in reflexivity.

Finally, as with every other type in dependent type theory, the computation rules of both dependent and non-dependent heterogeneous identity types use judgmental equality, propositional equality, or typal equality.

Rules for non-dependent heterogeneous identity types

In the same way that there are rules for non-dependent function types and non-dependent pair types, there are also rules for non-dependent heterogeneous identity types, where the type family BB is a constant type family.

Formation rule for non-dependent heterogeneous identity types:

ΓAtypeΓBtype Γa:AΓb:AΓp:Id A(a,b)Γy:BΓz:BΓhId B(a,b,p,y,z)type\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\ \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B \quad \Gamma \vdash z:B \end{array} }{\Gamma \vdash \mathrm{hId}_B(a, b, p, y, z) \; \mathrm{type}}

Introduction rule for non-dependent heterogeneous identity types:

ΓAtypeΓBtype Γf:ABΓa:AΓb:AΓp:Id A(a,b)Γap B(f,a,b,p):hId B(a,b,p,f(a),f(b))\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\ \Gamma \vdash f:A \to B \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \mathrm{ap}_B(f, a, b, p):\mathrm{hId}_B(a, b, p, f(a), f(b))}

Elimination rule for non-dependent heterogeneous identity types:

ΓAtypeΓBtype Γ,a:A,b:A,p:Id A(a,b),y:B,z:B,q:hId B(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f:AB a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),ap B(f,a,b,p)) Γa:AΓb:AΓp:Id A(a,b)Γy:BΓz:BΓq:hId B(a,b,p,y,z)Γind hId B(t,a,b,p,y,z,q):C(a,b,p,y,z,q)\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B, z:B, q:\mathrm{hId}_B(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:A \to B} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)) \\ \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B \quad \Gamma \vdash z:B \quad \Gamma \vdash q:\mathrm{hId}_B(a, b, p, y, z) \end{array} }{\Gamma \vdash \mathrm{ind}_{\mathrm{hId}_B}(t, a, b, p, y, z, q):C(a, b, p, y, z, q)}

Computation rules for non-dependent heterogeneous identity types:

  • Judgmental computational rules

    ΓAtypeΓBtype Γ,a:A,b:A,p:Id A(a,b),y:B,z:B,q:hId B(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),ap B(f,a,b,p)) Γf:ABΓa:AΓb:AΓp:Id A(a,b)Γind hId B(t,a,b,p,f(a),f(b),ap B(f,a,b,p))t:C(a,b,p,f(a),f(b),ap B(f,a,b,p))\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B, z:B, q:\mathrm{hId}_B(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)) \\ \Gamma \vdash f:A \to B \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \mathrm{ind}_{\mathrm{hId}_B}(t, a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)) \equiv t:C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p))}
  • Propositional computational rules

    ΓAtypeΓBtype Γ,a:A,b:A,p:Id A(a,b),y:B,z:B,q:hId B(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),ap B(f,a,b,p)) Γf:ABΓa:AΓb:AΓp:Id A(a,b)Γind hId B(t,a,b,p,f(a),f(b),ap B(f,a,b,p)) C(a,b,p,f(a),f(b),ap B(f,a,b,p))ttrue\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B, z:B, q:\mathrm{hId}_B(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)) \\ \Gamma \vdash f:A \to B \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \mathrm{ind}_{\mathrm{hId}_B}(t, a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)) \equiv_{C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p))} t \; \mathrm{true}}
  • Typal computational rules

    ΓAtypeΓBtype Γ,a:A,b:A,p:Id A(a,b),y:B,z:B,q:hId B(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),ap B(f,a,b,p)) Γf:ABΓa:AΓb:AΓp:Id A(a,b)Γβ hId B(t,f,a,b,p):Id C(a,b,p,f(a),f(b),ap B(f,a,b,p))(ind hId B(t,a,b,p,f(a),f(b),ap B(f,a,b,p)),t)\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B, z:B, q:\mathrm{hId}_B(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)) \\ \Gamma \vdash f:A \to B \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \beta_{\mathrm{hId}_B}(t, f, a, b, p):\mathrm{Id}_{C(a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p))}(\mathrm{ind}_{\mathrm{hId}_B}(t, a, b, p, f(a), f(b), \mathrm{ap}_B(f, a, b, p)), t)}

Rules for dependent heterogeneous identity types

Formation rule for dependent heterogeneous identity types:

ΓAtypeΓB(x)type Γa:AΓb:AΓp:Id A(a,b)Γy:B(a)Γz:B(b)ΓhId x:A.B(x)(a,b,p,y,z)type\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma \vdash B(x) \; \mathrm{type} \\ \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B(a) \quad \Gamma \vdash z:B(b) \end{array} }{\Gamma \vdash \mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \; \mathrm{type}}

Introduction rule for dependent heterogeneous identity types:

ΓAtypeΓ,x:AB(x)type Γf: x:AB(x)Γa:AΓb:AΓp:Id A(a,b)Γapd x:A.B(x)(f,a,b,p):hId x:A.B(x)(a,b,p,f(a),f(b))\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\ \Gamma \vdash f:\prod_{x:A} B(x) \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \mathrm{apd}_{x:A.B(x)}(f, a, b, p):\mathrm{hId}_{x:A.B(x)}(a, b, p, f(a), f(b))}

Elimination rule for dependent heterogeneous identity types:

ΓAtypeΓ,x:AB(x)type Γ,a:A,b:A,p:Id A(a,b),y:B(a),z:B(b),q:hId x:A.B(x)(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p)) Γa:AΓb:AΓp:Id A(a,b)Γy:B(a)Γz:B(b)Γq:hId x:A.B(x)(a,b,p,y,z)Γind hId B(t,a,b,p,y,z,q):C(a,b,p,y,z,q)\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B(a), z:B(b), q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)) \\ \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \quad \Gamma \vdash y:B(a) \quad \Gamma \vdash z:B(b) \quad \Gamma \vdash q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \end{array} }{\Gamma \vdash \mathrm{ind}_{\mathrm{hId}_B}(t, a, b, p, y, z, q):C(a, b, p, y, z, q)}

Computation rules for dependent heterogeneous identity types:

  • Judgmental computational rules

    ΓAtypeΓ,x:AB(x)type Γ,a:A,b:A,p:Id A(a,b),y:B(a),z:B(b),q:hId x:A.B(x)(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p)) Γf: x:AB(x)Γa:AΓb:AΓp:Id A(a,b)Γind hId x:A.B(x)(t,a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p))t:C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p))\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B(a), z:B(b), q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)) \\ \Gamma \vdash f:\prod_{x:A} B(x) \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \mathrm{ind}_{\mathrm{hId}_{x:A.B(x)}}(t, a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)) \equiv t:C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p))}
  • Propositional computational rules

    ΓAtypeΓ,x:AB(x)type Γ,a:A,b:A,p:Id A(a,b),y:B(a),z:B(b),q:hId x:A.B(x)(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p)) Γf: x:AB(x)Γa:AΓb:AΓp:Id A(a,b)Γind hId x:A.B(x)(t,a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p)) C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p))ttrue\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B(a), z:B(b), q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)) \\ \Gamma \vdash f:\prod_{x:A} B(x) \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \mathrm{ind}_{\mathrm{hId}_{x:A.B(x)}}(t, a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)) \equiv_{C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p))} t \; \mathrm{true}}
  • Typal computational rules

    ΓAtypeΓ,x:AB(x)type Γ,a:A,b:A,p:Id A(a,b),y:B(a),z:B(b),q:hId x:A.B(x)(a,b,p,y,z)C(a,b,p,y,z,q)type Γt: f: x:AB(x) a:A b:A p:Id A(a,b)C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p)) Γf: x:AB(x)Γa:AΓb:AΓp:Id A(a,b)Γβ hId x:A.B(x)(t,f,a,b,p):Id C(a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p))(ind hId x:A.B(x)(t,a,b,p,f(a),f(b),apd x:A.B(x)(f,a,b,p)),t)\frac{ \begin{array}{l} \Gamma \vdash A \; \mathrm{type} \quad \Gamma, x:A \vdash B(x) \; \mathrm{type} \\ \Gamma, a:A, b:A, p:\mathrm{Id}_A(a, b), y:B(a), z:B(b), q:\mathrm{hId}_{x:A.B(x)}(a, b, p, y, z) \vdash C(a, b, p, y, z, q) \; \mathrm{type} \\ \Gamma \vdash t:\prod_{f:\prod_{x:A} B(x)} \prod_{a:A} \prod_{b:A} \prod_{p:\mathrm{Id}_A(a, b)} C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)) \\ \Gamma \vdash f:\prod_{x:A} B(x) \quad \Gamma \vdash a:A \quad \Gamma \vdash b:A \quad \Gamma \vdash p:\mathrm{Id}_A(a, b) \end{array} }{\Gamma \vdash \beta_{\mathrm{hId}_{x:A.B(x)}}(t, f, a, b, p):\mathrm{Id}_{C(a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p))}(\mathrm{ind}_{\mathrm{hId}_{x:A.B(x)}}(t, a, b, p, f(a), f(b), \mathrm{apd}_{x:A.B(x)}(f, a, b, p)), t)}

As weak transport along an identity

Another way to define the dependent heterogeneous identity type is by using weak transport along the identity pp:

(a= B pb)(tr B p(a)= B(b)b). (a =_B^p b) \;\coloneqq\; \big( \mathrm{tr}_B^p(a) =_{B(b)} b \big) \,.

Definition in higher observational type theory

In higher observational type theory, the dependent heterogeneous identity type is a primitive type former (although depending on the presentation, it can also be obtained using apap into the universe). In its general form, the type family can depend not just on a single type but on a type telescope Δ\Delta. The resulting dependent heterogeneous identity type then depends on an “identification in that telescope”, which is defined by mutual recursion as a telescope of dependent heterogeneous identity types. The formation rule is then

ς:δ= Δδ δAtypea:A[δ]a :A[δ ]a= Δ.A ςa type\frac{\varsigma:\delta =_\Delta \delta^{'} \quad \delta \vdash A\; \mathrm{type} \quad a:A[\delta] \quad a^{'}:A[\delta^{'}]}{a =_{\Delta.A}^\varsigma a^{'}\; \mathrm{type}}

… needs to be finished

Heterogeneous identity types in universes

Given a term of a universe A:𝒰A:\mathcal{U}, a judgment z:𝒯 𝒰(A)B:𝒰z:\mathcal{T}_\mathcal{U}(A) \vdash B:\mathcal{U}, terms x:𝒯 𝒰(A)x:\mathcal{T}_\mathcal{U}(A) and y:𝒯 𝒰(A)y:\mathcal{T}_\mathcal{U}(A), and an identity p:id 𝒯 𝒰(A)(x,y)p:\mathrm{id}_{\mathcal{T}_\mathcal{U}(A)}(x,y), we have

ap z.B(p):id 𝒰(B(x),B(y))\mathrm{ap}_{z.B}(p):\mathrm{id}_\mathcal{U}(B(x),B(y))

and

(u,v):𝒯 𝒰(B(x))×𝒯 𝒰(B(y))π 1((ap z.B(p)))(u,v):𝒰(u,v):\mathcal{T}_\mathcal{U}(B(x)) \times \mathcal{T}_\mathcal{U}(B(y)) \vdash \pi_1(\nabla(\mathrm{ap}_{z.B}(p)))(u,v):\mathcal{U}

We could define a heterogeneous identity type as

id 𝒯 𝒰(z.B) p(u,v)π 1((ap z.B(p)))(u,v)\mathrm{id}_{\mathcal{T}_\mathcal{U}(z.B)}^{p}(u, v) \coloneqq \pi_1(\nabla(\mathrm{ap}_{z.B}(p)))(u, v)

There is a rule

A:𝒰z:𝒯 𝒰(A)B:𝒰a:𝒯 𝒰(A)id 𝒯 𝒰(z.B) refl a(u,v)id 𝒯 𝒰(B[a/z])(u,v)\frac{A:\mathcal{U} \quad z:\mathcal{T}_\mathcal{U}(A) \vdash B:\mathcal{U} \quad a:\mathcal{T}_\mathcal{U}(A)}{\mathrm{id}_{\mathcal{T}_\mathcal{U}(z.B)}^{\refl_{a}}(u, v) \equiv \mathrm{id}_{\mathcal{T}_\mathcal{U}(B[a/z])}(u, v)}

and for constant families B:𝒰B:\mathcal{U}

id 𝒯 𝒰(z.B) p(u,v)id 𝒯 𝒰(B)(u,v)\mathrm{id}_{\mathcal{T}_\mathcal{U}(z.B)}^{p}(u, v) \equiv \mathrm{id}_{\mathcal{T}_\mathcal{U}(B)}(u, v)

Categorical semantics

needs to be written

See also

type, type theory

dependent type, dependent type theory, Martin-Löf dependent type theory

homotopy type, homotopy type theory

References

Last revised on January 25, 2023 at 14:26:30. See the history of this page for a list of all contributions to it.