# HG changeset patch # User wenzelm # Date 1437654051 -7200 # Node ID cf7f3465eaf1c4214e3cbd69688f9f0c94cbc931 # Parent f47bd91fdc75e801c94d7ce2a31522607bd0f7fe tuned proofs; diff -r f47bd91fdc75 -r cf7f3465eaf1 src/FOL/ex/First_Order_Logic.thy --- a/src/FOL/ex/First_Order_Logic.thy Thu Jul 23 13:28:34 2015 +0200 +++ b/src/FOL/ex/First_Order_Logic.thy Thu Jul 23 14:20:51 2015 +0200 @@ -51,17 +51,14 @@ from `A \ B` show B by (rule conjD2) qed -definition - true :: o ("\") where - "\ \ \ \ \" +definition true :: o ("\") + where "\ \ \ \ \" -definition - not :: "o \ o" ("\ _" [40] 40) where - "\ A \ A \ \" +definition not :: "o \ o" ("\ _" [40] 40) + where "\ A \ A \ \" -definition - iff :: "o \ o \ o" (infixr "\" 25) where - "A \ B \ (A \ B) \ (B \ A)" +definition iff :: "o \ o \ o" (infixr "\" 25) + where "A \ B \ (A \ B) \ (B \ A)" theorem trueI [intro]: \ @@ -78,7 +75,8 @@ theorem notE [elim]: "\ A \ A \ B" proof (unfold not_def) assume "A \ \" and A - then have \ .. then show B .. + then have \ .. + then show B .. qed theorem iffI [intro]: "(A \ B) \ (B \ A) \ A \ B" diff -r f47bd91fdc75 -r cf7f3465eaf1 src/HOL/ex/Higher_Order_Logic.thy --- a/src/HOL/ex/Higher_Order_Logic.thy Thu Jul 23 13:28:34 2015 +0200 +++ b/src/HOL/ex/Higher_Order_Logic.thy Thu Jul 23 14:20:51 2015 +0200 @@ -4,7 +4,9 @@ section \Foundations of HOL\ -theory Higher_Order_Logic imports Pure begin +theory Higher_Order_Logic +imports Pure +begin text \ The following theory development demonstrates Higher-Order Logic @@ -28,8 +30,7 @@ subsubsection \Basic logical connectives\ -judgment - Trueprop :: "o \ prop" ("_" 5) +judgment Trueprop :: "o \ prop" ("_" 5) axiomatization imp :: "o \ o \ o" (infixr "\" 25) and @@ -115,9 +116,8 @@ theorem notE [elim]: "\ A \ A \ B" proof (unfold not_def) - assume "A \ \" - also assume A - finally have \ .. + assume "A \ \" and A + then have \ .. then show B .. qed @@ -202,11 +202,13 @@ from c have "(A \ C) \ (B \ C) \ C" .. also have "A \ C" proof - assume A then show C by (rule r1) + assume A + then show C by (rule r1) qed also have "B \ C" proof - assume B then show C by (rule r2) + assume B + then show C by (rule r2) qed finally show C . qed @@ -248,8 +250,7 @@ locale classical = assumes classical: "(\ A \ A) \ A" -theorem (in classical) - Peirce's_Law: "((A \ B) \ A) \ A" +theorem (in classical) Peirce's_Law: "((A \ B) \ A) \ A" proof assume a: "(A \ B) \ A" show A @@ -264,8 +265,7 @@ qed qed -theorem (in classical) - double_negation: "\ \ A \ A" +theorem (in classical) double_negation: "\ \ A \ A" proof - assume "\ \ A" show A @@ -275,8 +275,7 @@ qed qed -theorem (in classical) - tertium_non_datur: "A \ \ A" +theorem (in classical) tertium_non_datur: "A \ \ A" proof (rule double_negation) show "\ \ (A \ \ A)" proof @@ -291,8 +290,7 @@ qed qed -theorem (in classical) - classical_cases: "(A \ C) \ (\ A \ C) \ C" +theorem (in classical) classical_cases: "(A \ C) \ (\ A \ C) \ C" proof - assume r1: "A \ C" and r2: "\ A \ C" from tertium_non_datur show C