2014-08-07 18:36:44 +00:00
|
|
|
|
-- Copyright (c) 2014 Microsoft Corporation. All rights reserved.
|
2014-07-21 04:15:48 +00:00
|
|
|
|
-- Released under Apache 2.0 license as described in the file LICENSE.
|
2014-08-01 01:40:09 +00:00
|
|
|
|
-- Author: Leonardo de Moura
|
|
|
|
|
|
|
|
|
|
import logic.axioms.hilbert logic.axioms.funext
|
2014-09-03 23:00:38 +00:00
|
|
|
|
open eq_ops nonempty inhabited
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
|
|
|
|
-- Diaconescu’s theorem
|
|
|
|
|
-- Show that Excluded middle follows from
|
2014-07-22 16:43:18 +00:00
|
|
|
|
-- Hilbert's choice operator, function extensionality and Prop extensionality
|
2014-07-21 04:15:48 +00:00
|
|
|
|
section
|
2014-07-25 18:10:45 +00:00
|
|
|
|
hypothesis propext {a b : Prop} : (a → b) → (b → a) → a = b
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2014-07-22 16:43:18 +00:00
|
|
|
|
parameter p : Prop
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2014-08-15 03:12:54 +00:00
|
|
|
|
definition u [private] := epsilon (λx, x = true ∨ p)
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2014-08-15 03:12:54 +00:00
|
|
|
|
definition v [private] := epsilon (λx, x = false ∨ p)
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2014-07-29 02:58:57 +00:00
|
|
|
|
lemma u_def [private] : u = true ∨ p :=
|
2014-08-15 15:43:52 +00:00
|
|
|
|
epsilon_spec (exists_intro true (or_inl (refl true)))
|
2014-07-29 02:58:57 +00:00
|
|
|
|
|
|
|
|
|
lemma v_def [private] : v = false ∨ p :=
|
2014-08-15 15:43:52 +00:00
|
|
|
|
epsilon_spec (exists_intro false (or_inl (refl false)))
|
2014-07-29 02:58:57 +00:00
|
|
|
|
|
|
|
|
|
lemma uv_implies_p [private] : ¬(u = v) ∨ p :=
|
|
|
|
|
or_elim u_def
|
|
|
|
|
(assume Hut : u = true, or_elim v_def
|
|
|
|
|
(assume Hvf : v = false,
|
|
|
|
|
have Hne : ¬(u = v), from Hvf⁻¹ ▸ Hut⁻¹ ▸ true_ne_false,
|
|
|
|
|
or_inl Hne)
|
|
|
|
|
(assume Hp : p, or_inr Hp))
|
|
|
|
|
(assume Hp : p, or_inr Hp)
|
|
|
|
|
|
|
|
|
|
lemma p_implies_uv [private] : p → u = v :=
|
|
|
|
|
assume Hp : p,
|
|
|
|
|
have Hpred : (λ x, x = true ∨ p) = (λ x, x = false ∨ p), from
|
|
|
|
|
funext (take x : Prop,
|
|
|
|
|
have Hl : (x = true ∨ p) → (x = false ∨ p), from
|
|
|
|
|
assume A, or_inr Hp,
|
|
|
|
|
have Hr : (x = false ∨ p) → (x = true ∨ p), from
|
|
|
|
|
assume A, or_inr Hp,
|
|
|
|
|
show (x = true ∨ p) = (x = false ∨ p), from
|
|
|
|
|
propext Hl Hr),
|
|
|
|
|
show u = v, from
|
|
|
|
|
Hpred ▸ (refl (epsilon (λ x, x = true ∨ p)))
|
|
|
|
|
|
|
|
|
|
theorem em : p ∨ ¬p :=
|
2014-08-04 05:58:12 +00:00
|
|
|
|
have H : ¬(u = v) → ¬p, from mt p_implies_uv,
|
2014-07-29 02:58:57 +00:00
|
|
|
|
or_elim uv_implies_p
|
|
|
|
|
(assume Hne : ¬(u = v), or_inr (H Hne))
|
|
|
|
|
(assume Hp : p, or_inl Hp)
|
2014-07-21 04:15:48 +00:00
|
|
|
|
end
|