2014-08-12 00:35:25 +00:00
|
|
|
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
|
|
|
-- Released under Apache 2.0 license as described in the file LICENSE.
|
2014-09-05 16:31:27 +00:00
|
|
|
-- Author: Jeremy Avigad, Floris van Doorn
|
2014-08-12 00:35:25 +00:00
|
|
|
|
|
|
|
-- Empty type
|
|
|
|
-- ----------
|
|
|
|
|
2014-10-05 17:50:13 +00:00
|
|
|
import logic.cast
|
2014-09-05 16:31:27 +00:00
|
|
|
|
2014-08-12 00:35:25 +00:00
|
|
|
inductive empty : Type
|
|
|
|
|
2014-09-05 05:31:52 +00:00
|
|
|
namespace empty
|
2014-09-19 22:04:52 +00:00
|
|
|
protected theorem elim (A : Type) (H : empty) : A :=
|
2014-09-05 05:31:52 +00:00
|
|
|
rec (λe, A) H
|
2014-10-09 01:41:18 +00:00
|
|
|
|
|
|
|
protected theorem subsingleton [instance] : subsingleton empty :=
|
|
|
|
subsingleton.intro (λ a b, !elim a)
|
2014-09-05 05:31:52 +00:00
|
|
|
end empty
|
2014-09-05 16:31:27 +00:00
|
|
|
|
|
|
|
namespace false
|
|
|
|
theorem to_empty (H : false) : empty :=
|
|
|
|
cast (false_elim H) true
|
|
|
|
|
|
|
|
theorem rec_type (A : Type) (H : false) : A :=
|
2014-10-09 01:41:18 +00:00
|
|
|
!empty.elim (to_empty H)
|
2014-09-05 16:31:27 +00:00
|
|
|
end false
|