2015-04-07 01:01:08 +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
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
Declaration of mapping cylinders
|
2015-04-07 01:01:08 +00:00
|
|
|
-/
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
import hit.quotient types.fiber
|
2015-04-07 01:01:08 +00:00
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
open quotient eq sum equiv fiber
|
2015-04-07 01:01:08 +00:00
|
|
|
|
|
|
|
namespace cylinder
|
2015-04-23 22:27:56 +00:00
|
|
|
section
|
2015-04-07 01:01:08 +00:00
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
parameters {A B : Type} (f : A → B)
|
2015-04-07 01:01:08 +00:00
|
|
|
|
2015-04-11 00:33:33 +00:00
|
|
|
local abbreviation C := B + A
|
|
|
|
inductive cylinder_rel : C → C → Type :=
|
|
|
|
| Rmk : Π(a : A), cylinder_rel (inl (f a)) (inr a)
|
|
|
|
open cylinder_rel
|
|
|
|
local abbreviation R := cylinder_rel
|
2015-04-07 01:01:08 +00:00
|
|
|
|
2015-06-04 19:57:00 +00:00
|
|
|
definition cylinder := quotient cylinder_rel -- TODO: define this in root namespace
|
2015-04-10 01:45:18 +00:00
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
parameter {f}
|
2015-04-10 01:45:18 +00:00
|
|
|
definition base (b : B) : cylinder :=
|
2015-04-11 00:33:33 +00:00
|
|
|
class_of R (inl b)
|
2015-04-10 01:45:18 +00:00
|
|
|
|
|
|
|
definition top (a : A) : cylinder :=
|
2015-04-11 00:33:33 +00:00
|
|
|
class_of R (inr a)
|
2015-04-10 01:45:18 +00:00
|
|
|
|
|
|
|
definition seg (a : A) : base (f a) = top a :=
|
2015-04-27 21:34:55 +00:00
|
|
|
eq_of_rel cylinder_rel (Rmk f a)
|
2015-04-10 01:45:18 +00:00
|
|
|
|
|
|
|
protected definition rec {P : cylinder → Type}
|
|
|
|
(Pbase : Π(b : B), P (base b)) (Ptop : Π(a : A), P (top a))
|
2015-05-22 08:35:38 +00:00
|
|
|
(Pseg : Π(a : A), Pbase (f a) =[seg a] Ptop a) (x : cylinder) : P x :=
|
2015-04-10 01:45:18 +00:00
|
|
|
begin
|
2015-05-21 04:16:23 +00:00
|
|
|
induction x,
|
|
|
|
{ cases a,
|
|
|
|
apply Pbase,
|
|
|
|
apply Ptop},
|
|
|
|
{ cases H, apply Pseg}
|
2015-04-10 01:45:18 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
protected definition rec_on [reducible] {P : cylinder → Type} (x : cylinder)
|
|
|
|
(Pbase : Π(b : B), P (base b)) (Ptop : Π(a : A), P (top a))
|
2015-05-22 08:35:38 +00:00
|
|
|
(Pseg : Π(a : A), Pbase (f a) =[seg a] Ptop a) : P x :=
|
2015-04-10 01:45:18 +00:00
|
|
|
rec Pbase Ptop Pseg x
|
|
|
|
|
2015-04-27 21:34:55 +00:00
|
|
|
theorem rec_seg {P : cylinder → Type}
|
2015-04-19 21:56:24 +00:00
|
|
|
(Pbase : Π(b : B), P (base b)) (Ptop : Π(a : A), P (top a))
|
2015-05-22 08:35:38 +00:00
|
|
|
(Pseg : Π(a : A), Pbase (f a) =[seg a] Ptop a)
|
2016-03-19 15:25:08 +00:00
|
|
|
(a : A) : apd (rec Pbase Ptop Pseg) (seg a) = Pseg a :=
|
2015-04-28 01:30:20 +00:00
|
|
|
!rec_eq_of_rel
|
2015-04-19 21:56:24 +00:00
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
protected definition elim {P : Type} (Pbase : B → P) (Ptop : A → P)
|
|
|
|
(Pseg : Π(a : A), Pbase (f a) = Ptop a) (x : cylinder) : P :=
|
2016-06-23 20:49:54 +00:00
|
|
|
rec Pbase Ptop (λa, pathover_of_eq _ (Pseg a)) x
|
2015-04-10 01:45:18 +00:00
|
|
|
|
|
|
|
protected definition elim_on [reducible] {P : Type} (x : cylinder) (Pbase : B → P) (Ptop : A → P)
|
|
|
|
(Pseg : Π(a : A), Pbase (f a) = Ptop a) : P :=
|
|
|
|
elim Pbase Ptop Pseg x
|
|
|
|
|
2015-04-27 21:34:55 +00:00
|
|
|
theorem elim_seg {P : Type} (Pbase : B → P) (Ptop : A → P)
|
2015-04-10 01:45:18 +00:00
|
|
|
(Pseg : Π(a : A), Pbase (f a) = Ptop a)
|
2015-04-27 21:34:55 +00:00
|
|
|
(a : A) : ap (elim Pbase Ptop Pseg) (seg a) = Pseg a :=
|
|
|
|
begin
|
2018-09-07 14:30:58 +00:00
|
|
|
apply inj_inv !(pathover_constant (seg a)),
|
2016-03-19 15:25:08 +00:00
|
|
|
rewrite [▸*,-apd_eq_pathover_of_eq_ap,↑elim,rec_seg],
|
2015-04-27 21:34:55 +00:00
|
|
|
end
|
2015-04-10 01:45:18 +00:00
|
|
|
|
2015-04-19 21:56:24 +00:00
|
|
|
protected definition elim_type (Pbase : B → Type) (Ptop : A → Type)
|
|
|
|
(Pseg : Π(a : A), Pbase (f a) ≃ Ptop a) (x : cylinder) : Type :=
|
|
|
|
elim Pbase Ptop (λa, ua (Pseg a)) x
|
|
|
|
|
|
|
|
protected definition elim_type_on [reducible] (x : cylinder) (Pbase : B → Type) (Ptop : A → Type)
|
|
|
|
(Pseg : Π(a : A), Pbase (f a) ≃ Ptop a) : Type :=
|
|
|
|
elim_type Pbase Ptop Pseg x
|
|
|
|
|
2015-04-27 21:34:55 +00:00
|
|
|
theorem elim_type_seg (Pbase : B → Type) (Ptop : A → Type)
|
2015-04-19 21:56:24 +00:00
|
|
|
(Pseg : Π(a : A), Pbase (f a) ≃ Ptop a)
|
2015-04-27 21:34:55 +00:00
|
|
|
(a : A) : transport (elim_type Pbase Ptop Pseg) (seg a) = Pseg a :=
|
|
|
|
by rewrite [tr_eq_cast_ap_fn,↑elim_type,elim_seg];apply cast_ua_fn
|
2015-04-19 21:56:24 +00:00
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
end
|
|
|
|
|
2015-04-07 01:01:08 +00:00
|
|
|
end cylinder
|
2015-05-07 20:35:14 +00:00
|
|
|
|
|
|
|
attribute cylinder.base cylinder.top [constructor]
|
2015-07-07 23:37:06 +00:00
|
|
|
attribute cylinder.rec cylinder.elim [unfold 8] [recursor 8]
|
|
|
|
attribute cylinder.elim_type [unfold 7]
|
|
|
|
attribute cylinder.rec_on cylinder.elim_on [unfold 5]
|
|
|
|
attribute cylinder.elim_type_on [unfold 4]
|
2016-04-11 17:11:59 +00:00
|
|
|
|
|
|
|
namespace cylinder
|
|
|
|
open sigma sigma.ops
|
|
|
|
variables {A B : Type} (f : A → B)
|
|
|
|
|
|
|
|
/- cylinder as a dependent family -/
|
|
|
|
definition pr1 [unfold 4] : cylinder f → B :=
|
|
|
|
cylinder.elim id f (λa, idp)
|
|
|
|
|
|
|
|
definition fcylinder : B → Type := fiber (pr1 f)
|
|
|
|
|
|
|
|
definition cylinder_equiv_sigma_fcylinder [constructor] : cylinder f ≃ Σb, fcylinder f b :=
|
|
|
|
!sigma_fiber_equiv⁻¹ᵉ
|
|
|
|
|
|
|
|
variable {f}
|
|
|
|
definition fbase (b : B) : fcylinder f b :=
|
|
|
|
fiber.mk (base b) idp
|
|
|
|
|
|
|
|
definition ftop (a : A) : fcylinder f (f a) :=
|
|
|
|
fiber.mk (top a) idp
|
|
|
|
|
|
|
|
definition fseg (a : A) : fbase (f a) = ftop a :=
|
|
|
|
fiber_eq (seg a) !elim_seg⁻¹
|
|
|
|
|
2016-04-22 19:12:25 +00:00
|
|
|
-- TODO: define the induction principle for "fcylinder"
|
2016-04-11 17:11:59 +00:00
|
|
|
-- set_option pp.notation false
|
|
|
|
-- -- The induction principle for the dependent mapping cylinder (TODO)
|
|
|
|
-- protected definition frec {P : Π(b), fcylinder f b → Type}
|
|
|
|
-- (Pbase : Π(b : B), P _ (fbase b)) (Ptop : Π(a : A), P _ (ftop a))
|
|
|
|
-- (Pseg : Π(a : A), Pbase (f a) =[fseg a] Ptop a) {b : B} (x : fcylinder f b) : P _ x :=
|
|
|
|
-- begin
|
|
|
|
-- cases x with x p, induction p,
|
|
|
|
-- induction x: esimp,
|
|
|
|
-- { apply Pbase},
|
|
|
|
-- { apply Ptop},
|
|
|
|
-- { esimp, --fapply fiber_pathover,
|
|
|
|
-- --refine pathover_of_pathover_ap P (λx, fiber.mk x idp),
|
|
|
|
|
|
|
|
-- exact sorry}
|
|
|
|
-- end
|
|
|
|
|
|
|
|
-- theorem frec_fseg {P : Π(b), fcylinder f b → Type}
|
|
|
|
-- (Pbase : Π(b : B), P _ (fbase b)) (Ptop : Π(a : A), P _ (ftop a))
|
|
|
|
-- (Pseg : Π(a : A), Pbase (f a) =[fseg a] Ptop a) (a : A)
|
|
|
|
-- : apd (cylinder.frec Pbase Ptop Pseg) (fseg a) = Pseg a :=
|
|
|
|
-- sorry
|
|
|
|
|
|
|
|
|
|
|
|
end cylinder
|