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-10 01:45:18 +00:00
|
|
|
|
import .colimit
|
2015-04-07 01:01:08 +00:00
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
|
open colimit bool unit eq
|
2015-04-07 01:01:08 +00:00
|
|
|
|
|
|
|
|
|
namespace cylinder
|
2015-04-10 01:45:18 +00:00
|
|
|
|
context
|
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-10 01:45:18 +00:00
|
|
|
|
definition cylinder_diag [reducible] : diagram :=
|
|
|
|
|
diagram.mk bool
|
|
|
|
|
unit.{0}
|
|
|
|
|
(λi, bool.rec_on i A B)
|
|
|
|
|
(λj, ff)
|
|
|
|
|
(λj, tt)
|
|
|
|
|
(λj, f)
|
2015-04-07 01:01:08 +00:00
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
|
local notation `D` := cylinder_diag
|
2015-04-07 01:01:08 +00:00
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
|
definition cylinder := colimit cylinder_diag -- TODO: define this in root namespace
|
|
|
|
|
local attribute cylinder_diag [instance]
|
|
|
|
|
|
|
|
|
|
definition base (b : B) : cylinder :=
|
|
|
|
|
@ι _ _ b
|
|
|
|
|
|
|
|
|
|
definition top (a : A) : cylinder :=
|
|
|
|
|
@ι _ _ a
|
|
|
|
|
|
|
|
|
|
definition seg (a : A) : base (f a) = top a :=
|
|
|
|
|
@cglue _ star a
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
fapply (@colimit.rec_on _ _ x),
|
|
|
|
|
{ intros [i, x], cases i,
|
|
|
|
|
apply Ptop,
|
|
|
|
|
apply Pbase},
|
|
|
|
|
{ intros [j, x], cases j, apply Pseg}
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
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 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)
|
|
|
|
|
(a : A) : apD (rec Pbase Ptop Pseg) (seg a) = sorry ⬝ Pseg a ⬝ sorry :=
|
2015-04-07 01:01:08 +00:00
|
|
|
|
sorry
|
|
|
|
|
|
2015-04-10 01:45:18 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2015-04-07 01:01:08 +00:00
|
|
|
|
end cylinder
|