2018.02.23 Penn Cubical Computational Type Carlo Angiuli Theory Evan Cavallo (*) Favonia & RedPRL Bob Harper Dan Licata >> redprl.org >> Jon Sterling Todd Wilson 1
Vladimir Voevodsky 1966-2017 2
Cubical & Computational features of homotopy type theory (HoTT) features of computational type theory (equality types, strict quotients, ...) 3
Computational Types programs/ realizers computation 4
Computational Types programs/ computational <----- realizers type theory computation theory of computation 4
Computational Types programs/ computational <----- realizers type theory computation theory of computation meaning Martin-Löf <---- explanation type theory pre-mathematical in M-L's work 4
A Minimum Example M := a | bool | true | false | if(M,M,M) 5
A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M 5
A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language 5
A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language What are the types in canonical forms? {bool} 5
A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language {bool} What are the types in canonical forms? What are the canonical forms of the types? bool: {true, false} 5
A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language {bool} What are the types in canonical forms? What are the canonical forms of the types? bool: {true, false} How they are equal? syntactic equality 5
A Minimum Example M := a | bool | true | false | if(M,M,M) bool val true val if(true,M,_) ↦ M false val if(false,_,M) ↦ M The Language {bool} What are the types in canonical forms? What are the canonical forms of the types? bool: {true, false} How they are equal? syntactic equality One Theory 5
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality 6
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' 6
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' bool ≐ bool type 6
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality M ≐ N ∈ A A ≐ A type, M ⇓ M', N ⇓ N', A ⇓ A' and M' ≈ A' N' 7
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality M ≐ N ∈ A A ≐ A type, M ⇓ M', N ⇓ N', A ⇓ A' and M' ≈ A' N' false ≐ false ∈ bool 7
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality M ≐ N ∈ A A ≐ A type, M ⇓ M', N ⇓ N', A ⇓ A' and M' ≈ A' N' false ≐ false ∈ bool if(true,true,bool) ≐ true ∈ if(true,bool,bool) ⇓ true ⇓ bool 7
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality a:A >> M ≐ N ∈ B P ≐ Q ∈ A implies M[P/a] ≐ N[Q/a] ∈ B 8
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality bool: {true, false} with syntactic equality a:A >> M ≐ N ∈ B P ≐ Q ∈ A implies M[P/a] ≐ N[Q/a] ∈ B b:bool >> b ≐ if(b,true,false) ∈ bool? 8
Variables In Nuprl and friends variables range over closed terms 9
Variables In Nuprl and friends variables range over closed terms In Coq, Agda, and friends variables are not subject to inductive analysis 9
Variables In Nuprl and friends variables range over closed terms In Coq, Agda, and friends variables are not subject to inductive analysis closed reduction ⇔ vars over closed terms open reduction ⇔ indeterminate vars 9
A Functional Example M := a | M1 ⟶ M2 | \a.M | M1 M2 | ... (M1 ⟶ M2) val \a.M val (\a.M1)M2 ↦ M1[M2/a] Another Language 10
A Functional Example M := a | M1 ⟶ M2 | \a.M | M1 M2 | ... (M1 ⟶ M2) val \a.M val (\a.M1)M2 ↦ M1[M2/a] Another Language What are the types in canonical forms? the least fixed point of S.({M ⟶ N | M ⇓ , N ⇓ in S} union ...) What are the canonical forms of the types? A ⟶ B: {\a.M} How they are equal? A1 ⟶ B1 ≈ A2 ⟶ B2 if A1 ≐ A2 and B1 ≐ B2 \a.M1 ≈ A ⟶ B \a.M2 if a:A >> M1 ≐ M2 ∈ B 10
Open-endedness 11
Open-endedness Open to new constructs 11
Open-endedness Open to new constructs Open to new theories for the same language 11
Open-endedness Open to new constructs Open to new theories for the same language Open to new proof theories (rules in proof assistants) for the same theory 11
Open-endedness Open to new constructs Open to new theories for the same language Open to new proof theories (rules in proof assistants) for the same theory Canonicity always holds 11
Homotopy Type Theory b a points 12
Homotopy Type Theory b p:a=b paths a q:a=b points 12
Homotopy Type Theory paths b between p:a=b paths h:p=q paths a q:a=b points 12
⋮ Homotopy Type Theory paths b between p:a=b paths h:p=q paths a q:a=b points 12
Homotopy Type Theory [Awodey and Warren] [Voevodsky et al ] [van den Berg and Garner] A Type Space a : A Element Point f : A → B Function Continuous Mapping C : A → Type Dependent Type Fibration a = A b Identification Path 13
Homotopy Type Theory Numerous results in homotopy theory mechanized through this. In some case new proofs were discovered and inspired new results. [Anel, Biedermann, Finster, Joyal] Extensive works in category theory and other fields. 14
Key Features of HoTT 1. Identifications as paths 2. Univalence: if e is an equivalence between A and B , then ua(e):A=B 3. Higher inductive types: generalized inductive types with (higher) path generators 15
Key Features of HoTT 1. Identifications as paths 2. Univalence: if e is an equivalence between A and B , then ua(e):A=B 3. Higher inductive types: generalized inductive types with (higher) path generators Problems: 1&2&3 give new identifications 15
The Poor Eliminator elim-path[a.C]( refl-case , path ) can only handle reflexivity coe(p:A=B,a:A):B coe(ua(e),a) is stuck 16
The Poor Eliminator elim-path[a.C]( refl-case , path ) can only handle reflexivity coe(p:A=B,a:A):B coe(ua(e),a) is stuck Solution each motive C handles paths itself 16
The Happy Eliminator elim-path[a.C]( refl-case , path ) each motive handles paths itself each type has cubical Kan structure [Bezem, Coquand, Huber] [Cohen, Coquand, Huber, Mörtberg] This work: extend Nuprl by cubical Kan structures [Angiuli, Harper, Wilson] [Angiuli, Harper] [Angiuli, Favonia, Harper] [Cavallo, Harper] 17
Cubical Programming dim expr r := 0 | 1 | x 0 x 1 somewhere 18
Cubical Programming dim expr r := 0 | 1 | x 0 x 1 somewhere n = 18
Circle base loop{x} 19
Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base loop{x} 19
Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base loop{x} S1 val 19
Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base val base loop{x} S1 val 19
Circle dim M := S1 | base | loop{r} expr | S1elim(a.M, M, M, x.M) | ... base val base loop{x} val loop{0} ↦ base loop{x} loop{1} ↦ base S1 val 19
Circle M ↦ M' S1elim(a.A, M, B, x.L) ↦ S1elim(a.A, M', B, x.L) base loop{x} S1 val 20
Circle M ↦ M' S1elim(a.A, M, B, x.L) ↦ S1elim(a.A, M', B, x.L) base S1elim(a.A, base, B, x._) loop{x} ↦ B S1 val 20
Circle M ↦ M' S1elim(a.A, M, B, x.L) ↦ S1elim(a.A, M', B, x.L) base S1elim(a.A, base, B, x._) loop{x} ↦ B S1 val S1elim(a.A, loop{x}, _, y.L) ↦ L<x/y> 20
Kan 1/2: Coercion M x ∈ x.A 21
Kan 1/2: Coercion coe{0 ⟶ 1} (x.A,M) M x ∈ ∈ x.A 21
Kan 1/2: Coercion coe{0 ⟶ 1} (x.A,M) M x ∈ ∈ x.A coe{r ⟶ r'}(x.A, M) ∈ A<r'/x> ∈ A<r/x> 21
Kan 2/2: Homogeneous Composition N 0 N 1 y x M 22
Kan 2/2: Homogeneous Composition hcom{0 ⟶ 1}(A,M) [x=0 ⟶ y.N 0 , x=1 ⟶ y.N 1 ] N 0 N 1 y x M 22
Kan 2/2: Homogeneous Composition hcom{0 ⟶ 1}(A,M) [x=0 ⟶ y.N 0 , x=1 ⟶ y.N 1 ] N 0 N 1 y x M hcom{r ⟶ r'}(A, M) [..., r i =r' i ⟶ y.N i , ...] 22
Recommend
More recommend