doc-src/TutorialI/Rules/Force.thy
author paulson
Mon, 23 Oct 2000 16:25:04 +0200
changeset 10295 8eb12693cead
child 10341 6eb91805a012
permissions -rw-r--r--
the Rules chapter and theories
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10295
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     1
theory Force = Main:
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     2
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
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
     6
apply clarify
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     7
oops
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     8
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
     9
text {*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    10
proof\ {\isacharparenleft}prove{\isacharparenright}{\isacharcolon}\ step\ {\isadigit{1}}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    11
\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    12
goal\ {\isacharparenleft}lemma{\isacharparenright}{\isacharcolon}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    13
{\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
    14
\ {\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
    15
*};
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    16
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    17
text {*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    18
couldn't find a good example of clarsimp
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    19
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    20
@{thm[display]"someI"}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    21
\rulename{someI}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    22
*};
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    23
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    24
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
    25
apply (rule someI)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    26
oops
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    27
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    28
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
    29
apply (fast intro!: someI)
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    30
done
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    31
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    32
text{*
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    33
proof\ {\isacharparenleft}prove{\isacharparenright}{\isacharcolon}\ step\ \isadigit{1}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    34
\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    35
goal\ {\isacharparenleft}lemma{\isacharparenright}{\isacharcolon}\isanewline
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    36
{\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
    37
\ \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
    38
*}
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    39
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    40
end
8eb12693cead the Rules chapter and theories
paulson
parents:
diff changeset
    41