2016-01-25 16:54:24 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2016 Jakob von Raumer. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Authors: Jakob von Raumer
|
|
|
|
|
|
|
|
The Cofiber Type
|
|
|
|
-/
|
2016-01-27 11:48:32 +00:00
|
|
|
import hit.pointed_pushout function .susp
|
2016-01-25 16:54:24 +00:00
|
|
|
|
2016-01-27 11:48:32 +00:00
|
|
|
open eq pushout unit pointed is_trunc is_equiv susp unit
|
2016-01-25 16:54:24 +00:00
|
|
|
|
|
|
|
definition cofiber {A B : Type} (f : A → B) := pushout (λ (a : A), ⋆) f
|
|
|
|
|
|
|
|
namespace cofiber
|
|
|
|
section
|
|
|
|
parameters {A B : Type} (f : A → B)
|
|
|
|
|
2016-01-27 14:59:54 +00:00
|
|
|
protected definition base [constructor] : cofiber f := inl ⋆
|
2016-01-25 16:54:24 +00:00
|
|
|
|
2016-01-27 14:59:54 +00:00
|
|
|
protected definition cod [constructor] : B → cofiber f := inr
|
2016-01-25 16:54:24 +00:00
|
|
|
|
|
|
|
protected definition contr_of_equiv [H : is_equiv f] : is_contr (cofiber f) :=
|
|
|
|
begin
|
|
|
|
fapply is_contr.mk, exact base,
|
|
|
|
intro a, induction a with [u, b],
|
|
|
|
{ cases u, reflexivity },
|
|
|
|
{ exact !glue ⬝ ap inr (right_inv f b) },
|
2016-02-15 19:40:25 +00:00
|
|
|
{ apply eq_pathover, refine _ ⬝hp !ap_id⁻¹, refine !ap_constant ⬝ph _,
|
2016-01-26 17:14:45 +00:00
|
|
|
apply move_bot_of_left, refine !idp_con ⬝ph _, apply transpose, esimp,
|
|
|
|
refine _ ⬝hp (ap (ap inr) !adj⁻¹), refine _ ⬝hp !ap_compose, apply square_Flr_idp_ap },
|
2016-01-25 16:54:24 +00:00
|
|
|
end
|
|
|
|
|
2016-01-27 14:59:54 +00:00
|
|
|
protected definition rec {A : Type} {B : Type} {f : A → B} {P : cofiber f → Type}
|
|
|
|
(Pinl : P (inl ⋆)) (Pinr : Π (x : B), P (inr x))
|
|
|
|
(Pglue : Π (x : A), pathover P Pinl (glue x) (Pinr (f x))) :
|
|
|
|
(Π y, P y) :=
|
|
|
|
begin
|
|
|
|
intro y, induction y, induction x, exact Pinl, exact Pinr x, esimp, exact Pglue x,
|
|
|
|
end
|
|
|
|
|
2016-01-27 17:12:57 +00:00
|
|
|
protected definition rec_on {A : Type} {B : Type} {f : A → B} {P : cofiber f → Type}
|
|
|
|
(y : cofiber f) (Pinl : P (inl ⋆)) (Pinr : Π (x : B), P (inr x))
|
|
|
|
(Pglue : Π (x : A), pathover P Pinl (glue x) (Pinr (f x))) : P y :=
|
|
|
|
begin
|
|
|
|
induction y, induction x, exact Pinl, exact Pinr x, esimp, exact Pglue x,
|
|
|
|
end
|
|
|
|
|
2016-01-25 16:54:24 +00:00
|
|
|
end
|
|
|
|
end cofiber
|
|
|
|
|
2016-02-15 23:23:28 +00:00
|
|
|
-- pointed version
|
2016-01-25 16:54:24 +00:00
|
|
|
|
2016-02-15 23:23:28 +00:00
|
|
|
definition pcofiber {A B : Type*} (f : A →* B) : Type* := ppushout (pconst A punit) f
|
2016-01-25 16:54:24 +00:00
|
|
|
|
2016-01-27 11:48:32 +00:00
|
|
|
namespace cofiber
|
2016-01-27 14:59:54 +00:00
|
|
|
|
2016-02-15 23:23:28 +00:00
|
|
|
protected definition prec {A B : Type*} {f : A →* B} {P : pcofiber f → Type}
|
2016-01-27 14:59:54 +00:00
|
|
|
(Pinl : P (inl ⋆)) (Pinr : Π (x : B), P (inr x))
|
|
|
|
(Pglue : Π (x : A), pathover P Pinl (pglue x) (Pinr (f x))) :
|
2016-02-15 23:23:28 +00:00
|
|
|
(Π (y : pcofiber f), P y) :=
|
2016-01-27 14:59:54 +00:00
|
|
|
begin
|
2016-01-27 17:12:57 +00:00
|
|
|
intro y, induction y, induction x, exact Pinl, exact Pinr x, esimp, exact Pglue x
|
|
|
|
end
|
|
|
|
|
2016-02-15 23:23:28 +00:00
|
|
|
protected definition prec_on {A B : Type*} {f : A →* B} {P : pcofiber f → Type}
|
|
|
|
(y : pcofiber f) (Pinl : P (inl ⋆)) (Pinr : Π (x : B), P (inr x))
|
2016-01-27 17:12:57 +00:00
|
|
|
(Pglue : Π (x : A), pathover P Pinl (pglue x) (Pinr (f x))) : P y :=
|
|
|
|
begin
|
|
|
|
induction y, induction x, exact Pinl, exact Pinr x, esimp, exact Pglue x
|
|
|
|
end
|
|
|
|
|
2016-02-15 23:23:28 +00:00
|
|
|
protected definition pelim_on {A B C : Type*} {f : A →* B} (y : pcofiber f)
|
2016-01-27 17:12:57 +00:00
|
|
|
(c : C) (g : B → C) (p : Π x, c = g (f x)) : C :=
|
|
|
|
begin
|
|
|
|
fapply pushout.elim_on y, exact (λ x, c), exact g, exact p
|
2016-01-27 14:59:54 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
--TODO more pointed recursors
|
|
|
|
|
2016-01-27 11:48:32 +00:00
|
|
|
variables (A : Type*)
|
2016-01-25 16:54:24 +00:00
|
|
|
|
2016-02-15 23:23:28 +00:00
|
|
|
definition cofiber_unit : pcofiber (pconst A punit) ≃* psusp A :=
|
2016-01-27 11:48:32 +00:00
|
|
|
begin
|
2016-02-15 19:40:25 +00:00
|
|
|
fapply pequiv_of_pmap,
|
2016-01-27 11:48:32 +00:00
|
|
|
{ fconstructor, intro x, induction x, exact north, exact south, exact merid x,
|
|
|
|
reflexivity },
|
|
|
|
{ esimp, fapply adjointify,
|
|
|
|
intro s, induction s, exact inl ⋆, exact inr ⋆, apply glue a,
|
|
|
|
intro s, induction s, do 2 reflexivity, esimp,
|
2016-02-15 19:40:25 +00:00
|
|
|
apply eq_pathover, refine _ ⬝hp !ap_id⁻¹, apply hdeg_square,
|
|
|
|
refine !(ap_compose (pushout.elim _ _ _)) ⬝ _,
|
2016-01-27 11:48:32 +00:00
|
|
|
refine ap _ !elim_merid ⬝ _, apply elim_glue,
|
2016-02-15 19:40:25 +00:00
|
|
|
intro c, induction c with [n, s], induction n, reflexivity,
|
|
|
|
induction s, reflexivity, esimp, apply eq_pathover, apply hdeg_square,
|
|
|
|
refine _ ⬝ !ap_id⁻¹, refine !(ap_compose (pushout.elim _ _ _)) ⬝ _,
|
2016-01-27 11:48:32 +00:00
|
|
|
refine ap _ !elim_glue ⬝ _, apply elim_merid },
|
|
|
|
end
|
|
|
|
|
|
|
|
end cofiber
|