2015-06-20 11:44:26 +00: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-08-01 01:40:09 +00:00
|
|
|
|
|
2015-04-01 19:36:33 +00:00
|
|
|
|
import logic.axioms.hilbert logic.eq
|
2015-06-20 11:44:26 +00:00
|
|
|
|
open eq.ops
|
|
|
|
|
|
|
|
|
|
/-
|
|
|
|
|
Diaconescu’s theorem: excluded middle follows from Hilbert's choice operator, function extensionality,
|
|
|
|
|
and Prop extensionality
|
|
|
|
|
-/
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2015-04-22 02:13:19 +00:00
|
|
|
|
section
|
2014-10-09 14:13:06 +00:00
|
|
|
|
parameter p : Prop
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2015-06-20 11:44:26 +00:00
|
|
|
|
private definition U (x : Prop) : Prop := x = true ∨ p
|
|
|
|
|
private definition V (x : Prop) : Prop := x = false ∨ p
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2015-06-20 11:44:26 +00:00
|
|
|
|
private definition u := epsilon U
|
|
|
|
|
private definition v := epsilon V
|
2014-07-21 04:15:48 +00:00
|
|
|
|
|
2015-06-20 11:44:26 +00:00
|
|
|
|
private lemma u_def : U u :=
|
2014-12-16 03:05:03 +00:00
|
|
|
|
epsilon_spec (exists.intro true (or.inl rfl))
|
2014-07-29 02:58:57 +00:00
|
|
|
|
|
2015-06-20 11:44:26 +00:00
|
|
|
|
private lemma v_def : V v :=
|
2014-12-16 03:05:03 +00:00
|
|
|
|
epsilon_spec (exists.intro false (or.inl rfl))
|
2014-07-29 02:58:57 +00:00
|
|
|
|
|
2015-06-20 11:44:26 +00:00
|
|
|
|
private lemma not_uv_or_p : ¬(u = v) ∨ p :=
|
2014-09-05 04:25:21 +00:00
|
|
|
|
or.elim u_def
|
2015-06-20 11:44:26 +00:00
|
|
|
|
(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))
|
2014-09-05 04:25:21 +00:00
|
|
|
|
(assume Hp : p, or.inr Hp)
|
2014-07-29 02:58:57 +00:00
|
|
|
|
|
2014-09-19 21:30:02 +00:00
|
|
|
|
private lemma p_implies_uv : p → u = v :=
|
2014-07-29 02:58:57 +00:00
|
|
|
|
assume Hp : p,
|
2015-06-20 11:44:26 +00:00
|
|
|
|
have Hpred : U = V, 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 (iff.intro Hl Hr)),
|
|
|
|
|
have H' : epsilon U = epsilon V, from Hpred ▸ rfl,
|
|
|
|
|
show u = v, from H'
|
2014-07-29 02:58:57 +00:00
|
|
|
|
|
|
|
|
|
theorem em : p ∨ ¬p :=
|
2014-08-04 05:58:12 +00:00
|
|
|
|
have H : ¬(u = v) → ¬p, from mt p_implies_uv,
|
2015-06-20 11:44:26 +00:00
|
|
|
|
or.elim not_uv_or_p
|
2014-09-05 04:25:21 +00:00
|
|
|
|
(assume Hne : ¬(u = v), or.inr (H Hne))
|
|
|
|
|
(assume Hp : p, or.inl Hp)
|
2014-07-21 04:15:48 +00:00
|
|
|
|
end
|