lean4-htt/library/init/unit.lean
Leonardo de Moura 0163c1aa5b feat(library/init): use mk_dec_eq_instance in the init folder
We cannot mk_dec_eq_instance everywhere in the init folder because some
dec_eq instances are used to define the tactic mk_dec_eq_instance.
2016-07-20 20:21:58 -04:00

19 lines
490 B
Text

/-
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
-/
prelude
import init.logic
theorem unit_eq (a b : unit) : a = b :=
unit.rec_on a (unit.rec_on b rfl)
theorem unit_eq_unit (a : unit) : a = () :=
unit_eq a ()
definition unit_subsingleton [instance] : subsingleton unit :=
subsingleton.intro unit_eq
definition unit_is_inhabited [instance] : inhabited unit :=
inhabited.mk ()