2015-03-03 21:35:51 +00:00
|
|
|
|
/-
|
|
|
|
|
Copyright (c) 2014 Floris van Doorn. All rights reserved.
|
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
Author: Floris van Doorn
|
|
|
|
|
|
|
|
|
|
Ported from Coq HoTT
|
|
|
|
|
Theorems about the types equiv and is_equiv
|
|
|
|
|
-/
|
|
|
|
|
|
2016-11-23 22:59:13 +00:00
|
|
|
|
import .fiber .arrow arity ..prop_trunc cubical.square .pointed
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
2016-03-03 15:48:27 +00:00
|
|
|
|
open eq is_trunc sigma sigma.ops pi fiber function equiv
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
|
|
|
|
namespace is_equiv
|
2015-04-29 00:48:39 +00:00
|
|
|
|
variables {A B : Type} (f : A → B) [H : is_equiv f]
|
|
|
|
|
include H
|
|
|
|
|
/- is_equiv f is a mere proposition -/
|
|
|
|
|
|
2015-06-17 19:58:58 +00:00
|
|
|
|
definition is_contr_right_inverse : is_contr (Σ(g : B → A), f ∘ g ~ id) :=
|
2015-04-29 00:48:39 +00:00
|
|
|
|
begin
|
|
|
|
|
fapply is_trunc_equiv_closed,
|
2016-02-15 21:05:31 +00:00
|
|
|
|
{apply sigma_equiv_sigma_right, intro g, apply eq_equiv_homotopy},
|
2015-04-29 00:48:39 +00:00
|
|
|
|
fapply is_trunc_equiv_closed,
|
|
|
|
|
{apply fiber.sigma_char},
|
|
|
|
|
fapply is_contr_fiber_of_is_equiv,
|
2015-09-10 22:32:52 +00:00
|
|
|
|
apply (to_is_equiv (arrow_equiv_arrow_right B (equiv.mk f H))),
|
2015-04-29 00:48:39 +00:00
|
|
|
|
end
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
2015-06-17 19:58:58 +00:00
|
|
|
|
definition is_contr_right_coherence (u : Σ(g : B → A), f ∘ g ~ id)
|
|
|
|
|
: is_contr (Σ(η : u.1 ∘ f ~ id), Π(a : A), u.2 (f a) = ap f (η a)) :=
|
2015-04-29 00:48:39 +00:00
|
|
|
|
begin
|
2018-09-07 13:57:43 +00:00
|
|
|
|
apply is_contr_equiv_closed_rev !sigma_pi_equiv_pi_sigma,
|
|
|
|
|
apply is_contr_equiv_closed,
|
|
|
|
|
{ apply pi_equiv_pi_right, intro a,
|
|
|
|
|
apply (fiber_eq_equiv (fiber.mk (u.1 (f a)) (u.2 (f a))) (fiber.mk a idp)) },
|
|
|
|
|
exact _
|
2015-03-03 21:35:51 +00:00
|
|
|
|
end
|
2015-04-29 00:48:39 +00:00
|
|
|
|
|
|
|
|
|
omit H
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
2015-03-04 05:10:48 +00:00
|
|
|
|
protected definition sigma_char : (is_equiv f) ≃
|
2015-06-17 19:58:58 +00:00
|
|
|
|
(Σ(g : B → A) (ε : f ∘ g ~ id) (η : g ∘ f ~ id), Π(a : A), ε (f a) = ap f (η a)) :=
|
2015-04-27 19:39:36 +00:00
|
|
|
|
equiv.MK (λH, ⟨inv f, right_inv f, left_inv f, adj f⟩)
|
2015-04-24 22:51:16 +00:00
|
|
|
|
(λp, is_equiv.mk f p.1 p.2.1 p.2.2.1 p.2.2.2)
|
2015-03-04 05:10:48 +00:00
|
|
|
|
(λp, begin
|
2015-07-29 12:17:16 +00:00
|
|
|
|
induction p with p1 p2,
|
|
|
|
|
induction p2 with p21 p22,
|
|
|
|
|
induction p22 with p221 p222,
|
|
|
|
|
reflexivity
|
2015-03-04 05:10:48 +00:00
|
|
|
|
end)
|
2015-07-29 12:17:16 +00:00
|
|
|
|
(λH, by induction H; reflexivity)
|
2015-03-04 05:10:48 +00:00
|
|
|
|
|
|
|
|
|
protected definition sigma_char' : (is_equiv f) ≃
|
2016-03-28 20:33:33 +00:00
|
|
|
|
(Σ(u : Σ(g : B → A), f ∘ g ~ id) (η : u.1 ∘ f ~ id), Π(a : A), u.2 (f a) = ap f (η a)) :=
|
2015-03-04 05:10:48 +00:00
|
|
|
|
calc
|
|
|
|
|
(is_equiv f) ≃
|
2015-06-17 19:58:58 +00:00
|
|
|
|
(Σ(g : B → A) (ε : f ∘ g ~ id) (η : g ∘ f ~ id), Π(a : A), ε (f a) = ap f (η a))
|
2015-03-04 05:10:48 +00:00
|
|
|
|
: is_equiv.sigma_char
|
2015-06-17 19:58:58 +00:00
|
|
|
|
... ≃ (Σ(u : Σ(g : B → A), f ∘ g ~ id), Σ(η : u.1 ∘ f ~ id), Π(a : A), u.2 (f a) = ap f (η a))
|
2016-03-28 20:33:33 +00:00
|
|
|
|
: sigma_assoc_equiv (λu, Σ(η : u.1 ∘ f ~ id), Π(a : A), u.2 (f a) = ap f (η a))
|
2015-03-04 05:10:48 +00:00
|
|
|
|
|
2015-04-25 03:04:24 +00:00
|
|
|
|
local attribute is_contr_right_inverse [instance] [priority 1600]
|
|
|
|
|
local attribute is_contr_right_coherence [instance] [priority 1600]
|
2015-04-29 00:48:39 +00:00
|
|
|
|
|
2016-02-15 20:18:07 +00:00
|
|
|
|
theorem is_prop_is_equiv [instance] : is_prop (is_equiv f) :=
|
|
|
|
|
is_prop_of_imp_is_contr
|
2018-09-07 13:57:43 +00:00
|
|
|
|
(λ(H : is_equiv f), is_contr_equiv_closed (equiv.symm !is_equiv.sigma_char') _)
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
2015-05-07 02:48:11 +00:00
|
|
|
|
definition inv_eq_inv {A B : Type} {f f' : A → B} {Hf : is_equiv f} {Hf' : is_equiv f'}
|
|
|
|
|
(p : f = f') : f⁻¹ = f'⁻¹ :=
|
2016-06-23 20:49:54 +00:00
|
|
|
|
apd011 inv p !is_prop.elimo
|
2015-05-07 02:48:11 +00:00
|
|
|
|
|
2015-04-29 00:48:39 +00:00
|
|
|
|
/- contractible fibers -/
|
|
|
|
|
definition is_contr_fun_of_is_equiv [H : is_equiv f] : is_contr_fun f :=
|
|
|
|
|
is_contr_fiber_of_is_equiv f
|
2015-04-27 21:29:56 +00:00
|
|
|
|
|
2016-02-15 20:18:07 +00:00
|
|
|
|
definition is_prop_is_contr_fun (f : A → B) : is_prop (is_contr_fun f) := _
|
2015-04-27 21:29:56 +00:00
|
|
|
|
|
2015-04-29 00:48:39 +00:00
|
|
|
|
definition is_equiv_of_is_contr_fun [H : is_contr_fun f] : is_equiv f :=
|
|
|
|
|
adjointify _ (λb, point (center (fiber f b)))
|
|
|
|
|
(λb, point_eq (center (fiber f b)))
|
|
|
|
|
(λa, ap point (center_eq (fiber.mk a idp)))
|
|
|
|
|
|
|
|
|
|
definition is_equiv_of_imp_is_equiv (H : B → is_equiv f) : is_equiv f :=
|
|
|
|
|
@is_equiv_of_is_contr_fun _ _ f (λb, @is_contr_fiber_of_is_equiv _ _ _ (H b) _)
|
|
|
|
|
|
|
|
|
|
definition is_equiv_equiv_is_contr_fun : is_equiv f ≃ is_contr_fun f :=
|
2018-09-11 14:45:30 +00:00
|
|
|
|
equiv_of_is_prop _ (λH, !is_equiv_of_is_contr_fun) _ _
|
2015-04-27 21:29:56 +00:00
|
|
|
|
|
2016-06-23 20:49:54 +00:00
|
|
|
|
theorem inv_commute'_fn {A : Type} {B C : A → Type} (f : Π{a}, B a → C a) [H : Πa, is_equiv (@f a)]
|
|
|
|
|
{g : A → A} (h : Π{a}, B a → B (g a)) (h' : Π{a}, C a → C (g a))
|
|
|
|
|
(p : Π⦃a : A⦄ (b : B a), f (h b) = h' (f b)) {a : A} (b : B a) :
|
|
|
|
|
inv_commute' @f @h @h' p (f b)
|
|
|
|
|
= (ap f⁻¹ (p b))⁻¹ ⬝ left_inv f (h b) ⬝ (ap h (left_inv f b))⁻¹ :=
|
|
|
|
|
begin
|
2018-09-07 14:30:58 +00:00
|
|
|
|
rewrite [↑[inv_commute',inj'],+ap_con,-adj_inv f,+con.assoc,inv_con_cancel_left,
|
2016-06-23 20:49:54 +00:00
|
|
|
|
adj f,+ap_inv,-+ap_compose,
|
2016-11-23 22:59:13 +00:00
|
|
|
|
eq_bot_of_square (natural_square_tr (λb, (left_inv f (h b))⁻¹ ⬝ ap f⁻¹ (p b)) (left_inv f b))⁻¹ʰ,
|
2016-06-23 20:49:54 +00:00
|
|
|
|
con_inv,inv_inv,+con.assoc],
|
|
|
|
|
do 3 apply whisker_left,
|
|
|
|
|
rewrite [con_inv_cancel_left,con.left_inv]
|
|
|
|
|
end
|
|
|
|
|
|
2015-03-03 21:35:51 +00:00
|
|
|
|
end is_equiv
|
|
|
|
|
|
2016-02-08 11:07:53 +00:00
|
|
|
|
/- Moving equivalences around in homotopies -/
|
|
|
|
|
namespace is_equiv
|
|
|
|
|
variables {A B C : Type} (f : A → B) [Hf : is_equiv f]
|
|
|
|
|
|
|
|
|
|
include Hf
|
|
|
|
|
|
|
|
|
|
section pre_compose
|
|
|
|
|
variables (α : A → C) (β : B → C)
|
|
|
|
|
|
2016-03-14 23:11:21 +00:00
|
|
|
|
-- homotopy_inv_of_homotopy_pre is in init.equiv
|
|
|
|
|
protected definition inv_homotopy_of_homotopy_pre.is_equiv
|
|
|
|
|
: is_equiv (inv_homotopy_of_homotopy_pre f α β) :=
|
|
|
|
|
adjointify _ (homotopy_of_inv_homotopy_pre f α β)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
abstract begin
|
|
|
|
|
intro q, apply eq_of_homotopy, intro b,
|
2016-03-14 23:11:21 +00:00
|
|
|
|
unfold inv_homotopy_of_homotopy_pre,
|
|
|
|
|
unfold homotopy_of_inv_homotopy_pre,
|
2016-02-08 11:07:53 +00:00
|
|
|
|
apply inverse, apply eq_bot_of_square,
|
|
|
|
|
apply eq_hconcat (ap02 α (adj_inv f b)),
|
|
|
|
|
apply eq_hconcat (ap_compose α f⁻¹ (right_inv f b))⁻¹,
|
2016-11-23 22:59:13 +00:00
|
|
|
|
apply natural_square q (right_inv f b)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
end end
|
|
|
|
|
abstract begin
|
|
|
|
|
intro p, apply eq_of_homotopy, intro a,
|
2016-03-14 23:11:21 +00:00
|
|
|
|
unfold inv_homotopy_of_homotopy_pre,
|
|
|
|
|
unfold homotopy_of_inv_homotopy_pre,
|
2016-02-08 11:07:53 +00:00
|
|
|
|
apply trans (con.assoc
|
|
|
|
|
(ap α (left_inv f a))⁻¹
|
|
|
|
|
(p (f⁻¹ (f a)))
|
|
|
|
|
(ap β (right_inv f (f a))))⁻¹,
|
|
|
|
|
apply inverse, apply eq_bot_of_square,
|
|
|
|
|
refine hconcat_eq _ (ap02 β (adj f a))⁻¹,
|
|
|
|
|
refine hconcat_eq _ (ap_compose β f (left_inv f a)),
|
2016-11-23 22:59:13 +00:00
|
|
|
|
apply natural_square p (left_inv f a)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
end end
|
|
|
|
|
end pre_compose
|
|
|
|
|
|
|
|
|
|
section post_compose
|
2016-03-14 23:11:21 +00:00
|
|
|
|
variables (α : C → A) (β : C → B)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
|
2016-03-14 23:11:21 +00:00
|
|
|
|
-- homotopy_inv_of_homotopy_post is in init.equiv
|
|
|
|
|
protected definition inv_homotopy_of_homotopy_post.is_equiv
|
|
|
|
|
: is_equiv (inv_homotopy_of_homotopy_post f α β) :=
|
|
|
|
|
adjointify _ (homotopy_of_inv_homotopy_post f α β)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
abstract begin
|
|
|
|
|
intro q, apply eq_of_homotopy, intro c,
|
2016-03-14 23:11:21 +00:00
|
|
|
|
unfold inv_homotopy_of_homotopy_post,
|
|
|
|
|
unfold homotopy_of_inv_homotopy_post,
|
2016-11-24 05:13:05 +00:00
|
|
|
|
apply trans (whisker_right (left_inv f (α c))
|
2016-02-08 11:07:53 +00:00
|
|
|
|
(ap_con f⁻¹ (right_inv f (β c))⁻¹ (ap f (q c))
|
2016-11-24 05:13:05 +00:00
|
|
|
|
⬝ whisker_right (ap f⁻¹ (ap f (q c)))
|
|
|
|
|
(ap_inv f⁻¹ (right_inv f (β c))))),
|
2016-02-08 11:07:53 +00:00
|
|
|
|
apply inverse, apply eq_bot_of_square,
|
|
|
|
|
apply eq_hconcat (adj_inv f (β c))⁻¹,
|
|
|
|
|
apply eq_vconcat (ap_compose f⁻¹ f (q c))⁻¹,
|
|
|
|
|
refine vconcat_eq _ (ap_id (q c)),
|
2016-11-23 22:59:13 +00:00
|
|
|
|
apply natural_square_tr (left_inv f) (q c)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
end end
|
|
|
|
|
abstract begin
|
|
|
|
|
intro p, apply eq_of_homotopy, intro c,
|
2016-03-14 23:11:21 +00:00
|
|
|
|
unfold inv_homotopy_of_homotopy_post,
|
|
|
|
|
unfold homotopy_of_inv_homotopy_post,
|
2016-02-08 11:07:53 +00:00
|
|
|
|
apply trans (whisker_left (right_inv f (β c))⁻¹
|
|
|
|
|
(ap_con f (ap f⁻¹ (p c)) (left_inv f (α c)))),
|
|
|
|
|
apply trans (con.assoc (right_inv f (β c))⁻¹ (ap f (ap f⁻¹ (p c)))
|
|
|
|
|
(ap f (left_inv f (α c))))⁻¹,
|
|
|
|
|
apply inverse, apply eq_bot_of_square,
|
|
|
|
|
refine hconcat_eq _ (adj f (α c)),
|
|
|
|
|
apply eq_vconcat (ap_compose f f⁻¹ (p c))⁻¹,
|
|
|
|
|
refine vconcat_eq _ (ap_id (p c)),
|
2016-11-23 22:59:13 +00:00
|
|
|
|
apply natural_square_tr (right_inv f) (p c)
|
2016-02-08 11:07:53 +00:00
|
|
|
|
end end
|
|
|
|
|
|
|
|
|
|
end post_compose
|
|
|
|
|
|
|
|
|
|
end is_equiv
|
|
|
|
|
|
2015-09-27 00:23:39 +00:00
|
|
|
|
namespace is_equiv
|
|
|
|
|
|
|
|
|
|
/- Theorem 4.7.7 -/
|
|
|
|
|
variables {A : Type} {P Q : A → Type}
|
|
|
|
|
variable (f : Πa, P a → Q a)
|
|
|
|
|
|
2015-09-27 21:08:58 +00:00
|
|
|
|
definition is_fiberwise_equiv [reducible] := Πa, is_equiv (f a)
|
2015-09-27 00:23:39 +00:00
|
|
|
|
|
2015-09-27 21:08:58 +00:00
|
|
|
|
definition is_equiv_total_of_is_fiberwise_equiv [H : is_fiberwise_equiv f] : is_equiv (total f) :=
|
|
|
|
|
is_equiv_sigma_functor id f
|
2015-09-27 00:23:39 +00:00
|
|
|
|
|
2015-11-05 17:51:59 +00:00
|
|
|
|
definition is_fiberwise_equiv_of_is_equiv_total [H : is_equiv (total f)]
|
2015-09-27 21:08:58 +00:00
|
|
|
|
: is_fiberwise_equiv f :=
|
2015-09-27 00:23:39 +00:00
|
|
|
|
begin
|
|
|
|
|
intro a,
|
|
|
|
|
apply is_equiv_of_is_contr_fun, intro q,
|
2018-09-07 13:57:43 +00:00
|
|
|
|
exact is_contr_equiv_closed (fiber_total_equiv f q) _
|
2015-09-27 00:23:39 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end is_equiv
|
|
|
|
|
|
2015-03-03 21:35:51 +00:00
|
|
|
|
namespace equiv
|
|
|
|
|
open is_equiv
|
2015-08-07 14:44:57 +00:00
|
|
|
|
variables {A B C : Type}
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
2015-04-27 21:29:56 +00:00
|
|
|
|
definition equiv_mk_eq {f f' : A → B} [H : is_equiv f] [H' : is_equiv f'] (p : f = f')
|
2015-03-03 21:35:51 +00:00
|
|
|
|
: equiv.mk f H = equiv.mk f' H' :=
|
2016-06-23 20:49:54 +00:00
|
|
|
|
apd011 equiv.mk p !is_prop.elimo
|
2015-03-03 21:35:51 +00:00
|
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
|
definition equiv_eq' {f f' : A ≃ B} (p : to_fun f = to_fun f') : f = f' :=
|
2015-04-27 21:29:56 +00:00
|
|
|
|
by (cases f; cases f'; apply (equiv_mk_eq p))
|
2015-04-29 00:48:39 +00:00
|
|
|
|
|
2016-04-11 17:11:59 +00:00
|
|
|
|
definition equiv_eq {f f' : A ≃ B} (p : to_fun f ~ to_fun f') : f = f' :=
|
|
|
|
|
by apply equiv_eq'; apply eq_of_homotopy p
|
2015-08-07 14:44:57 +00:00
|
|
|
|
|
2018-08-19 11:51:12 +00:00
|
|
|
|
definition ap_equiv_eq {X Y : Type} {e e' : X ≃ Y} (p : e ~ e') (x : X) :
|
|
|
|
|
ap (λ(e : X ≃ Y), e x) (equiv_eq p) = p x :=
|
|
|
|
|
begin
|
|
|
|
|
cases e with e He, cases e' with e' He', esimp at *, esimp [equiv_eq],
|
|
|
|
|
refine homotopy.rec_on' p _, intro q, induction q, esimp [equiv_eq', equiv_mk_eq],
|
|
|
|
|
assert H : He = He', apply is_prop.elim, induction H, rewrite [is_prop_elimo_self]
|
|
|
|
|
end
|
|
|
|
|
|
2015-08-07 14:44:57 +00:00
|
|
|
|
definition trans_symm (f : A ≃ B) (g : B ≃ C) : (f ⬝e g)⁻¹ᵉ = g⁻¹ᵉ ⬝e f⁻¹ᵉ :> (C ≃ A) :=
|
2016-04-11 17:11:59 +00:00
|
|
|
|
equiv_eq' idp
|
2015-08-07 14:44:57 +00:00
|
|
|
|
|
|
|
|
|
definition symm_symm (f : A ≃ B) : f⁻¹ᵉ⁻¹ᵉ = f :> (A ≃ B) :=
|
2016-04-11 17:11:59 +00:00
|
|
|
|
equiv_eq' idp
|
2015-08-07 14:44:57 +00:00
|
|
|
|
|
2015-07-29 12:17:16 +00:00
|
|
|
|
protected definition equiv.sigma_char [constructor]
|
|
|
|
|
(A B : Type) : (A ≃ B) ≃ Σ(f : A → B), is_equiv f :=
|
2015-04-29 00:48:39 +00:00
|
|
|
|
begin
|
|
|
|
|
fapply equiv.MK,
|
|
|
|
|
{intro F, exact ⟨to_fun F, to_is_equiv F⟩},
|
2015-04-30 18:00:39 +00:00
|
|
|
|
{intro p, cases p with f H, exact (equiv.mk f H)},
|
|
|
|
|
{intro p, cases p, exact idp},
|
|
|
|
|
{intro F, cases F, exact idp},
|
2015-04-29 00:48:39 +00:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition equiv_eq_char (f f' : A ≃ B) : (f = f') ≃ (to_fun f = to_fun f') :=
|
|
|
|
|
calc
|
2018-09-07 14:30:58 +00:00
|
|
|
|
(f = f') ≃ (!equiv.sigma_char f = !equiv.sigma_char f')
|
|
|
|
|
: eq_equiv_fn_eq !equiv.sigma_char
|
2015-04-29 00:48:39 +00:00
|
|
|
|
... ≃ ((to_fun !equiv.sigma_char f).1 = (to_fun !equiv.sigma_char f').1 ) : equiv_subtype
|
2016-04-11 17:11:59 +00:00
|
|
|
|
... ≃ (to_fun f = to_fun f') : equiv.rfl
|
2015-04-29 00:48:39 +00:00
|
|
|
|
|
|
|
|
|
definition is_equiv_ap_to_fun (f f' : A ≃ B)
|
|
|
|
|
: is_equiv (ap to_fun : f = f' → to_fun f = to_fun f') :=
|
|
|
|
|
begin
|
|
|
|
|
fapply adjointify,
|
2016-02-15 20:18:07 +00:00
|
|
|
|
{intro p, cases f with f H, cases f' with f' H', cases p, apply ap (mk f'), apply is_prop.elim},
|
2015-04-30 18:00:39 +00:00
|
|
|
|
{intro p, cases f with f H, cases f' with f' H', cases p,
|
2016-02-15 20:18:07 +00:00
|
|
|
|
apply @concat _ _ (ap to_fun (ap (equiv.mk f') (is_prop.elim H H'))), {apply idp},
|
|
|
|
|
generalize is_prop.elim H H', intro q, cases q, apply idp},
|
|
|
|
|
{intro p, cases p, cases f with f H, apply ap (ap (equiv.mk f)), apply is_set.elim}
|
2015-04-29 00:48:39 +00:00
|
|
|
|
end
|
|
|
|
|
|
2015-07-29 12:17:16 +00:00
|
|
|
|
definition equiv_pathover {A : Type} {a a' : A} (p : a = a')
|
|
|
|
|
{B : A → Type} {C : A → Type} (f : B a ≃ C a) (g : B a' ≃ C a')
|
2018-08-19 11:51:12 +00:00
|
|
|
|
(r : to_fun f =[p] to_fun g) : f =[p] g :=
|
2015-07-29 12:17:16 +00:00
|
|
|
|
begin
|
2015-11-22 06:37:13 +00:00
|
|
|
|
fapply pathover_of_fn_pathover_fn,
|
2018-08-19 11:51:12 +00:00
|
|
|
|
{ intro a, apply equiv.sigma_char },
|
|
|
|
|
{ apply sigma_pathover _ _ _ r, apply is_prop.elimo }
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition equiv_pathover2 {A : Type} {a a' : A} (p : a = a')
|
|
|
|
|
{B : A → Type} {C : A → Type} (f : B a ≃ C a) (g : B a' ≃ C a')
|
|
|
|
|
(r : Π(b : B a) (b' : B a') (q : b =[p] b'), f b =[p] g b') : f =[p] g :=
|
|
|
|
|
begin
|
|
|
|
|
apply equiv_pathover, apply arrow_pathover, exact r
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
definition equiv_pathover_inv {A : Type} {a a' : A} (p : a = a')
|
|
|
|
|
{B : A → Type} {C : A → Type} (f : B a ≃ C a) (g : B a' ≃ C a')
|
|
|
|
|
(r : to_inv f =[p] to_inv g) : f =[p] g :=
|
|
|
|
|
begin
|
|
|
|
|
/- this proof is a bit weird, but it works -/
|
|
|
|
|
apply equiv_pathover,
|
|
|
|
|
change f⁻¹ᶠ⁻¹ᶠ =[p] g⁻¹ᶠ⁻¹ᶠ,
|
|
|
|
|
apply apo (λ(a: A) (h : C a ≃ B a), h⁻¹ᶠ),
|
|
|
|
|
apply equiv_pathover,
|
|
|
|
|
exact r
|
2015-07-29 12:17:16 +00:00
|
|
|
|
end
|
|
|
|
|
|
2016-01-19 21:20:18 +00:00
|
|
|
|
definition is_contr_equiv (A B : Type) [HA : is_contr A] [HB : is_contr B] : is_contr (A ≃ B) :=
|
2016-02-15 20:18:07 +00:00
|
|
|
|
begin
|
2018-09-11 14:45:30 +00:00
|
|
|
|
refine is_contr_of_inhabited_prop _ _,
|
|
|
|
|
{ exact equiv_of_is_contr_of_is_contr _ _ },
|
|
|
|
|
{ apply is_prop.mk,
|
|
|
|
|
intro x y, cases x with fx Hx, cases y with fy Hy, generalize Hy,
|
|
|
|
|
apply (eq_of_homotopy (λ a, !eq_of_is_contr)) ▸ (λ Hy, !is_prop.elim ▸ rfl) }
|
2016-01-19 21:20:18 +00:00
|
|
|
|
end
|
2016-02-15 20:18:07 +00:00
|
|
|
|
|
2016-01-19 21:20:18 +00:00
|
|
|
|
definition is_trunc_succ_equiv (n : trunc_index) (A B : Type)
|
|
|
|
|
[HA : is_trunc n.+1 A] [HB : is_trunc n.+1 B] : is_trunc n.+1 (A ≃ B) :=
|
|
|
|
|
@is_trunc_equiv_closed _ _ n.+1 (equiv.symm !equiv.sigma_char)
|
2018-09-11 14:45:30 +00:00
|
|
|
|
(@is_trunc_sigma _ _ _ _ (λ f, is_trunc_succ_of_is_prop _ _ _))
|
2016-02-15 20:18:07 +00:00
|
|
|
|
|
|
|
|
|
definition is_trunc_equiv (n : trunc_index) (A B : Type)
|
2016-01-19 21:20:18 +00:00
|
|
|
|
[HA : is_trunc n A] [HB : is_trunc n B] : is_trunc n (A ≃ B) :=
|
2016-02-15 20:18:07 +00:00
|
|
|
|
by cases n; apply !is_contr_equiv; apply !is_trunc_succ_equiv
|
2016-01-19 21:20:18 +00:00
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition inj'_idp {A B : Type} (f : A → B) [is_equiv f] (x : A)
|
|
|
|
|
: inj' f (idpath (f x)) = idpath x :=
|
2016-04-11 17:11:59 +00:00
|
|
|
|
!con.left_inv
|
|
|
|
|
|
2018-09-07 14:30:58 +00:00
|
|
|
|
definition inj'_con {A B : Type} (f : A → B) [is_equiv f] {x y z : A}
|
2016-04-11 17:11:59 +00:00
|
|
|
|
(p : f x = f y) (q : f y = f z)
|
2018-09-07 14:30:58 +00:00
|
|
|
|
: inj' f (p ⬝ q) = inj' f p ⬝ inj' f q :=
|
2016-04-11 17:11:59 +00:00
|
|
|
|
begin
|
2018-09-07 14:30:58 +00:00
|
|
|
|
unfold inj',
|
2016-04-11 17:11:59 +00:00
|
|
|
|
refine _ ⬝ !con.assoc, apply whisker_right,
|
|
|
|
|
refine _ ⬝ !con.assoc⁻¹ ⬝ !con.assoc⁻¹, apply whisker_left,
|
|
|
|
|
refine !ap_con ⬝ _, apply whisker_left,
|
|
|
|
|
refine !con_inv_cancel_left⁻¹
|
|
|
|
|
end
|
|
|
|
|
|
2015-03-03 21:35:51 +00:00
|
|
|
|
end equiv
|