feat(library/hott) add to trunc.lean: contractible types are equivalent to unit

This commit is contained in:
Jakob von Raumer 2014-11-12 16:31:44 -05:00 committed by Leonardo de Moura
parent 3ee703f5d5
commit df4a8db23d

View file

@ -238,6 +238,16 @@ namespace truncation
Equiv.mk f (isequiv_iff_hprop f g)
end
/- interaction with the Unit type -/
-- A contractible type is equivalent to [Unit]. *)
definition equiv_contr_unit [H : is_contr A] : A ≃ unit :=
Equiv.mk (λ (x : A), ⋆)
(IsEquiv.mk (λ (u : unit), center A)
(λ (u : unit), unit.rec_on u idp)
(λ (x : A), contr x)
(λ (x : A), (!ap_const)⁻¹))
-- TODO: port "Truncated morphisms"
end truncation