2015-06-26 02:27:03 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2015 Floris van Doorn. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Authors: Floris van Doorn
|
|
|
|
|
|
|
|
Declaration of the torus
|
|
|
|
-/
|
|
|
|
|
2015-09-13 18:58:11 +00:00
|
|
|
import hit.two_quotient
|
2015-06-26 02:27:03 +00:00
|
|
|
|
2015-11-22 22:46:54 +00:00
|
|
|
open two_quotient eq bool unit equiv
|
2015-06-26 02:27:03 +00:00
|
|
|
|
|
|
|
namespace torus
|
|
|
|
|
2015-11-22 22:46:54 +00:00
|
|
|
open e_closure relation
|
2015-06-26 02:27:03 +00:00
|
|
|
definition torus_R (x y : unit) := bool
|
|
|
|
local infix `⬝r`:75 := @e_closure.trans unit torus_R star star star
|
|
|
|
local postfix `⁻¹ʳ`:(max+10) := @e_closure.symm unit torus_R star star
|
|
|
|
local notation `[`:max a `]`:0 := @e_closure.of_rel unit torus_R star star a
|
|
|
|
|
|
|
|
inductive torus_Q : Π⦃x y : unit⦄, e_closure torus_R x y → e_closure torus_R x y → Type :=
|
|
|
|
| Qmk : torus_Q ([ff] ⬝r [tt]) ([tt] ⬝r [ff])
|
|
|
|
|
2015-11-22 22:46:54 +00:00
|
|
|
open torus_Q
|
|
|
|
|
2015-06-26 02:27:03 +00:00
|
|
|
definition torus := two_quotient torus_R torus_Q
|
2015-11-22 22:46:54 +00:00
|
|
|
notation `T²` := torus
|
2015-06-26 02:27:03 +00:00
|
|
|
definition base : torus := incl0 _ _ star
|
|
|
|
definition loop1 : base = base := incl1 _ _ ff
|
|
|
|
definition loop2 : base = base := incl1 _ _ tt
|
2015-11-22 22:46:54 +00:00
|
|
|
definition surf' : loop1 ⬝ loop2 = loop2 ⬝ loop1 :=
|
|
|
|
incl2 _ _ Qmk
|
|
|
|
definition surf : square loop1 loop1 loop2 loop2 :=
|
|
|
|
square_of_eq (incl2 _ _ Qmk)
|
|
|
|
|
|
|
|
protected definition rec {P : torus → Type} (Pb : P base) (Pl1 : Pb =[loop1] Pb)
|
|
|
|
(Pl2 : Pb =[loop2] Pb) (Ps : squareover P surf Pl1 Pl1 Pl2 Pl2) (x : torus) : P x :=
|
|
|
|
begin
|
|
|
|
induction x,
|
|
|
|
{ induction a, exact Pb},
|
|
|
|
{ induction s: induction a; induction a',
|
|
|
|
{ exact Pl1},
|
|
|
|
{ exact Pl2}},
|
|
|
|
{ induction q, esimp, apply change_path_of_pathover, apply pathover_of_squareover, exact Ps},
|
|
|
|
end
|
|
|
|
|
|
|
|
protected definition rec_on [reducible] {P : torus → Type} (x : torus) (Pb : P base)
|
|
|
|
(Pl1 : Pb =[loop1] Pb) (Pl2 : Pb =[loop2] Pb) (Ps : squareover P surf Pl1 Pl1 Pl2 Pl2) : P x :=
|
|
|
|
torus.rec Pb Pl1 Pl2 Ps x
|
|
|
|
|
|
|
|
theorem rec_loop1 {P : torus → Type} (Pb : P base) (Pl1 : Pb =[loop1] Pb)
|
|
|
|
(Pl2 : Pb =[loop2] Pb) (Ps : squareover P surf Pl1 Pl1 Pl2 Pl2)
|
|
|
|
: apdo (torus.rec Pb Pl1 Pl2 Ps) loop1 = Pl1 :=
|
|
|
|
!rec_incl1
|
|
|
|
|
|
|
|
theorem rec_loop2 {P : torus → Type} (Pb : P base) (Pl1 : Pb =[loop1] Pb)
|
|
|
|
(Pl2 : Pb =[loop2] Pb) (Ps : squareover P surf Pl1 Pl1 Pl2 Pl2)
|
|
|
|
: apdo (torus.rec Pb Pl1 Pl2 Ps) loop2 = Pl2 :=
|
|
|
|
!rec_incl1
|
2015-06-26 02:27:03 +00:00
|
|
|
|
|
|
|
protected definition elim {P : Type} (Pb : P) (Pl1 : Pb = Pb) (Pl2 : Pb = Pb)
|
2015-11-22 22:46:54 +00:00
|
|
|
(Ps : square Pl1 Pl1 Pl2 Pl2) (x : torus) : P :=
|
2015-06-26 02:27:03 +00:00
|
|
|
begin
|
|
|
|
induction x,
|
|
|
|
{ exact Pb},
|
|
|
|
{ induction s,
|
|
|
|
{ exact Pl1},
|
|
|
|
{ exact Pl2}},
|
2015-11-22 22:46:54 +00:00
|
|
|
{ induction q, apply eq_of_square, exact Ps},
|
2015-06-26 02:27:03 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
protected definition elim_on [reducible] {P : Type} (x : torus) (Pb : P)
|
2015-11-22 22:46:54 +00:00
|
|
|
(Pl1 : Pb = Pb) (Pl2 : Pb = Pb) (Ps : square Pl1 Pl1 Pl2 Pl2) : P :=
|
2015-06-26 02:27:03 +00:00
|
|
|
torus.elim Pb Pl1 Pl2 Ps x
|
|
|
|
|
2015-11-22 22:46:54 +00:00
|
|
|
definition elim_loop1 {P : Type} {Pb : P} {Pl1 : Pb = Pb} {Pl2 : Pb = Pb}
|
|
|
|
(Ps : square Pl1 Pl1 Pl2 Pl2) : ap (torus.elim Pb Pl1 Pl2 Ps) loop1 = Pl1 :=
|
2015-06-26 02:27:03 +00:00
|
|
|
!elim_incl1
|
|
|
|
|
2015-11-22 22:46:54 +00:00
|
|
|
definition elim_loop2 {P : Type} {Pb : P} {Pl1 : Pb = Pb} {Pl2 : Pb = Pb}
|
|
|
|
(Ps : square Pl1 Pl1 Pl2 Pl2) : ap (torus.elim Pb Pl1 Pl2 Ps) loop2 = Pl2 :=
|
2015-06-26 02:27:03 +00:00
|
|
|
!elim_incl1
|
|
|
|
|
2015-11-22 22:46:54 +00:00
|
|
|
theorem elim_surf {P : Type} {Pb : P} {Pl1 : Pb = Pb} {Pl2 : Pb = Pb}
|
|
|
|
(Ps : square Pl1 Pl1 Pl2 Pl2)
|
|
|
|
: whisker_square (elim_loop1 Ps) (elim_loop1 Ps) (elim_loop2 Ps) (elim_loop2 Ps)
|
|
|
|
(aps (torus.elim Pb Pl1 Pl2 Ps) surf) = Ps :=
|
|
|
|
begin
|
|
|
|
apply whisker_square_aps_eq,
|
|
|
|
apply elim_incl2
|
|
|
|
end
|
2015-06-26 02:27:03 +00:00
|
|
|
|
|
|
|
end torus
|
|
|
|
|
|
|
|
attribute torus.base [constructor]
|
2015-11-22 22:46:54 +00:00
|
|
|
attribute torus.rec torus.elim [unfold 6] [recursor 6]
|
|
|
|
--attribute torus.elim_type [unfold 5]
|
|
|
|
attribute torus.rec_on torus.elim_on [unfold 2]
|
|
|
|
--attribute torus.elim_type_on [unfold 1]
|