doc-src/TutorialI/Rules/Force.thy
author nipkow
Wed, 29 Nov 2000 17:23:27 +0100
changeset 10539 5929460a41df
parent 10341 6eb91805a012
child 11407 138919f1a135
permissions -rw-r--r--
*** empty log message ***
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10341
6eb91805a012 added the $Id:$ line
paulson
parents: 10295
diff changeset
     1
(* ID:         $Id$ *)
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     2
theory Force = Main:
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     3
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     4
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     5
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     6
lemma "(\<forall>x. P x) \<and> (\<exists>x. Q x) \<longrightarrow> (\<forall>x. P x \<and> Q x)"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     7
apply clarify
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     8
oops
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     9
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    10
text {*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    11
proof\ {\isacharparenleft}prove{\isacharparenright}{\isacharcolon}\ step\ {\isadigit{1}}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    12
\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    13
goal\ {\isacharparenleft}lemma{\isacharparenright}{\isacharcolon}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    14
{\isacharparenleft}{\isasymforall}x{\isachardot}\ P\ x{\isacharparenright}\ {\isasymand}\ {\isacharparenleft}{\isasymexists}x{\isachardot}\ Q\ x{\isacharparenright}\ {\isasymlongrightarrow}\ {\isacharparenleft}{\isasymforall}x{\isachardot}\ P\ x\ {\isasymand}\ Q\ x{\isacharparenright}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    15
\ {\isadigit{1}}{\isachardot}\ {\isasymAnd}x\ xa{\isachardot}\ {\isasymlbrakk}{\isasymforall}x{\isachardot}\ P\ x{\isacharsemicolon}\ Q\ xa{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ x\ {\isasymand}\ Q\ x
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    16
*};
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    17
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    18
text {*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    19
couldn't find a good example of clarsimp
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    20
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    21
@{thm[display]"someI"}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    22
\rulename{someI}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    23
*};
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    24
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    25
lemma "\<lbrakk>Q a; P a\<rbrakk> \<Longrightarrow> P (SOME x. P x \<and> Q x) \<and> Q (SOME x. P x \<and> Q x)"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    26
apply (rule someI)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    27
oops
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    28
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    29
lemma "\<lbrakk>Q a; P a\<rbrakk> \<Longrightarrow> P (SOME x. P x \<and> Q x) \<and> Q (SOME x. P x \<and> Q x)"
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    30
apply (fast intro!: someI)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    31
done
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    32
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    33
text{*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    34
proof\ {\isacharparenleft}prove{\isacharparenright}{\isacharcolon}\ step\ \isadigit{1}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    35
\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    36
goal\ {\isacharparenleft}lemma{\isacharparenright}{\isacharcolon}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    37
{\isasymlbrakk}Q\ a{\isacharsemicolon}\ P\ a{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ {\isacharparenleft}SOME\ x{\isachardot}\ P\ x\ {\isasymand}\ Q\ x{\isacharparenright}\ {\isasymand}\ Q\ {\isacharparenleft}SOME\ x{\isachardot}\ P\ x\ {\isasymand}\ Q\ x{\isacharparenright}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    38
\ \isadigit{1}{\isachardot}\ {\isasymlbrakk}Q\ a{\isacharsemicolon}\ P\ a{\isasymrbrakk}\ {\isasymLongrightarrow}\ P\ {\isacharquery}x\ {\isasymand}\ Q\ {\isacharquery}x
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    39
*}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    40
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    41
end
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    42