lean2/hott/types/unit.hlean

31 lines
696 B
Text
Raw Normal View History

/-
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 unit type
-/
open equiv option eq
namespace unit
protected definition eta : Π(u : unit), ⋆ = u
| eta ⋆ := idp
2016-03-01 04:37:03 +00:00
definition unit_equiv_option_empty [constructor] : 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
2016-03-01 04:37:03 +00:00
-- equivalences involving unit and other type constructors are in the file
-- of the other constructor
end unit
open unit is_trunc