refactor(library/standard/unit): make unit type similar to the one in the hott library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
c5cbe1cc2c
commit
8adf6e25ef
1 changed files with 5 additions and 3 deletions
|
@ -6,13 +6,15 @@ using decidable
|
|||
|
||||
namespace unit
|
||||
inductive unit : Type :=
|
||||
| tt : unit
|
||||
| star : unit
|
||||
|
||||
notation `⋆`:max := star
|
||||
|
||||
theorem unit_eq (a b : unit) : a = b
|
||||
:= unit_rec (unit_rec (refl tt) b) a
|
||||
:= unit_rec (unit_rec (refl ⋆) b) a
|
||||
|
||||
theorem inhabited_unit [instance] : inhabited unit
|
||||
:= inhabited_intro tt
|
||||
:= inhabited_intro ⋆
|
||||
|
||||
using decidable
|
||||
theorem decidable_eq [instance] (a b : unit) : decidable (a = b)
|
||||
|
|
Loading…
Reference in a new issue