src/Doc/Logics_ZF/FOL_examples.thy
 author wenzelm Tue, 31 Mar 2015 22:31:05 +0200 changeset 59886 e0dc738eb08c parent 58889 5b7a9633cfa8 child 66453 cc19f7ca2ed6 permissions -rw-r--r--
support for explicit scope of private entries;
```
section{*Examples of Classical Reasoning*}

theory FOL_examples imports "~~/src/FOL/FOL" begin

lemma "EX y. ALL x. P(y)-->P(x)"
--{* @{subgoals[display,indent=0,margin=65]} *}
apply (rule exCI)
--{* @{subgoals[display,indent=0,margin=65]} *}
apply (rule allI)
--{* @{subgoals[display,indent=0,margin=65]} *}
apply (rule impI)
--{* @{subgoals[display,indent=0,margin=65]} *}
apply (erule allE)
--{* @{subgoals[display,indent=0,margin=65]} *}
txt{*see below for @{text allI} combined with @{text swap}*}
apply (erule allI [THEN [2] swap])
--{* @{subgoals[display,indent=0,margin=65]} *}
apply (rule impI)
--{* @{subgoals[display,indent=0,margin=65]} *}
apply (erule notE)
--{* @{subgoals[display,indent=0,margin=65]} *}
apply assumption
done

text {*
@{thm[display] allI [THEN [2] swap]}
*}

lemma "EX y. ALL x. P(y)-->P(x)"
by blast

end

```