2 <!-- ============ Tacticals ====================== -->
3 <chapter id="sec_tacticals">
4 <title>Tacticals</title>
6 <title>Interactive proofs and definitions</title>
8 An interactive definition is started by giving a
9 <link linkend="definition">definition</link> command omitting
11 An interactive proof is started by using one of the
12 <link linkend="proofs">proof commands</link> omitting
13 an explicit proof term.
15 <para>An interactive proof or definition can and must be terminated by
16 a <link linkend="command_qed">qed</link> command when no more sequents are
17 left to prove. Between the command that starts the interactive session and
18 the qed command the user must provide a procedural proof script made
19 of <link linkend="sec_tactics">tactics</link> structured by means of
20 <link linkend="tacticals">tacticals</link>.</para>
21 <para>In the tradition of the LCF system, tacticals can be considered
22 higher order tactics. Their syntax is structured and they are executed
23 atomically. On the contrary, in Matita the syntax of several tacticals is
24 destructured into a sequence of tokens and tactics in such a way that is
25 is possible to stop execution after every single token or tactic.
26 The original semantics is preserved: the execution of the whole sequence
27 yields the result expected by the original LCF-like tactical.</para>
29 <sect1 id="tacticals">
30 <title>Tacticals</title>
31 <table frame="topbot" rowsep="0" colsep="0" role="grammar">
32 <title>proof script</title>
36 <entry id="grammar.proofscript">&proofscript;</entry>
38 <entry>&proofstep; [&proofstep;]…</entry>
43 <para>Every proof step can be immediately executed.</para>
44 <table frame="topbot" rowsep="0" colsep="0" role="grammar">
45 <title>proof steps</title>
49 <entry id="grammar.proofstep">&proofstep;</entry>
51 <entry>&LCFtactical;</entry>
56 <entry><emphasis role="bold">.</emphasis></entry>
61 <entry><emphasis role="bold">;</emphasis></entry>
66 <entry><emphasis role="bold">[</emphasis></entry>
71 <entry><emphasis role="bold">|</emphasis></entry>
76 <entry>&nat;[<emphasis role="bold">,</emphasis>&nat;]…<emphasis role="bold">:</emphasis></entry>
81 <entry><emphasis role="bold">*:</emphasis></entry>
86 <entry><emphasis role="bold">skip</emphasis></entry>
91 <entry><emphasis role="bold">]</emphasis></entry>
96 <entry><emphasis role="bold">focus</emphasis> &nat; [&nat;]…</entry>
101 <entry><emphasis role="bold">unfocus</emphasis></entry>
106 <table frame="topbot" rowsep="0" colsep="0" role="grammar">
107 <title>tactics and LCF tacticals</title>
111 <entry id="grammar.LCFtactical">&LCFtactical;</entry>
113 <entry>&tactic;</entry>
118 <entry>&LCFtactical; <emphasis role="bold">;</emphasis> &LCFtactical;</entry>
124 <emphasis role="bold">[</emphasis>
126 [<emphasis role="bold">|</emphasis> &LCFtactical;]…
127 <emphasis role="bold">]</emphasis>
133 <entry><emphasis role="bold">do</emphasis> &nat;
134 &LCFtactical; <emphasis role="bold">end</emphasis>
140 <entry><emphasis role="bold">repeat</emphasis>
141 &LCFtactical; <emphasis role="bold">end</emphasis>
148 <emphasis role="bold">first [</emphasis>
150 [<emphasis role="bold">|</emphasis> &LCFtactical;]…
151 <emphasis role="bold">]</emphasis>
157 <entry><emphasis role="bold">try</emphasis> &LCFtactical;</entry>
163 <emphasis role="bold">solve [</emphasis>
165 [<emphasis role="bold">|</emphasis> &LCFtactical;]…
166 <emphasis role="bold">]</emphasis>
172 <entry><emphasis role="bold">(</emphasis>&LCFtactical;<emphasis role="bold">)</emphasis></entry>