2015-05-20 23:23:05 -07:00
|
|
|
|
-- HoTT
|
|
|
|
|
import hit.circle
|
2015-05-26 21:17:46 -04:00
|
|
|
|
open circle eq int pi
|
2015-05-20 23:23:05 -07:00
|
|
|
|
|
|
|
|
|
attribute circle.rec circle.elim [recursor 4]
|
|
|
|
|
|
|
|
|
|
protected definition my_code (x : circle) : Type₀ :=
|
|
|
|
|
begin
|
|
|
|
|
induction x,
|
|
|
|
|
{ exact ℤ},
|
|
|
|
|
{ apply ua, apply equiv_succ}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
protected definition my_decode {x : circle} : my_code x → base = x :=
|
2015-05-26 21:17:46 -04:00
|
|
|
|
begin
|
|
|
|
|
induction x,
|
|
|
|
|
{ exact power loop},
|
|
|
|
|
{ apply arrow_pathover_left, intro b, apply concato_eq, apply pathover_eq_r,
|
2015-06-26 17:10:18 -07:00
|
|
|
|
xrewrite [power_con, transport_code_loop]},
|
2015-05-26 21:17:46 -04:00
|
|
|
|
end
|