equal
deleted
inserted
replaced
125 \begin{center} |
125 \begin{center} |
126 @{thm UNION_eq} \\ @{thm INTER_eq} |
126 @{thm UNION_eq} \\ @{thm INTER_eq} |
127 \end{center} |
127 \end{center} |
128 The ASCII forms are \ \texttt{UN x:A.~B} \ and \ \texttt{INT x:A. B} \ |
128 The ASCII forms are \ \texttt{UN x:A.~B} \ and \ \texttt{INT x:A. B} \ |
129 where \texttt{x} may occur in \texttt{B}. |
129 where \texttt{x} may occur in \texttt{B}. |
130 If \texttt{A} is \texttt{UNIV} you can just write \ \texttt{UN x.~B} \ and \ \texttt{INT x. B}. |
130 If \texttt{A} is \texttt{UNIV} you can write \ \texttt{UN x.~B} \ and \ \texttt{INT x. B}. |
131 |
131 |
132 Some other frequently useful functions on sets are the following: |
132 Some other frequently useful functions on sets are the following: |
133 \begin{center} |
133 \begin{center} |
134 \begin{tabular}{l@ {\quad}l} |
134 \begin{tabular}{l@ {\quad}l} |
135 @{const_typ set}\index{set@@{const set}} & converts a list to the set of its elements\\ |
135 @{const_typ set}\index{set@@{const set}} & converts a list to the set of its elements\\ |
195 There is no complete proof method for HOL, not even in theory. |
195 There is no complete proof method for HOL, not even in theory. |
196 Hence all our proof methods only differ in how incomplete they are. |
196 Hence all our proof methods only differ in how incomplete they are. |
197 |
197 |
198 A proof method that is still incomplete but tries harder than @{text auto} is |
198 A proof method that is still incomplete but tries harder than @{text auto} is |
199 \indexed{@{text fastforce}}{fastforce}. It either succeeds or fails, it acts on the first |
199 \indexed{@{text fastforce}}{fastforce}. It either succeeds or fails, it acts on the first |
200 subgoal only, and it can be modified just like @{text auto}, e.g., |
200 subgoal only, and it can be modified like @{text auto}, e.g., |
201 with @{text "simp add"}. Here is a typical example of what @{text fastforce} |
201 with @{text "simp add"}. Here is a typical example of what @{text fastforce} |
202 can do: |
202 can do: |
203 *} |
203 *} |
204 |
204 |
205 lemma "\<lbrakk> \<forall>xs \<in> A. \<exists>ys. xs = ys @ ys; us \<in> A \<rbrakk> |
205 lemma "\<lbrakk> \<forall>xs \<in> A. \<exists>ys. xs = ys @ ys; us \<in> A \<rbrakk> |
256 |
256 |
257 text{* We do not explain how the proof was found but what this command |
257 text{* We do not explain how the proof was found but what this command |
258 means. For a start, Isabelle does not trust external tools (and in particular |
258 means. For a start, Isabelle does not trust external tools (and in particular |
259 not the translations from Isabelle's logic to those tools!) |
259 not the translations from Isabelle's logic to those tools!) |
260 and insists on a proof that it can check. This is what \indexed{@{text metis}}{metis} does. |
260 and insists on a proof that it can check. This is what \indexed{@{text metis}}{metis} does. |
261 It is given a list of lemmas and tries to find a proof just using those lemmas |
261 It is given a list of lemmas and tries to find a proof using just those lemmas |
262 (and pure logic). In contrast to using @{text simp} and friends who know a lot of |
262 (and pure logic). In contrast to using @{text simp} and friends who know a lot of |
263 lemmas already, using @{text metis} manually is tedious because one has |
263 lemmas already, using @{text metis} manually is tedious because one has |
264 to find all the relevant lemmas first. But that is precisely what |
264 to find all the relevant lemmas first. But that is precisely what |
265 \isacom{sledgehammer} does for us. |
265 \isacom{sledgehammer} does for us. |
266 In this case lemma @{thm[source]append_eq_conv_conj} alone suffices: |
266 In this case lemma @{thm[source]append_eq_conv_conj} alone suffices: |
350 terms syntactically equal by suitable instantiations of unknowns. For example, |
350 terms syntactically equal by suitable instantiations of unknowns. For example, |
351 unifying @{text"?P \<and> ?Q"} with \mbox{@{prop"a=b \<and> False"}} instantiates |
351 unifying @{text"?P \<and> ?Q"} with \mbox{@{prop"a=b \<and> False"}} instantiates |
352 @{text "?P"} with @{prop "a=b"} and @{text "?Q"} with @{prop False}. |
352 @{text "?P"} with @{prop "a=b"} and @{text "?Q"} with @{prop False}. |
353 \end{itemize} |
353 \end{itemize} |
354 We need not instantiate all unknowns. If we want to skip a particular one we |
354 We need not instantiate all unknowns. If we want to skip a particular one we |
355 can just write @{text"_"} instead, for example @{text "conjI[of _ \"False\"]"}. |
355 can write @{text"_"} instead, for example @{text "conjI[of _ \"False\"]"}. |
356 Unknowns can also be instantiated by name using \indexed{@{text "where"}}{where}, for example |
356 Unknowns can also be instantiated by name using \indexed{@{text "where"}}{where}, for example |
357 @{text "conjI[where ?P = \"a=b\""} \isacom{and} @{text"?Q = \"False\"]"}. |
357 @{text "conjI[where ?P = \"a=b\""} \isacom{and} @{text"?Q = \"False\"]"}. |
358 |
358 |
359 |
359 |
360 \subsection{Rule Application} |
360 \subsection{Rule Application} |