2014-06-30 11:44:47 -07: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-07-31 18:40:09 -07:00
|
|
|
|
|
|
|
import logic.classes.decidable logic.classes.inhabited
|
2014-08-20 15:49:44 -07:00
|
|
|
|
2014-07-19 20:09:47 +01:00
|
|
|
using decidable
|
2014-06-29 19:30:38 -07:00
|
|
|
|
2014-07-19 20:09:47 +01:00
|
|
|
namespace unit
|
2014-08-20 15:49:44 -07:00
|
|
|
|
2014-06-29 19:30:38 -07:00
|
|
|
inductive unit : Type :=
|
2014-08-22 15:46:10 -07:00
|
|
|
star : unit
|
2014-07-22 09:56:05 -07:00
|
|
|
|
|
|
|
notation `⋆`:max := star
|
2014-06-29 19:30:38 -07:00
|
|
|
|
2014-07-28 19:58:57 -07:00
|
|
|
theorem unit_eq (a b : unit) : a = b :=
|
|
|
|
unit_rec (unit_rec (refl ⋆) b) a
|
2014-07-19 20:09:47 +01:00
|
|
|
|
2014-08-20 15:49:44 -07:00
|
|
|
theorem unit_inhabited [instance] : inhabited unit :=
|
2014-08-19 19:32:44 -07:00
|
|
|
inhabited_mk ⋆
|
2014-07-19 20:09:47 +01:00
|
|
|
|
2014-07-28 19:58:57 -07:00
|
|
|
theorem decidable_eq [instance] (a b : unit) : decidable (a = b) :=
|
|
|
|
inl (unit_eq a b)
|
2014-08-20 15:49:44 -07:00
|
|
|
|
2014-08-19 19:32:44 -07:00
|
|
|
end unit
|