2014-06-30 18:44:47 +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
|
2014-09-16 18:44:50 +00:00
|
|
|
import logic.core.decidable logic.core.inhabited
|
2014-09-03 23:00:38 +00:00
|
|
|
open decidable
|
2014-06-30 02:30:38 +00:00
|
|
|
|
|
|
|
inductive unit : Type :=
|
2014-09-05 05:31:52 +00:00
|
|
|
star : unit
|
2014-09-04 23:36:06 +00:00
|
|
|
namespace unit
|
2014-09-05 05:31:52 +00:00
|
|
|
notation `⋆`:max := star
|
2014-09-04 23:36:06 +00:00
|
|
|
|
2014-09-05 05:31:52 +00:00
|
|
|
theorem equal [protected] (a b : unit) : a = b :=
|
|
|
|
rec (rec rfl b) a
|
2014-09-02 02:44:04 +00:00
|
|
|
|
2014-09-05 05:31:52 +00:00
|
|
|
theorem eq_star (a : unit) : a = star :=
|
|
|
|
equal a star
|
2014-07-19 19:09:47 +00:00
|
|
|
|
2014-09-05 05:31:52 +00:00
|
|
|
theorem is_inhabited [protected] [instance] : inhabited unit :=
|
|
|
|
inhabited.mk ⋆
|
2014-08-20 22:49:44 +00:00
|
|
|
|
2014-09-08 05:22:04 +00:00
|
|
|
theorem has_decidable_eq [protected] [instance] : decidable_eq unit :=
|
2014-09-09 23:07:07 +00:00
|
|
|
take (a b : unit), inl (equal a b)
|
2014-08-20 02:32:44 +00:00
|
|
|
end unit
|