(* Title: HOL/Proofs/ex/Hilbert_Classical.thy Author: Stefan Berghofer Author: Makarius Wenzel
*)
section \<open>Hilbert's choice and classical logic\<close>
theory Hilbert_Classical imports Main begin
text\<open>
Derivation of the classical law of tertium-non-datur by means of
Hilbert's choice operator (due to M. J. Beeson and J. Harrison). \<close>
subsection \<open>Proof text\<close>
theorem tertium_non_datur: "A \ \ A" proof - let ?P = "\x. (A \ x) \ \ x" let ?Q = "\x. (A \ \ x) \ x"
have a: "?P (Eps ?P)" proof (rule someI) have"\ False" .. thenshow"?P False" .. qed have b: "?Q (Eps ?Q)" proof (rule someI) have True .. thenshow"?Q True" .. qed
from a show ?thesis proof assume"A \ Eps ?P" thenhave A .. thenshow ?thesis .. next assume"\ Eps ?P" from b show ?thesis proof assume"A \ \ Eps ?Q" thenhave A .. thenshow ?thesis .. next assume"Eps ?Q" have neq: "?P \ ?Q" proof assume"?P = ?Q" thenhave"Eps ?P \ Eps ?Q" by (rule arg_cong) alsonote\<open>Eps ?Q\<close> finallyhave"Eps ?P" . with\<open>\<not> Eps ?P\<close> show False by contradiction qed have"\ A" proof assume A have"?P = ?Q" proof (rule ext) show"?P x \ ?Q x" for x proof assume"?P x" thenshow"?Q x" proof assume"\ x" with\<open>A\<close> have "A \<and> \<not> x" .. thenshow ?thesis .. next assume"A \ x" thenhave x .. thenshow ?thesis .. qed next assume"?Q x" thenshow"?P x" proof assume"A \ \ x" thenhave"\ x" .. thenshow ?thesis .. next assume x with\<open>A\<close> have "A \<and> x" .. thenshow ?thesis .. qed qed qed with neq show False by contradiction qed thenshow ?thesis .. qed qed qed
subsection \<open>Old proof text\<close>
theorem tertium_non_datur1: "A \ \ A" proof - let ?P = "\x. (x \ False) \ (x \ True) \ A" let ?Q = "\x. (x \ False) \ A \ (x \ True)"
have a: "?P (Eps ?P)" proof (rule someI) show"?P False"using refl .. qed have b: "?Q (Eps ?Q)" proof (rule someI) show"?Q True"using refl .. qed
from a show ?thesis proof assume"(Eps ?P \ True) \ A" thenhave A .. thenshow ?thesis .. next assume P: "Eps ?P \ False" from b show ?thesis proof assume"(Eps ?Q \ False) \ A" thenhave A .. thenshow ?thesis .. next assume Q: "Eps ?Q \ True" have neq: "?P \ ?Q" proof assume"?P = ?Q" thenhave"Eps ?P \ Eps ?Q" by (rule arg_cong) alsonote P alsonote Q finallyshow False by (rule False_neq_True) qed have"\ A" proof assume A have"?P = ?Q" proof (rule ext) show"?P x \ ?Q x" for x proof assume"?P x" thenshow"?Q x" proof assume"x \ False" from this and\<open>A\<close> have "(x \<longleftrightarrow> False) \<and> A" .. thenshow ?thesis .. next assume"(x \ True) \ A" thenhave"x \ True" .. thenshow ?thesis .. qed next assume"?Q x" thenshow"?P x" proof assume"(x \ False) \ A" thenhave"x \ False" .. thenshow ?thesis .. next assume"x \ True" from this and\<open>A\<close> have "(x \<longleftrightarrow> True) \<and> A" .. thenshow ?thesis .. qed qed qed with neq show False by contradiction qed thenshow ?thesis .. qed qed qed
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.