2014-12-23 20:35:06 +00:00
|
|
|
/-
|
|
|
|
Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
-/
|
2015-04-01 18:48:18 +00:00
|
|
|
import logic.eq
|
2014-12-23 20:35:06 +00:00
|
|
|
|
|
|
|
namespace unit
|
|
|
|
notation `⋆` := star
|
|
|
|
|
2015-05-25 12:13:23 +00:00
|
|
|
protected theorem eq (a b : unit) : a = b :=
|
2015-02-11 20:49:27 +00:00
|
|
|
unit.rec_on a (unit.rec_on b rfl)
|
2014-12-23 20:35:06 +00:00
|
|
|
|
|
|
|
theorem eq_star (a : unit) : a = star :=
|
2015-05-25 12:13:23 +00:00
|
|
|
unit.eq a star
|
2014-12-23 20:35:06 +00:00
|
|
|
|
|
|
|
protected theorem subsingleton [instance] : subsingleton unit :=
|
2015-05-25 12:13:23 +00:00
|
|
|
subsingleton.intro (λ a b, unit.eq a b)
|
2014-12-23 20:35:06 +00:00
|
|
|
|
|
|
|
protected definition is_inhabited [instance] : inhabited unit :=
|
|
|
|
inhabited.mk unit.star
|
|
|
|
|
|
|
|
protected definition has_decidable_eq [instance] : decidable_eq unit :=
|
2015-05-25 12:13:23 +00:00
|
|
|
take (a b : unit), decidable.inl (unit.eq a b)
|
2014-12-23 20:35:06 +00:00
|
|
|
end unit
|