2018.07.07 LFMTP Cubical Computational Type Carlo Angiuli Evan Cavallo Theory (*) Favonia Robert Harper & RedPRL Jonathan Sterling Todd Wilson >> redprl.org >> 1
Cubical features of homotopy type theory univalence, higher inductive types + Computational features of Nuprl and PVS strict equality, strict quotients, predicative subtypes... 2
Cartesian Cubical features of homotopy type theory univalence, higher inductive types + Computational features of Nuprl and PVS strict equality, strict quotients, predicative subtypes... 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 if(M,Mt,Mf) ↦ if(M',Mt,Mf) 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 ≈ bool 6
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality ≈ bool: {true, false} with syntactic equality ≈ bool 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 ≈ bool 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 ≈ bool A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' bool ≐ bool type if(true,bool,bool) ≐ bool type ⇓ bool 6
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality ≈ bool: {true, false} with syntactic equality ≈ bool A ≐ B type A ⇓ A' B ⇓ B' and A' ≈ B' bool ≐ bool type if(true,bool,bool) ≐ bool type ⇓ bool if(true,bool, any closed term ) ≐ 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 ≈ bool 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 ≈ bool 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 ≈ bool 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 ≈ bool a:A >> M ≐ N ∈ B P ≐ Q ∈ A implies M[P/a] ≐ N[Q/a] ∈ B[P/a] 8
A Minimum Example M := a | bool | true | false | if(M,M,M) types: {bool} with syntactic equality ≈ bool: {true, false} with syntactic equality ≈ bool a:A >> M ≐ N ∈ B P ≐ Q ∈ A implies M[P/a] ≐ N[Q/a] ∈ B[P/a] b:bool >> b ≐ if(b,true,false) ∈ bool? 8
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 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 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 9
Variables Nuprl/... Coq/Agda/... Vars range over Vars are indet. closed terms Defined by Defined by transition b/w conversion b/w closed terms open terms 10
Open-endedness Proof theory/tactics/editors Computational type theory Programming language 11
Open-endedness Proof theory/tactics/editors Computational type theory Programming language 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
Equality and Paths Equality ( ≡ ) Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M 13
Equality and Paths Equality ( ≡ ) Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M If A ≡ B and M : A then M : B 13
Equality and Paths Equality ( ≡ ) Silent in theory 2 + 3 ≡ 5 fst ⟨ M,N ⟩ ≡ M If A ≡ B and M : A then M : B Paths (=) Visible in theory If P : A=B and M : A then transport(M,P) : B 13
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 14
Features of HoTT Univalence If E is an equivalence between types A and B , then ua(E):A=B Higher Inductive Types circle sphere torus 15
Canonicity? Canonicity broken by new features stated as axioms! 16
Canonicity? Canonicity broken by new features stated as axioms! Canonicity For any M : bool , either M ≡ true : bool or M ≡ false : bool 16
Canonicity? Canonicity broken by new features stated as axioms! Canonicity For any M : bool , either M ≡ true : bool or M ≡ false : bool ua(not) : bool = bool transport(ua(not),true) ≢ false 16
Canonicity for All Canonicity for bool means canonicity for everyone 17
Canonicity for All Canonicity for bool means canonicity for everyone M : bool × A fst(M) ≡ ??? : bool 17
Canonicity for All Canonicity for bool means canonicity for everyone M : bool × A fst(M) ≡ ??? : bool Wants M ≡ ⟨ P,Q ⟩ and then fst(M) ≡ fst ⟨ P,Q ⟩ ≡ P ≡ true or false 17
Canonicity for Paths? M : A refl(M) : M = A M 18
Canonicity for Paths? M : A refl(M) : M = A M a:A ⊦ R : C(a,a,refl(a)) P : M = N path-ind[C](a.R,P) : C(M,N,P) 18
Canonicity for Paths? M : A refl(M) : M = A M a:A ⊦ R : C(a,a,refl(a)) P : M = N path-ind[C](a.R,P) : C(M,N,P) a:A ⊦ R : C(a,a,refl(a)) M : A path-ind[C](a.R,refl(M)) ≡ R[M/a] : C(M,M,refl(M)) 18
Canonicity for Paths? M : A refl(M) : M = A M a:A ⊦ R : C(a,a,refl(a)) P : M = N path-ind[C](a.R,P) : C(M,N,P) a:A ⊦ R : C(a,a,refl(a)) M : A path-ind[C](a.R,refl(M)) ≡ R[M/a] : C(M,M,refl(M)) path-ind[C](a.R,ua(E)) ≡ ??? 18
Restore Canonicity Can we have a new TT with canonicity + univalence? Yes with De Morgan cubes [CCHM 2016] Yes with Cartesian cubes [AFH 2017] ... and higher inductive types? Examples with De Morgan cubes [CHM 2018] Yes with Cartesian cubes [CH 2018] 19
Restore Canonicity Idea: each type manages its own paths 20
Restore Canonicity Idea: each type manages its own paths base : S1 base loop 20
Restore Canonicity Idea: each type manages its own paths base : S1 loop : base = base base loop 20
Restore Canonicity Idea: each type manages its own paths base : S1 loop : base = base base loop 20
Recommend
More recommend