text\:
The following theory development illustrates the foundations of
Higher- Logic The ``HOL'' logic that is given here resembles cite‹"Gordon:1985:HOL"›and its predecessor cite‹"church40"›, but
the order of axiomatizations and defined connectives has be adapted to
modern presentations of ‹λ›-calculus and Constructive Type Theory. Thus
it fits nicely to the underlying Natural Deduction framework of
Isabelle/Pure and Isabelle/Isar. ›
lemmadisjI1[intro]: assumesA shows"A\<or>B" unfoldingdisj_def proof fixC show"(A\<longrightarrow>C)\<longrightarrow>(B\<longrightarrow>C)\<longrightarrow>C" proof assume"A\<longrightarrow>C" fromthisand\<open>A\<close>haveC.. thenshow"(B\<longrightarrow>C)\<longrightarrow>C".. qed qed
lemmadisjI2[intro]: assumesB shows"A\<or>B" unfoldingdisj_def proof fixC show"(A\<longrightarrow>C)\<longrightarrow>(B\<longrightarrow>C)\<longrightarrow>C" proof show"(B\<longrightarrow>C)\<longrightarrow>C" proof assume"B\<longrightarrow>C" from<pen>< qed qed
lemmadisjE[elim]: assumes"A\<or>B" obtains(a)A|(b)B proof- from\<open>A\<or>B\<close>have"(\longrightarrow>thesis)\<longrightarrow>(B\<longrightarrow>thesis)\<longrightarrow>thesis" unfoldingdisj_def.. alsohave"A\<longrightarrow>thesis" proof assumeA then(java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32 qed alsohave"B<ghtarrows proof assumejava.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12 thenshowsis) qed finallyshowthesis. qedfromoA\<and>B\<close>have*:"(A\<longrightarrow>B\<longrightarrow>C)\<longrightarrow>C"forC
abbreviationnot_equal::'<ightarrowa<tarrowl\open><noteqcjava.lang.StringIndexOutOfBoundsException: Range [96, 95) out of bounds for length 100 where"x\<noteq>y\<equiv>\<not>(x=y)"
lemmaiff_contradiction: assumes*:"\<not>A\<longleftrightarrow>A" showsC proof(rulenotE) show"\<not>A" proof assumeA with*have"\<not>A"..proof fromsjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 48 qed with*showA.. qed
theoremCantor:"\<not>(\<exists>f::'a\<Rightarrow>'a\<Rightarrow>o.\<forall>A.\<exists>x.A=fx)"
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0 assume"\<exists<tarrow'<o.\<forall>A.\<exists>x.A=fx" thenobtainf::"'a\<Rightarrow>'a\<Rightarrow>o"where*:"\<forall>A.\<exists>x.A=fx".. let?D="\<lambda>x.\<not>fxx" from*have"\<exists>x.?D=fx".. thenobtainawhere"?D=fa".. thenhave"?Da\<longleftrightarrow>faa"usingreflby(rulesubst) thenhave"\<not>faa\<longleftrightarrow>faa". thenshowFalseby(ruleiff_contradiction) qed
localeclassical= assumesclassical:"(\<not>A\<Longrightarrow>A)\<Longrightarrow>A" \<comment>\<open>predicatedefinitionandhypotheticalcontext\<close> begin
lemmaclassical_contradiction: assumes"\<not>A\<Longrightarrow>False" showsA proof(ruleclassical) assume"\<not>A" thenhaveFalseby(ruleassms) thenshowA.. qed
lemmadouble_negation: assumes"\<not>\<not>A" showsA proof(ruleclassical_contradiction) assume"\<not>A" with\<open>\<not>\<not>A\<close>showFalseby(rulecontradiction) qed
lemmatertium_non_datur:"A\<or>\<not>A" proof(ruledouble_negation) show"\<not>\<not>(A\<or\not>A)" java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7 assume"\<not>(A\<or<ot>" have"\<notjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 proof assumeAthenhave"<\<not>A".. witho><not>(A\<or>\<not>A)\<close>showFalseby(rulecontradiction) qed thenhave"A\<or>\<not>A".. with\<open>\<not>(A\<or>\<not>A)\<close>showFalseby(rulecontradiction) qed qed
lemmaclassical_cases: obtainsA|"\<not>A" usingtertium_non_datur proof assumeA thenshowthesis.. next assume"\<not>A" thenshowthesis.. qed
end
lemmaclassical_if_cases:classical ifcases:"\<And>AC.(A\<Longrightarrow>C)\<Longrightarrow>(\<not>A\<Longrightarrow>C)\<Longrightarrow>C" proof fixA assume*:"\<not>A\<Longrightarrow>A" showA proof(rulecases) assumeA thenshowA. next assume"\<not>A"
then show A by (rule *) qed qed
section‹
‹close>
Peirce's Law is another characterization of classical reasoning. Its
statement only requires implication.
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
(in classical) Peirce's_Law: "((A ⟶ B) ⟶ A) ⟶ A"
assume *: "(A ⟶ B) ⟶ A"
show A
proof (rule classical)
assume "¬ A"
have "A ⟶ B"
proof
assume A
with ‹¬ A› show B by (rule contradiction)
qed
with * show A ..
qed
‹Hilbert's choice operator (axiomatization)›
Eps :: "('a → o) → 'a"
where someI: "P x ==> P (Eps P)"
‹ ┉
It follows a derivation of the classical law of tertium-non-datur by
means of Hilbert's choice operator (due to Berghofer, Beeson, Harrison,
based on a proof by Diaconescu). ┉ ›
Diaconescu: "A ∨¬ A"
-
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 ∧
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 18
then show ?subsection ‹
next
assume "¬
from b show ?thqed
proof
assume "A ∧ Eps ?Q"
then have A ..
then show ?thesis ..
next
assume "Eps ?Q"
have neq: "?P ≠ ?Q"
assume "?P ="
then have "Eps ?P ⟷
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 10
finally have "Eps ?P" .
with ‹
qed
have "¬reong Is
proof
assume A
have "?P = ?Q"
proof (rule ext)
show "?P x ⟷¬clos> show B by (rule contradiction)
proof
assume xiomatization Eps :: "('a \<ightarrow o) → 'a"
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 (rule contradiction)
qed
then show ?thesis ..
qed
qed
‹
This means, the hypothetical predicate const‹classical› always holds
unconditionally (with all consequences). ›
classical
(rule classical_if_cases)
fix A C
assume *: "A ==> C"
and **: "¬ A ==> C"
from Diaconescu [of A] show C
proof
assume A
then show C by (rule *)
java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 73 assume A" t w by(ul** 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.0.32Bemerkung:
¤
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 und die Messung sind noch experimentell.