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.
|
|
|
|
|
|
|
|
Module: hit.cylinder
|
|
|
|
Authors: Floris van Doorn
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
Declaration of mapping cylinders
|
2015-04-07 01:01:08 +00:00
|
|
|
-/
|
|
|
|
|
2015-04-11 00:33:33 +00:00
|
|
|
import .type_quotient
|
2015-04-07 01:01:08 +00:00
|
|
|
|
2015-04-19 21:56:24 +00:00
|
|
|
open type_quotient eq sum equiv
|
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
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
universe u
|
|
|
|
parameters {A B : Type.{u}} (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-04-11 00:33:33 +00:00
|
|
|
definition cylinder := type_quotient cylinder_rel -- TODO: define this in root namespace
|
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-11 00:33:33 +00:00
|
|
|
eq_of_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))
|
|
|
|
(Pseg : Π(a : A), seg a ▹ Pbase (f a) = Ptop a) (x : cylinder) : P x :=
|
|
|
|
begin
|
2015-04-11 00:33:33 +00:00
|
|
|
fapply (type_quotient.rec_on x),
|
|
|
|
{ intro a, cases a,
|
|
|
|
apply Pbase,
|
|
|
|
apply Ptop},
|
|
|
|
{ intros [a, a', H], 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))
|
|
|
|
(Pseg : Π(a : A), seg a ▹ Pbase (f a) = Ptop a) : P x :=
|
|
|
|
rec Pbase Ptop Pseg x
|
|
|
|
|
2015-04-19 21:56:24 +00:00
|
|
|
definition rec_seg {P : cylinder → Type}
|
|
|
|
(Pbase : Π(b : B), P (base b)) (Ptop : Π(a : A), P (top a))
|
|
|
|
(Pseg : Π(a : A), seg a ▹ Pbase (f a) = Ptop a)
|
2015-04-24 21:00:32 +00:00
|
|
|
(a : A) : apd (rec Pbase Ptop Pseg) (seg a) = sorry ⬝ Pseg a ⬝ sorry :=
|
2015-04-19 21:56:24 +00:00
|
|
|
sorry
|
|
|
|
|
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 :=
|
|
|
|
rec Pbase Ptop (λa, !tr_constant ⬝ Pseg a) x
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
definition elim_seg {P : Type} (Pbase : B → P) (Ptop : A → P)
|
|
|
|
(Pseg : Π(a : A), Pbase (f a) = Ptop a)
|
|
|
|
(a : A) : ap (elim Pbase Ptop Pseg) (seg a) = sorry ⬝ Pseg a ⬝ sorry :=
|
|
|
|
sorry
|
|
|
|
|
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
|
|
|
|
|
|
|
|
definition elim_type_seg (Pbase : B → Type) (Ptop : A → Type)
|
|
|
|
(Pseg : Π(a : A), Pbase (f a) ≃ Ptop a)
|
|
|
|
(a : A) : transport (elim_type Pbase Ptop Pseg) (seg a) = sorry /-Pseg a-/ :=
|
|
|
|
sorry
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
end
|
|
|
|
|
2015-04-07 01:01:08 +00:00
|
|
|
end cylinder
|