2015-02-21 00:30:32 +00:00
|
|
|
|
/-
|
|
|
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
2015-11-21 20:12:45 +00:00
|
|
|
|
Author: Jeremy Avigad, Jakob von Raumer, Floris van Doorn
|
2015-02-21 00:30:32 +00:00
|
|
|
|
|
|
|
|
|
Ported from Coq HoTT
|
|
|
|
|
-/
|
|
|
|
|
|
2014-12-12 18:17:50 +00:00
|
|
|
|
prelude
|
|
|
|
|
import .path .function
|
2015-06-24 21:59:17 +00:00
|
|
|
|
open eq function lift
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
/- Equivalences -/
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
-- This is our definition of equivalence. In the HoTT-book it's called
|
|
|
|
|
-- ihae (half-adjoint equivalence).
|
|
|
|
|
structure is_equiv [class] {A B : Type} (f : A → B) :=
|
2015-04-24 22:51:16 +00:00
|
|
|
|
mk' ::
|
2014-12-12 04:14:53 +00:00
|
|
|
|
(inv : B → A)
|
2015-07-29 12:17:16 +00:00
|
|
|
|
(right_inv : Πb, f (inv b) = b)
|
|
|
|
|
(left_inv : Πa, inv (f a) = a)
|
2015-04-27 19:39:36 +00:00
|
|
|
|
(adj : Πx, right_inv (f x) = ap f (left_inv x))
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-02-26 01:42:44 +00:00
|
|
|
|
attribute is_equiv.inv [reducible]
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
-- A more bundled version of equivalence
|
2014-12-12 04:14:53 +00:00
|
|
|
|
structure equiv (A B : Type) :=
|
|
|
|
|
(to_fun : A → B)
|
|
|
|
|
(to_is_equiv : is_equiv to_fun)
|
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
namespace is_equiv
|
|
|
|
|
/- Some instances and closure properties of equivalences -/
|
2015-10-01 19:52:28 +00:00
|
|
|
|
postfix ⁻¹ := inv
|
2015-04-24 22:51:16 +00:00
|
|
|
|
/- a second notation for the inverse, which is not overloaded -/
|
2015-10-09 20:21:03 +00:00
|
|
|
|
postfix [parsing_only] `⁻¹ᶠ`:std.prec.max_plus := inv
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
section
|
2016-06-23 22:38:35 +00:00
|
|
|
|
variables {A B C : Type} (g : B → C) (f : A → B) {f' : A → B}
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-04-24 22:51:16 +00:00
|
|
|
|
-- The variant of mk' where f is explicit.
|
2016-11-23 22:59:13 +00:00
|
|
|
|
protected definition mk [constructor] := @is_equiv.mk' A B f
|
2015-04-24 22:51:16 +00:00
|
|
|
|
|
2014-12-12 04:14:53 +00:00
|
|
|
|
-- The identity function is an equivalence.
|
2016-02-11 22:58:19 +00:00
|
|
|
|
definition is_equiv_id [instance] [constructor] (A : Type) : (is_equiv (id : A → A)) :=
|
2015-04-24 22:51:16 +00:00
|
|
|
|
is_equiv.mk id id (λa, idp) (λa, idp) (λa, idp)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
-- The composition of two equivalences is, again, an equivalence.
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition is_equiv_compose [constructor] (Hf : is_equiv f) (Hg : is_equiv g)
|
2015-08-07 14:44:57 +00:00
|
|
|
|
: is_equiv (g ∘ f) :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
is_equiv.mk (g ∘ f) (f⁻¹ᶠ ∘ g⁻¹ᶠ)
|
|
|
|
|
abstract (λc, ap g (right_inv f (g⁻¹ᶠ c)) ⬝ right_inv g c) end
|
2016-02-11 18:58:31 +00:00
|
|
|
|
abstract (λa, ap (inv f) (left_inv g (f a)) ⬝ left_inv f a) end
|
|
|
|
|
abstract (λa, (whisker_left _ (adj g (f a))) ⬝
|
2015-08-07 14:44:57 +00:00
|
|
|
|
(ap_con g _ _)⁻¹ ⬝
|
|
|
|
|
ap02 g ((ap_con_eq_con (right_inv f) (left_inv g (f a)))⁻¹ ⬝
|
|
|
|
|
(ap_compose f (inv f) _ ◾ adj f a) ⬝
|
|
|
|
|
(ap_con f _ _)⁻¹
|
|
|
|
|
) ⬝
|
2016-02-11 18:58:31 +00:00
|
|
|
|
(ap_compose g f _)⁻¹) end
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
-- Any function equal to an equivalence is an equivlance as well.
|
2015-05-02 21:17:50 +00:00
|
|
|
|
variable {f}
|
2015-06-17 19:58:58 +00:00
|
|
|
|
definition is_equiv_eq_closed [Hf : is_equiv f] (Heq : f = f') : is_equiv f' :=
|
|
|
|
|
eq.rec_on Heq Hf
|
2015-02-21 00:30:32 +00:00
|
|
|
|
end
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-04-22 02:17:59 +00:00
|
|
|
|
section
|
2014-12-12 04:14:53 +00:00
|
|
|
|
parameters {A B : Type} (f : A → B) (g : B → A)
|
2015-07-29 12:17:16 +00:00
|
|
|
|
(ret : Πb, f (g b) = b) (sec : Πa, g (f a) = a)
|
|
|
|
|
|
2016-06-23 20:49:54 +00:00
|
|
|
|
definition adjointify_left_inv' [unfold_full] (a : A) : g (f a) = a :=
|
2015-07-29 12:17:16 +00:00
|
|
|
|
ap g (ap f (inverse (sec a))) ⬝ ap g (ret (f a)) ⬝ sec a
|
|
|
|
|
|
2016-03-08 05:16:45 +00:00
|
|
|
|
theorem adjointify_adj' (a : A) : ret (f a) = ap f (adjointify_left_inv' a) :=
|
2015-07-29 12:17:16 +00:00
|
|
|
|
let fgretrfa := ap f (ap g (ret (f a))) in
|
|
|
|
|
let fgfinvsect := ap f (ap g (ap f (sec a)⁻¹)) in
|
|
|
|
|
let fgfa := f (g (f a)) in
|
|
|
|
|
let retrfa := ret (f a) in
|
|
|
|
|
have eq1 : ap f (sec a) = _,
|
|
|
|
|
from calc ap f (sec a)
|
|
|
|
|
= idp ⬝ ap f (sec a) : by rewrite idp_con
|
|
|
|
|
... = (ret (f a) ⬝ (ret (f a))⁻¹) ⬝ ap f (sec a) : by rewrite con.right_inv
|
|
|
|
|
... = ((ret fgfa)⁻¹ ⬝ ap (f ∘ g) (ret (f a))) ⬝ ap f (sec a) : by rewrite con_ap_eq_con
|
|
|
|
|
... = ((ret fgfa)⁻¹ ⬝ fgretrfa) ⬝ ap f (sec a) : by rewrite ap_compose
|
|
|
|
|
... = (ret fgfa)⁻¹ ⬝ (fgretrfa ⬝ ap f (sec a)) : by rewrite con.assoc,
|
|
|
|
|
have eq2 : ap f (sec a) ⬝ idp = (ret fgfa)⁻¹ ⬝ (fgretrfa ⬝ ap f (sec a)),
|
|
|
|
|
from !con_idp ⬝ eq1,
|
|
|
|
|
have eq3 : idp = _,
|
|
|
|
|
from calc idp
|
|
|
|
|
= (ap f (sec a))⁻¹ ⬝ ((ret fgfa)⁻¹ ⬝ (fgretrfa ⬝ ap f (sec a))) : eq_inv_con_of_con_eq eq2
|
|
|
|
|
... = ((ap f (sec a))⁻¹ ⬝ (ret fgfa)⁻¹) ⬝ (fgretrfa ⬝ ap f (sec a)) : by rewrite con.assoc'
|
|
|
|
|
... = (ap f (sec a)⁻¹ ⬝ (ret fgfa)⁻¹) ⬝ (fgretrfa ⬝ ap f (sec a)) : by rewrite ap_inv
|
|
|
|
|
... = ((ap f (sec a)⁻¹ ⬝ (ret fgfa)⁻¹) ⬝ fgretrfa) ⬝ ap f (sec a) : by rewrite con.assoc'
|
|
|
|
|
... = ((retrfa⁻¹ ⬝ ap (f ∘ g) (ap f (sec a)⁻¹)) ⬝ fgretrfa) ⬝ ap f (sec a) : by rewrite con_ap_eq_con
|
2015-08-31 16:23:34 +00:00
|
|
|
|
... = ((retrfa⁻¹ ⬝ fgfinvsect) ⬝ fgretrfa) ⬝ ap f (sec a) : by rewrite ap_compose
|
2015-07-29 12:17:16 +00:00
|
|
|
|
... = (retrfa⁻¹ ⬝ (fgfinvsect ⬝ fgretrfa)) ⬝ ap f (sec a) : by rewrite con.assoc'
|
|
|
|
|
... = retrfa⁻¹ ⬝ ap f (ap g (ap f (sec a)⁻¹) ⬝ ap g (ret (f a))) ⬝ ap f (sec a) : by rewrite ap_con
|
|
|
|
|
... = retrfa⁻¹ ⬝ (ap f (ap g (ap f (sec a)⁻¹) ⬝ ap g (ret (f a))) ⬝ ap f (sec a)) : by rewrite con.assoc'
|
|
|
|
|
... = retrfa⁻¹ ⬝ ap f ((ap g (ap f (sec a)⁻¹) ⬝ ap g (ret (f a))) ⬝ sec a) : by rewrite -ap_con,
|
2016-02-16 01:59:38 +00:00
|
|
|
|
show ret (f a) = ap f ((ap g (ap f (sec a)⁻¹) ⬝ ap g (ret (f a))) ⬝ sec a),
|
|
|
|
|
from eq_of_idp_eq_inv_con eq3
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-05-14 02:01:48 +00:00
|
|
|
|
definition adjointify [constructor] : is_equiv f :=
|
2016-02-16 01:59:38 +00:00
|
|
|
|
is_equiv.mk f g ret adjointify_left_inv' adjointify_adj'
|
2014-12-12 04:14:53 +00:00
|
|
|
|
end
|
|
|
|
|
|
2015-06-17 19:58:58 +00:00
|
|
|
|
-- Any function pointwise equal to an equivalence is an equivalence as well.
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_closed [constructor] {A B : Type} (f : A → B) {f' : A → B} (Hty : f ~ f')
|
|
|
|
|
(Hf : is_equiv f) : is_equiv f' :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
adjointify f'
|
|
|
|
|
(inv f)
|
|
|
|
|
(λ b, (Hty (inv f b))⁻¹ ⬝ right_inv f b)
|
|
|
|
|
(λ a, (ap (inv f) (Hty a))⁻¹ ⬝ left_inv f a)
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition inv_homotopy_closed [constructor] {A B : Type} {f : A → B} (f' : B → A)
|
|
|
|
|
(Hf : is_equiv f) (Hty : f⁻¹ᶠ ~ f') : is_equiv f :=
|
2015-06-17 19:58:58 +00:00
|
|
|
|
adjointify f
|
|
|
|
|
f'
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(λ b, ap f !Hty⁻¹ᵖ ⬝ right_inv f b)
|
|
|
|
|
(λ a, !Hty⁻¹ᵖ ⬝ left_inv f a)
|
2015-06-17 19:58:58 +00:00
|
|
|
|
|
2017-06-02 16:13:20 +00:00
|
|
|
|
definition inv_homotopy_inv {A B : Type} {f g : A → B} [is_equiv f] [is_equiv g] (p : f ~ g)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
: f⁻¹ᶠ ~ g⁻¹ᶠ :=
|
|
|
|
|
λb, (left_inv g (f⁻¹ᶠ b))⁻¹ ⬝ ap g⁻¹ᶠ ((p (f⁻¹ᶠ b))⁻¹ ⬝ right_inv f b)
|
2017-06-02 16:13:20 +00:00
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
definition is_equiv_up [instance] [constructor] (A : Type)
|
|
|
|
|
: is_equiv (up : A → lift A) :=
|
2015-06-24 21:59:17 +00:00
|
|
|
|
adjointify up down (λa, by induction a;reflexivity) (λa, idp)
|
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
section
|
2015-03-13 22:27:29 +00:00
|
|
|
|
variables {A B C : Type} (f : A → B) {f' : A → B} [Hf : is_equiv f] (g : B → C)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
include Hf
|
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
|
-- The function equiv_rect says that given an equivalence f : A → B,
|
|
|
|
|
-- and a hypothesis from B, one may always assume that the hypothesis
|
|
|
|
|
-- is in the image of e.
|
|
|
|
|
|
|
|
|
|
-- In fibrational terms, if we have a fibration over B which has a section
|
|
|
|
|
-- once pulled back along an equivalence f : A → B, then it has a section
|
|
|
|
|
-- over all of B.
|
|
|
|
|
|
|
|
|
|
definition is_equiv_rect (P : B → Type) (g : Πa, P (f a)) (b : B) : P b :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
right_inv f b ▸ g (f⁻¹ᶠ b)
|
2016-11-23 22:59:13 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition is_equiv_rect' (P : A → B → Type) (g : Πb, P (f⁻¹ᶠ b) b) (a : A) : P a (f a) :=
|
2016-11-23 22:59:13 +00:00
|
|
|
|
left_inv f a ▸ g (f a)
|
|
|
|
|
|
|
|
|
|
definition is_equiv_rect_comp (P : B → Type)
|
|
|
|
|
(df : Π (x : A), P (f x)) (x : A) : is_equiv_rect f P df (f x) = df x :=
|
|
|
|
|
calc
|
|
|
|
|
is_equiv_rect f P df (f x)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
= right_inv f (f x) ▸ df (f⁻¹ᶠ (f x)) : by esimp
|
|
|
|
|
... = ap f (left_inv f x) ▸ df (f⁻¹ᶠ (f x)) : by rewrite -adj
|
|
|
|
|
... = left_inv f x ▸ df (f⁻¹ᶠ (f x)) : by rewrite -tr_compose
|
2016-11-23 22:59:13 +00:00
|
|
|
|
... = df x : by rewrite (apdt df (left_inv f x))
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
theorem adj_inv (b : B) : left_inv f (f⁻¹ᶠ b) = ap f⁻¹ᶠ (right_inv f b) :=
|
2016-11-23 22:59:13 +00:00
|
|
|
|
is_equiv_rect f _
|
|
|
|
|
(λa, eq.cancel_right (left_inv f (id a))
|
|
|
|
|
(whisker_left _ !ap_id⁻¹ ⬝ (ap_con_eq_con_ap (left_inv f) (left_inv f a))⁻¹) ⬝
|
2018-09-11 14:45:30 +00:00
|
|
|
|
!ap_compose ⬝ ap02 f⁻¹ᶠ (adj f a)⁻¹)
|
2016-11-23 22:59:13 +00:00
|
|
|
|
b
|
|
|
|
|
|
2015-03-13 22:27:29 +00:00
|
|
|
|
--The inverse of an equivalence is, again, an equivalence.
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition is_equiv_inv [instance] [constructor] [priority 500] : is_equiv f⁻¹ᶠ :=
|
|
|
|
|
is_equiv.mk f⁻¹ᶠ f (left_inv f) (right_inv f) (adj_inv f)
|
2015-02-11 20:49:27 +00:00
|
|
|
|
|
2016-04-22 19:12:25 +00:00
|
|
|
|
-- The 2-out-of-3 properties
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition cancel_right (g : B → C) [Hgf : is_equiv (g ∘ f)] : (is_equiv g) :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
homotopy_closed _ (λb, ap g (right_inv f b)) (is_equiv_compose (g ∘ f) f⁻¹ᶠ _ _)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition cancel_left (g : C → A) [Hgf : is_equiv (f ∘ g)] : (is_equiv g) :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
homotopy_closed _ (λa, left_inv f (g a)) (is_equiv_compose f⁻¹ᶠ (f ∘ g) _ _)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition inj' [unfold 4] {x y : A} (q : f x = f y) : x = y :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(left_inv f x)⁻¹ ⬝ ap f⁻¹ᶠ q ⬝ left_inv f y
|
2015-05-22 08:35:38 +00:00
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition ap_inj' {x y : A} (q : f x = f y) : ap f (inj' f q) = q :=
|
2016-11-24 05:13:05 +00:00
|
|
|
|
!ap_con ⬝ whisker_right _ !ap_con
|
2016-04-22 19:12:25 +00:00
|
|
|
|
⬝ ((!ap_inv ⬝ inverse2 (adj f _)⁻¹)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
◾ (inverse (ap_compose f f⁻¹ᶠ _))
|
2016-04-22 19:12:25 +00:00
|
|
|
|
◾ (adj f _)⁻¹)
|
|
|
|
|
⬝ con_ap_con_eq_con_con (right_inv f) _ _
|
2016-11-24 05:13:05 +00:00
|
|
|
|
⬝ whisker_right _ !con.left_inv
|
2016-04-22 19:12:25 +00:00
|
|
|
|
⬝ !idp_con
|
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition inj'_ap {x y : A} (q : x = y) : inj' f (ap f q) = q :=
|
2016-04-22 19:12:25 +00:00
|
|
|
|
by induction q; apply con.left_inv
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
2016-03-24 21:28:29 +00:00
|
|
|
|
definition is_equiv_ap [instance] [constructor] (x y : A) : is_equiv (ap f : x = y → f x = f y) :=
|
2016-02-15 17:57:51 +00:00
|
|
|
|
adjointify
|
|
|
|
|
(ap f)
|
2018-09-07 14:30:58 +00:00
|
|
|
|
(inj' f)
|
|
|
|
|
(ap_inj' f)
|
|
|
|
|
(inj'_ap f)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2015-03-13 22:27:29 +00:00
|
|
|
|
section
|
2016-03-14 23:11:21 +00:00
|
|
|
|
variables {A B C : Type} {f : A → B} [Hf : is_equiv f]
|
2015-03-13 22:27:29 +00:00
|
|
|
|
include Hf
|
|
|
|
|
|
2016-03-14 23:11:21 +00:00
|
|
|
|
section rewrite_rules
|
|
|
|
|
variables {a : A} {b : B}
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition eq_of_eq_inv (p : a = f⁻¹ᶠ b) : f a = b :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
ap f p ⬝ right_inv f b
|
2015-03-13 22:27:29 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition eq_of_inv_eq (p : f⁻¹ᶠ b = a) : b = f a :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
(eq_of_eq_inv p⁻¹)⁻¹
|
2015-03-13 22:27:29 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition inv_eq_of_eq (p : b = f a) : f⁻¹ᶠ b = a :=
|
|
|
|
|
ap f⁻¹ᶠ p ⬝ left_inv f a
|
2015-03-13 22:27:29 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition eq_inv_of_eq (p : f a = b) : a = f⁻¹ᶠ b :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
(inv_eq_of_eq p⁻¹)⁻¹
|
|
|
|
|
end rewrite_rules
|
2016-02-17 16:41:31 +00:00
|
|
|
|
|
|
|
|
|
variable (f)
|
|
|
|
|
|
2016-03-14 23:11:21 +00:00
|
|
|
|
section pre_compose
|
|
|
|
|
variables (α : A → C) (β : B → C)
|
2016-02-17 16:41:31 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_of_homotopy_inv_pre (p : β ~ α ∘ f⁻¹ᶠ) : β ∘ f ~ α :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
λ a, p (f a) ⬝ ap α (left_inv f a)
|
2016-02-17 16:41:31 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_of_inv_homotopy_pre (p : α ∘ f⁻¹ᶠ ~ β) : α ~ β ∘ f :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
λ a, (ap α (left_inv f a))⁻¹ ⬝ p (f a)
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition inv_homotopy_of_homotopy_pre (p : α ~ β ∘ f) : α ∘ f⁻¹ᶠ ~ β :=
|
|
|
|
|
λ b, p (f⁻¹ᶠ b) ⬝ ap β (right_inv f b)
|
2016-03-14 23:11:21 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_inv_of_homotopy_pre (p : β ∘ f ~ α) : β ~ α ∘ f⁻¹ᶠ :=
|
|
|
|
|
λ b, (ap β (right_inv f b))⁻¹ ⬝ p (f⁻¹ᶠ b)
|
2016-03-14 23:11:21 +00:00
|
|
|
|
end pre_compose
|
|
|
|
|
|
|
|
|
|
section post_compose
|
|
|
|
|
variables (α : C → A) (β : C → B)
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_of_homotopy_inv_post (p : α ~ f⁻¹ᶠ ∘ β) : f ∘ α ~ β :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
λ c, ap f (p c) ⬝ (right_inv f (β c))
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_of_inv_homotopy_post (p : f⁻¹ᶠ ∘ β ~ α) : β ~ f ∘ α :=
|
2016-03-14 23:11:21 +00:00
|
|
|
|
λ c, (right_inv f (β c))⁻¹ ⬝ ap f (p c)
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition inv_homotopy_of_homotopy_post (p : β ~ f ∘ α) : f⁻¹ᶠ ∘ β ~ α :=
|
|
|
|
|
λ c, ap f⁻¹ᶠ (p c) ⬝ (left_inv f (α c))
|
2016-03-14 23:11:21 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition homotopy_inv_of_homotopy_post (p : f ∘ α ~ β) : α ~ f⁻¹ᶠ ∘ β :=
|
|
|
|
|
λ c, (left_inv f (α c))⁻¹ ⬝ ap f⁻¹ᶠ (p c)
|
2016-03-14 23:11:21 +00:00
|
|
|
|
end post_compose
|
2016-02-17 16:41:31 +00:00
|
|
|
|
|
2015-03-13 22:27:29 +00:00
|
|
|
|
end
|
|
|
|
|
|
2014-12-12 04:14:53 +00:00
|
|
|
|
--Transporting is an equivalence
|
2015-10-27 21:43:06 +00:00
|
|
|
|
definition is_equiv_tr [constructor] {A : Type} (P : A → Type) {x y : A}
|
2015-08-31 16:23:34 +00:00
|
|
|
|
(p : x = y) : (is_equiv (transport P p)) :=
|
2015-08-07 14:44:57 +00:00
|
|
|
|
is_equiv.mk _ (transport P p⁻¹) (tr_inv_tr p) (inv_tr_tr p) (tr_inv_tr_lemma p)
|
2015-02-21 00:30:32 +00:00
|
|
|
|
|
2016-05-30 18:24:15 +00:00
|
|
|
|
-- a version where the transport is a cast. Note: A and B live in the same universe here.
|
|
|
|
|
definition is_equiv_cast [constructor] {A B : Type} (H : A = B) : is_equiv (cast H) :=
|
|
|
|
|
is_equiv_tr (λX, X) H
|
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
section
|
|
|
|
|
variables {A : Type} {B C : A → Type} (f : Π{a}, B a → C a) [H : Πa, is_equiv (@f a)]
|
2016-02-15 19:40:25 +00:00
|
|
|
|
{g : A → A} {g' : A → A} (h : Π{a}, B (g' a) → B (g a)) (h' : Π{a}, C (g' a) → C (g a))
|
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
include H
|
2016-02-15 19:40:25 +00:00
|
|
|
|
definition inv_commute' (p : Π⦃a : A⦄ (b : B (g' a)), f (h b) = h' (f b)) {a : A}
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(c : C (g' a)) : f⁻¹ᶠ (h' c) = h (f⁻¹ᶠ c) :=
|
|
|
|
|
inj' f (right_inv f (h' c) ⬝ ap h' (right_inv f c)⁻¹ ⬝ (p (f⁻¹ᶠ c))⁻¹)
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition fun_commute_of_inv_commute' (p : Π⦃a : A⦄ (c : C (g' a)), f⁻¹ᶠ (h' c) = h (f⁻¹ᶠ c))
|
2016-02-15 19:40:25 +00:00
|
|
|
|
{a : A} (b : B (g' a)) : f (h b) = h' (f b) :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
inj' f⁻¹ᶠ (left_inv f (h b) ⬝ ap h (left_inv f b)⁻¹ ⬝ (p (f b))⁻¹)
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
2016-02-15 19:40:25 +00:00
|
|
|
|
definition ap_inv_commute' (p : Π⦃a : A⦄ (b : B (g' a)), f (h b) = h' (f b)) {a : A}
|
|
|
|
|
(c : C (g' a)) : ap f (inv_commute' @f @h @h' p c)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
= right_inv f (h' c) ⬝ ap h' (right_inv f c)⁻¹ ⬝ (p (f⁻¹ᶠ c))⁻¹ :=
|
2018-09-07 14:30:58 +00:00
|
|
|
|
!ap_inj'
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
2016-06-23 20:49:54 +00:00
|
|
|
|
-- inv_commute'_fn is in types.equiv
|
2015-08-31 16:23:34 +00:00
|
|
|
|
end
|
2016-04-11 17:11:59 +00:00
|
|
|
|
|
|
|
|
|
-- This is inv_commute' for A ≡ unit
|
|
|
|
|
definition inv_commute1' {B C : Type} (f : B → C) [is_equiv f] (h : B → B) (h' : C → C)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(p : Π(b : B), f (h b) = h' (f b)) (c : C) : f⁻¹ᶠ (h' c) = h (f⁻¹ᶠ c) :=
|
|
|
|
|
inj' f (right_inv f (h' c) ⬝ ap h' (right_inv f c)⁻¹ ⬝ (p (f⁻¹ᶠ c))⁻¹)
|
2016-04-11 17:11:59 +00:00
|
|
|
|
|
2014-12-12 04:14:53 +00:00
|
|
|
|
end is_equiv
|
2015-02-21 00:30:32 +00:00
|
|
|
|
open is_equiv
|
2015-05-07 02:48:11 +00:00
|
|
|
|
|
|
|
|
|
namespace eq
|
2015-10-27 21:43:06 +00:00
|
|
|
|
local attribute is_equiv_tr [instance]
|
|
|
|
|
|
2015-05-07 02:48:11 +00:00
|
|
|
|
definition tr_inv_fn {A : Type} {B : A → Type} {a a' : A} (p : a = a') :
|
|
|
|
|
transport B p⁻¹ = (transport B p)⁻¹ := idp
|
|
|
|
|
definition tr_inv {A : Type} {B : A → Type} {a a' : A} (p : a = a') (b : B a') :
|
|
|
|
|
p⁻¹ ▸ b = (transport B p)⁻¹ b := idp
|
|
|
|
|
|
|
|
|
|
definition cast_inv_fn {A B : Type} (p : A = B) : cast p⁻¹ = (cast p)⁻¹ := idp
|
2015-08-31 16:23:34 +00:00
|
|
|
|
definition cast_inv {A B : Type} (p : A = B) (b : B) : cast p⁻¹ b = (cast p)⁻¹ b := idp
|
2015-05-07 02:48:11 +00:00
|
|
|
|
end eq
|
|
|
|
|
|
2016-03-03 15:48:27 +00:00
|
|
|
|
infix ` ≃ `:25 := equiv
|
|
|
|
|
attribute equiv.to_is_equiv [instance]
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-03-03 15:48:27 +00:00
|
|
|
|
namespace equiv
|
|
|
|
|
attribute to_fun [coercion]
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
section
|
2015-02-26 18:19:54 +00:00
|
|
|
|
variables {A B C : Type}
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-05-14 02:01:48 +00:00
|
|
|
|
protected definition MK [reducible] [constructor] (f : A → B) (g : B → A)
|
2015-07-29 12:17:16 +00:00
|
|
|
|
(right_inv : Πb, f (g b) = b) (left_inv : Πa, g (f a) = a) : A ≃ B :=
|
2015-04-27 19:39:36 +00:00
|
|
|
|
equiv.mk f (adjointify f g right_inv left_inv)
|
2015-02-28 06:16:20 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition to_inv [reducible] [unfold 3] (f : A ≃ B) : B → A := f⁻¹ᶠ
|
|
|
|
|
definition to_right_inv [reducible] [unfold 3] (f : A ≃ B) (b : B) : f (f⁻¹ᶠ b) = b :=
|
2015-07-29 12:17:16 +00:00
|
|
|
|
right_inv f b
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition to_left_inv [reducible] [unfold 3] (f : A ≃ B) (a : A) : f⁻¹ᶠ (f a) = a :=
|
2015-07-29 12:17:16 +00:00
|
|
|
|
left_inv f a
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
|
protected definition rfl [refl] [constructor] : A ≃ A :=
|
2015-02-26 18:19:54 +00:00
|
|
|
|
equiv.mk id !is_equiv_id
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
|
protected definition refl [constructor] [reducible] (A : Type) : A ≃ A :=
|
|
|
|
|
@equiv.rfl A
|
|
|
|
|
|
2016-03-24 21:28:29 +00:00
|
|
|
|
protected definition symm [symm] [constructor] (f : A ≃ B) : B ≃ A :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
equiv.mk f⁻¹ᶠ !is_equiv_inv
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-03-24 21:28:29 +00:00
|
|
|
|
protected definition trans [trans] [constructor] (f : A ≃ B) (g : B ≃ C) : A ≃ C :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
equiv.mk (g ∘ f) (is_equiv_compose g f _ _)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-11-13 22:17:02 +00:00
|
|
|
|
infixl ` ⬝e `:75 := equiv.trans
|
2016-02-15 19:40:25 +00:00
|
|
|
|
postfix `⁻¹ᵉ`:(max + 1) := equiv.symm
|
2015-05-22 08:35:44 +00:00
|
|
|
|
-- notation for inverse which is not overloaded
|
2016-04-11 17:11:59 +00:00
|
|
|
|
abbreviation erfl [constructor] := @equiv.rfl
|
2015-05-22 08:35:44 +00:00
|
|
|
|
|
2015-10-09 20:21:03 +00:00
|
|
|
|
definition to_inv_trans [reducible] [unfold_full] (f : A ≃ B) (g : B ≃ C)
|
2015-08-07 14:44:57 +00:00
|
|
|
|
: to_inv (f ⬝e g) = to_fun (g⁻¹ᵉ ⬝e f⁻¹ᵉ) :=
|
|
|
|
|
idp
|
|
|
|
|
|
2015-06-17 19:58:58 +00:00
|
|
|
|
definition equiv_change_fun [constructor] (f : A ≃ B) {f' : A → B} (Heq : f ~ f') : A ≃ B :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
equiv.mk f' (is_equiv.homotopy_closed f Heq _)
|
2015-06-17 19:58:58 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition equiv_change_inv [constructor] (f : A ≃ B) {f' : B → A} (Heq : f⁻¹ᶠ ~ f')
|
2015-06-17 19:58:58 +00:00
|
|
|
|
: A ≃ B :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
equiv.mk f (inv_homotopy_closed _ _ Heq)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition eq_equiv_fn_eq_of_is_equiv [constructor] (f : A → B) [H : is_equiv f] (a b : A) :
|
|
|
|
|
(a = b) ≃ (f a = f b) :=
|
2015-02-26 18:19:54 +00:00
|
|
|
|
equiv.mk (ap f) !is_equiv_ap
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition eq_equiv_fn_eq [constructor] (f : A ≃ B) (a b : A) : (a = b) ≃ (f a = f b) :=
|
2015-02-26 18:19:54 +00:00
|
|
|
|
equiv.mk (ap f) !is_equiv_ap
|
|
|
|
|
|
2016-02-15 19:40:25 +00:00
|
|
|
|
definition equiv_ap [constructor] (P : A → Type) {a b : A} (p : a = b) : P a ≃ P b :=
|
2015-02-26 18:19:54 +00:00
|
|
|
|
equiv.mk (transport P p) !is_equiv_tr
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-02-15 19:40:25 +00:00
|
|
|
|
definition equiv_of_eq [constructor] {A B : Type} (p : A = B) : A ≃ B :=
|
2016-03-01 04:37:03 +00:00
|
|
|
|
equiv.mk (cast p) !is_equiv_tr
|
2016-02-15 19:40:25 +00:00
|
|
|
|
|
2016-05-30 18:24:15 +00:00
|
|
|
|
definition equiv_of_eq_refl [reducible] [unfold_full] (A : Type)
|
|
|
|
|
: equiv_of_eq (refl A) = equiv.refl A :=
|
|
|
|
|
idp
|
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition inj [unfold 3] (f : A ≃ B) {x y : A} (q : f x = f y) : x = y :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(left_inv f x)⁻¹ ⬝ ap f⁻¹ᶠ q ⬝ left_inv f y
|
2015-05-22 08:35:38 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition inj_inv [unfold 3] (f : A ≃ B) {x y : B} (q : f⁻¹ᶠ x = f⁻¹ᶠ y) : x = y :=
|
2015-05-22 08:35:38 +00:00
|
|
|
|
(right_inv f x)⁻¹ ⬝ ap f q ⬝ right_inv f y
|
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition ap_inj (f : A ≃ B) {x y : A} (q : f x = f y) : ap f (inj' f q) = q :=
|
|
|
|
|
ap_inj' f q
|
2017-05-19 18:44:39 +00:00
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition inj_ap (f : A ≃ B) {x y : A} (q : x = y) : inj' f (ap f q) = q :=
|
|
|
|
|
inj'_ap f q
|
2017-05-19 18:44:39 +00:00
|
|
|
|
|
2017-06-02 16:13:20 +00:00
|
|
|
|
definition to_inv_homotopy_inv {f g : A ≃ B} (p : f ~ g) : f⁻¹ᵉ ~ g⁻¹ᵉ :=
|
|
|
|
|
inv_homotopy_inv p
|
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
--we need this theorem for the funext_of_ua proof
|
|
|
|
|
theorem inv_eq {A B : Type} (eqf eqg : A ≃ B) (p : eqf = eqg) : (to_fun eqf)⁻¹ = (to_fun eqg)⁻¹ :=
|
2015-02-26 18:19:54 +00:00
|
|
|
|
eq.rec_on p idp
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2016-02-15 19:40:25 +00:00
|
|
|
|
definition equiv_of_equiv_of_eq [trans] {A B C : Type} (p : A = B) (q : B ≃ C) : A ≃ C :=
|
|
|
|
|
equiv_of_eq p ⬝e q
|
|
|
|
|
definition equiv_of_eq_of_equiv [trans] {A B C : Type} (p : A ≃ B) (q : B = C) : A ≃ C :=
|
|
|
|
|
p ⬝e equiv_of_eq q
|
2015-03-03 21:37:38 +00:00
|
|
|
|
|
2015-09-03 04:46:11 +00:00
|
|
|
|
definition equiv_lift [constructor] (A : Type) : A ≃ lift A := equiv.mk up _
|
2015-06-24 21:59:17 +00:00
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
definition equiv_rect (f : A ≃ B) (P : B → Type) (g : Πa, P (f a)) (b : B) : P b :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
right_inv f b ▸ g (f⁻¹ᶠ b)
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition equiv_rect' (f : A ≃ B) (P : A → B → Type) (g : Πb, P (f⁻¹ᶠ b) b) (a : A) : P a (f a) :=
|
2015-08-31 16:23:34 +00:00
|
|
|
|
left_inv f a ▸ g (f a)
|
2015-08-04 17:00:12 +00:00
|
|
|
|
|
|
|
|
|
definition equiv_rect_comp (f : A ≃ B) (P : B → Type)
|
|
|
|
|
(df : Π (x : A), P (f x)) (x : A) : equiv_rect f P df (f x) = df x :=
|
|
|
|
|
calc
|
|
|
|
|
equiv_rect f P df (f x)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
= right_inv f (f x) ▸ df (f⁻¹ᶠ (f x)) : by esimp
|
|
|
|
|
... = ap f (left_inv f x) ▸ df (f⁻¹ᶠ (f x)) : by rewrite -adj
|
|
|
|
|
... = left_inv f x ▸ df (f⁻¹ᶠ (f x)) : by rewrite -tr_compose
|
2016-03-19 14:38:05 +00:00
|
|
|
|
... = df x : by rewrite (apdt df (left_inv f x))
|
2015-08-31 16:23:34 +00:00
|
|
|
|
end
|
|
|
|
|
|
2018-09-11 16:57:19 +00:00
|
|
|
|
definition rec_eq_of_equiv {A : Type} {P : A → A → Type} (e : Πa a', a = a' ≃ P a a')
|
|
|
|
|
{a a' : A} (Q : P a a' → Type) (H : Π(q : a = a'), Q (e a a' q)) :
|
|
|
|
|
Π(p : P a a'), Q p :=
|
|
|
|
|
equiv_rect (e a a') Q H
|
|
|
|
|
|
|
|
|
|
definition rec_idp_of_equiv {A : Type} {P : A → A → Type} (e : Πa a', a = a' ≃ P a a') {a : A}
|
|
|
|
|
(r : P a a) (s : e a a idp = r) (Q : Πa', P a a' → Type) (H : Q a r) ⦃a' : A⦄ (p : P a a') :
|
|
|
|
|
Q a' p :=
|
|
|
|
|
rec_eq_of_equiv e _ begin intro q, induction q, induction s, exact H end p
|
|
|
|
|
|
|
|
|
|
definition rec_idp_of_equiv_idp {A : Type} {P : A → A → Type} (e : Πa a', a = a' ≃ P a a') {a : A}
|
|
|
|
|
(r : P a a) (s : e a a idp = r) (Q : Πa', P a a' → Type) (H : Q a r) :
|
|
|
|
|
rec_idp_of_equiv e r s Q H r = H :=
|
|
|
|
|
begin
|
|
|
|
|
induction s, refine !is_equiv_rect_comp ⬝ _, reflexivity
|
|
|
|
|
end
|
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
section
|
2016-02-15 19:40:25 +00:00
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
|
variables {A B : Type} (f : A ≃ B) {a : A} {b : B}
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition to_eq_of_eq_inv (p : a = f⁻¹ᶠ b) : f a = b :=
|
2016-11-23 22:59:13 +00:00
|
|
|
|
ap f p ⬝ right_inv f b
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition to_eq_of_inv_eq (p : f⁻¹ᶠ b = a) : b = f a :=
|
2016-11-23 22:59:13 +00:00
|
|
|
|
(eq_of_eq_inv p⁻¹)⁻¹
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition to_inv_eq_of_eq (p : b = f a) : f⁻¹ᶠ b = a :=
|
|
|
|
|
ap f⁻¹ᶠ p ⬝ left_inv f a
|
2016-11-23 22:59:13 +00:00
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition to_eq_inv_of_eq (p : f a = b) : a = f⁻¹ᶠ b :=
|
2016-11-23 22:59:13 +00:00
|
|
|
|
(inv_eq_of_eq p⁻¹)⁻¹
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
section
|
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
variables {A : Type} {B C : A → Type} (f : Π{a}, B a ≃ C a)
|
2016-02-15 19:40:25 +00:00
|
|
|
|
{g : A → A} {g' : A → A} (h : Π{a}, B (g' a) → B (g a)) (h' : Π{a}, C (g' a) → C (g a))
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
2016-02-15 19:40:25 +00:00
|
|
|
|
definition inv_commute (p : Π⦃a : A⦄ (b : B (g' a)), f (h b) = h' (f b)) {a : A}
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(c : C (g' a)) : f⁻¹ᶠ (h' c) = h (f⁻¹ᶠ c) :=
|
2015-08-31 16:23:34 +00:00
|
|
|
|
inv_commute' @f @h @h' p c
|
|
|
|
|
|
2018-09-11 14:45:30 +00:00
|
|
|
|
definition fun_commute_of_inv_commute (p : Π⦃a : A⦄ (c : C (g' a)), f⁻¹ᶠ (h' c) = h (f⁻¹ᶠ c))
|
2016-02-15 19:40:25 +00:00
|
|
|
|
{a : A} (b : B (g' a)) : f (h b) = h' (f b) :=
|
2015-08-31 16:23:34 +00:00
|
|
|
|
fun_commute_of_inv_commute' @f @h @h' p b
|
2016-02-15 19:40:25 +00:00
|
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
|
definition inv_commute1 {B C : Type} (f : B ≃ C) (h : B → B) (h' : C → C)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(p : Π(b : B), f (h b) = h' (f b)) (c : C) : f⁻¹ᶠ (h' c) = h (f⁻¹ᶠ c) :=
|
2016-04-11 17:11:59 +00:00
|
|
|
|
inv_commute1' (to_fun f) h h' p c
|
|
|
|
|
|
2015-08-31 16:23:34 +00:00
|
|
|
|
end
|
2015-08-04 17:00:12 +00:00
|
|
|
|
|
2016-02-15 19:40:25 +00:00
|
|
|
|
infixl ` ⬝pe `:75 := equiv_of_equiv_of_eq
|
|
|
|
|
infixl ` ⬝ep `:75 := equiv_of_eq_of_equiv
|
|
|
|
|
|
2014-12-12 04:14:53 +00:00
|
|
|
|
end equiv
|
2015-05-22 08:35:38 +00:00
|
|
|
|
|
2016-03-03 15:48:27 +00:00
|
|
|
|
open equiv
|
2015-08-31 16:23:34 +00:00
|
|
|
|
namespace is_equiv
|
|
|
|
|
|
|
|
|
|
definition is_equiv_of_equiv_of_homotopy [constructor] {A B : Type} (f : A ≃ B)
|
|
|
|
|
{f' : A → B} (Hty : f ~ f') : is_equiv f' :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
homotopy_closed f Hty _
|
2015-08-31 16:23:34 +00:00
|
|
|
|
|
|
|
|
|
end is_equiv
|
|
|
|
|
|
2015-12-28 18:30:23 +00:00
|
|
|
|
export [unfold] equiv
|
|
|
|
|
export [unfold] is_equiv
|
2018-08-19 11:51:12 +00:00
|
|
|
|
|
|
|
|
|
/- properties about squares of functions -/
|
|
|
|
|
namespace eq
|
|
|
|
|
|
|
|
|
|
section hsquare
|
|
|
|
|
variables {A₀₀ A₂₀ A₄₀ A₀₂ A₂₂ A₄₂ A₀₄ A₂₄ A₄₄ : Type}
|
|
|
|
|
{f₁₀ : A₀₀ → A₂₀} {f₃₀ : A₂₀ → A₄₀}
|
|
|
|
|
{f₀₁ : A₀₀ → A₀₂} {f₂₁ : A₂₀ → A₂₂} {f₄₁ : A₄₀ → A₄₂}
|
|
|
|
|
{f₁₂ : A₀₂ → A₂₂} {f₃₂ : A₂₂ → A₄₂}
|
|
|
|
|
{f₀₃ : A₀₂ → A₀₄} {f₂₃ : A₂₂ → A₂₄} {f₄₃ : A₄₂ → A₄₄}
|
|
|
|
|
{f₁₄ : A₀₄ → A₂₄} {f₃₄ : A₂₄ → A₄₄}
|
|
|
|
|
|
|
|
|
|
definition hsquare [reducible] (f₁₀ : A₀₀ → A₂₀) (f₁₂ : A₀₂ → A₂₂)
|
|
|
|
|
(f₀₁ : A₀₀ → A₀₂) (f₂₁ : A₂₀ → A₂₂) : Type :=
|
|
|
|
|
f₂₁ ∘ f₁₀ ~ f₁₂ ∘ f₀₁
|
|
|
|
|
|
|
|
|
|
definition hsquare_of_homotopy (p : f₂₁ ∘ f₁₀ ~ f₁₂ ∘ f₀₁) : hsquare f₁₀ f₁₂ f₀₁ f₂₁ :=
|
|
|
|
|
p
|
|
|
|
|
|
|
|
|
|
definition homotopy_of_hsquare (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) : f₂₁ ∘ f₁₀ ~ f₁₂ ∘ f₀₁ :=
|
|
|
|
|
p
|
|
|
|
|
|
|
|
|
|
definition homotopy_top_of_hsquare {f₂₁ : A₂₀ ≃ A₂₂} (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) :
|
|
|
|
|
f₁₀ ~ f₂₁⁻¹ ∘ f₁₂ ∘ f₀₁ :=
|
|
|
|
|
homotopy_inv_of_homotopy_post _ _ _ p
|
|
|
|
|
|
|
|
|
|
definition homotopy_top_of_hsquare' [is_equiv f₂₁] (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) :
|
|
|
|
|
f₁₀ ~ f₂₁⁻¹ ∘ f₁₂ ∘ f₀₁ :=
|
|
|
|
|
homotopy_inv_of_homotopy_post _ _ _ p
|
|
|
|
|
|
|
|
|
|
definition hhconcat [unfold_full] (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) (q : hsquare f₃₀ f₃₂ f₂₁ f₄₁) :
|
|
|
|
|
hsquare (f₃₀ ∘ f₁₀) (f₃₂ ∘ f₁₂) f₀₁ f₄₁ :=
|
|
|
|
|
hwhisker_right f₁₀ q ⬝hty hwhisker_left f₃₂ p
|
|
|
|
|
|
|
|
|
|
definition hvconcat [unfold_full] (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) (q : hsquare f₁₂ f₁₄ f₀₃ f₂₃) :
|
|
|
|
|
hsquare f₁₀ f₁₄ (f₀₃ ∘ f₀₁) (f₂₃ ∘ f₂₁) :=
|
|
|
|
|
hwhisker_left f₂₃ p ⬝hty hwhisker_right f₀₁ q
|
|
|
|
|
|
|
|
|
|
definition hhinverse {f₁₀ : A₀₀ ≃ A₂₀} {f₁₂ : A₀₂ ≃ A₂₂} (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) :
|
|
|
|
|
hsquare f₁₀⁻¹ᵉ f₁₂⁻¹ᵉ f₂₁ f₀₁ :=
|
|
|
|
|
λb, eq_inv_of_eq ((p (f₁₀⁻¹ᵉ b))⁻¹ ⬝ ap f₂₁ (to_right_inv f₁₀ b))
|
|
|
|
|
|
|
|
|
|
definition hvinverse {f₀₁ : A₀₀ ≃ A₀₂} {f₂₁ : A₂₀ ≃ A₂₂} (p : hsquare f₁₀ f₁₂ f₀₁ f₂₁) :
|
|
|
|
|
hsquare f₁₂ f₁₀ f₀₁⁻¹ᵉ f₂₁⁻¹ᵉ :=
|
|
|
|
|
λa, inv_eq_of_eq (p (f₀₁⁻¹ᵉ a) ⬝ ap f₁₂ (to_right_inv f₀₁ a))⁻¹
|
|
|
|
|
|
|
|
|
|
infix ` ⬝htyh `:73 := hhconcat
|
|
|
|
|
infix ` ⬝htyv `:73 := hvconcat
|
|
|
|
|
postfix `⁻¹ʰᵗʸʰ`:(max+1) := hhinverse
|
|
|
|
|
postfix `⁻¹ʰᵗʸᵛ`:(max+1) := hvinverse
|
|
|
|
|
|
|
|
|
|
definition rfl_hhconcat (q : hsquare f₃₀ f₃₂ f₂₁ f₄₁) : homotopy.rfl ⬝htyh q ~ q :=
|
|
|
|
|
homotopy.rfl
|
|
|
|
|
|
|
|
|
|
definition hhconcat_rfl (q : hsquare f₃₀ f₃₂ f₂₁ f₄₁) : q ⬝htyh homotopy.rfl ~ q :=
|
|
|
|
|
λx, !idp_con ⬝ ap_id (q x)
|
|
|
|
|
|
|
|
|
|
definition rfl_hvconcat (q : hsquare f₃₀ f₃₂ f₂₁ f₄₁) : homotopy.rfl ⬝htyv q ~ q :=
|
|
|
|
|
λx, !idp_con
|
|
|
|
|
|
|
|
|
|
definition hvconcat_rfl (q : hsquare f₃₀ f₃₂ f₂₁ f₄₁) : q ⬝htyv homotopy.rfl ~ q :=
|
|
|
|
|
λx, !ap_id
|
|
|
|
|
|
|
|
|
|
end hsquare
|
|
|
|
|
|
|
|
|
|
end eq
|