2015-02-21 00:30:32 +00:00
|
|
|
|
/-
|
|
|
|
|
Copyright (c) 2014 Jakob von Raumer. All rights reserved.
|
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
2015-05-14 02:01:48 +00:00
|
|
|
|
Authors: Jakob von Raumer, Floris van Doorn
|
2015-02-21 00:30:32 +00:00
|
|
|
|
|
|
|
|
|
Ported from Coq HoTT
|
|
|
|
|
-/
|
|
|
|
|
|
2015-11-13 22:17:02 +00:00
|
|
|
|
import arity .eq .bool .unit .sigma .nat.basic
|
2015-06-04 01:41:21 +00:00
|
|
|
|
open is_trunc eq prod sigma nat equiv option is_equiv bool unit
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-05-14 02:01:48 +00:00
|
|
|
|
structure pointed [class] (A : Type) :=
|
2014-12-12 04:14:53 +00:00
|
|
|
|
(point : A)
|
|
|
|
|
|
2015-06-04 01:41:21 +00:00
|
|
|
|
structure Pointed :=
|
|
|
|
|
{carrier : Type}
|
|
|
|
|
(Point : carrier)
|
|
|
|
|
|
|
|
|
|
open Pointed
|
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
notation `Type*` := Pointed
|
|
|
|
|
|
2015-05-14 02:01:48 +00:00
|
|
|
|
namespace pointed
|
2015-06-04 01:41:21 +00:00
|
|
|
|
attribute Pointed.carrier [coercion]
|
2015-05-14 02:01:48 +00:00
|
|
|
|
variables {A B : Type}
|
2015-06-04 01:41:21 +00:00
|
|
|
|
|
2015-07-07 23:37:06 +00:00
|
|
|
|
definition pt [unfold 2] [H : pointed A] := point A
|
2015-09-22 16:01:55 +00:00
|
|
|
|
protected definition Mk [constructor] := @Pointed.mk
|
|
|
|
|
protected definition MK [constructor] (A : Type) (a : A) := Pointed.mk a
|
|
|
|
|
protected definition mk' [constructor] (A : Type) [H : pointed A] : Type* :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
Pointed.mk (point A)
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition pointed_carrier [instance] [constructor] (A : Type*) : pointed A :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
pointed.mk (Point A)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
-- Any contractible type is pointed
|
2015-06-17 23:31:05 +00:00
|
|
|
|
definition pointed_of_is_contr [instance] [priority 800] [constructor]
|
|
|
|
|
(A : Type) [H : is_contr A] : pointed A :=
|
2015-05-14 02:01:48 +00:00
|
|
|
|
pointed.mk !center
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
-- A pi type with a pointed target is pointed
|
2015-06-04 01:41:21 +00:00
|
|
|
|
definition pointed_pi [instance] [constructor] (P : A → Type) [H : Πx, pointed (P x)]
|
2015-05-14 02:01:48 +00:00
|
|
|
|
: pointed (Πx, P x) :=
|
|
|
|
|
pointed.mk (λx, pt)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
-- A sigma type of pointed components is pointed
|
2015-06-04 01:41:21 +00:00
|
|
|
|
definition pointed_sigma [instance] [constructor] (P : A → Type) [G : pointed A]
|
2015-05-14 02:01:48 +00:00
|
|
|
|
[H : pointed (P pt)] : pointed (Σx, P x) :=
|
|
|
|
|
pointed.mk ⟨pt,pt⟩
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-06-04 01:41:21 +00:00
|
|
|
|
definition pointed_prod [instance] [constructor] (A B : Type) [H1 : pointed A] [H2 : pointed B]
|
2015-05-14 02:01:48 +00:00
|
|
|
|
: pointed (A × B) :=
|
|
|
|
|
pointed.mk (pt,pt)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-06-04 01:41:21 +00:00
|
|
|
|
definition pointed_loop [instance] [constructor] (a : A) : pointed (a = a) :=
|
2015-05-14 02:01:48 +00:00
|
|
|
|
pointed.mk idp
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-06-04 01:41:21 +00:00
|
|
|
|
definition pointed_bool [instance] [constructor] : pointed bool :=
|
|
|
|
|
pointed.mk ff
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition Bool [constructor] : Type* :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
pointed.mk' bool
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-06-04 01:41:21 +00:00
|
|
|
|
definition pointed_fun_closed [constructor] (f : A → B) [H : pointed A] : pointed B :=
|
|
|
|
|
pointed.mk (f pt)
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition Loop_space [reducible] [constructor] (A : Type*) : Type* :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
pointed.mk' (point A = point A)
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-11-13 22:17:02 +00:00
|
|
|
|
definition Iterated_loop_space [unfold 1] [reducible] : ℕ → Type* → Type*
|
|
|
|
|
| Iterated_loop_space 0 X := X
|
|
|
|
|
| Iterated_loop_space (n+1) X := Loop_space (Iterated_loop_space n X)
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-06-04 05:09:26 +00:00
|
|
|
|
prefix `Ω`:(max+5) := Loop_space
|
2015-10-01 19:52:28 +00:00
|
|
|
|
notation `Ω[`:95 n:0 `] `:0 A:95 := Iterated_loop_space n A
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-11-16 20:30:28 +00:00
|
|
|
|
definition rfln [constructor] [reducible] {A : Type*} {n : ℕ} : Ω[n] A := pt
|
|
|
|
|
definition refln [constructor] [reducible] (A : Type*) (n : ℕ) : Ω[n] A := pt
|
|
|
|
|
definition refln_eq_refl (A : Type*) (n : ℕ) : rfln = rfl :> Ω[succ n] A := rfl
|
2015-07-29 12:17:16 +00:00
|
|
|
|
|
|
|
|
|
definition iterated_loop_space [unfold 3] (A : Type) [H : pointed A] (n : ℕ) : Type :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
Ω[n] (pointed.mk' A)
|
|
|
|
|
|
|
|
|
|
open equiv.ops
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition Pointed_eq {A B : Type*} (f : A ≃ B) (p : f pt = pt) : A = B :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
begin
|
|
|
|
|
cases A with A a, cases B with B b, esimp at *,
|
|
|
|
|
fapply apd011 @Pointed.mk,
|
|
|
|
|
{ apply ua f},
|
|
|
|
|
{ rewrite [cast_ua,p]},
|
|
|
|
|
end
|
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
protected definition Pointed.sigma_char.{u} : Pointed.{u} ≃ Σ(X : Type.{u}), X :=
|
|
|
|
|
begin
|
|
|
|
|
fapply equiv.MK,
|
|
|
|
|
{ intro x, induction x with X x, exact ⟨X, x⟩},
|
|
|
|
|
{ intro x, induction x with X x, exact pointed.MK X x},
|
|
|
|
|
{ intro x, induction x with X x, reflexivity},
|
|
|
|
|
{ intro x, induction x with X x, reflexivity},
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
definition add_point [constructor] (A : Type) : Type* :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
Pointed.mk (none : option A)
|
|
|
|
|
postfix `₊`:(max+1) := add_point
|
|
|
|
|
-- the inclusion A → A₊ is called "some", the extra point "pt" or "none" ("@none A")
|
|
|
|
|
end pointed
|
|
|
|
|
|
|
|
|
|
open pointed
|
2015-09-22 16:01:55 +00:00
|
|
|
|
structure pmap (A B : Type*) :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
(map : A → B)
|
|
|
|
|
(resp_pt : map (Point A) = Point B)
|
2015-06-04 01:41:21 +00:00
|
|
|
|
|
2015-06-17 19:58:58 +00:00
|
|
|
|
open pmap
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
|
|
|
|
namespace pointed
|
|
|
|
|
|
2015-07-07 23:37:06 +00:00
|
|
|
|
abbreviation respect_pt [unfold 3] := @pmap.resp_pt
|
2015-06-17 19:58:58 +00:00
|
|
|
|
notation `map₊` := pmap
|
2015-10-01 19:52:28 +00:00
|
|
|
|
infix ` →* `:30 := pmap
|
2015-06-17 19:58:58 +00:00
|
|
|
|
attribute pmap.map [coercion]
|
2015-09-22 16:01:55 +00:00
|
|
|
|
variables {A B C D : Type*} {f g h : A →* B}
|
2015-06-17 23:31:05 +00:00
|
|
|
|
|
|
|
|
|
definition pmap_eq (r : Πa, f a = g a) (s : respect_pt f = (r pt) ⬝ respect_pt g) : f = g :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
begin
|
|
|
|
|
cases f with f p, cases g with g q,
|
|
|
|
|
esimp at *,
|
2015-06-17 19:58:58 +00:00
|
|
|
|
fapply apo011 pmap.mk,
|
2015-06-04 01:41:21 +00:00
|
|
|
|
{ exact eq_of_homotopy r},
|
|
|
|
|
{ apply concato_eq, apply pathover_eq_Fl, apply inv_con_eq_of_eq_con,
|
2015-06-17 19:58:58 +00:00
|
|
|
|
rewrite [ap_eq_ap10,↑ap10,apd10_eq_of_homotopy,s]}
|
2015-06-04 01:41:21 +00:00
|
|
|
|
end
|
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition pid [constructor] (A : Type*) : A →* A :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
pmap.mk function.id idp
|
|
|
|
|
|
|
|
|
|
definition pcompose [constructor] (g : B →* C) (f : A →* B) : A →* C :=
|
|
|
|
|
pmap.mk (λa, g (f a)) (ap g (respect_pt f) ⬝ respect_pt g)
|
|
|
|
|
|
2015-10-01 19:52:28 +00:00
|
|
|
|
infixr ` ∘* `:60 := pcompose
|
2015-06-17 19:58:58 +00:00
|
|
|
|
|
|
|
|
|
structure phomotopy (f g : A →* B) :=
|
|
|
|
|
(homotopy : f ~ g)
|
|
|
|
|
(homotopy_pt : homotopy pt ⬝ respect_pt g = respect_pt f)
|
|
|
|
|
|
2015-10-01 19:52:28 +00:00
|
|
|
|
infix ` ~* `:50 := phomotopy
|
2015-07-07 23:37:06 +00:00
|
|
|
|
abbreviation to_homotopy_pt [unfold 5] := @phomotopy.homotopy_pt
|
|
|
|
|
abbreviation to_homotopy [coercion] [unfold 5] (p : f ~* g) : Πa, f a = g a :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
phomotopy.homotopy p
|
|
|
|
|
|
|
|
|
|
definition passoc (h : C →* D) (g : B →* C) (f : A →* B) : (h ∘* g) ∘* f ~* h ∘* (g ∘* f) :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor, intro a, reflexivity,
|
2015-06-17 19:58:58 +00:00
|
|
|
|
cases A, cases B, cases C, cases D, cases f with f pf, cases g with g pg, cases h with h ph,
|
|
|
|
|
esimp at *,
|
|
|
|
|
induction pf, induction pg, induction ph, reflexivity
|
|
|
|
|
end
|
|
|
|
|
|
2015-06-17 23:31:05 +00:00
|
|
|
|
definition pid_comp (f : A →* B) : pid B ∘* f ~* f :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 23:31:05 +00:00
|
|
|
|
{ intro a, reflexivity},
|
|
|
|
|
{ esimp, exact !idp_con ⬝ !ap_id⁻¹}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition comp_pid (f : A →* B) : f ∘* pid A ~* f :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 23:31:05 +00:00
|
|
|
|
{ intro a, reflexivity},
|
|
|
|
|
{ reflexivity}
|
|
|
|
|
end
|
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition pmap_equiv_left (A : Type) (B : Type*) : A₊ →* B ≃ (A → B) :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
begin
|
|
|
|
|
fapply equiv.MK,
|
|
|
|
|
{ intro f a, cases f with f p, exact f (some a)},
|
2015-06-23 16:47:52 +00:00
|
|
|
|
{ intro f, fconstructor,
|
2015-06-04 01:41:21 +00:00
|
|
|
|
intro a, cases a, exact pt, exact f a,
|
|
|
|
|
reflexivity},
|
|
|
|
|
{ intro f, reflexivity},
|
2015-06-17 19:58:58 +00:00
|
|
|
|
{ intro f, cases f with f p, esimp, fapply pmap_eq,
|
2015-06-04 01:41:21 +00:00
|
|
|
|
{ intro a, cases a; all_goals (esimp at *), exact p⁻¹},
|
|
|
|
|
{ esimp, exact !con.left_inv⁻¹}},
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- set_option pp.notation false
|
2015-09-22 16:01:55 +00:00
|
|
|
|
-- definition pmap_equiv_right (A : Type*) (B : Type)
|
2015-06-04 01:41:21 +00:00
|
|
|
|
-- : (Σ(b : B), map₊ A (pointed.Mk b)) ≃ (A → B) :=
|
|
|
|
|
-- begin
|
|
|
|
|
-- fapply equiv.MK,
|
|
|
|
|
-- { intro u a, cases u with b f, cases f with f p, esimp at f, exact f a},
|
2015-06-17 19:58:58 +00:00
|
|
|
|
-- { intro f, refine ⟨f pt, _⟩, fapply pmap.mk,
|
2015-06-04 01:41:21 +00:00
|
|
|
|
-- intro a, esimp, exact f a,
|
|
|
|
|
-- reflexivity},
|
|
|
|
|
-- { intro f, reflexivity},
|
|
|
|
|
-- { intro u, cases u with b f, cases f with f p, esimp at *, apply sigma_eq p,
|
|
|
|
|
-- esimp, apply sorry
|
|
|
|
|
-- }
|
|
|
|
|
-- end
|
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
definition pmap_bool_equiv (B : Type*) : map₊ Bool B ≃ B :=
|
2015-06-04 01:41:21 +00:00
|
|
|
|
begin
|
|
|
|
|
fapply equiv.MK,
|
|
|
|
|
{ intro f, cases f with f p, exact f tt},
|
2015-06-23 16:47:52 +00:00
|
|
|
|
{ intro b, fconstructor,
|
2015-06-04 01:41:21 +00:00
|
|
|
|
intro u, cases u, exact pt, exact b,
|
|
|
|
|
reflexivity},
|
|
|
|
|
{ intro b, reflexivity},
|
2015-06-17 19:58:58 +00:00
|
|
|
|
{ intro f, cases f with f p, esimp, fapply pmap_eq,
|
2015-06-04 01:41:21 +00:00
|
|
|
|
{ intro a, cases a; all_goals (esimp at *), exact p⁻¹},
|
|
|
|
|
{ esimp, exact !con.left_inv⁻¹}},
|
|
|
|
|
end
|
2015-05-14 02:01:48 +00:00
|
|
|
|
|
2015-11-13 22:17:02 +00:00
|
|
|
|
definition ap1 [constructor] (f : A →* B) : Ω A →* Ω B :=
|
|
|
|
|
begin
|
|
|
|
|
fconstructor,
|
|
|
|
|
{ intro p, exact !respect_pt⁻¹ ⬝ ap f p ⬝ !respect_pt},
|
|
|
|
|
{ esimp, apply con.left_inv}
|
|
|
|
|
end
|
|
|
|
|
|
2015-07-29 12:17:16 +00:00
|
|
|
|
definition apn [unfold 3] (n : ℕ) (f : map₊ A B) : Ω[n] A →* Ω[n] B :=
|
2015-06-04 05:09:26 +00:00
|
|
|
|
begin
|
2015-11-13 22:17:02 +00:00
|
|
|
|
induction n with n IH,
|
|
|
|
|
{ exact f},
|
|
|
|
|
{ esimp [Iterated_loop_space], exact ap1 IH}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
variable (A)
|
|
|
|
|
definition loop_space_succ_eq_in (n : ℕ) : Ω[succ n] A = Ω[n] (Ω A) :=
|
|
|
|
|
begin
|
|
|
|
|
induction n with n IH,
|
|
|
|
|
{ reflexivity},
|
|
|
|
|
{ exact ap Loop_space IH}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition loop_space_add (n m : ℕ) : Ω[n] (Ω[m] A) = Ω[m+n] (A) :=
|
|
|
|
|
begin
|
|
|
|
|
induction n with n IH,
|
|
|
|
|
{ reflexivity},
|
|
|
|
|
{ exact ap Loop_space IH}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition loop_space_succ_eq_out (n : ℕ) : Ω[succ n] A = Ω(Ω[n] A) :=
|
|
|
|
|
idp
|
|
|
|
|
|
|
|
|
|
variable {A}
|
|
|
|
|
definition loop_space_loop_irrel (p : point A = point A) : Ω(Pointed.mk p) = Ω[2] A :=
|
|
|
|
|
begin
|
|
|
|
|
intros, fapply Pointed_eq,
|
|
|
|
|
{ esimp, transitivity _,
|
|
|
|
|
apply eq_equiv_fn_eq_of_equiv (equiv_eq_closed_right _ p⁻¹),
|
|
|
|
|
esimp, apply eq_equiv_eq_closed, apply con.right_inv, apply con.right_inv},
|
|
|
|
|
{ esimp, apply con.left_inv}
|
2015-06-04 05:09:26 +00:00
|
|
|
|
end
|
|
|
|
|
|
2015-11-13 22:17:02 +00:00
|
|
|
|
definition iterated_loop_space_loop_irrel (n : ℕ) (p : point A = point A)
|
|
|
|
|
: Ω[succ n](Pointed.mk p) = Ω[succ (succ n)] A :> Pointed :=
|
|
|
|
|
calc
|
|
|
|
|
Ω[succ n](Pointed.mk p) = Ω[n](Ω (Pointed.mk p)) : loop_space_succ_eq_in
|
|
|
|
|
... = Ω[n] (Ω[2] A) : loop_space_loop_irrel
|
|
|
|
|
... = Ω[2+n] A : loop_space_add
|
|
|
|
|
... = Ω[n+2] A : add.comm
|
|
|
|
|
|
|
|
|
|
-- TODO:
|
|
|
|
|
-- definition apn_compose (n : ℕ) (g : B →* C) (f : A →* B) : apn n (g ∘* f) ~* apn n g ∘* apn n f :=
|
|
|
|
|
-- _
|
2015-06-17 23:31:05 +00:00
|
|
|
|
|
|
|
|
|
definition ap1_compose (g : B →* C) (f : A →* B) : ap1 (g ∘* f) ~* ap1 g ∘* ap1 f :=
|
|
|
|
|
begin
|
|
|
|
|
induction B, induction C, induction g with g pg, induction f with f pf, esimp at *,
|
|
|
|
|
induction pg, induction pf,
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
|
|
|
|
{ intro p, esimp, apply whisker_left, exact ap_compose g f p ⬝ ap (ap g) !idp_con⁻¹},
|
2015-06-17 23:31:05 +00:00
|
|
|
|
{ reflexivity}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
protected definition phomotopy.refl [refl] (f : A →* B) : f ~* f :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 23:31:05 +00:00
|
|
|
|
{ intro a, exact idp},
|
|
|
|
|
{ apply idp_con}
|
|
|
|
|
end
|
2015-06-17 19:58:58 +00:00
|
|
|
|
|
2015-06-17 23:31:05 +00:00
|
|
|
|
protected definition phomotopy.trans [trans] (p : f ~* g) (q : g ~* h)
|
2015-06-17 19:58:58 +00:00
|
|
|
|
: f ~* h :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 19:58:58 +00:00
|
|
|
|
{ intro a, exact p a ⬝ q a},
|
|
|
|
|
{ induction f, induction g, induction p with p p', induction q with q q', esimp at *,
|
|
|
|
|
induction p', induction q', esimp, apply con.assoc}
|
|
|
|
|
end
|
|
|
|
|
|
2015-06-17 23:31:05 +00:00
|
|
|
|
protected definition phomotopy.symm [symm] (p : f ~* g) : g ~* f :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 19:58:58 +00:00
|
|
|
|
{ intro a, exact (p a)⁻¹},
|
|
|
|
|
{ induction f, induction p with p p', esimp at *,
|
|
|
|
|
induction p', esimp, apply inv_con_cancel_left}
|
|
|
|
|
end
|
|
|
|
|
|
2015-10-01 19:52:28 +00:00
|
|
|
|
infix ` ⬝* `:75 := phomotopy.trans
|
2015-06-17 23:31:05 +00:00
|
|
|
|
postfix `⁻¹*`:(max+1) := phomotopy.symm
|
|
|
|
|
|
|
|
|
|
definition eq_of_phomotopy (p : f ~* g) : f = g :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
begin
|
|
|
|
|
fapply pmap_eq,
|
|
|
|
|
{ intro a, exact p a},
|
|
|
|
|
{ exact !to_homotopy_pt⁻¹}
|
|
|
|
|
end
|
|
|
|
|
|
2015-06-17 23:31:05 +00:00
|
|
|
|
definition pwhisker_left (h : B →* C) (p : f ~* g) : h ∘* f ~* h ∘* g :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 23:31:05 +00:00
|
|
|
|
{ intro a, exact ap h (p a)},
|
|
|
|
|
{ induction A, induction B, induction C,
|
|
|
|
|
induction f with f pf, induction g with g pg, induction h with h ph,
|
|
|
|
|
induction p with p p', esimp at *, induction ph, induction pg, induction p', reflexivity}
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition pwhisker_right (h : C →* A) (p : f ~* g) : f ∘* h ~* g ∘* h :=
|
|
|
|
|
begin
|
2015-06-23 16:47:52 +00:00
|
|
|
|
fconstructor,
|
2015-06-17 23:31:05 +00:00
|
|
|
|
{ intro a, exact p (h a)},
|
|
|
|
|
{ induction A, induction B, induction C,
|
|
|
|
|
induction f with f pf, induction g with g pg, induction h with h ph,
|
|
|
|
|
induction p with p p', esimp at *, induction ph, induction pg, induction p', esimp,
|
|
|
|
|
exact !idp_con⁻¹}
|
|
|
|
|
end
|
|
|
|
|
|
2015-09-22 16:01:55 +00:00
|
|
|
|
structure pequiv (A B : Type*) :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
(to_pmap : A →* B)
|
|
|
|
|
(is_equiv_to_pmap : is_equiv to_pmap)
|
|
|
|
|
|
2015-10-01 19:52:28 +00:00
|
|
|
|
infix ` ≃* `:25 := pequiv
|
2015-06-17 19:58:58 +00:00
|
|
|
|
attribute pequiv.to_pmap [coercion]
|
|
|
|
|
attribute pequiv.is_equiv_to_pmap [instance]
|
|
|
|
|
|
|
|
|
|
definition equiv_of_pequiv [constructor] (f : A ≃* B) : A ≃ B :=
|
|
|
|
|
equiv.mk f _
|
|
|
|
|
|
2015-05-14 02:01:48 +00:00
|
|
|
|
end pointed
|