Cubical Syntax for Reflection-Free Extensional Equality
FSCD 2019 Jonathan Sterling1 Carlo Angiuli1 Daniel Gratzer2
1Carnegie Mellon University 2Aarhus University 1 / 32
Cubical Syntax for Reflection-Free Extensional Equality Jonathan - - PowerPoint PPT Presentation
FSCD 2019 Cubical Syntax for Reflection-Free Extensional Equality Jonathan Sterling 1 Carlo Angiuli 1 Daniel Gratzer 2 1 Carnegie Mellon University 2 Aarhus University 1 / 32 () type need to consider equality of types:
FSCD 2019 Jonathan Sterling1 Carlo Angiuli1 Daniel Gratzer2
1Carnegie Mellon University 2Aarhus University 1 / 32
... is about families!
π¦ βΆ π΅ β’ πΆ(π¦) type π¦ βΆ π΅ β’ π(π¦) βΆ πΆ(π¦)
need to consider equality of types: if π΅ = πΆ type, then elements of π΅ should be elements of πΆ. types depend on elements, so equality of elements necessary too. not all equations can be made automatic, so a language of proofs must account for coercions.
2 / 32
... is about families!
π¦ βΆ π΅ β’ πΆ(π¦) type π¦ βΆ π΅ β’ π(π¦) βΆ πΆ(π¦)
need to consider equality of types: if π΅ = πΆ type, then elements of π΅ should be elements of πΆ. types depend on elements, so equality of elements necessary too. not all equations can be made automatic, so a language of proofs must account for coercions.
2 / 32
... is about families!
π¦ βΆ π΅ β’ πΆ(π¦) type π¦ βΆ π΅ β’ π(π¦) βΆ πΆ(π¦)
need to consider equality of types: if π΅ = πΆ type, then elements of π΅ should be elements of πΆ. types depend on elements, so equality of elements necessary too. not all equations can be made automatic, so a language of proofs must account for coercions.
2 / 32
... is about families!
π¦ βΆ π΅ β’ πΆ(π¦) type π¦ βΆ π΅ β’ π(π¦) βΆ πΆ(π¦)
need to consider equality of types: if π΅ = πΆ type, then elements of π΅ should be elements of πΆ. types depend on elements, so equality of elements necessary too. not all equations can be made automatic, so a language of proofs must account for coercions.
2 / 32
... is about families!
π¦ βΆ π΅ β’ πΆ(π¦) type π¦ βΆ π΅ β’ π(π¦) βΆ πΆ(π¦)
need to consider equality of types: if π΅ = πΆ type, then elements of π΅ should be elements of πΆ. types depend on elements, so equality of elements necessary too. not all equations can be made automatic, so a language of proofs must account for coercions.
2 / 32
what equations can be made automatic? surely π½/π/πΎ, and type theorists also know how to automate π/π/π/ β¦
π¦ βΆ π΅ Γ πΆ β’ π βΆ πΊ(π¦)
ifg
π¦ βΆ π΅ Γ πΆ β’ π βΆ πΊ(β¨π¦.1, π¦.2β©)
3 / 32
what equations can be made automatic? surely π½/π/πΎ, and type theorists also know how to automate π/π/π/ β¦
π¦ βΆ π΅ Γ πΆ β’ π βΆ πΊ(π¦)
ifg
π¦ βΆ π΅ Γ πΆ β’ π βΆ πΊ(β¨π¦.1, π¦.2β©)
3 / 32
π βΆ nat β’ πΊ(π) typeβ¦
1βequality reflectionβ just pushes the problem elsewhere and makes it worse! unlike many, I
speak from experience.
4 / 32
π βΆ nat β’ πΊ(π) typeβ¦ π βΆ nat β’ π βΆ πΊ(π + 1)
ifg???
π βΆ nat β’ π βΆ πΊ(1 + π)
1βequality reflectionβ just pushes the problem elsewhere and makes it worse! unlike many, I
speak from experience.
4 / 32
π βΆ nat β’ πΊ(π) typeβ¦ π βΆ nat β’ π βΆ πΊ(π + 1)
ifg
π βΆ nat β’ coeπΊ(β)(π, π) βΆ πΊ(1 + π)
1βequality reflectionβ just pushes the problem elsewhere and makes it worse! unlike many, I
speak from experience.
4 / 32
π βΆ nat β’ πΊ(π) typeβ¦ π βΆ nat β’ π βΆ πΊ(π + 1)
ifg
π βΆ nat β’ coeπΊ(β)(π, π) βΆ πΊ(1 + π)
1βequality reflectionβ just pushes the problem elsewhere and makes it worse! unlike many, I
speak from experience.
4 / 32
π βΆ nat β’ πΊ(π) typeβ¦ π βΆ nat β’ π βΆ πΊ(π + 1)
ifg
π βΆ nat β’ coeπΊ(β)(π, π) βΆ πΊ(1 + π)
1βequality reflectionβ just pushes the problem elsewhere and makes it worse! unlike many, I
speak from experience.
4 / 32
Altenkirch and McBride [AM06]. Towards Observational Type Theory. Altenkirch, McBride, and Swierstra [AMS07]. βObservational Equality, Now!β
program, by recursion on type codes π΅, πΆ Eq(πΊ0 βΆ π΅0 β πΆ0, πΊ1 βΆ π΅1 β πΆ1) =
(π¦0 βΆ π΅0)(π¦1 βΆ π΅1)(Μ π¦ βΆ Eq(π¦0 βΆ π΅0, π¦1 βΆ π΅1)) β Eq(πΊ0(π¦0) βΆ πΆ0, πΊ1(π¦1) βΆ πΆ1)
(funext)
π = π βΆ Eq(π0 βΆ π΅0, π1 βΆ π΅1)
irrelevance (see Altenkirch, McBride, and Swierstra [AMS07])
5 / 32
Altenkirch and McBride [AM06]. Towards Observational Type Theory. Altenkirch, McBride, and Swierstra [AMS07]. βObservational Equality, Now!β
program, by recursion on type codes π΅, πΆ Eq(πΊ0 βΆ π΅0 β πΆ0, πΊ1 βΆ π΅1 β πΆ1) =
(π¦0 βΆ π΅0)(π¦1 βΆ π΅1)(Μ π¦ βΆ Eq(π¦0 βΆ π΅0, π¦1 βΆ π΅1)) β Eq(πΊ0(π¦0) βΆ πΆ0, πΊ1(π¦1) βΆ πΆ1)
(funext)
π = π βΆ Eq(π0 βΆ π΅0, π1 βΆ π΅1)
irrelevance (see Altenkirch, McBride, and Swierstra [AMS07])
5 / 32
Altenkirch and McBride [AM06]. Towards Observational Type Theory. Altenkirch, McBride, and Swierstra [AMS07]. βObservational Equality, Now!β
program, by recursion on type codes π΅, πΆ Eq(πΊ0 βΆ π΅0 β πΆ0, πΊ1 βΆ π΅1 β πΆ1) =
(π¦0 βΆ π΅0)(π¦1 βΆ π΅1)(Μ π¦ βΆ Eq(π¦0 βΆ π΅0, π¦1 βΆ π΅1)) β Eq(πΊ0(π¦0) βΆ πΆ0, πΊ1(π¦1) βΆ πΆ1)
(funext)
π = π βΆ Eq(π0 βΆ π΅0, π1 βΆ π΅1)
irrelevance (see Altenkirch, McBride, and Swierstra [AMS07])
5 / 32
Altenkirch and McBride [AM06]. Towards Observational Type Theory. Altenkirch, McBride, and Swierstra [AMS07]. βObservational Equality, Now!β
program, by recursion on type codes π΅, πΆ Eq(πΊ0 βΆ π΅0 β πΆ0, πΊ1 βΆ π΅1 β πΆ1) =
(π¦0 βΆ π΅0)(π¦1 βΆ π΅1)(Μ π¦ βΆ Eq(π¦0 βΆ π΅0, π¦1 βΆ π΅1)) β Eq(πΊ0(π¦0) βΆ πΆ0, πΊ1(π¦1) βΆ πΆ1)
(funext)
π = π βΆ Eq(π0 βΆ π΅0, π1 βΆ π΅1)
irrelevance (see Altenkirch, McBride, and Swierstra [AMS07])
5 / 32
Altenkirch and McBride [AM06]. Towards Observational Type Theory. Altenkirch, McBride, and Swierstra [AMS07]. βObservational Equality, Now!β
program, by recursion on type codes π΅, πΆ Eq(πΊ0 βΆ π΅0 β πΆ0, πΊ1 βΆ π΅1 β πΆ1) =
(π¦0 βΆ π΅0)(π¦1 βΆ π΅1)(Μ π¦ βΆ Eq(π¦0 βΆ π΅0, π¦1 βΆ π΅1)) β Eq(πΊ0(π¦0) βΆ πΆ0, πΊ1(π¦1) βΆ πΆ1)
(funext)
π = π βΆ Eq(π0 βΆ π΅0, π1 βΆ π΅1)
irrelevance (see Altenkirch, McBride, and Swierstra [AMS07])
5 / 32
goal: find smaller set of primitives which systematically generate (something in the spirit of) OTT idea: start with Cartesian cubical type theory [ABCFHL], restrict to Bishop sets Γ la Coquand [Coq17]
the XTT paper
Sterling, Angiuli, and Gratzer [SAG19]. βCubical Syntax for Reflection-Free Extensional Equalityβ. Formal Structures for Computation and Deduction (FSCD 2019).
6 / 32
rather than defining heterogeneous equality by recursion on type structure, define dependent equality all at once using a formal interval:
0, 1 βΆ π
eq formation
π βΆ π β’ π΅ βΆ Type π βΆ π΅[0] π βΆ π΅[1]
Eqπ.π΅[π](π, π) βΆ Type
eq introduction
π βΆ π β’ π[π] βΆ π΅[π] π[0] = π0 βΆ π΅[0] π[1] = π1 βΆ π΅[1] ππ.π[π] βΆ Eqπ.π΅[π](π0, π1)
eq elimination
π βΆ Eqπ.π΅[π](π0, π1) π βΆ π π(π ) βΆ π΅[π ] π(0) = π0 βΆ π΅[0] π(1) = π1 βΆ π΅[1]
(along with more πΎ, π rules, etc.)
7 / 32
we have function extensionality by swapping quantifiers:
πΊ0, πΊ1 βΆ π΅ β πΆ π βΆ (π¦ βΆ π΅) β Eq_.πΆ(πΊ0(π¦), πΊ1(π¦)) ππ.ππ¦.π (π¦)(π) βΆ Eq_.π΅βπΆ(πΊ0, πΊ1) β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
8 / 32
given a cube π βΆ Eq_.Type(π΅, πΆ), we can coerce from π΅ to πΆ:
π βΆ Eq_.Type(π΅, πΆ) π βΆ π΅ [π.π (π)] β0
1 π βΆ πΆ
but how is π related to [π.π·[π]] β0
1 π?
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] ππ.[π.π·[π]] β0
π π βΆ Eqπ.π·[π](π, [π.π·[π]] β0 1 π)
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
9 / 32
given a cube π βΆ Eq_.Type(π΅, πΆ), we can coerce from π΅ to πΆ:
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] [π.π·[π]] β0
1 π βΆ π·[1]
but how is π related to [π.π·[π]] β0
1 π?
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] ππ.[π.π·[π]] β0
π π βΆ Eqπ.π·[π](π, [π.π·[π]] β0 1 π)
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
9 / 32
given a cube π βΆ Eq_.Type(π΅, πΆ), we can coerce from π΅ to πΆ:
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] [π.π·[π]] β0
1 π βΆ π·[1]
but how is π related to [π.π·[π]] β0
1 π?
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] ππ.[π.π·[π]] β0
π π βΆ Eqπ.π·[π](π, [π.π·[π]] β0 1 π)
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
9 / 32
given a cube π βΆ Eq_.Type(π΅, πΆ), we can coerce from π΅ to πΆ:
π , π β² βΆ π π βΆ π β’ π·[π] βΆ Type π βΆ π·[π ] [π.π·[π]] βπ
π β² π βΆ π·[π β²]
but how is π related to [π.π·[π]] β0
1 π? by another equation.
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] ππ.[π.π·[π]] β0
π π βΆ Eqπ.π·[π](π, [π.π·[π]] β0 1 π)
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
9 / 32
given a cube π βΆ Eq_.Type(π΅, πΆ), we can coerce from π΅ to πΆ:
π , π β² βΆ π π βΆ π β’ π·[π] βΆ Type π βΆ π·[π ] [π.π·[π]] βπ
π β² π βΆ π·[π β²]
but how is π related to [π.π·[π]] β0
1 π? by another equation.
π βΆ π β’ π·[π] βΆ Type π βΆ π·[0] ππ.[π.π·[π]] β0
π π βΆ Eqπ.π·[π](π, [π.π·[π]] β0 1 π)
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
9 / 32
allow either zero or two faces to be attached:
π , π β², π‘ βΆ π π βΆ π β’ π΅[π] βΆ Type π βΆ π΅[π ] π‘ = 0, π βΆ π β’ π0 βΆ π΅[π β²] π‘ = 1, π βΆ π β’ π1 βΆ π΅[π β²] [π.π΅[π]] βπ
π β² π [π‘ = 0 β π.π0 β£ π‘ = 1 β π.π1] βΆ π΅[π β²]
implements symmetry, transitivity, coercion in Eqπ.π΅(π, π)
βΉ generalizes several primitives of OTT simultaneously
like OTT, deciding equality of coercions requires inductive-recursive universe
10 / 32
allow either zero or two faces to be attached:
π , π β², π‘ βΆ π π βΆ π β’ π΅[π] βΆ Type π βΆ π΅[π ] π‘ = 0, π βΆ π β’ π0 βΆ π΅[π β²] π‘ = 1, π βΆ π β’ π1 βΆ π΅[π β²] [π.π΅[π]] βπ
π β² π [π‘ = 0 β π.π0 β£ π‘ = 1 β π.π1] βΆ π΅[π β²]
implements symmetry, transitivity, coercion in Eqπ.π΅(π, π)
βΉ generalizes several primitives of OTT simultaneously
like OTT, deciding equality of coercions requires inductive-recursive universe
10 / 32
in OTT, we always have π 0 = π 1 βΆ Eq(π βΆ π΅, π βΆ πΆ); we achieve this modularly using a boundary separation2 rule:
π βΆ π π = 0 β’ π = π βΆ π΅ π = 1 β’ π = π βΆ π΅ π = π βΆ π΅
(does not mention equality type!!) given π 0, π 1 βΆ Eqπ.π΅(π, π), we have π 0 = π 1 βΆ Eqπ.π΅(π, π) by the πΎ, π, π rules of the equality type, together with boundary separation.
2(it is a presheaf separation condition for a certain coverage on the category of contexts) 11 / 32
5 second cofgee break
12 / 32
we used to study the metatheory of presentations of type theories, not of type theories.
determinate notion of model, nor interpretation) 2.
13 / 32
we used to study the metatheory of presentations of type theories, not of type theories.
determinate notion of model, nor interpretation)
13 / 32
we used to study the metatheory of presentations of type theories, not of type theories.
determinate notion of model, nor interpretation)
13 / 32
we used to study the metatheory of presentations of type theories, not of type theories.
determinate notion of model, nor interpretation)
2.1 operational semantics 2.2 PER βmodelβ of type theory 2.3 logical relation between syntax and PER βmodelβ
(βΌ 200 pages of work)
13 / 32
we used to study the metatheory of presentations of type theories, not of type theories.
determinate notion of model, nor interpretation)
2.1 operational semantics 2.2 PER βmodelβ of type theory 2.3 logical relation between syntax and PER βmodelβ
(βΌ 200 pages of work)
13 / 32
we used to study the metatheory of presentations of type theories, not of type theories.
determinate notion of model, nor interpretation)
2.1 operational semantics 2.2 PER βmodelβ of type theory 2.3 logical relation between syntax and PER βmodelβ
(βΌ 200 pages of work)
actually this is totally intractable to do more than once! letβs bootstrap it a difgerent way.
13 / 32
a new (old) syntax-invariant approach to metatheory
Uem19]; presentations considered up to isomorphism
initial object (soundness and completeness); initial algebra is covered by fully-annotated De Bruijn syntax (but this doesnβt matter)
initial π-algebra using categorical gluing/logical families [Coq18]3
(using the above) the language of category theory makes each of the preceding steps βeasyβ, and independent of syntax / representation details. no raw terms, no PERs.
3See also Coquand, Huber, and Sattler [CHS19], Kaposi, Huber, and Sattler [KHS19], and
Shulman [Shu15].
14 / 32
a new (old) syntax-invariant approach to metatheory
Uem19]; presentations considered up to isomorphism
initial object (soundness and completeness); initial algebra is covered by fully-annotated De Bruijn syntax (but this doesnβt matter)
initial π-algebra using categorical gluing/logical families [Coq18]3
(using the above) the language of category theory makes each of the preceding steps βeasyβ, and independent of syntax / representation details. no raw terms, no PERs.
3See also Coquand, Huber, and Sattler [CHS19], Kaposi, Huber, and Sattler [KHS19], and
Shulman [Shu15].
14 / 32
a new (old) syntax-invariant approach to metatheory
Uem19]; presentations considered up to isomorphism
initial object (soundness and completeness); initial algebra is covered by fully-annotated De Bruijn syntax (but this doesnβt matter)
initial π-algebra using categorical gluing/logical families [Coq18]3
(using the above) the language of category theory makes each of the preceding steps βeasyβ, and independent of syntax / representation details. no raw terms, no PERs.
3See also Coquand, Huber, and Sattler [CHS19], Kaposi, Huber, and Sattler [KHS19], and
Shulman [Shu15].
14 / 32
a new (old) syntax-invariant approach to metatheory
Uem19]; presentations considered up to isomorphism
initial object (soundness and completeness); initial algebra is covered by fully-annotated De Bruijn syntax (but this doesnβt matter)
initial π-algebra using categorical gluing/logical families [Coq18]3
(using the above) the language of category theory makes each of the preceding steps βeasyβ, and independent of syntax / representation details. no raw terms, no PERs.
3See also Coquand, Huber, and Sattler [CHS19], Kaposi, Huber, and Sattler [KHS19], and
Shulman [Shu15].
14 / 32
a new (old) syntax-invariant approach to metatheory
Uem19]; presentations considered up to isomorphism
initial object (soundness and completeness); initial algebra is covered by fully-annotated De Bruijn syntax (but this doesnβt matter)
initial π-algebra using categorical gluing/logical families [Coq18]3
(using the above) the language of category theory makes each of the preceding steps βeasyβ, and independent of syntax / representation details. no raw terms, no PERs.
3See also Coquand, Huber, and Sattler [CHS19], Kaposi, Huber, and Sattler [KHS19], and
Shulman [Shu15].
14 / 32
a new (old) syntax-invariant approach to metatheory
Uem19]; presentations considered up to isomorphism
initial object (soundness and completeness); initial algebra is covered by fully-annotated De Bruijn syntax (but this doesnβt matter)
initial π-algebra using categorical gluing/logical families [Coq18]3
(using the above) the language of category theory makes each of the preceding steps βeasyβ, and independent of syntax / representation details. no raw terms, no PERs.
3See also Coquand, Huber, and Sattler [CHS19], Kaposi, Huber, and Sattler [KHS19], and
Shulman [Shu15].
14 / 32
to warm up, we proved canonicity for XTT using a cubical gluing technique (independently proposed by Awodey).
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff. use βcubical versionβ of global sections functor (cubical nerve). first we need to understand XTTβs structure.
15 / 32
to warm up, we proved canonicity for XTT using a cubical gluing technique (independently proposed by Awodey).
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff. use βcubical versionβ of global sections functor (cubical nerve). first we need to understand XTTβs structure.
15 / 32
Ξ¨ β£ Ξ β’ π βΆ π΅
El Ty βΆ Pr(β)
Ξ¨ cube+
+ βΆ Cat
Ξ¨ β£ Ξ ctx β
+
u
Ξ¨ β£ Ξ β’ π΅ type βop
Set
Ty
16 / 32
Ξ¨ β£ Ξ β’ π βΆ π΅
El Ty βΆ Pr(β)
Ξ¨ cube+
β‘+ βΆ Cat
Ξ¨ β£ Ξ ctx β
+
u
Ξ¨ β£ Ξ β’ π΅ type βop
Set
Ty
16 / 32
Ξ¨ β£ Ξ β’ π βΆ π΅
El Ty βΆ Pr(β)
Ξ¨ cube+
β‘+ βΆ Cat
Ξ¨ β£ Ξ ctx β
β‘+ u
Ξ¨ β£ Ξ β’ π΅ type βop
Set
Ty
16 / 32
Ξ¨ β£ Ξ β’ π βΆ π΅
El Ty βΆ Pr(β)
Ξ¨ cube+
β‘+ βΆ Cat
Ξ¨ β£ Ξ ctx β
β‘+ u
Ξ¨ β£ Ξ β’ π΅ type βop
Set
Ty
16 / 32
Ξ¨ β£ Ξ β’ π βΆ π΅
El Ty βΆ Pr(β)
Ξ¨ cube+
β‘+ βΆ Cat
Ξ¨ β£ Ξ ctx β
β‘+ u
Ξ¨ β£ Ξ β’ π΅ type βop
Set
Ty
16 / 32
idea: consider empty Ξ, arbitrary Ξ¨; βcubicalβ version of closed terms
Ξ¨ β£ β β’ π βΆ π΅
define for each Ξ¨ β£ β β’ π΅ type a family of βcomputability proofsβ over each
π βΆ π΅; must live in Pr(
+). +
β
i
Ξ¨ Ξ¨ β£ β
βcubical global sections functorβ is a nerve β Pr(
+) N
,4 restricting the Yoneda embedding to purely cubical contexts: N(Ξ) = β[i(β), Ξ]
4proposed by Awodey in 2015; analogous to Fioreβs relative hom functor in NbE (2002) 17 / 32
idea: consider empty Ξ, arbitrary Ξ¨; βcubicalβ version of closed terms
Ξ¨ β£ β β’ π βΆ π΅
define for each Ξ¨ β£ β β’ π΅ type a family of βcomputability proofsβ over each
π βΆ π΅; must live in Pr(β‘+).
β‘+
β
i
Ξ¨ Ξ¨ β£ β
βcubical global sections functorβ is a nerve β Pr(
+) N
,4 restricting the Yoneda embedding to purely cubical contexts: N(Ξ) = β[i(β), Ξ]
4proposed by Awodey in 2015; analogous to Fioreβs relative hom functor in NbE (2002) 17 / 32
idea: consider empty Ξ, arbitrary Ξ¨; βcubicalβ version of closed terms
Ξ¨ β£ β β’ π βΆ π΅
define for each Ξ¨ β£ β β’ π΅ type a family of βcomputability proofsβ over each
π βΆ π΅; must live in Pr(β‘+).
β‘+
β
i
Ξ¨ Ξ¨ β£ β
βcubical global sections functorβ is a nerve β Pr(β‘+)
N
,4 restricting the Yoneda embedding to purely cubical contexts: N(Ξ) = β[i(β), Ξ]
4proposed by Awodey in 2015; analogous to Fioreβs relative hom functor in NbE (2002) 17 / 32
Ξ βΆ Μ β is a context Ξ βΆ β together with a computability
family Ξβ’ βΆ N(Ξ) β U internal to Pr(β‘+).
Ξ Μ Ξ
Μ πΏ
is a substitution Ξ
Ξ
πΏ
together with a realizer πΏβ’ βΆ βπβΆN(Ξ) βπβ’βΆΞβ’π Ξβ’(πΏπ).
π΅ β Ty(Μ Ξ) has a type π΅ β Ty(Ξ) together with a computability
family π΅β’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ N(π΅πΏ) β U.5
π β El(Μ Ξ, Μ π΅) is an element π β El(Ξ, π΅) together with a
realizer πβ’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ π΅β’πΏπΏβ’(ππΏ). intuition: βrealizersβ are semantic whnfs, but intrinsic. what remains is the pure essence of operational-style techniques [Hub18; AFH17].
5more complicated, because XTT needs inductive-recursive universe; just for intuition! 18 / 32
Ξ βΆ Μ β is a context Ξ βΆ β together with a computability
family Ξβ’ βΆ N(Ξ) β U internal to Pr(β‘+).
Ξ Μ Ξ
Μ πΏ
is a substitution Ξ
Ξ
πΏ
together with a realizer πΏβ’ βΆ βπβΆN(Ξ) βπβ’βΆΞβ’π Ξβ’(πΏπ).
π΅ β Ty(Μ Ξ) has a type π΅ β Ty(Ξ) together with a computability
family π΅β’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ N(π΅πΏ) β U.5
π β El(Μ Ξ, Μ π΅) is an element π β El(Ξ, π΅) together with a
realizer πβ’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ π΅β’πΏπΏβ’(ππΏ). intuition: βrealizersβ are semantic whnfs, but intrinsic. what remains is the pure essence of operational-style techniques [Hub18; AFH17].
5more complicated, because XTT needs inductive-recursive universe; just for intuition! 18 / 32
Ξ βΆ Μ β is a context Ξ βΆ β together with a computability
family Ξβ’ βΆ N(Ξ) β U internal to Pr(β‘+).
Ξ Μ Ξ
Μ πΏ
is a substitution Ξ
Ξ
πΏ
together with a realizer πΏβ’ βΆ βπβΆN(Ξ) βπβ’βΆΞβ’π Ξβ’(πΏπ).
π΅ β Ty(Μ Ξ) has a type π΅ β Ty(Ξ) together with a computability
family π΅β’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ N(π΅πΏ) β U.5
π β El(Μ Ξ, Μ π΅) is an element π β El(Ξ, π΅) together with a
realizer πβ’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ π΅β’πΏπΏβ’(ππΏ). intuition: βrealizersβ are semantic whnfs, but intrinsic. what remains is the pure essence of operational-style techniques [Hub18; AFH17].
5more complicated, because XTT needs inductive-recursive universe; just for intuition! 18 / 32
Ξ βΆ Μ β is a context Ξ βΆ β together with a computability
family Ξβ’ βΆ N(Ξ) β U internal to Pr(β‘+).
Ξ Μ Ξ
Μ πΏ
is a substitution Ξ
Ξ
πΏ
together with a realizer πΏβ’ βΆ βπβΆN(Ξ) βπβ’βΆΞβ’π Ξβ’(πΏπ).
π΅ β Ty(Μ Ξ) has a type π΅ β Ty(Ξ) together with a computability
family π΅β’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ N(π΅πΏ) β U.5
π β El(Μ Ξ, Μ π΅) is an element π β El(Ξ, π΅) together with a
realizer πβ’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ π΅β’πΏπΏβ’(ππΏ). intuition: βrealizersβ are semantic whnfs, but intrinsic. what remains is the pure essence of operational-style techniques [Hub18; AFH17].
5more complicated, because XTT needs inductive-recursive universe; just for intuition! 18 / 32
Ξ βΆ Μ β is a context Ξ βΆ β together with a computability
family Ξβ’ βΆ N(Ξ) β U internal to Pr(β‘+).
Ξ Μ Ξ
Μ πΏ
is a substitution Ξ
Ξ
πΏ
together with a realizer πΏβ’ βΆ βπβΆN(Ξ) βπβ’βΆΞβ’π Ξβ’(πΏπ).
π΅ β Ty(Μ Ξ) has a type π΅ β Ty(Ξ) together with a computability
family π΅β’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ N(π΅πΏ) β U.5
π β El(Μ Ξ, Μ π΅) is an element π β El(Ξ, π΅) together with a
realizer πβ’ βΆ βπΏβΆN(Ξ) βπΏβ’βΆΞβ’ π΅β’πΏπΏβ’(ππΏ). intuition: βrealizersβ are semantic whnfs, but intrinsic. what remains is the pure essence of operational-style techniques [Hub18; AFH17].
5more complicated, because XTT needs inductive-recursive universe; just for intuition! 18 / 32
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff. we choose a computability family for bool which forces this to be true!
Μ
bool β Ty( Μ
β) Μ
bool = (bool, )
Μ
tt, Μ ff β El( Μ
β, Μ
bool)
Μ
tt = (tt, πππβ’.inl(refltt))
Μ
ff = (ff, πππβ’.inr(reflff)) idea: the βrealizerβ of any closed boolean reveals whether it is tt or ff. abstract
19 / 32
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff. we choose a computability family for bool which forces this to be true!
Μ
bool β Ty( Μ
β) Μ
bool = (bool, ? βΆ βπβΆN(β) βπβ’βΆββ’π U)
Μ
tt, Μ ff β El( Μ
β, Μ
bool)
Μ
tt = (tt, πππβ’.inl(refltt))
Μ
ff = (ff, πππβ’.inr(reflff)) idea: the βrealizerβ of any closed boolean reveals whether it is tt or ff. abstract
19 / 32
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff. we choose a computability family for bool which forces this to be true!
Μ
bool β Ty( Μ
β) Μ
bool = (bool, πππβ’π.(π = tt) + (π = ff))
Μ
tt, Μ ff β El( Μ
β, Μ
bool)
Μ
tt = (tt, πππβ’.inl(refltt))
Μ
ff = (ff, πππβ’.inr(reflff)) idea: the βrealizerβ of any closed boolean reveals whether it is tt or ff. abstract
19 / 32
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff. we choose a computability family for bool which forces this to be true!
Μ
bool β Ty( Μ
β) Μ
bool = (bool, πππβ’π.(π = tt) + (π = ff))
Μ
tt, Μ ff β El( Μ
β, Μ
bool)
Μ
tt = (tt, πππβ’.inl(refltt))
Μ
ff = (ff, πππβ’.inr(reflff)) idea: the βrealizerβ of any closed boolean reveals whether it is tt or ff. abstract
19 / 32
Theorem (Canonicity)
In the initial XTT-algebra, if π β El(β, bool) then either π = tt or π = ff.
Proof.
If π β El(β, bool) in the initial XTT-algebra β, then by the universal property of
β, there exists Μ π = (π, πβ’) β El( Μ β, Μ
bool) such that π = π and πβ’ β boolβ’π. Proceed by case:
20 / 32
we contributed a (Cartesian) cubical reconstruction of OTT, and took a first step toward objective metatheory (gluing) for cubical type theory. whatβs next?
judgmental boundary separation most likely too strict for any of the above; XTT could be extended to a language for quasitoposes (not toposes). programming applications hoped for!
21 / 32
[ABCFHL] Carlo Angiuli, Guillaume Brunerie, Thierry Coquand, Kuen-Bang Hou (Favonia), Robert Harper, and Daniel R. Licata. βSyntax and Models
https://github.com/dlicata335/cart-cube (cit. on p. 19). [ACD08] Andreas Abel, Thierry Coquand, and Peter Dybjer. βOn the Algebraic Foundation of Proof Assistants for Intuitionistic Type Theoryβ. In: Functional and Logic Programming. Ed. by Jacques Garrigue and Manuel V. Hermenegildo. Berlin, Heidelberg: Springer Berlin Heidelberg, 2008, pp. 3β13. isbn: 978-3-540-78969-7 (cit. on
[AFH17] Carlo Angiuli, Kuen-Bang Hou (Favonia), and Robert Harper. Computational Higher Type theory III: Univalent Universes and Exact
22 / 32
[AK16a] Thorsten Altenkirch and Ambrus Kaposi. βNormalisation by Evaluation for Dependent Typesβ. In: 1st International Conference on Formal Structures for Computation and Deduction (FSCD 2016).
International Proceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss DagstuhlβLeibniz-Zentrum fuer Informatik, 2016, 6:1β6:16. isbn: 978-3-95977-010-1. doi: 10.4230/LIPIcs.FSCD.2016.6. [AK16b] Thorsten Altenkirch and Ambrus Kaposi. βType Theory in Type Theory Using Quotient Inductive Typesβ. In: Proceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. POPL β16. St. Petersburg, FL, USA: ACM, 2016, pp. 18β29. isbn: 978-1-4503-3549-2. doi: 10.1145/2837614.2837638.
23 / 32
[AM06] Thorsten Altenkirch and Conor McBride. Towards Observational Type Theory. 2006. url: www.strictlypositive.org/ott.pdf (cit. on pp. 14β18). [AMB13] Guillaume Allais, Conor McBride, and Pierre Boutillier. βNew Equations for Neutral Terms: A Sound and Complete Decision Procedure, Formalizedβ. In: Proceedings of the 2013 ACM SIGPLAN Workshop on Dependently-typed Programming. DTP β13. Boston, Massachusetts, USA: ACM, 2013, pp. 13β24. isbn: 978-1-4503-2384-0. doi: 10.1145/2502409.2502411. [AMS07] Thorsten Altenkirch, Conor McBride, and Wouter Swierstra. βObservational Equality, Now!β In: Proceedings of the 2007 Workshop on Programming Languages Meets Program Verification. PLPV β07. Freiburg, Germany: ACM, 2007, pp. 57β68. isbn: 978-1-59593-677-6 (cit. on pp. 14β18).
24 / 32
[Awo18] Steve Awodey. βNatural models of homotopy type theoryβ. In: Mathematical Structures in Computer Science 28.2 (2018),
[BD08] Alexandre Buisse and Peter Dybjer. βTowards formalizing categorical models of type theory in type theoryβ. In: Electronic Notes in Theoretical Computer Science 196 (2008), pp. 137β151. [Car86] John Cartmell. βGeneralised algebraic theories and contextual categoriesβ. In: Annals of Pure and Applied Logic 32 (1986),
[CCD17] Simon Castellan, Pierre Clairambault, and Peter Dybjer. βUndecidability of Equality in the Free Locally Cartesian Closed Category (Extended version)β. In: Logical Methods in Computer Science 13.4 (2017).
25 / 32
[CCHM17] Cyril Cohen, Thierry Coquand, Simon Huber, and Anders MΓΆrtberg. βCubical Type Theory: a constructive interpretation of the univalence axiomβ. In: IfCoLog Journal of Logics and their Applications 4.10 (Nov. 2017), pp. 3127β3169. url: http://www. collegepublications.co.uk/journals/ifcolog/?00019. [CFM18] James Chapman, Fredrik Nordvall Forsberg, and Conor McBride. βThe Box of Delights (Cubical Observational Type Theory)β. Unpublished note. Jan. 2018. url: https://github.com/msp-strath/platypus/blob/ master/January18/doc/CubicalOTT/CubicalOTT.pdf. [CHS19] Thierry Coquand, Simon Huber, and Christian Sattler. βHomotopy canonicity for cubical type theoryβ. In: Proceedings of the 4th International Conference on Formal Structures for Computation and Deduction (FSCD 2019). Ed. by Herman Geuvers. Vol. 131. 2019 (cit. on
26 / 32
[Coq17] Thierry Coquand. Universe of Bishop sets. Feb. 2017. url: http://www.cse.chalmers.se/~coquand/bishop.pdf (cit. on p. 19). [Coq18] Thierry Coquand. Canonicity and normalization for Dependent Type
[Fio02] Marcelo Fiore. βSemantic Analysis of Normalisation by Evaluation for Typed Lambda Calculusβ. In: Proceedings of the 4th ACM SIGPLAN International Conference on Principles and Practice of Declarative
isbn: 1-58113-528-9. doi: 10.1145/571157.571161 (cit. on
[Hub18] Simon Huber. βCanonicity for Cubical Type Theoryβ. In: Journal of Automated Reasoning (June 13, 2018). issn: 1573-0670. doi: 10.1007/s10817-018-9469-1 (cit. on pp. 53β57).
27 / 32
[JT93] Achim Jung and Jerzy Tiuryn. βA new characterization of lambda definabilityβ. In: Typed Lambda Calculi and Applications. Ed. by Marc Bezem and Jan Friso Groote. Berlin, Heidelberg: Springer Berlin Heidelberg, 1993, pp. 245β257. isbn: 978-3-540-47586-6. [KHS19] Ambrus Kaposi, Simon Huber, and Christian Sattler. βGluing for type theoryβ. In: Proceedings of the 4th International Conference on Formal Structures for Computation and Deduction (FSCD 2019).
[KKA19] Ambrus Kaposi, AndrΓ‘s KovΓ‘cs, and Thorsten Altenkirch. βConstructing Quotient Inductive-inductive Typesβ. In: Proc. ACM
10.1145/3290315.
28 / 32
[ML75a] Per Martin-LΓΆf. βAbout Models for Intuitionistic Type Theories and the Notion of Definitional Equalityβ. In: Proceedings of the Third Scandinavian Logic Symposium. Ed. by Stig Kanger. Vol. 82. Studies in Logic and the Foundations of Mathematics. Elsevier, 1975,
[ML75b] Per Martin-LΓΆf. βAn Intuitionistic Theory of Types: Predicative Partβ. In: Logic Colloquium β73. Ed. by H. E. Rose and J. C. Shepherdson.
Elsevier, 1975, pp. 73β118. doi: 10.1016/S0049-237X(08)71945-1. [MS93] John C. Mitchell and Andre Scedrov. βNotes on sconing and relatorsβ. In: Computer Science Logic. Ed. by E. BΓΆrger, G. JΓ€ger,
Springer Berlin Heidelberg, 1993, pp. 352β378. isbn: 978-3-540-47890-4.
29 / 32
[SAG19] Jonathan Sterling, Carlo Angiuli, and Daniel Gratzer. βCubical Syntax for Reflection-Free Extensional Equalityβ. In: Proceedings of the 4th International Conference on Formal Structures for Computation and Deduction (FSCD 2019). Ed. by Herman Geuvers. Vol. 131. 2019. doi: 10.4230/LIPIcs.FSCD.2019.32. arXiv: 1904.08562 (cit. on
[Shu06] Michael Shulman. Scones, Logical Relations, and Parametricity.
2013/04/scones_logical_relations_and_p.html. [Shu15] Michael Shulman. βUnivalence for inverse diagrams and homotopy canonicityβ. In: Mathematical Structures in Computer Science 25.5 (2015), pp. 1203β1277. doi: 10.1017/S0960129514000565 (cit. on
[SS18] Jonathan Sterling and Bas Spitters. Normalization by gluing for free
π-theories. Sept. 2018. arXiv: 1809.08646 [cs.LO].
30 / 32
[Ste18] Jonathan Sterling. Algebraic Type Theory and Universe Hierarchies.
[Str91] Thomas Streicher. Semantics of Type Theory: Correctness, Completeness, and Independence Results. Cambridge, MA, USA: Birkhauser Boston Inc., 1991. isbn: 0-8176-3594-7. [Str94] Thomas Streicher. Investigations Into Intensional Type Theory. Habilitationsschrit, UniversitΓ€t MΓΌnchen. 1994. [Str98] Thomas Streicher. βCategorical intuitions underlying semantic normalisation proofsβ. In: Preliminary Proceedings of the APPSEM Workshop on Normalisation by Evaluation. Ed. by O. Danvy and
[Uem19] Taichi Uemura. A General Framework for the Semantics of Type
31 / 32
[Voe16] Vladimir Voevodsky. Mathematical theory of type theories and the initiality conjecture. Research proposal to the Templeton Foundation for 2016-2019, project description. Apr. 2016. url: http://www.math.ias.edu/Voevodsky/other/Voevodsky% 20Templeton%20proposal.pdf.
32 / 32