# HG changeset patch # User wenzelm # Date 1478551243 -3600 # Node ID d072c8169c7caa4e1cee79cc360648569c071774 # Parent 6eff987ab7186701538c5be0a5354930c54093f5 simplified main proof; diff -r 6eff987ab718 -r d072c8169c7c src/HOL/Proofs/ex/Hilbert_Classical.thy --- a/src/HOL/Proofs/ex/Hilbert_Classical.thy Mon Nov 07 21:13:41 2016 +0100 +++ b/src/HOL/Proofs/ex/Hilbert_Classical.thy Mon Nov 07 21:40:43 2016 +0100 @@ -19,6 +19,86 @@ 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" .. + then show "?P False" .. + qed + have b: "?Q (Eps ?Q)" + proof (rule someI) + have True .. + then show "?Q True" .. + qed + + from a show ?thesis + proof + assume "A \ Eps ?P" + then have A .. + then show ?thesis .. + next + assume "\ Eps ?P" + from b show ?thesis + proof + assume "A \ \ Eps ?Q" + then have A .. + then show ?thesis .. + next + assume "Eps ?Q" + have neq: "?P \ ?Q" + proof + assume "?P = ?Q" + then have "Eps ?P \ Eps ?Q" by (rule arg_cong) + also note \Eps ?Q\ + finally have "Eps ?P" . + with \\ Eps ?P\ 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" + then show "?Q x" + proof + assume "\ x" + with \A\ have "A \ \ x" .. + then show ?thesis .. + next + assume "A \ x" + then have x .. + then show ?thesis .. + qed + next + assume "?Q x" + then show "?P x" + proof + assume "A \ \ x" + then have "\ x" .. + then show ?thesis .. + next + assume x + with \A\ have "A \ x" .. + then show ?thesis .. + qed + qed + qed + with neq show False by contradiction + qed + then show ?thesis .. + qed + qed +qed + + +subsection \Old proof text\ + +theorem tertium_non_datur1: "A \ \ A" +proof - let ?P = "\x. (x \ False) \ (x \ True) \ A" let ?Q = "\x. (x \ False) \ A \ (x \ True)" @@ -93,14 +173,9 @@ qed -subsection \Proof term of text\ - -prf tertium_non_datur +subsection \Old proof script\ - -subsection \Proof script\ - -theorem tertium_non_datur': "A \ \ A" +theorem tertium_non_datur2: "A \ \ A" apply (subgoal_tac "(((SOME x. x = False \ x = True \ A) = False) \ ((SOME x. x = False \ x = True \ A) = True) \ A) \ @@ -152,8 +227,10 @@ done -subsection \Proof term of script\ +subsection \Proof terms\ -prf tertium_non_datur' +prf tertium_non_datur +prf tertium_non_datur1 +prf tertium_non_datur2 end