Admin/page/main-content/faq.content
author paulson
Fri, 29 Apr 2005 18:13:28 +0200
changeset 15890 ff6787d730d5
parent 15812 c1d36b9c7c3b
permissions -rw-r--r--
updated PG preview for new thms-containing
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
     1
%title%
c721a0d251b0 add faq
kleing
parents:
diff changeset
     2
Isabelle FAQ
c721a0d251b0 add faq
kleing
parents:
diff changeset
     3
c721a0d251b0 add faq
kleing
parents:
diff changeset
     4
%meta%
c721a0d251b0 add faq
kleing
parents:
diff changeset
     5
<style type="text/css">
c721a0d251b0 add faq
kleing
parents:
diff changeset
     6
  <!--
c721a0d251b0 add faq
kleing
parents:
diff changeset
     7
  .question { background-color:#C0C0C0; color:#000001; padding:3px; margin-top:12px; font-weight: bold; }
c721a0d251b0 add faq
kleing
parents:
diff changeset
     8
  .answer  { background-color:#E0E0E0; padding:3px; margin-top:3px; }
c721a0d251b0 add faq
kleing
parents:
diff changeset
     9
  -->
c721a0d251b0 add faq
kleing
parents:
diff changeset
    10
</style>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    11
c721a0d251b0 add faq
kleing
parents:
diff changeset
    12
c721a0d251b0 add faq
kleing
parents:
diff changeset
    13
%body%
c721a0d251b0 add faq
kleing
parents:
diff changeset
    14
    <h2>General Questions</h2>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    15
    <table class="question" width="100%">
c721a0d251b0 add faq
kleing
parents:
diff changeset
    16
        <tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    17
          <td>What is Isabelle?</td>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    18
        </tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    19
    </table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    20
c721a0d251b0 add faq
kleing
parents:
diff changeset
    21
    <table class="answer" width="100%">
c721a0d251b0 add faq
kleing
parents:
diff changeset
    22
        <tr><td>Isabelle is a popular generic theorem proving
c721a0d251b0 add faq
kleing
parents:
diff changeset
    23
        environment developed at Cambridge University (<a
c721a0d251b0 add faq
kleing
parents:
diff changeset
    24
        href="http://www.cl.cam.ac.uk/users/lcp/">Larry Paulson</a>)
c721a0d251b0 add faq
kleing
parents:
diff changeset
    25
        and TU Munich (<a href="http://www.in.tum.de/~nipkow/">Tobias
c721a0d251b0 add faq
kleing
parents:
diff changeset
    26
        Nipkow</a>). See the <a
c721a0d251b0 add faq
kleing
parents:
diff changeset
    27
        href="http://isabelle.in.tum.de/">Isabelle homepage</a> for
c721a0d251b0 add faq
kleing
parents:
diff changeset
    28
        more information.</td></tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    29
    </table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    30
    
c721a0d251b0 add faq
kleing
parents:
diff changeset
    31
c721a0d251b0 add faq
kleing
parents:
diff changeset
    32
    <table class="question" width="100%">
c721a0d251b0 add faq
kleing
parents:
diff changeset
    33
        <tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    34
          <td>Where can I find documentation?</td>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    35
        </tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    36
    </table>    
c721a0d251b0 add faq
kleing
parents:
diff changeset
    37
    <table class="answer" width="100%">
c721a0d251b0 add faq
kleing
parents:
diff changeset
    38
        <tr><td><a href="http://isabelle.in.tum.de/docs.html">This
c721a0d251b0 add faq
kleing
parents:
diff changeset
    39
        way, please</a>. Also have a look at the <a
c721a0d251b0 add faq
kleing
parents:
diff changeset
    40
        href="http://isabelle.in.tum.de/library/">theory
c721a0d251b0 add faq
kleing
parents:
diff changeset
    41
        library</a>.</td></tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    42
    </table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    43
c721a0d251b0 add faq
kleing
parents:
diff changeset
    44
    <table class="question" width="100%">
c721a0d251b0 add faq
kleing
parents:
diff changeset
    45
        <tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    46
          <td>Is it available for download?</td>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    47
        </tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    48
    </table> <table class="answer" width="100%"> <tr><td>Yes, it is
c721a0d251b0 add faq
kleing
parents:
diff changeset
    49
    available from <a
c721a0d251b0 add faq
kleing
parents:
diff changeset
    50
    href="http://isabelle.in.tum.de/dist/">several mirror
c721a0d251b0 add faq
kleing
parents:
diff changeset
    51
    sites</a>. It should run on most recent Unix systems (Solaris,
c721a0d251b0 add faq
kleing
parents:
diff changeset
    52
    Linux, MacOS X, etc.).</td></tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    53
    </table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    54
c721a0d251b0 add faq
kleing
parents:
diff changeset
    55
c721a0d251b0 add faq
kleing
parents:
diff changeset
    56
    <h2>Syntax</h2>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    57
    <table class="question" width="100%">
c721a0d251b0 add faq
kleing
parents:
diff changeset
    58
        <tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    59
          <td>There are lots of arrows in Isabelle. What's the
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    60
          difference between <tt>-&gt;</tt>, <tt>=&gt;</tt>, <tt>--&gt;</tt>,
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    61
          and <tt>==&gt;</tt> ?</td>
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
    62
        </tr>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    63
    </table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    64
    <table class="answer" width="100%">
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    65
        <tr><td>Isabelle uses the <tt>=&gt;</tt> arrow for the function
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
    66
        type (contrary to most functional languages which use
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    67
        <tt>-&gt;</tt>). So <tt>a =&gt; b</tt> is the type of a function
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
    68
        that takes an element of <tt>a</tt> as input and gives you an
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    69
        element of <tt>b</tt> as output. The long arrow <tt>--&gt;</tt>
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    70
        and <tt>==&gt;</tt> are object and meta level
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
    71
        implication. Roughly speaking, the meta level implication
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
    72
        should only be used when stating theorems where it separates
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
    73
        the assumptions from the conclusion. Whenever you need an
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
    74
        implication inside a HOL formula, use <code>--&gt;</code>.
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
    75
        </td></tr>
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
    76
    </table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    77
c721a0d251b0 add faq
kleing
parents:
diff changeset
    78
    <table class="question" width="100%"><tr><td>Where do I have to put those double quotes?</td></tr></table> 
c721a0d251b0 add faq
kleing
parents:
diff changeset
    79
c721a0d251b0 add faq
kleing
parents:
diff changeset
    80
    <table class="answer" width="100%"><tr><td>Isabelle distinguishes between <em>inner</em>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    81
    and <em>outer</em> syntax. The outer syntax comes from the
c721a0d251b0 add faq
kleing
parents:
diff changeset
    82
    Isabelle framework, the inner syntax is the one in between
c721a0d251b0 add faq
kleing
parents:
diff changeset
    83
    quotation marks and comes from the object logic (in this case HOL).
c721a0d251b0 add faq
kleing
parents:
diff changeset
    84
    With time the distinction between the two becomes obvious, but in
c721a0d251b0 add faq
kleing
parents:
diff changeset
    85
    the beginning the following rules of thumb may work: types should
c721a0d251b0 add faq
kleing
parents:
diff changeset
    86
    be inside quotation marks, formulas and lemmas should be inside
c721a0d251b0 add faq
kleing
parents:
diff changeset
    87
    quotation marks, rules and equations (e.g. for definitions) should
c721a0d251b0 add faq
kleing
parents:
diff changeset
    88
    be inside quotation marks, commands like <tt>lemma</tt>,
c721a0d251b0 add faq
kleing
parents:
diff changeset
    89
    <tt>consts</tt>, <tt>primrec</tt>, <tt>constdefs</tt>,
c721a0d251b0 add faq
kleing
parents:
diff changeset
    90
    <tt>apply</tt>, <tt>done</tt> are without quotation marks, as are
c721a0d251b0 add faq
kleing
parents:
diff changeset
    91
    the names of constants in constant definitions (<tt>consts</tt>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    92
    and <tt>constdefs</tt>)
c721a0d251b0 add faq
kleing
parents:
diff changeset
    93
    </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    94
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
    95
    <table class="question" width="100%"><tr><td>What is <tt>"No such
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
    96
    constant: _case_syntax"</tt> supposed to tell
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
    97
    me?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
    98
c721a0d251b0 add faq
kleing
parents:
diff changeset
    99
    <table class="answer" width="100%"><tr><td>You get this message if
c721a0d251b0 add faq
kleing
parents:
diff changeset
   100
    you use a case construct on a datatype and have a typo in the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   101
    names of the constructor patterns or if the order of the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   102
    constructors in the case pattern is different from the order in
c721a0d251b0 add faq
kleing
parents:
diff changeset
   103
    which they where defined (in the datatype definition).
c721a0d251b0 add faq
kleing
parents:
diff changeset
   104
    </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   105
    
c721a0d251b0 add faq
kleing
parents:
diff changeset
   106
    <table class="question" width="100%"><tr><td>Why doesn't Isabelle understand my
c721a0d251b0 add faq
kleing
parents:
diff changeset
   107
    equation?</td></tr></table> 
c721a0d251b0 add faq
kleing
parents:
diff changeset
   108
c721a0d251b0 add faq
kleing
parents:
diff changeset
   109
    <table class="answer" width="100%"><tr><td>Isabelle's equality <tt>=</tt> binds
c721a0d251b0 add faq
kleing
parents:
diff changeset
   110
    relatively strongly, so an equation like <tt>a = b & c</tt> might
c721a0d251b0 add faq
kleing
parents:
diff changeset
   111
    not be what you intend. Isabelle parses it as <tt>(a = b) &
c721a0d251b0 add faq
kleing
parents:
diff changeset
   112
    c</tt>.  If you want it the other way around, you must set
c721a0d251b0 add faq
kleing
parents:
diff changeset
   113
    explicit parentheses as in <tt>a = (b & c)</tt>. This also applies
c721a0d251b0 add faq
kleing
parents:
diff changeset
   114
    to e.g. <tt>primrec</tt> definitions (see below).</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   115
c721a0d251b0 add faq
kleing
parents:
diff changeset
   116
    <table class="question" width="100%"><tr><td>What does it mean "not a proper
c721a0d251b0 add faq
kleing
parents:
diff changeset
   117
    equation"?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   118
      
c721a0d251b0 add faq
kleing
parents:
diff changeset
   119
    <table class="answer" width="100%"><tr><td>Most commonly this is an instance of the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   120
    question above. The <tt>primrec</tt> command (and others) expect
c721a0d251b0 add faq
kleing
parents:
diff changeset
   121
    equations as input, and since equality binds strongly in Isabelle,
c721a0d251b0 add faq
kleing
parents:
diff changeset
   122
    something like <tt>f x = b & c</tt> is not what you might expect
c721a0d251b0 add faq
kleing
parents:
diff changeset
   123
    it to be: Isabelle parses it as <tt>(f x = b) & c</tt> (which is
c721a0d251b0 add faq
kleing
parents:
diff changeset
   124
    indeed not a proper equation). To turn it into an equation you
c721a0d251b0 add faq
kleing
parents:
diff changeset
   125
    must set explicit parentheses: <tt>f x = (b & c)</tt>.</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   126
c721a0d251b0 add faq
kleing
parents:
diff changeset
   127
    <table class="question" width="100%"><tr><td>What does it mean
c721a0d251b0 add faq
kleing
parents:
diff changeset
   128
    "<tt>Not a meta-equality (==)</tt>"?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   129
    
c721a0d251b0 add faq
kleing
parents:
diff changeset
   130
    <table class="answer" width="100%"><tr><td>This usually occurs if
c721a0d251b0 add faq
kleing
parents:
diff changeset
   131
    you use <tt>=</tt> for <tt>constdefs</tt>. The <tt>constdefs</tt>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   132
    and <tt>defs</tt> commands expect not equations, but meta
c721a0d251b0 add faq
kleing
parents:
diff changeset
   133
    equivalences. Just use the <tt>\&lt;equiv&gt;</tt> or <tt>==</tt>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   134
    signs instead of <tt>=</tt>.  </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   135
c721a0d251b0 add faq
kleing
parents:
diff changeset
   136
c721a0d251b0 add faq
kleing
parents:
diff changeset
   137
    <h2>Proving</h2>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   138
c721a0d251b0 add faq
kleing
parents:
diff changeset
   139
    <table class="question" width="100%"><tr><td>What does "empty result sequence"
c721a0d251b0 add faq
kleing
parents:
diff changeset
   140
    mean?</td></tr></table> 
c721a0d251b0 add faq
kleing
parents:
diff changeset
   141
c721a0d251b0 add faq
kleing
parents:
diff changeset
   142
    <table class="answer" width="100%"><tr><td>It means that the applied proof method (or
c721a0d251b0 add faq
kleing
parents:
diff changeset
   143
    tactic) was unsuccessful. It did not transform the goal in any
c721a0d251b0 add faq
kleing
parents:
diff changeset
   144
    way, or simply just failed to do anything. You must try another
c721a0d251b0 add faq
kleing
parents:
diff changeset
   145
    tactic (or give the one you used more hints or lemmas to work
c721a0d251b0 add faq
kleing
parents:
diff changeset
   146
    with)</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   147
c721a0d251b0 add faq
kleing
parents:
diff changeset
   148
c721a0d251b0 add faq
kleing
parents:
diff changeset
   149
    <table class="question" width="100%"><tr><td>The Simplifier doesn't want to apply my
c721a0d251b0 add faq
kleing
parents:
diff changeset
   150
    rule, what's wrong?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   151
c721a0d251b0 add faq
kleing
parents:
diff changeset
   152
    <table class="answer" width="100%"><tr><td>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   153
    Most commonly this is a typing problem. The rule you want to apply
c721a0d251b0 add faq
kleing
parents:
diff changeset
   154
    may require a more special (or just plain different) type from
c721a0d251b0 add faq
kleing
parents:
diff changeset
   155
    what you have in the current goal. Use the ProofGeneral menu
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
   156
    <tt>Isabelle/Isar -&gt; Settings -&gt; Show Types</tt> and the
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   157
    <tt>thm</tt> command on the rule you want to apply to find out if
c721a0d251b0 add faq
kleing
parents:
diff changeset
   158
    the types are what you expect them to be (also take a look at the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   159
    types in your goal). <tt>Show Sorts</tt>, <tt>Show Constants</tt>,
c721a0d251b0 add faq
kleing
parents:
diff changeset
   160
    and <tt>Trace Simplifier</tt> in the same menu may also be
c721a0d251b0 add faq
kleing
parents:
diff changeset
   161
    helpful.
c721a0d251b0 add faq
kleing
parents:
diff changeset
   162
    </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   163
c721a0d251b0 add faq
kleing
parents:
diff changeset
   164
c721a0d251b0 add faq
kleing
parents:
diff changeset
   165
    <table class="question" width="100%"><tr><td>If I do <tt>auto</tt>, it leaves me a goal
c721a0d251b0 add faq
kleing
parents:
diff changeset
   166
    <tt>False</tt>. Is my theorem wrong?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   167
    
c721a0d251b0 add faq
kleing
parents:
diff changeset
   168
    <table class="answer" width="100%"><tr><td>Not necessarily. It just means that
c721a0d251b0 add faq
kleing
parents:
diff changeset
   169
    <tt>auto</tt> transformed the goal into something that is not
c721a0d251b0 add faq
kleing
parents:
diff changeset
   170
    provable any more. That could be due to <tt>auto</tt> doing
c721a0d251b0 add faq
kleing
parents:
diff changeset
   171
    something stupid, or e.g. due to some earlier step in the proof
c721a0d251b0 add faq
kleing
parents:
diff changeset
   172
    that lost important information. It is of course also possible
c721a0d251b0 add faq
kleing
parents:
diff changeset
   173
    that the goal was never provable in the first place.</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   174
c721a0d251b0 add faq
kleing
parents:
diff changeset
   175
c721a0d251b0 add faq
kleing
parents:
diff changeset
   176
    <table class="question" width="100%"><tr><td>Why does <tt>lemma
c721a0d251b0 add faq
kleing
parents:
diff changeset
   177
    "1+1=2"</tt> fail?</td></tr></table> 
c721a0d251b0 add faq
kleing
parents:
diff changeset
   178
c721a0d251b0 add faq
kleing
parents:
diff changeset
   179
    <table class="answer" width="100%"><tr><td>Because it is not
c721a0d251b0 add faq
kleing
parents:
diff changeset
   180
    necessarily true.  Isabelle does not assume that 1 and 2 are
c721a0d251b0 add faq
kleing
parents:
diff changeset
   181
    natural numbers. Try <tt>"(1::nat)+1=2"</tt>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   182
    instead.</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   183
c721a0d251b0 add faq
kleing
parents:
diff changeset
   184
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   185
    <table class="question" width="100%"><tr><td>Can Isabelle find
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   186
    counterexamples?</td></tr></table>
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   187
    
c721a0d251b0 add faq
kleing
parents:
diff changeset
   188
    <table class="answer" width="100%"><tr><td>
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   189
    <p>
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   190
    For arithmetic goals, <code>arith</code> finds counterexamples.
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   191
    For executable goals, <code>quickcheck</code> tries to find a
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   192
    counterexample.  For goals of a more logical nature (including
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   193
    quantifiers, sets and inductive definitions) <code>refute</code>
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   194
    searches for a countermodel.
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   195
    </p>
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   196
    <p>
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   197
    Otherwise, negate the proposition
c721a0d251b0 add faq
kleing
parents:
diff changeset
   198
    and instantiate (some) variables with concrete values. You may
c721a0d251b0 add faq
kleing
parents:
diff changeset
   199
    also need additional assumptions about these values.  For example,
c721a0d251b0 add faq
kleing
parents:
diff changeset
   200
    <tt>True & False ~= True | False</tt> is a counterexample of <tt>A
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
   201
    & B = A | B</tt>, and <tt>A = ~B ==&gt; A & B ~= A | B</tt> is
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   202
    another one. Sometimes Isabelle can help you to find the
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   203
    counterexample: just negate the proposition and do <tt>auto</tt>
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   204
    or <tt>simp</tt>.  If lucky, you are left with the assumptions you
14581
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   205
    need for the counterexample to work.
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   206
    </p>
f56e9e16753b updated, tuned
kleing
parents: 14575
diff changeset
   207
    </td></tr></table>
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   208
c721a0d251b0 add faq
kleing
parents:
diff changeset
   209
c721a0d251b0 add faq
kleing
parents:
diff changeset
   210
    <h2>Interface</h2>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   211
15812
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   212
    <table class="question" width="100%"><tr><td>ProofGeneral appears to hang when Isabelle is started.</td></tr></table>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   213
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   214
    <table class="answer" width="100%"><tr>This may be because of UTF-8 issues e.g. in Red Hat 8.0/9.0, Suse 9.0/9.1
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   215
    <p>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   216
   RedHat 8 and later has glibc 2.2 and UTF8 encoded output may be
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   217
   turned on in default locale.  Unfortunately Proof General relies on
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   218
   8-bit characters which are UTF8 prefixes in the output of proof
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   219
   assistants (inc Coq, Isabelle).  These prefix characters are not
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   220
   flushed to stdout individually.  As a workaround we must find a way
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   221
   to disable interpretation of UTF8 in the C libraries that Coq and
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   222
   friends use.
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   223
   <p>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   224
   Doing this inside PG/Emacs seems tricky; locale settings are
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   225
   set/inherited in strange ways.  One solution is to run the Emacs
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   226
   process itself with an altered locale setting, for example,
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   227
   starting XEmacs by typing:
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   228
   <p>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   229
   <tt>$  LC_CTYPE=en_GB Isabelle &</tt>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   230
   <p>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   231
   The supplied proofgeneral script makes this setting if it sees
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   232
   the string UTF in the current value of LC_CTYPE. Depending on your 
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   233
   distribution, this variable might also be called <tt>LANG</tt>.
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   234
   <p>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   235
   Alternatively you can set LC_CTYPE or LANG inside a file ~/.i18n, which will
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   236
   be read by the shell.  This will affect all applications, though.
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   237
   [ suggestions for a better workaround inside Emacs would be welcome ]
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   238
   <p>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   239
   NB: a related issue is warnings from x-symbol: "Emacs language 
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   240
   environment and system locale specify different encoding, I'll 
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   241
   assume `iso-8859-1'".  This warning appears to be mainly harmless.
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   242
   Notice that the variable `buffer-file-coding-system' may determine
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   243
   the format that files are saved in.<td></td></tr></table>
c1d36b9c7c3b added PG hang to FAQ
kleing
parents: 14582
diff changeset
   244
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   245
    <table class="question" width="100%"><tr><td>X-Symbol doesn't seem to work. What can I
c721a0d251b0 add faq
kleing
parents:
diff changeset
   246
    do?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   247
c721a0d251b0 add faq
kleing
parents:
diff changeset
   248
    <table class="answer" width="100%"><tr><td>The most common reason why X-Symbol doesn't
c721a0d251b0 add faq
kleing
parents:
diff changeset
   249
    work is: it's not switched on yet. Assuming you are using
c721a0d251b0 add faq
kleing
parents:
diff changeset
   250
    ProofGeneral and have installed the X-Symbol package, you still
c721a0d251b0 add faq
kleing
parents:
diff changeset
   251
    need to turn X-Symbol on in ProofGeneral: select the menu items
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
   252
    <tt>Proof-General -&gt; Options -&gt; X-Symbol</tt> and (if you want to
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
   253
    save the setting for future sessions) select <tt>Options -&gt; Save
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   254
    Options</tt> in XEmacs.</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   255
c721a0d251b0 add faq
kleing
parents:
diff changeset
   256
    <table class="question" width="100%"><tr><td>How do I input those X-Symbols anyway?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   257
c721a0d251b0 add faq
kleing
parents:
diff changeset
   258
    <table class="answer" width="100%"><tr><td>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   259
    There are lots of ways to input x-symbols. The one that always
c721a0d251b0 add faq
kleing
parents:
diff changeset
   260
    works is writing it out in plain text (e.g. for the 'and' symbol
c721a0d251b0 add faq
kleing
parents:
diff changeset
   261
    type <tt>\&lt;and&gt;</tt>). For common symbols you can try to "paint
c721a0d251b0 add faq
kleing
parents:
diff changeset
   262
    them in ASCII" and if the xsymbol package recognizes them it will
c721a0d251b0 add faq
kleing
parents:
diff changeset
   263
    automatically convert them into their graphical
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
   264
    representation. Examples: <tt>--&gt;</tt> is converted into the long
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   265
    single arrow, <tt>/\</tt> is converted into the 'and' symbol, the
14582
f0779f6fa7e8 make weblint happy
kleing
parents: 14581
diff changeset
   266
    sequence <tt>=_</tt> into the equivalence sign, <tt>&lt;_</tt> into
14575
c721a0d251b0 add faq
kleing
parents:
diff changeset
   267
    less-or-equal, <tt>[|</tt> into opening semantic brackets, and so
c721a0d251b0 add faq
kleing
parents:
diff changeset
   268
    on. For greek characters, the <code>rotate</code> command works well:
c721a0d251b0 add faq
kleing
parents:
diff changeset
   269
    to input &alpha; type <code>a</code> and then <code>C-.</code>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   270
    (control and <code>.</code>).  You can also display the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   271
    grid-of-characters in the x-symbol menu to get an overview of the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   272
    available graphical representations (not all of them already have
c721a0d251b0 add faq
kleing
parents:
diff changeset
   273
    a meaning in Isabelle, though).
c721a0d251b0 add faq
kleing
parents:
diff changeset
   274
    </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   275
c721a0d251b0 add faq
kleing
parents:
diff changeset
   276
    <h2>System</h2>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   277
c721a0d251b0 add faq
kleing
parents:
diff changeset
   278
    <table class="question" width="100%"><tr><td>I want to generate one of those flashy LaTeX
c721a0d251b0 add faq
kleing
parents:
diff changeset
   279
      documents. How?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   280
c721a0d251b0 add faq
kleing
parents:
diff changeset
   281
    <table class="answer" width="100%"><tr><td>You will need to work with the
c721a0d251b0 add faq
kleing
parents:
diff changeset
   282
    <tt>isatool</tt> command for this (in a Unix shell). The easiest
c721a0d251b0 add faq
kleing
parents:
diff changeset
   283
    way to get to a document is the following: use <tt>isatool
c721a0d251b0 add faq
kleing
parents:
diff changeset
   284
    mkdir</tt> to set up a new directory. The command will also create
c721a0d251b0 add faq
kleing
parents:
diff changeset
   285
    a file called <tt>IsaMakefile</tt> in the current directory.  Put
c721a0d251b0 add faq
kleing
parents:
diff changeset
   286
    your theory file(s) into the new directory and edit the file
c721a0d251b0 add faq
kleing
parents:
diff changeset
   287
    <tt>ROOT.ML</tt> in there (following the comments) to tell
c721a0d251b0 add faq
kleing
parents:
diff changeset
   288
    Isabelle which of the theories to load (and in which order). Go
c721a0d251b0 add faq
kleing
parents:
diff changeset
   289
    back to the parent directory (where the <tt>IsaMakefile</tt> is)
c721a0d251b0 add faq
kleing
parents:
diff changeset
   290
    and type <tt>isatool make</tt>. Isabelle should then process your
c721a0d251b0 add faq
kleing
parents:
diff changeset
   291
    theories and tell you where to find the finished document. For
c721a0d251b0 add faq
kleing
parents:
diff changeset
   292
    more information on generating documents see the Isabelle Tutorial, Chapter 4.
c721a0d251b0 add faq
kleing
parents:
diff changeset
   293
    </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   294
      
c721a0d251b0 add faq
kleing
parents:
diff changeset
   295
c721a0d251b0 add faq
kleing
parents:
diff changeset
   296
    <table class="question" width="100%"><tr><td>I have a large formalization with many
c721a0d251b0 add faq
kleing
parents:
diff changeset
   297
      theories. Must I process all of them all of the time?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   298
c721a0d251b0 add faq
kleing
parents:
diff changeset
   299
    <table class="answer" width="100%"><tr><td>No, you can tell Isabelle to build a so-called
c721a0d251b0 add faq
kleing
parents:
diff changeset
   300
    heap image. This heap image can contain your preloaded
c721a0d251b0 add faq
kleing
parents:
diff changeset
   301
    theories. To get one, set up a directory with a <tt>ROOT.ML</tt>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   302
    file (as for generating a document) and use the command
c721a0d251b0 add faq
kleing
parents:
diff changeset
   303
    <tt>isatool usedir -b HOL MyImage</tt> in that directory to create
c721a0d251b0 add faq
kleing
parents:
diff changeset
   304
    an image <tt>MyImage</tt> using the parent logic <tt>HOL</tt>.
c721a0d251b0 add faq
kleing
parents:
diff changeset
   305
    You should then be able to invoke Isabelle with <tt>Isabelle -l
c721a0d251b0 add faq
kleing
parents:
diff changeset
   306
    MyImage</tt> and have everything that is loaded in ROOT.ML
c721a0d251b0 add faq
kleing
parents:
diff changeset
   307
    instantly available.</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   308
    
c721a0d251b0 add faq
kleing
parents:
diff changeset
   309
    <table class="question" width="100%"><tr><td>Does Isabelle run on Windows?</td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   310
c721a0d251b0 add faq
kleing
parents:
diff changeset
   311
    <table class="answer" width="100%"><tr><td> After a fashion, yes,
c721a0d251b0 add faq
kleing
parents:
diff changeset
   312
    but Isabelle is not being developed for Windows. A friendly user
c721a0d251b0 add faq
kleing
parents:
diff changeset
   313
    (Norbert V&ouml;lker) has managed to get a minimal Isabelle environment
c721a0d251b0 add faq
kleing
parents:
diff changeset
   314
    to work on it.  See the description on <a
c721a0d251b0 add faq
kleing
parents:
diff changeset
   315
    href="http://cswww.essex.ac.uk/Research/FSS/projects/isawin/">his
c721a0d251b0 add faq
kleing
parents:
diff changeset
   316
    website</a>. Be warned, though: emphasis is on <em>minimal</em>,
c721a0d251b0 add faq
kleing
parents:
diff changeset
   317
    working with Windows is no fun at all. To enjoy Isabelle in its
c721a0d251b0 add faq
kleing
parents:
diff changeset
   318
    full beauty it is recommended to get a Linux distribution (they
c721a0d251b0 add faq
kleing
parents:
diff changeset
   319
    are inexpensive, any reasonably recent one should work, dualboot
c721a0d251b0 add faq
kleing
parents:
diff changeset
   320
    Windows/Linux should pose no problems).
c721a0d251b0 add faq
kleing
parents:
diff changeset
   321
    </td></tr></table>
c721a0d251b0 add faq
kleing
parents:
diff changeset
   322