66 type (contrary to most functional languages which use |
66 type (contrary to most functional languages which use |
67 <tt>-></tt>). So <tt>a => b</tt> is the type of a function |
67 <tt>-></tt>). So <tt>a => b</tt> is the type of a function |
68 that takes an element of <tt>a</tt> as input and gives you an |
68 that takes an element of <tt>a</tt> as input and gives you an |
69 element of <tt>b</tt> as output. The long arrow <tt>--></tt> |
69 element of <tt>b</tt> as output. The long arrow <tt>--></tt> |
70 and <tt>==></tt> are object and meta level |
70 and <tt>==></tt> are object and meta level |
71 implication. Roughly speaking, the meta level implication is |
71 implication. Roughly speaking, the meta level implication |
72 used to write down theorems (<tt>P ==> Q</tt> is a theorem |
72 should only be used when stating theorems where it separates |
73 with <tt>P</tt> as premise and <tt>Q</tt> as conclusion), and |
73 the assumptions from the conclusion. Whenever you need an |
74 the object level implication is used in usual HOL formulas |
74 implication inside a HOL formula, use <code>--></code>. |
75 (e.g. in definitions).</td></tr> |
75 </td></tr> |
76 </table> |
76 </table> |
77 |
77 |
78 <table class="question" width="100%"><tr><td>Where do I have to put those double quotes?</td></tr></table> |
78 <table class="question" width="100%"><tr><td>Where do I have to put those double quotes?</td></tr></table> |
79 |
79 |
80 <table class="answer" width="100%"><tr><td>Isabelle distinguishes between <em>inner</em> |
80 <table class="answer" width="100%"><tr><td>Isabelle distinguishes between <em>inner</em> |
90 <tt>apply</tt>, <tt>done</tt> are without quotation marks, as are |
90 <tt>apply</tt>, <tt>done</tt> are without quotation marks, as are |
91 the names of constants in constant definitions (<tt>consts</tt> |
91 the names of constants in constant definitions (<tt>consts</tt> |
92 and <tt>constdefs</tt>) |
92 and <tt>constdefs</tt>) |
93 </td></tr></table> |
93 </td></tr></table> |
94 |
94 |
95 <table class="question" width="100%"><tr><td>What is <tt>No such |
95 <table class="question" width="100%"><tr><td>What is <tt>"No such |
96 constant: "_case_syntax"</tt> supposed to tell |
96 constant: _case_syntax"</tt> supposed to tell |
97 me?</td></tr></table> |
97 me?</td></tr></table> |
98 |
98 |
99 <table class="answer" width="100%"><tr><td>You get this message if |
99 <table class="answer" width="100%"><tr><td>You get this message if |
100 you use a case construct on a datatype and have a typo in the |
100 you use a case construct on a datatype and have a typo in the |
101 names of the constructor patterns or if the order of the |
101 names of the constructor patterns or if the order of the |
180 necessarily true. Isabelle does not assume that 1 and 2 are |
180 necessarily true. Isabelle does not assume that 1 and 2 are |
181 natural numbers. Try <tt>"(1::nat)+1=2"</tt> |
181 natural numbers. Try <tt>"(1::nat)+1=2"</tt> |
182 instead.</td></tr></table> |
182 instead.</td></tr></table> |
183 |
183 |
184 |
184 |
185 <table class="question" width="100%"><tr><td>How do I show |
185 <table class="question" width="100%"><tr><td>Can Isabelle find |
186 counter examples?</td></tr></table> |
186 counterexamples?</td></tr></table> |
187 |
187 |
188 <table class="answer" width="100%"><tr><td> |
188 <table class="answer" width="100%"><tr><td> |
189 There are a number of commands that try to find counter examples |
189 <p> |
190 automatically. Try <code>quickcheck</code> for small executable |
190 For arithmetic goals, <code>arith</code> finds counterexamples. |
191 examples and <code>arith</code> for Presburger arithmetic. |
191 For executable goals, <code>quickcheck</code> tries to find a |
|
192 counterexample. For goals of a more logical nature (including |
|
193 quantifiers, sets and inductive definitions) <code>refute</code> |
|
194 searches for a countermodel. |
|
195 </p> |
|
196 <p> |
192 Otherwise, negate the proposition |
197 Otherwise, negate the proposition |
193 and instantiate (some) variables with concrete values. You may |
198 and instantiate (some) variables with concrete values. You may |
194 also need additional assumptions about these values. For example, |
199 also need additional assumptions about these values. For example, |
195 <tt>True & False ~= True | False</tt> is a counterexample of <tt>A |
200 <tt>True & False ~= True | False</tt> is a counterexample of <tt>A |
196 & B = A | B</tt>, and <tt>A = ~B ==> A & B ~= A | B</tt> is |
201 & B = A | B</tt>, and <tt>A = ~B ==> A & B ~= A | B</tt> is |
197 another one. Sometimes Isabelle can help you to find the |
202 another one. Sometimes Isabelle can help you to find the |
198 counter example: just negate the proposition and do <tt>auto</tt> |
203 counterexample: just negate the proposition and do <tt>auto</tt> |
199 or <tt>simp</tt>. If lucky, you are left with the assumptions you |
204 or <tt>simp</tt>. If lucky, you are left with the assumptions you |
200 need for the counter example to work.</td></tr></table> |
205 need for the counterexample to work. |
|
206 </p> |
|
207 </td></tr></table> |
201 |
208 |
202 |
209 |
203 <h2>Interface</h2> |
210 <h2>Interface</h2> |
204 |
211 |
205 <table class="question" width="100%"><tr><td>X-Symbol doesn't seem to work. What can I |
212 <table class="question" width="100%"><tr><td>X-Symbol doesn't seem to work. What can I |