feat(hott): prove HoTT book Theorem 4.7.6

This commit is contained in:
Ulrik Buchholtz 2015-09-26 18:01:33 -04:00 committed by Leonardo de Moura
parent 7cb66cdfae
commit 2c22501084
2 changed files with 49 additions and 0 deletions

View file

@ -199,6 +199,10 @@ namespace is_trunc
: is_contr (Σ(x : A), a = x) := : is_contr (Σ(x : A), a = x) :=
is_contr.mk (sigma.mk a idp) (λp, sigma.rec_on p (λ b q, eq.rec_on q idp)) is_contr.mk (sigma.mk a idp) (λp, sigma.rec_on p (λ b q, eq.rec_on q idp))
definition is_contr_sigma_eq' [instance] [priority 800] {A : Type} (a : A)
: is_contr (Σ(x : A), x = a) :=
is_contr.mk (sigma.mk a idp) (λp, sigma.rec_on p (λ b q, eq.rec_on q idp))
definition is_contr_unit : is_contr unit := definition is_contr_unit : is_contr unit :=
is_contr.mk star (λp, unit.rec_on p idp) is_contr.mk star (λp, unit.rec_on p idp)

View file

@ -44,3 +44,48 @@ namespace fiber
to_inv !fiber_eq_equiv ⟨p, q⟩ to_inv !fiber_eq_equiv ⟨p, q⟩
end fiber end fiber
open function is_equiv is_trunc
namespace fiber
/- Theorem 4.7.6 -/
variables {A : Type} {P Q : A → Type}
/- Note that the map on total spaces/sigmas is just sigma_functor id -/
definition fiber_total_equiv (f : Πa, P a → Q a) {a : A} (q : Q a)
: fiber (sigma_functor id f) ⟨a , q⟩ ≃ fiber (f a) q :=
calc
fiber (sigma_functor id f) ⟨a , q⟩
≃ Σ(w : Σx, P x), ⟨w.1 , f w.1 w.2 ⟩ = ⟨a , q⟩
: sigma_char
... ≃ Σ(x : A), Σ(p : P x), ⟨x , f x p⟩ = ⟨a , q⟩
: sigma_assoc_equiv
... ≃ Σ(x : A), Σ(p : P x), Σ(H : x = a), f x p =[H] q
:
begin
apply sigma_equiv_sigma_id, intro x,
apply sigma_equiv_sigma_id, intro p,
apply sigma_eq_equiv
end
... ≃ Σ(x : A), Σ(H : x = a), Σ(p : P x), f x p =[H] q
:
begin
apply sigma_equiv_sigma_id, intro x,
apply sigma_comm_equiv
end
... ≃ Σ(w : Σx, x = a), Σ(p : P w.1), f w.1 p =[w.2] q
: sigma_assoc_equiv
... ≃ Σ(p : P (center (Σx, x=a)).1), f (center (Σx, x=a)).1 p =[(center (Σx, x=a)).2] q
: sigma_equiv_of_is_contr_left
... ≃ Σ(p : P a), f a p =[idpath a] q
: equiv_of_eq idp
... ≃ Σ(p : P a), f a p = q
:
begin
apply sigma_equiv_sigma_id, intro p,
apply pathover_idp
end
... ≃ fiber (f a) q
: sigma_char
end fiber