feat(library/hott) postcomposition from ua lemma is done up to the last gap

This commit is contained in:
Jakob von Raumer 2014-11-14 00:05:17 -05:00 committed by Leonardo de Moura
parent 4420f0dc0c
commit 992aad9661
2 changed files with 46 additions and 11 deletions

View file

@ -53,7 +53,8 @@ Equiv A B
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
definition equiv_isequiv [instance] {A B : Type} (e : Equiv A B) : IsEquiv (equiv_fun e) :=
@ -170,7 +171,7 @@ end IsEquiv
namespace IsEquiv
variables {A B: Type} (f : A → B)
--The inverse of an equivalence is, again, an equivalence.
definition inv_closed [instance] [Hf : IsEquiv f] : (IsEquiv (inv 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 :=
(moveR_V f (p⁻¹))⁻¹
definition ap_closed [instance] (x y : A) : IsEquiv (ap f) :=
adjointify (ap f)
definition ap_closed [instance] (x y : A) : IsEquiv (ap f) :=
adjointify (ap f)
(λq, (inverse (sect f x)) ⬝ ap (f⁻¹) q ⬝ sect f y)
(λq, !ap_pp
⬝ whiskerR !ap_pp _
@ -277,6 +278,18 @@ namespace Equiv
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
-- Note: Calculating with substitutions needs univalence
calc_trans compose

View file

@ -2,10 +2,10 @@
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Author: Jakob von Raumer
-- 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
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) :=
(@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)
context
parameters {ua : ua_type}
parameters {ua : ua_type.{1}}
-- TODO base this theorem on UA instead of FunExt.
-- IsEquiv.postcompose relies on FunExt!
protected theorem ua_isequiv_postcompose {A B C : Type} {w : A → B} {H0 : IsEquiv w}
: IsEquiv (@compose C A B w) :=
!IsEquiv.postcompose
protected theorem ua_isequiv_postcompose {A B C : Type.{1}} {w : A → B} {H0 : IsEquiv w}
: IsEquiv (@compose C A B w)
:= 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,
-- starting with the naive non-dependent version.
protected definition diagonal [reducible] (B : Type) : Type