notifications

Homotopy Type Theory

Wikipedia nLab

Homotopy

Wikipedia nLabf,g:XY,H:X×[0,1]YH(x,0)=f(x),H(x,1)=g(x).p:x=Ay.p,q:x=Ay.

2-path/homotopy

r:p=x=Ayq.

Types Are Higher Groupoids

inverse : =-symmetry

First proof.

λ(A).λ(a).λ(b).λ(p).ind=A(λ(a).λ(b).λ(p).(a=b),λ(a).refla,a,b,p):(A:𝒰)(a,b:A)(a=b)(b=a).

concatenate/compose : =-transitivity

λ(A).λ(a).λ(b).λ(c).λ(p).λ(q).ind=A(λ(a).λ(b).λ(p).λ(c).λ(q).(a=c),ind=A(λ(a).λ(c).λ(q).(a=c),refla)):(A:𝒰)(a,b,c:A)(a=b)(b=c)(a=c).

Lemma

A:𝒰x,y,z,w:Ap:x=y,q:y=z,r:z=w1. p=py, p=xp. 2. p1p=y, pp1=x. 3. (p1)^[−1]=p. 4. p(qr)=(pq)r.

Eckmann–Hilton

α,β:Ω2(A,a)αβ=βα.

Pointed type

(A,a):𝒰(A:𝒰,A).

Loop space

Ω(A,a)(a=Aa,a).Ω0(A,a)(A,a)Ωn+1(A,a)Ωn(Ω(A,a)).Ω2(A,a)Ω(Ω(A,a))Ω((a=Aa,a)).Ω(a=Aa,a)(a=a=Aaa,a).

Functions Are Functors

Lemma

f:AB,x,y:A,apf:(x=Ay)(f(x)=Bf(y)).D(x,y,p)f(x)=f(y),D:x,y:A(x=y)𝒰,dxf(x),d:x:AD(x,x,x),apf:x,y:A(x=y)(f(x)=f(y))(by path induction).x:Aap_f(x)↺_[f(x)] (by computation rule).

Lemma

Dependent Types are Fibrations

Transport

Transport

a:AP:𝒰p:x=Ayp*transportP(p,)ind=A(D,d,x,y,p):P(x)P(y),Dx,y:A,p:x=AyP(x)=P(y),dx:AidP(x),ind=A(D,d,x,y,p):P(x)P(y)forp:x=y.

Type theory: P respects equality: x=yP(x)P(y). Topology: path lifting in a fibration P with base space A, with P(x) being the fibre over x and with Σ_[x:A] P being the total space of the fibration, with the first projection Σ_[x:A] P(x)A.

Path Lifting Property

A:𝒰a:AP:𝒰,a_0:A,p_0:Pp:x=Aylift(p0,p):(x,p0)=(y,p*(p0)),pr1(lift(p0,p))=p.

Dependent map

a:Ap:Pp:x=Ayp*(f(x))=P(y)f(y).Dx,y,p,(x)_*(f(x))f(x),dx:Af(x),

Lemma

(f(x)=f(y))(p*(f(x))=f(y)),(p*(f(x))=f(y))(f(x)=f(y)).

Lemma

Lemma

a:AP:U,p:x =A y,q:y =A z, p_0:P(x) q_*(p*(p_0))=(p q)_*(p_0).

Lemma

a:Ab:B,b:B P:U,p:x =Ay, p_0:P(b(x))

Lemma

a:AP,Q:U, (a:APQ), p:x =Ay, p_0:P(b(x))

Homotopies and Equivalences

Homotopies

Natural transformations.

f,g:(a:A)B(a)(fg)(a:A)(f(a)=g(a)).

Equivalence Relation

reflexivity:(f:(a:A)B(a))(ff).symmetry:(f,g:(a:A)B(a))(fg)(gf).transitivity:(f,g,h:(a:A)B(a))(fg)(gh)(fh).

Lemma

(a:A)f,g:BH:fg,p:x=AyH(x)g(p)=f(p)H(y).

Corollary

(a:A)f:AH:fidA(a:A)H(f(x))=f(H(x)).

Quasi-Inverse

Homotopy equivalence, 'equivalence of (higher) groupoids'.

(f:AB),qinv(g:BA)×(fgidB)×(gfidA).

Example

(idA,y,x):qinv(idA).

Example

Example

Equivalence

  1. (a:A)f:Bqinv(f)is-equiv(f).
  2. (a:A)f:Bis-equiv(f)qinv(f).
  3. e1,e2:is-equiv(f)e1=e2.
gβhfgαh,AB(f:AB),is-equiv(f).

Lemma

  1. AA.
  2. ABBA.
  3. ABBCAC.

The Higher Groupoid Structure of Type Formers

×

Theorem

(x=A×By)(pr1(x)=Apr1(y))×(pr3(x)=Bpr3(y)).

Introduction Rule for =A×B

Elimination Rule for =A×B

Propositional Computation Rule for =A×B

Propositional Uniqueness Principle for =A×B

Theorem

Theorem

Dependent ×

Theorem

w,w':(a:A,P)(w=w')p:w0=w'0,p*(w1)=w'1.

Propositional Uniqueness Principle

z:(a:A)×P(a)z=(pr1(z),pr3(z)).

Theorem

A:𝒰,a:AP:𝒰,(a:A,p:P)Q:𝒰0a:A(p:P,Q).p:x=Au,(u,z):(p:P,Q)0p*(u,z)=(p*(u),pair=(p,p*(u))*(z)).

𝟏

Theorem

x,u:𝟏(x=u)𝟏.(x=u)𝟏,relf:x=u,𝟏(x=u),

Π-Types and the Function Extensionality Axiom

Function Extensionality

a:AB:𝒰f,g:B(f=g)(a:Af(a)=B(a)g(a)).happly:(f=Bg)(a:Af(a)=B(a)g(x)),_:is-equiv(happly).funext:(a:Af=Bg)f=Bg.

Lemma

x:XA,B:𝒰,p:x=Xy,(a:Af:B),(a:Ag:B)(p*(f)=g)(a:Ap*(f)=g(p*)).

Lemma

x:X,A:𝒰,a:A,B:𝒰,b:B,p:x=Xy,(x:Xa:A,f:B),(y:Xa:A,g:B)(p*(f)=g)(a:A).

Universes and the Univalence Axiom

Lemma

A,B:𝒰idtoeqv:(A=B)(AB).

Univalence

(A=B)(AB).

Remark

Introduction rule for =𝒰

ua:(AB)(A=B).

Elimination Rule for =𝒰

idtoeqvtransportXX:(A=B)(AB).

Propositional Computation Rule for =𝒰

transportXX(ua(f),x)=f(x).

Propositional Uniqueness Rule for =𝒰

p=ua(transport(p)).
  • A=ua(idA).
  • ua(f)ua(g)=ua(gf).
  • ua(f)1=ua(f1).

Lemma

=

Theorem

(a=Aa')(b(a)=Bb(a'))

Lemma

Lemma

Theorem

Theorem

+

(inj1(a)=inj1(a'))(a=a')(inj2(b)=inj2(b'))(b=b')(inj1(a)=inj2(b))𝟎code(inj1(a))(a0=a),code(inj2(b))𝟎.

Theorem

code:𝒰,code(0,0)𝟏,code(succ(m),0)𝟎,code(0,succ(n))𝟎,code(succ(m),succ(n))code(m,n).r:n:code(n,n),r(0),r(succ(n))r(n).

Theorem

(m,n:)(m=n)code(m,n).encode:(m,n):(m=n)code(m,n),encode(m,n,p)transportcode(m,)(p,r(m)),decode:m,n:code(m,n)(m=n)(by double induction on m, n).code(succ(m),succ(n))code(m,n)decode(m,n)(m=n)apsuccsucc(m)=succ(n).

Equality of Structures

Semigroup structures

(m:AAA,x,y,z:A)m(x,m(y,z))=m(m(x,y),z)

Universal Properties

×

Mapping in, non-dependent.

(CA×B)(CA)×(CB).f:XA×Bpr1f:XApr3f:XB(pr1f,pr3f):(XA)×(XB)×-introductionλf.(pr1f,pr3f):(XA×B)((XA)×(XB))→-introduction.a:XA,b:XB(a,b):(XA)×(XB)×-introductionλ(a,b).λx.(ax,bx):((XA)×(XB))(XA×B) →-introduction.

By induction principle for ×.

ind(XA)×(XB)(C,c,(a,b))c(a)(b),ind(XA)×(XB):(C:((XA)×(XB))𝒰)((a:XA)(b:XB)C((a,b)))(x:(XA)×(XB))C(x).λx.((pr1fx,pr3fx))f,(λx.a(x),λx.b(x))(a,b).

Mapping in, dependent.

((x:X)(A(x)×B(x)))((x:X)A(x))×((x:X)B(x))

Mapping out, non-dependent.

((A×B)C)(A(BC)).

Mapping out, dependent.

((w:A×B)C(w))((a:A)((b:B)C(a,b))).

Dependent ×

Mapping in, dependent.

Axiom of choice.

(x:X)((a:A(x))×B(x)(a))(a:(x:X)A(x))×((x:X)B(x)(a(x))).

Mapping out, dependent.

((b:(a:A)×B(a))C(b))((a:A)((b:B(a))C(a,b))).

+

(A+BC)(AC)×(BC).

𝟏

𝟎

?

((x:A)(p:a=x)B(x,p))B(a,refla).f:ACg:BCA×CB(a:A)×(b:B)(f(a)=g(b)).

Higher Inductive Types

𝕊1

'Circle'.

Formation Rule

𝕊1:𝒰.

Introduction Rules

base:𝕊1,loop:base=𝕊1base

Induction principle and dependent path

𝕀

'Interval'.

Formation Rule

𝕀:𝒰.

Introduction Rules

0𝕀:𝕀,1𝕀:𝕀,seg:0𝕀=𝕀1𝕀

Recursion Principle

Function Extensionality

Lemma

is-truncated2(𝕀).

Lemma

(f,g:AB)(a:Af(a)=g(a))(f=ABg).

Circle and Sphere

Lemma

loopbase.

Lemma

f:(x:𝕊1)(x=x),fxx.

Corollary

𝕊1:𝒰,is-truncated_1(𝒰)𝟎.

Lemma

f:AB,x,y:A,p,q:x=y,r:p=qapf2(p)f(p).

Lemma

P:A𝒰,x,y:A,p,q:x=y,r:p=q,u:P(x)transport2(r,u):p*(u)=q*(u).

Lemma

Suspension

  • N:ΣA,
  • S:ΣA,
  • merid:A(N=ΣAS).

Lemma

Σ𝟐S_1 .

Lemma

Lemma

A,(B,b0):UMap*(A+,B)(AB).

Lemma

(A,a0),(B,b0):𝒰Map*(ΣA,B)Map*(A,ΩB).

Cell Complex

Hub and Spoke

Pushout

Truncation

Lemma

(||A∪^CB||0E)coconeD(E).

Quotient

Algebra

Theorem

(F(A)GroupG)(AG).

Monoid

is-0-type(G)
  • (x,y)xy:G×GG,
  • 1:G,
  • (x:G)(x1=x)×(1x=x),
  • (x,y,z:G)x(yz)=(xy)z.

Group

  • xx1:GG,
  • (x:G)(xx1=1)×(x1x=1).

Flattening Lemma

General Syntax

Example

f:(X:𝒰)XX,fXidX,f2:22.a,b:K,σ:fK(a)fK(b).

Quotient

(a,b:A)×R(a,b)A.
  • q:AA/R,
  • (a,b:A)R(a,b)(q(a)=q(b)),
  • (x,y:A/R)(r,s:x=y)(r=s).

Integers

(a,b)(c,d)(a+d=b+c)Z(N×N)/.

Lemma

idempotentr:AA,x,y:A(r(x)=r(y))(xy)(A/)((x:A)×r(x)=x),q:A(A/),((A/)B)((g:AB)×x,y:A(xy)(g(x)=g(y))).

Corollary

Lemma

P:ZU,
  • d0:P(0),
  • d_+:(n:)P(n)P(succ(n)),
  • d_−:(n:)P(n)P(succ(n))
f:z:ZP(z),
  • f(0)=d0,
  • (n:)f(succ(n))=d_+(n,f(n)),
  • (n:)f(succ(n))=d_−(n,f(n)).

Corollary

p:a=a,npn:(n:)(a=a),p0a,pn+1pnpfor0n,pn1pnp1forn0.

Homotopy Type

Modal Homotopy Type Theory

Cohesive Homotopy Type Theory

References