Homotopy Type Theory higher observational type theory > history (Rev #8, changes)

Showing changes from revision #7 to #8: Added | Removed | Changed

Contents

Idea

Higher observational type theory involves a different definition of identity types where the identity types are defined recursively for each type former rather than uniformly across all types. types inintensional Martin-Loef type theory.

ap is a primitive in higher observational type theory, rather than being derived from path induction? of path types as in intensional Martin-Loef type theory.

Definitions

We are working in a dependent type theory.

The identity types in higher observational type theory have the following formation rule:

Atypea:Ab:A(a= Ab)type\frac{A\ \mathrm{type} \quad a:A \quad b:A}{(a =_A b)\ \mathrm{type}}

We define a general congruence term called ap

x:Af:Bp:(a= Aa )ap x.f(p):id B(f[a/x],f[a /x])\frac{x:A \vdash f:B \quad p:(a =_A a^{'})}{\mathrm{ap}_{x.f}(p):\mathrm{id}_B(f[a/x], f[a^{'}/x])}

and the reflexivity terms:

a:Arefl a:(a= Aa)\frac{a:A}{\mathrm{refl}_{a}:(a =_A a)}

and computation rules for identity functions

ap x.x(p)p\mathrm{ap}_{x.x}(p) \equiv p

and for constant functions yy

ap x.y(p)refl y\mathrm{ap}_{x.y}(p) \equiv \mathrm{refl}_{y}

Thus, ap is a higher dimensional explicit substitution. There are definitional equalities

ap x.f(refl a)refl f[a/x]\mathrm{ap}_{x.f}(\mathrm{refl}_{a}) \equiv \mathrm{refl}_{f[a/x]}
ap y.g(ap x.f(p))ap x.g[f/y](p)\mathrm{ap}_{y.g}(\mathrm{ap}_{x.f}(p)) \equiv \mathrm{ap}_{x.g[f/y]}(p)
ap x.t(p)refl t\mathrm{ap}_{x.t}(p) \equiv \mathrm{refl}_{t}

for constant term tt.

Identity types for pair types

Computation rules are defend for pair types:

(s= A×Bt)(π 1(s)= Aπ 1(t))×(π 2(s)= Bπ 2(t))(s =_{A \times B} t) \equiv (\pi_1(s) =_A \pi_1(t)) \times (\pi_2(s) =_B \pi_2(t))

with computation rules for ap

ap x.(a,b)(p)(ap x.a(p),ap x.b(p))\mathrm{ap}_{x.(a,b)}(p) \equiv (\mathrm{ap}_{x.a}(p), \mathrm{ap}_{x.b}(p))
ap x.π 1(s)(p)π 1(ap x.s(p))\mathrm{ap}_{x.\pi_1(s)}(p) \equiv \pi_1(\mathrm{ap}_{x.s}(p))
ap x.π 2(s)(p)π 2(ap x.s(p))\mathrm{ap}_{x.\pi_2(s)}(p) \equiv \pi_2(\mathrm{ap}_{x.s}(p))

and computation rules for reflexivity

refl (a,b)(p)(refl a(p),refl b(p))\mathrm{refl}_{(a,b)}(p) \equiv (\mathrm{refl}_{a}(p), \mathrm{refl}_{b}(p))
refl π 1(s)(p)π 1(refl s(p))\mathrm{refl}_{\pi_1(s)}(p) \equiv \pi_1(\mathrm{refl}_{s}(p))
refl π 2(s)(p)π 2(refl s(p))\mathrm{refl}_{\pi_2(s)}(p) \equiv \pi_2(\mathrm{refl}_{s}(p))

Identity types for function types

Computation rules are defined for function types:

(f= ABg) a:A b:A q:(a= Ab)(f(a)= Bg(b))(f =_{A \to B} g) \equiv \prod_{a:A} \prod_{b:A} \prod_{q:(a =_A b)} (f(a) =_B g(b))

with computation rules for ap

ap x.f(b)(p)ap x.f(p)(b[a/x],b[a /x],ap x.b(p))\mathrm{ap}_{x.f(b)}(p) \equiv \mathrm{ap}_{x.f}(p)(b[a/x],b[a^{'}/x], \mathrm{ap}_{x.b}(p))

Computation rules are also defined for abstractions: TBD (involves currying)

Transport

Given a type AA, a judgment z:AB(z)typez:A \vdash B(z)\ \mathrm{type}, terms x:Ax:A and y:Ay:A, and an identity p:(x= Ay)p:(x =_A y), there is a function tr B p:B(x)B(y)\overrightarrow{\mathrm{tr}}_{B}^{p}:B(x) \to B(y) called transport.

Atypez:AB(z)typex:Ay:Ap:(x= Ay)tr B p:B(x)B(y)\frac{A\ \mathrm{type} \quad z:A \vdash B(z)\ \mathrm{type} \quad x:A \quad y:A \quad p:(x =_A y)}{\overrightarrow{\mathrm{tr}}_{B}^{p}:B(x) \to B(y)}

and a dependent function indicating that transport is an equivalence:

Atypez:AB(z)typex:Ay:Ap:(x= Ay)tr B p:B(x)B(y)q: u:B(y)isContr(fiber(tr B p,u))\frac{A\ \mathrm{type} \quad z:A \vdash B(z)\ \mathrm{type} \quad x:A \quad y:A \quad p:(x =_A y) \quad \overrightarrow{\mathrm{tr}}_{B}^{p}:B(x) \to B(y)}{q:\prod_{u:B(y)} \mathrm{isContr}(\mathrm{fiber}(\overrightarrow{\mathrm{tr}}_{B}^{p},u))}

Identity types for dependent pair types

Computation rules are defend for dependent pair types:

(s= x:AB(x)t) p:(π 1(s)= Aπ 1(t))tr B p(π 2(s))= B(π 2(t))π 2(t)(s =_{\sum_{x:A} B(x)} t) \equiv \sum_{p:(\pi_1(s) =_A \pi_1(t))} \overrightarrow{\mathrm{tr}}_{B}^{p}(\pi_2(s)) =_{B(\pi_2(t))} \pi_2(t)

with computation rules for ap

Identity types for dependent function types

(f= x:AB(x)g) a:A b:A p:(a= Ab)tr B p(f(a))= B(g(b))g(b)(f =_{\prod_{x:A} B(x)} g) \equiv \prod_{a:A} \prod_{b:A} \prod_{p:(a =_{A} b)} \overrightarrow{\mathrm{tr}}_{B}^{p}(f(a)) =_{B(g(b))} g(b)

With universes

We are working in a dependent type theory with Tarski-style universes.

The identity types in a universe in higher observational type theory have the following formation rule:

A:𝒰a:𝒯 𝒰(A)b:𝒯 𝒰(A)id A(a,b):𝒰\frac{A:\mathcal{U} \quad a:\mathcal{T}_\mathcal{U}(A) \quad b:\mathcal{T}_\mathcal{U}(A)}{\mathrm{id}_A(a, b):\mathcal{U}}

We define a general congruence term called ap

x:Af:Bp:id A(a,a )ap x.f(p):id B(f[a/x],f[a /x])\frac{x:A \vdash f:B \quad p:\mathrm{id}_A(a, a^{'})}{\mathrm{ap}_{x.f}(p):\mathrm{id}_B(f[a/x], f[a^{'}/x])}

and the reflexivity terms:

a:Arefl a:id A(a,a)\frac{a:A}{\mathrm{refl}_{a}:\mathrm{id}_A(a, a)}

and computation rules for identity functions

ap x.x(p)p\mathrm{ap}_{x.x}(p) \equiv p

and for constant functions yy

ap x.y(p)refl y\mathrm{ap}_{x.y}(p) \equiv \mathrm{refl}_{y}

Thus, ap is a higher dimensional explicit substitution. There are definitional equalities

ap x.f(refl a)refl f[a/x]\mathrm{ap}_{x.f}(\mathrm{refl}_{a}) \equiv \mathrm{refl}_{f[a/x]}
ap y.g(ap x.f(p))ap x.g[f/y](p)\mathrm{ap}_{y.g}(\mathrm{ap}_{x.f}(p)) \equiv \mathrm{ap}_{x.g[f/y]}(p)
ap x.t(p)refl t\mathrm{ap}_{x.t}(p) \equiv \mathrm{refl}_{t}

for constant term tt.

Identity types for universes

Let A 𝒰BA \cong_\mathcal{U} B be the type of bijective correspondences between two terms of a universe A:𝒰A:\mathcal{U} and B:𝒰B:\mathcal{U}, and let id 𝒰(A,B)\mathrm{id}_\mathcal{U}(A, B) be the identity type between two terms of a universe A:𝒰A:\mathcal{U} and B:𝒰B:\mathcal{U}. Then there are rules

R:A 𝒰BΔ(R):id 𝒰(A,B)P:id 𝒰(A,B)(P):A 𝒰BR:A 𝒰B(Δ(R))R\frac{R:A \cong_\mathcal{U} B}{\Delta(R):\mathrm{id}_\mathcal{U}(A, B)} \qquad \frac{P:\mathrm{id}_\mathcal{U}(A, B)}{\nabla(P):A \cong_\mathcal{U} B} \qquad \frac{R:A \cong_\mathcal{U} B}{\nabla(\Delta(R)) \equiv R}

Identity types in universes and singleton contractibility

Given a term of a universe A:𝒰A:\mathcal{U}

id 𝒯 𝒰(A)π 1((refl A))\mathrm{id}_{\mathcal{T}_\mathcal{U}(A)} \equiv \pi_1(\nabla(\mathrm{refl}_A))

with terms representing singleton contractibility.

π 1(π 2((refl A)): a:𝒯 𝒰(A)isContr( b:𝒯 𝒰(A)id 𝒯 𝒰(A)(a,b))\pi_1(\pi_2(\nabla(\mathrm{refl}_A)):\prod_{a:\mathcal{T}_\mathcal{U}(A)} \mathrm{isContr}\left(\sum_{b:\mathcal{T}_\mathcal{U}(A)} \mathrm{id}_{\mathcal{T}_\mathcal{U}(A)}(a, b)\right)
π 2(π 2((refl A))): b:𝒯 𝒰(A)isContr( a:𝒯 𝒰(A)id 𝒯 𝒰(A)(a,b))\pi_2(\pi_2(\nabla(\mathrm{refl}_A))):\prod_{b:\mathcal{T}_\mathcal{U}(A)} \mathrm{isContr}\left(\sum_{a:\mathcal{T}_\mathcal{U}(A)} \mathrm{id}_{\mathcal{T}_\mathcal{U}(A)}(a, b)\right)

Dependent 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 dependent 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)

See also

References

  • Mike Shulman, Towards a Third-Generation HOTT Part 1 (slides, video)

Revision on May 1, 2022 at 00:02:49 by Anonymous?. See the history of this page for a list of all contributions to it.