towards the syntax and semantics of higher dimensional ... · the goal: type theory in type theory...

22
Towards the syntax and semantics of higher dimensional type theory Thorsten Altenkirch Nicolai Kraus Oxford, HoTT/UF’18, 8 July [picture by Andrej Bauer, (CC BY-SA 2.5 SI)]

Upload: others

Post on 01-Jun-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Towards the syntax and semanticsof higher dimensional type theory

Thorsten AltenkirchNicolai Kraus

Oxford, HoTT/UF’18, 8 July

[picture by Andrej Bauer, (CC BY-SA 2.5 SI)]

Page 2: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

The goal: type theory in type theory

Plan: develop the metatheory of type theory in type theoryWhy?

I A foundation should be able to model itself.I “Template meta-programming”, this problem is in some

sense universal.I Specify HITs.I . . . ?

Page 3: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

The goal: type theory in type theory

typesignatures

HIIT

constructors

Con : UTy : Con→ UTm : ΠΓ : Con.Ty(Γ)→ UTms : Con→ Con→ U...

Pi : ΠA : Ty(Γ), B : Ty(Γ.A).Ty(Γ)

...lam : Tm(Γ.A,B)→ Tm(Γ,Pi(A,B))

app : Tm(Γ,Pi(A,B))→ Tm(Γ.A,B)

...β : Πt : Tm(Γ.A,B).app(lam(t)) = t

Page 4: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Past work. . .Altenkirch-Kaposi, POPL 2016:Type theory in type theory using quotient inductive types

But this was done assuming UIP/K. How to do it in HoTT?

Why not just set-truncate everything?

Breaks when we want to define the “standard model”, i.e.functions con : Con→ U

ty : (Γ : Con)→ con(Γ)→ Ty(γ)→ Utms : . . .

tm : . . .

Page 5: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Past work. . .Altenkirch-Kaposi, POPL 2016:Type theory in type theory using quotient inductive types

But this was done assuming UIP/K. How to do it in HoTT?

Why not just set-truncate everything?

Breaks when we want to define the “standard model”, i.e.functions con : Con→ U

ty : (Γ : Con)→ con(Γ)→ Ty(γ)→ Utms : . . .

tm : . . .

Page 6: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Categories with familiesA category with families (CwF) is given by:

I A category of contexts and substitutions Con.I A presheaf of types Ty : Conop → U

I A presheaf of terms over contexts and types∫

Tyop → UI . . .

The “quotient inductive-inductive type” (QIIT) from beforedefines the initial CwF.

Thorsten’s plan for the “HoTT in HoTT” problem:Just replace “category” by “(∞, 1)-category” and replace all no-tions by the relevant ∞-notions. The syntax will still be a setbecause the sytax will still have decidable equality. Done.

The End (of the part where Italk about Thorsten’s ideas).

Page 7: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Categories with familiesA category with families (CwF) is given by:

I A category of contexts and substitutions Con.I A presheaf of types Ty : Conop → U

I A presheaf of terms over contexts and types∫

Tyop → UI . . .

The “quotient inductive-inductive type” (QIIT) from beforedefines the initial CwF.

Thorsten’s plan for the “HoTT in HoTT” problem:Just replace “category” by “(∞, 1)-category” and replace all no-tions by the relevant ∞-notions. The syntax will still be a setbecause the sytax will still have decidable equality. Done.

The End (of the part where Italk about Thorsten’s ideas).

Page 8: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

What are ∞-categories in HoTT?Independently of type theory:

∞-categories(Boardman-Vogt /Joyal / Lurie)

completeSegal spaces(Rezk)

complete semi-Segal spaces

based on∆op → Set

based on∆op → Spaces

based on∆op

+ → Spaces

Joyal-Tierney Harpaz

Works well in type theory!Capriotti-Kraus, POPL 2018:Higher univalent categoriesvia complete semi-Segal types

Page 9: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

What are ∞-categories in HoTT?Independently of type theory:

∞-categories(Boardman-Vogt /Joyal / Lurie)

completeSegal spaces(Rezk)

complete semi-Segal spaces

based on∆op → Set

based on∆op → Spaces

based on∆op

+ → Spaces

Joyal-Tierney Harpaz

Works well in type theory!Capriotti-Kraus, POPL 2018:Higher univalent categoriesvia complete semi-Segal types

Page 10: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

How do complete semi-Segal types work?

I First, we need A : ∆op+ → U ; encoding the Reedy fibrant

ones is very natural in type theory (semisimplicial types):A0 : UA1 : A0 → A0 → UA2 : (x, y, z : A0)→ A1(x, y)→ A1(y, z)→ A1(x, z)→ U

I Add the Segal condition: For any inner horn, the type offillers is contractible.

(composition!)

(associativity!)

Page 11: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

How do complete semi-Segal types work?

I First, we need A : ∆op+ → U ; encoding the Reedy fibrant

ones is very natural in type theory (semisimplicial types):A0 : UA1 : A0 → A0 → UA2 : (x, y, z : A0)→ A1(x, y)→ A1(y, z)→ A1(x, z)→ U

I Add the Segal condition: For any inner horn, the type offillers is contractible.

(composition!)

(associativity!)

Page 12: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

How do complete semi-Segal types work? (2)

I Identities via Harpaz’ (Lurie’s) trick.Definition: f : A1(x, y) is an equivalence if − ◦ f andf ◦ − are equivalences.Condition: exactly one outgoing equivalence for everyobject.

Πx : A0, isContr(Σ(y : A0), (e : A1(x, y)), isequiv(e))

I Construct identities:

x x

y

x x

y

(identity found!)

⇒ This gives univalent (∞, 1)-categories. (Can removeunivalence by removing isContr.)

Page 13: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

How do complete semi-Segal types work? (2)

I Identities via Harpaz’ (Lurie’s) trick.Definition: f : A1(x, y) is an equivalence if − ◦ f andf ◦ − are equivalences.Condition: exactly one outgoing equivalence for everyobject.

Πx : A0, isContr(Σ(y : A0), (e : A1(x, y)), isequiv(e))

I Construct identities:

x x

y

x x

y

(identity found!)

⇒ This gives univalent (∞, 1)-categories. (Can removeunivalence by removing isContr.)

Page 14: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

How do complete semi-Segal types work? (2)

I Identities via Harpaz’ (Lurie’s) trick.Definition: f : A1(x, y) is an equivalence if − ◦ f andf ◦ − are equivalences.Condition: exactly one outgoing equivalence for everyobject.

Πx : A0, isContr(Σ(y : A0), (e : A1(x, y)), isequiv(e))

I Construct identities:

x x

y

x x

y

(identity found!)

⇒ This gives univalent (∞, 1)-categories. (Can removeunivalence by removing isContr.)

Page 15: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

What if we want an explicit identity structure?Try again to define simplicial types. Two possibilities are givenin:

Kraus-Sattler 2017:Space-valued diagrams, type-theoretically

Possibility 1: a directreplacement of ∆ whichis finite if restricted tofinite levels.

(1) (1, 1) (1, 1, 1)

(2) (2, 1)(1, 2)

(3)

Page 16: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Direct replacement of ∆

(1) (1, 1) (1, 1, 1)

(2) (2, 1)(1, 2)

(3)A(1) : UA(1,1) : A(1) → A(1) → UA(1,1,1) : (x, y, z : A(1))→ A(1,1)(x, y)

→ A(1,1)(y, z)→ A(1,1)(x, z)→ UA(2) : (x : A(1))→ A(1,1)(x, x)→ Uh(2) : (x : A(1))→ isContr(Σ(l : A(1,1)(x, x), A(2)(x, l)))

. . . . . . . . .

Page 17: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Homotopy coherent diagrams

Second possibility to get “simplicial types”: Write downfunctors ∆op → U with all coherences.

This can be done by looking at the nerve of ∆op:I a type for every [n] : ∆op

I a function for every [n]f−→ [m]

I a commutative triangle for every [n]f−→ [m]

g−→ [k]

I a tetrahedron for every [n]f−→ [m]

g−→ [k]h−→ [j]

I . . . . . .Note: Similar constructions have been used before for higher

categories (“D construction”), e.g. Rădulescu-Banu’09,Szumiło’14.

I plus: every [n]id−→ [n] is mapped to an equivalence

Page 18: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Homotopy coherent diagrams

Second possibility to get “simplicial types”: Write downfunctors ∆op → U with all coherences.

This can be done by looking at the nerve of ∆op:I a type for every [n] : ∆op

I a function for every [n]f−→ [m]

I a commutative triangle for every [n]f−→ [m]

g−→ [k]

I a tetrahedron for every [n]f−→ [m]

g−→ [k]h−→ [j]

I . . . . . .Note: Similar constructions have been used before for higher

categories (“D construction”), e.g. Rădulescu-Banu’09,Szumiło’14.

I plus: every [n]id−→ [n] is mapped to an equivalence

Page 19: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Homotopy coherent diagrams

Second possibility to get “simplicial types”: Write downfunctors ∆op → U with all coherences.

This can be done by looking at the nerve of ∆op:I a type for every [n] : ∆op

I a function for every [n]f−→ [m]

I a commutative triangle for every [n]f−→ [m]

g−→ [k]

I a tetrahedron for every [n]f−→ [m]

g−→ [k]h−→ [j]

I . . . . . .Note: Similar constructions have been used before for higher

categories (“D construction”), e.g. Rădulescu-Banu’09,Szumiło’14.

I plus: every [n]id−→ [n] is mapped to an equivalence

Page 20: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Higher categories without univalence

Result:These two notions of simplicial types are equivalent.

We can use either of them to define (∞, 1)-categories(without built-in univalence).

Now we can go back and attempt to construct what Thorstensuggested.

The End (of the talk).

Page 21: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

Higher categories without univalence

Result:These two notions of simplicial types are equivalent.

We can use either of them to define (∞, 1)-categories(without built-in univalence).

Now we can go back and attempt to construct what Thorstensuggested.

The End (of the talk).

Page 22: Towards the syntax and semantics of higher dimensional ... · The goal: type theory in type theory type signatures HIIT constructors Con : U Ty : Con !U Tm : : Con :Ty() !U Tms :

ReferencesThorsten Altenkirch and Ambrus Kaposi.Type theory in type theory using quotient inductive types.POPL’16, 2016.

Danil Annenkov, Paolo Capriotti, and Nicolai Kraus.Two-level type theory and applications.ArXiv e-prints, 2017.

Paolo Capriotti and Nicolai Kraus.Univalent higher categories via complete semi-segal types.POPL’18, 2017.

Yonatan Harpaz.Quasi-unital ∞–categories.Algebraic & Geometric Topology, 2015.

André Joyal.The theory of quasi-categories and its applications.2008.

André Joyal and Myles Tierney.Quasi-categories vs segal spaces.Contemp. Math, 2006.

Nicolai Kraus and Christian Sattler.Space-valued diagrams, type-theoretically.ArXiv e-prints, 2017.

Jacob Lurie.Higher Topos Theory.2009.