lean2/library/standard/logic/classes/inhabited.lean
Leonardo de Moura f3cb5f2f84 feat(library/standard/logic/connectives/quantifiers): add some theorems for simplifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-03 20:03:49 -07:00

19 lines
830 B
Text

----------------------------------------------------------------------------------------------------
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
-- Released under Apache 2.0 license as described in the file LICENSE.
-- Authors: Leonardo de Moura, Jeremy Avigad
----------------------------------------------------------------------------------------------------
import logic.connectives.basic
inductive inhabited (A : Type) : Prop :=
| inhabited_intro : A → inhabited A
theorem inhabited_elim {A : Type} {B : Prop} (H1 : inhabited A) (H2 : A → B) : B :=
inhabited_rec H2 H1
theorem inhabited_Prop [instance] : inhabited Prop :=
inhabited_intro true
theorem inhabited_fun [instance] (A : Type) {B : Type} (H : inhabited B) : inhabited (A → B) :=
inhabited_elim H (take b, inhabited_intro (λa, b))