lean2/hott/types/unit.hlean
Floris van Doorn 876aa20ad6 feat(hott): Port remainder of §6.3 and §7.2 from the HoTT book
Also prove a theorem similar to Lemma 7.3.1

There are still some sorry's in hit.suspension
2015-06-04 20:14:12 -04:00

31 lines
733 B
Text

/-
Copyright (c) 2015 Floris van Doorn. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Floris van Doorn
Theorems about the booleans
-/
open equiv option
namespace unit
definition unit_equiv_option_empty : unit ≃ option empty :=
begin
fapply equiv.MK,
{ intro u, exact none},
{ intro e, exact star},
{ intro e, cases e, reflexivity, contradiction},
{ intro u, cases u, reflexivity},
end
definition unit_imp_equiv (A : Type) : (unit → A) ≃ A :=
begin
fapply equiv.MK,
{ intro f, exact f star},
{ intro a u, exact a},
{ intro a, reflexivity},
{ intro f, apply eq_of_homotopy, intro u, cases u, reflexivity},
end
end unit