| ID | c92e5bcb-895c-41bd-9431-4f8bb2304a9d |
|---|---|
| ROAM_ALIASES | "J (Homotopy type theory)" |
| DeertopiaVisibility | public |
Path induction
In homotopy type theory, path induction refers to the induction principle of identity types . Informally, path induction declares that, to prove that some proposition holds for , it suffices to consider the reflexivity case .
Path induction is one of the most subtle aspects of HoTT, and is key to understanding the differences between HoTT's paths and inductively-defined identity types.Inductively-defined identity types are the usual equality types used in Idris and (non-cubical) Agda: a simple data type _β‘_ : (x y : A) β Type with a single constructor refl : x β‘ x. "A single constructor" is the most important detail here. Inductively-defined identity types are trivial singletons. One inhabitant. Zero complex structure. This is completely opposite to path types, which are not inductively-defined (they are taken as primitive) and possess rich structure relating the identified types. Two arbitrary identifications are not necessarily the same in HoTT (i.e. UIP does not hold). [cite:@hottbook]
Statement
Given a family and a dependent function path induction gives us a dependent function defined by the equation
Path induction has an equivalent formation that is occasionally convenient, called based path induction.[cite:@hottbook] This is the variant used in Agda's cubical library:
Fix an element , and suppose a family and an element We then obtain a function defined by the equation
Traditionally, (based) path induction is packaged up as a single function and called .[cite:@hottbook]
Corollaries
Many important properties of paths follow from path induction, including invertibility and concatenation:Or, the language of relations, symmetry and transitivity.
private variable
β β' β'' : Level
module _ {A : Type β}
(C : (a a' : A) β a β‘ a' β Type β')
(c : β a β C a a refl)
where
β‘-ind : β a a' p β C a a' p
β‘-ind a a' p = J (C a) (c a) p
β‘-ind-refl : β a β β‘-ind a a refl β‘ c a
β‘-ind-refl a = JRefl (Ξ» y z β y) (c a)
inv : {A : Type β} {x y : A} β x β‘ y β y β‘ x
inv = β‘-ind D d _ _ where
D : β x y β x β‘ y β Type _
D x y _ = y β‘ x
d : β x β D x x refl
d x = refl
-- β‘-concatΛ‘ refl p β‘ p follows from β‘-ind-refl.
β‘-concatΛ‘ : {x y z : A} β x β‘ y β y β‘ z β x β‘ z
β‘-concatΛ‘ {A = A} = Ξ» p q β β‘-ind D d _ _ p _ q where
D : (x y : A) β x β‘ y β Type _
D x y _ = β z β y β‘ z β x β‘ z
d : β x β D x x refl
-- β x z β x β‘ z β x β‘ z
d x z p = p
-- β‘-concatΚ³ p refl β‘ p follows from β‘-ind-refl.
β‘-concatΚ³ : {x y z : A} β x β‘ y β y β‘ z β x β‘ z
β‘-concatΚ³ {A = A} = Ξ» p q β β‘-ind D d _ _ q _ p where
D : (y z : A) β y β‘ z β Type _
D y z _ = β x β x β‘ y β x β‘ z
d : β y β D y y refl
-- β y x β x β‘ y β x β‘ y
d x z p = p
References
[cite:@hottbook]