feat(library/hott) postcomposition from ua lemma is done up to the last gap
This commit is contained in:
parent
4420f0dc0c
commit
992aad9661
2 changed files with 46 additions and 11 deletions
|
@ -53,7 +53,8 @@ Equiv A B
|
||||||
|
|
||||||
namespace Equiv
|
namespace Equiv
|
||||||
|
|
||||||
definition equiv_fun [coercion] {A B : Type} (e : Equiv A B) : A → B :=
|
--Note: No coercion here
|
||||||
|
definition equiv_fun {A B : Type} (e : Equiv A B) : A → B :=
|
||||||
Equiv.rec (λequiv_fun equiv_isequiv, equiv_fun) e
|
Equiv.rec (λequiv_fun equiv_isequiv, equiv_fun) e
|
||||||
|
|
||||||
definition equiv_isequiv [instance] {A B : Type} (e : Equiv A B) : IsEquiv (equiv_fun e) :=
|
definition equiv_isequiv [instance] {A B : Type} (e : Equiv A B) : IsEquiv (equiv_fun e) :=
|
||||||
|
@ -170,7 +171,7 @@ end IsEquiv
|
||||||
|
|
||||||
namespace IsEquiv
|
namespace IsEquiv
|
||||||
variables {A B: Type} (f : A → B)
|
variables {A B: Type} (f : A → B)
|
||||||
|
|
||||||
--The inverse of an equivalence is, again, an equivalence.
|
--The inverse of an equivalence is, again, an equivalence.
|
||||||
definition inv_closed [instance] [Hf : IsEquiv f] : (IsEquiv (inv f)) :=
|
definition inv_closed [instance] [Hf : IsEquiv f] : (IsEquiv (inv f)) :=
|
||||||
adjointify (inv f) f (sect f) (retr f)
|
adjointify (inv f) f (sect f) (retr f)
|
||||||
|
@ -202,8 +203,8 @@ namespace IsEquiv
|
||||||
definition moveL_V {x : B} {y : A} (p : f y ≈ x) : y ≈ (inv f) x :=
|
definition moveL_V {x : B} {y : A} (p : f y ≈ x) : y ≈ (inv f) x :=
|
||||||
(moveR_V f (p⁻¹))⁻¹
|
(moveR_V f (p⁻¹))⁻¹
|
||||||
|
|
||||||
definition ap_closed [instance] (x y : A) : IsEquiv (ap f) :=
|
definition ap_closed [instance] (x y : A) : IsEquiv (ap f) :=
|
||||||
adjointify (ap f)
|
adjointify (ap f)
|
||||||
(λq, (inverse (sect f x)) ⬝ ap (f⁻¹) q ⬝ sect f y)
|
(λq, (inverse (sect f x)) ⬝ ap (f⁻¹) q ⬝ sect f y)
|
||||||
(λq, !ap_pp
|
(λq, !ap_pp
|
||||||
⬝ whiskerR !ap_pp _
|
⬝ whiskerR !ap_pp _
|
||||||
|
@ -277,6 +278,18 @@ namespace Equiv
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context
|
||||||
|
parameters {A B : Type} (eqf eqg : A ≃ B)
|
||||||
|
|
||||||
|
private definition Hf [instance] : IsEquiv (equiv_fun eqf) := equiv_isequiv eqf
|
||||||
|
private definition Hg [instance] : IsEquiv (equiv_fun eqg) := equiv_isequiv eqg
|
||||||
|
|
||||||
|
theorem inv_eq (p : eqf ≈ eqg)
|
||||||
|
: IsEquiv.inv (equiv_fun eqf) ≈ IsEquiv.inv (equiv_fun eqg) :=
|
||||||
|
path.rec_on p idp
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
-- calc enviroment
|
-- calc enviroment
|
||||||
-- Note: Calculating with substitutions needs univalence
|
-- Note: Calculating with substitutions needs univalence
|
||||||
calc_trans compose
|
calc_trans compose
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
-- Released under Apache 2.0 license as described in the file LICENSE.
|
-- Released under Apache 2.0 license as described in the file LICENSE.
|
||||||
-- Author: Jakob von Raumer
|
-- Author: Jakob von Raumer
|
||||||
-- Ported from Coq HoTT
|
-- Ported from Coq HoTT
|
||||||
import hott.equiv hott.equiv_precomp hott.funext_varieties
|
import hott.equiv hott.funext_varieties
|
||||||
import data.prod data.sigma data.unit
|
import data.prod data.sigma data.unit
|
||||||
|
|
||||||
open path function prod sigma truncation Equiv unit
|
open path function prod sigma truncation Equiv IsEquiv unit
|
||||||
|
|
||||||
definition isequiv_path {A B : Type} (H : A ≈ B) :=
|
definition isequiv_path {A B : Type} (H : A ≈ B) :=
|
||||||
(@IsEquiv.transport Type (λX, X) A B H)
|
(@IsEquiv.transport Type (λX, X) A B H)
|
||||||
|
@ -18,14 +18,36 @@ definition equiv_path {A B : Type} (H : A ≈ B) : A ≃ B :=
|
||||||
definition ua_type := Π (A B : Type), IsEquiv (@equiv_path A B)
|
definition ua_type := Π (A B : Type), IsEquiv (@equiv_path A B)
|
||||||
|
|
||||||
context
|
context
|
||||||
parameters {ua : ua_type}
|
parameters {ua : ua_type.{1}}
|
||||||
|
|
||||||
-- TODO base this theorem on UA instead of FunExt.
|
-- TODO base this theorem on UA instead of FunExt.
|
||||||
-- IsEquiv.postcompose relies on FunExt!
|
-- IsEquiv.postcompose relies on FunExt!
|
||||||
protected theorem ua_isequiv_postcompose {A B C : Type} {w : A → B} {H0 : IsEquiv w}
|
protected theorem ua_isequiv_postcompose {A B C : Type.{1}} {w : A → B} {H0 : IsEquiv w}
|
||||||
: IsEquiv (@compose C A B w) :=
|
: IsEquiv (@compose C A B w)
|
||||||
!IsEquiv.postcompose
|
:= IsEquiv.adjointify (@compose C A B w)
|
||||||
|
(@compose C B A (IsEquiv.inv w))
|
||||||
|
(λ (x : C → B),
|
||||||
|
let w' := Equiv.mk w H0 in
|
||||||
|
have foo : Equiv.equiv_fun w' ≈ w,
|
||||||
|
from idp,
|
||||||
|
have eqretr : equiv_path (equiv_path⁻¹ w') ≈ w',
|
||||||
|
from (@retr _ _ (@equiv_path A B) (ua A B) w'),
|
||||||
|
have eqinv : A ≈ B,
|
||||||
|
from (@inv _ _ (@equiv_path A B) (ua A B) w'),
|
||||||
|
have thoseeqs [visible] : Π (p : A ≈ B), IsEquiv (Equiv.equiv_fun (equiv_path p)),
|
||||||
|
from (λp, Equiv.equiv_isequiv (equiv_path p)),
|
||||||
|
have eqp : Π (p : A ≈ B) (x : C → B), equiv_path p ∘ ((equiv_path p)⁻¹ ∘ x) ≈ x,
|
||||||
|
from (λ p,
|
||||||
|
(@path.rec_on Type.{1} A
|
||||||
|
(λ B' p', Π (x' : C → B'), (@equiv_path A B' p') ∘ ((equiv_path p')⁻¹ ∘ x') ≈ x')
|
||||||
|
B p (λ x', idp))
|
||||||
|
),
|
||||||
|
--have eqfin : equiv_path eqinv ∘ ((equiv_path eqinv)⁻¹ eqinv ∘ x) ≈ x,
|
||||||
|
-- from eqp eqinv,
|
||||||
|
sorry
|
||||||
|
)
|
||||||
|
(λ x, sorry)
|
||||||
|
exit
|
||||||
-- We are ready to prove functional extensionality,
|
-- We are ready to prove functional extensionality,
|
||||||
-- starting with the naive non-dependent version.
|
-- starting with the naive non-dependent version.
|
||||||
protected definition diagonal [reducible] (B : Type) : Type
|
protected definition diagonal [reducible] (B : Type) : Type
|
||||||
|
|
Loading…
Reference in a new issue