Built with Alectryon. Bubbles () indicate interactive fragments: hover for details, tap to reveal contents. Use Ctrl+↑Ctrl+↓ to navigate, Ctrl+🖱️ to focus. On Mac, use ⌘ instead of Ctrl.
Require Import HoTT.Basics HoTT.Types.Require Import HoTT.Basics HoTT.Types.LocalOpen Scope nat_scope.LocalOpen Scope path_scope.(** * Cantor space 2^N *)DefinitionCantor : Type := nat -> Bool.
Cantor + Cantor -> Cantor
Cantor + Cantor -> Cantor
c: Cantor n: nat
Bool
c: Cantor n: nat
Bool
c: Cantor n: nat
Bool
c: Cantor
Bool
c: Cantor n: nat
Bool
c: Cantor
Bool
exact true.
c: Cantor n: nat
Bool
exact (c n).
c: Cantor n: nat
Bool
c: Cantor
Bool
c: Cantor n: nat
Bool
c: Cantor
Bool
exact false.
c: Cantor n: nat
Bool
exact (c n).Defined.
Cantor -> Cantor + Cantor
Cantor -> Cantor + Cantor
c: Cantor
Cantor + Cantor
c: Cantor
Cantor + Cantor
c: Cantor
Cantor + Cantor
c: Cantor
Cantor + Cantor
exact (inl (funn => c n.+1)).
c: Cantor
Cantor + Cantor
exact (inr (funn => c n.+1)).Defined.
H: Funext
IsEquiv cantor_fold
H: Funext
IsEquiv cantor_fold
H: Funext
(funx : Cantor => cantor_fold (cantor_unfold x)) == idmap
H: Funext
(funx : Cantor + Cantor => cantor_unfold (cantor_fold x)) == idmap
H: Funext
(funx : Cantor => cantor_fold (cantor_unfold x)) == idmap
H: Funext c: Cantor n: nat
cantor_fold (cantor_unfold c) n = c n
H: Funext c: Cantor
cantor_fold (cantor_unfold c) 0 = c 0
H: Funext c: Cantor n: nat IH: cantor_fold (cantor_unfold c) n = c n
cantor_fold (cantor_unfold c) n.+1 = c n.+1
H: Funext c: Cantor
cantor_fold (cantor_unfold c) 0 = c 0
H: Funext c: Cantor
cantor_fold
match c 0with
| true => inl (funn : nat => c n.+1)
| false => inr (funn : nat => c n.+1)
end0 =
c 0
case (c 0); reflexivity.
H: Funext c: Cantor n: nat IH: cantor_fold (cantor_unfold c) n = c n
cantor_fold (cantor_unfold c) n.+1 = c n.+1
H: Funext c: Cantor n: nat IH: cantor_fold (cantor_unfold c) n = c n
cantor_fold
match c 0with
| true => inl (funn0 : nat => c n0.+1)
| false => inr (funn0 : nat => c n0.+1)
end n.+1 =
c n.+1
case (c 0); reflexivity.
H: Funext
(funx : Cantor + Cantor => cantor_unfold (cantor_fold x)) == idmap
intros [c|c]; apply path_sum; reflexivity.Defined.Definitionequiv_cantor_fold `{Funext} : Cantor + Cantor <~> Cantor
:= Build_Equiv _ _ cantor_fold _.Definitionequiv_cantor_unfold `{Funext} : Cantor <~> Cantor + Cantor
:= Build_Equiv _ _ cantor_unfold (isequiv_inverse equiv_cantor_fold).