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.
|
2014-12-16 20:10:12 +00:00
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
Module: equiv_precomp
|
|
|
|
|
Author: Jakob von Raumer
|
|
|
|
|
|
|
|
|
|
Ported from Coq HoTT
|
|
|
|
|
-/
|
2015-02-26 18:19:54 +00:00
|
|
|
|
|
|
|
|
|
-- This file is nowhere used. Do we want to keep it?
|
2014-12-12 18:17:50 +00:00
|
|
|
|
open eq function funext
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
namespace is_equiv
|
|
|
|
|
context
|
|
|
|
|
|
|
|
|
|
--Precomposition of arbitrary functions with f
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition precompose {A B : Type} (f : A → B) (C : Type) (h : B → C) : A → C := h ∘ f
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
--Postcomposition of arbitrary functions with f
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition postcompose {A B : Type} (f : A → B) (C : Type) (l : C → A) : C → B := f ∘ l
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
--Precomposing with an equivalence is an equivalence
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition arrow_equiv_arrow_of_equiv_dom [instance] {A B : Type} (f : A → B) [F : funext] [Hf : is_equiv f] (C : Type)
|
|
|
|
|
: is_equiv (precompose f C) :=
|
|
|
|
|
adjointify (precompose f C) (λh, h ∘ f⁻¹)
|
|
|
|
|
(λh, eq_of_homotopy (λx, ap h (sect f x)))
|
|
|
|
|
(λg, eq_of_homotopy (λy, ap g (retr f y)))
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
--Postcomposing with an equivalence is an equivalence
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition arrow_equiv_arrow_of_equiv_cod [instance] {A B : Type} (f : A → B) [F : funext] [Hf : is_equiv f] (C : Type)
|
|
|
|
|
: is_equiv (postcompose f C) :=
|
|
|
|
|
adjointify (postcompose f C) (λl, f⁻¹ ∘ l)
|
|
|
|
|
(λh, eq_of_homotopy (λx, retr f (h x)))
|
|
|
|
|
(λg, eq_of_homotopy (λy, sect f (g y)))
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
--Conversely, if pre- or post-composing with a function is always an equivalence,
|
|
|
|
|
--then that function is also an equivalence. It's convenient to know
|
|
|
|
|
--that we only need to assume the equivalence when the other type is
|
|
|
|
|
--the domain or the codomain.
|
2015-02-21 00:30:32 +00:00
|
|
|
|
private definition isequiv_precompose_eq {A B : Type} (f : A → B) (C D : Type)
|
|
|
|
|
(Ceq : is_equiv (precompose f C)) (Deq : is_equiv (precompose f D)) (k : C → D) (h : A → C) :
|
|
|
|
|
k ∘ (precompose f C)⁻¹ h = (precompose f D)⁻¹ (k ∘ h) :=
|
|
|
|
|
let invD := inv (precompose f D) in
|
|
|
|
|
let invC := inv (precompose f C) in
|
2014-12-12 18:17:50 +00:00
|
|
|
|
have eq1 : invD (k ∘ h) = k ∘ (invC h),
|
2015-02-21 00:30:32 +00:00
|
|
|
|
from calc invD (k ∘ h) = invD (k ∘ (precompose f C (invC h))) : retr (precompose f C) h
|
2014-12-12 18:17:50 +00:00
|
|
|
|
... = k ∘ (invC h) : !sect,
|
2014-12-12 04:14:53 +00:00
|
|
|
|
eq1⁻¹
|
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition is_equiv_of_is_equiv_precomp {A B : Type} (f : A → B) (Aeq : is_equiv (precompose f A))
|
|
|
|
|
(Beq : is_equiv (precompose f B)) : (is_equiv f) :=
|
|
|
|
|
let invA := inv (precompose f A) in
|
|
|
|
|
let invB := inv (precompose f B) in
|
2014-12-12 04:14:53 +00:00
|
|
|
|
let sect' : f ∘ (invA id) ∼ id := (λx,
|
2014-12-12 18:17:50 +00:00
|
|
|
|
calc f (invA id x) = (f ∘ invA id) x : idp
|
|
|
|
|
... = invB (f ∘ id) x : apD10 (!isequiv_precompose_eq)
|
2015-02-21 00:30:32 +00:00
|
|
|
|
... = invB (precompose f B id) x : idp
|
|
|
|
|
... = x : apD10 (sect (precompose f B) id))
|
2014-12-12 04:14:53 +00:00
|
|
|
|
in
|
|
|
|
|
let retr' : (invA id) ∘ f ∼ id := (λx,
|
2015-02-21 00:30:32 +00:00
|
|
|
|
calc invA id (f x) = precompose f A (invA id) x : idp
|
|
|
|
|
... = x : apD10 (retr (precompose f A) id)) in
|
2014-12-12 04:14:53 +00:00
|
|
|
|
adjointify f (invA id) sect' retr'
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
end is_equiv
|
|
|
|
|
|
|
|
|
|
--Bundled versions of the previous theorems
|
|
|
|
|
namespace equiv
|
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition arrow_equiv_arrow_of_equiv_dom [F : funext] {A B C : Type} {eqf : A ≃ B}
|
2014-12-12 04:14:53 +00:00
|
|
|
|
: (B → C) ≃ (A → C) :=
|
|
|
|
|
let f := to_fun eqf in
|
|
|
|
|
let Hf := to_is_equiv eqf in
|
2015-02-21 00:30:32 +00:00
|
|
|
|
equiv.mk (is_equiv.precompose f C)
|
|
|
|
|
(@is_equiv.arrow_equiv_arrow_of_equiv_dom A B f F Hf C)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
2015-02-21 00:30:32 +00:00
|
|
|
|
definition arrow_equiv_arrow_of_equiv_cod [F : funext] {A B C : Type} {eqf : A ≃ B}
|
2014-12-12 04:14:53 +00:00
|
|
|
|
: (C → A) ≃ (C → B) :=
|
|
|
|
|
let f := to_fun eqf in
|
|
|
|
|
let Hf := to_is_equiv eqf in
|
2015-02-21 00:30:32 +00:00
|
|
|
|
equiv.mk (is_equiv.postcompose f C)
|
|
|
|
|
(@is_equiv.arrow_equiv_arrow_of_equiv_cod A B f F Hf C)
|
2014-12-12 04:14:53 +00:00
|
|
|
|
|
|
|
|
|
end equiv
|