]> matita.cs.unibo.it Git - helm.git/blob - matita/help/C/sec_tactics.xml
More documentation committed.
[helm.git] / matita / help / C / sec_tactics.xml
1
2 <!-- ============ Tactics ====================== -->
3 <chapter id="sec_tactics">
4  <title>Tactics</title>
5
6   <sect1 id="tac_absurd">
7     <title><emphasis role="bold">absurd</emphasis> &sterm;</title>
8     <titleabbrev>absurd</titleabbrev>
9     <para><userinput>absurd P</userinput></para>
10      <para>
11       <variablelist>
12         <varlistentry>
13           <term>Pre-conditions:</term>
14           <listitem>
15             <para><command>P</command> must have type <command>Prop</command>.</para>
16           </listitem>
17         </varlistentry>
18         <varlistentry>
19           <term>Action:</term>
20           <listitem>
21             <para>It closes the current sequent by eliminating an
22              absurd term.</para>
23           </listitem>
24         </varlistentry>
25         <varlistentry>
26           <term>New sequents to prove:</term>
27           <listitem>
28             <para>It opens two new sequents of conclusion <command>P</command>
29              and <command>¬P</command>.</para>
30           </listitem>
31         </varlistentry>
32       </variablelist>
33      </para>
34   </sect1>
35   <sect1 id="tac_apply">
36     <title><emphasis role="bold">apply</emphasis> &sterm;</title>
37     <titleabbrev>apply</titleabbrev>
38     <para><userinput>apply t</userinput></para>
39     <para>
40       <variablelist>
41         <varlistentry>
42           <term>Pre-conditions:</term>
43           <listitem>
44             <para><command>t</command> must have type
45              <command>T<subscript>1</subscript> → ... →
46               T<subscript>n</subscript> → G</command>
47              where <command>G</command> can be unified with the conclusion
48              of the current sequent.</para>
49           </listitem>
50         </varlistentry>
51         <varlistentry>
52           <term>Action:</term>
53           <listitem>
54             <para>It closes the current sequent by applying <command>t</command> to <command>n</command> implicit arguments (that become new sequents).</para>
55           </listitem>
56         </varlistentry>
57         <varlistentry>
58           <term>New sequents to prove:</term>
59           <listitem>
60             <para>It opens a new sequent for each premise 
61              <command>T<subscript>i</subscript></command> that is not
62              instantiated by unification. <command>T<subscript>i</subscript></command> is
63              the conclusion of the <command>i</command>-th new sequent to
64              prove.</para>
65           </listitem>
66         </varlistentry>
67       </variablelist>
68     </para>
69   </sect1>
70   <sect1 id="tac_assumption">
71     <title><emphasis role="bold">assumption</emphasis></title>
72     <titleabbrev>assumption</titleabbrev>
73     <para><userinput>assumption </userinput></para>
74     <para>
75       <variablelist>
76         <varlistentry>
77           <term>Pre-conditions:</term>
78           <listitem>
79             <para>There must exist an hypothesis whose type can be unified with
80              the conclusion of the current sequent.</para>
81           </listitem>
82         </varlistentry>
83         <varlistentry>
84           <term>Action:</term>
85           <listitem>
86             <para>It closes the current sequent exploiting an hypothesis.</para>
87           </listitem>
88         </varlistentry>
89         <varlistentry>
90           <term>New sequents to prove:</term>
91           <listitem>
92             <para>None</para>
93           </listitem>
94         </varlistentry>
95       </variablelist>
96     </para>
97   </sect1>
98   <sect1 id="tac_auto">
99     <title><emphasis role="bold">auto</emphasis> [<emphasis role="bold">depth=</emphasis>&nat;] [<emphasis role="bold">width=</emphasis>&nat;] [<emphasis role="bold">paramodulation</emphasis>] [<emphasis role="bold">full</emphasis>]</title>
100     <titleabbrev>auto</titleabbrev>
101     <para><userinput>auto depth=d width=w paramodulation full</userinput></para>
102     <para>
103       <variablelist>
104         <varlistentry>
105           <term>Pre-conditions:</term>
106           <listitem>
107             <para>None, but the tactic may fail finding a proof if every
108              proof is in the search space that is pruned away. Pruning is
109              controlled by <command>d</command> and <command>w</command>.
110              Moreover, only lemmas whose type signature is a subset of the
111              signature of the current sequent are considered. The signature of
112              a sequent is ...TODO</para>
113           </listitem>
114         </varlistentry>
115         <varlistentry>
116           <term>Action:</term>
117           <listitem>
118             <para>It closes the current sequent by repeated application of
119              rewriting steps (unless <command>paramodulation</command> is
120              omitted), hypothesis and lemmas in the library.</para>
121           </listitem>
122         </varlistentry>
123         <varlistentry>
124           <term>New sequents to prove:</term>
125           <listitem>
126             <para>None</para>
127           </listitem>
128         </varlistentry>
129       </variablelist>
130     </para>
131   </sect1>
132   <sect1 id="tac_clear">
133     <title><emphasis role="bold">clear</emphasis> &id;</title>
134     <titleabbrev>clear</titleabbrev>
135     <para><userinput>clear H</userinput></para>
136     <para>
137       <variablelist>
138         <varlistentry>
139           <term>Pre-conditions:</term>
140           <listitem>
141             <para><command>H</command> must be an hypothesis of the
142              current sequent to prove.</para>
143           </listitem>
144         </varlistentry>
145         <varlistentry>
146           <term>Action:</term>
147           <listitem>
148             <para>It hides the hypothesis <command>H</command> from the
149              current sequent.</para>
150           </listitem>
151         </varlistentry>
152         <varlistentry>
153           <term>New sequents to prove:</term>
154           <listitem>
155             <para>None</para>
156           </listitem>
157         </varlistentry>
158       </variablelist>
159     </para>
160   </sect1>
161   <sect1 id="tac_clearbody">
162     <title><emphasis role="bold">clearbody</emphasis> &id;</title>
163     <titleabbrev>clearbody</titleabbrev>
164     <para><userinput>clearbody H</userinput></para>
165     <para>
166       <variablelist>
167         <varlistentry>
168           <term>Pre-conditions:</term>
169           <listitem>
170             <para><command>H</command> must be an hypothesis of the
171              current sequent to prove.</para>
172           </listitem>
173         </varlistentry>
174         <varlistentry>
175           <term>Action:</term>
176           <listitem>
177             <para>It hides the definiens of a definition in the current
178              sequent context. Thus the definition becomes an hypothesis.</para>
179           </listitem>
180         </varlistentry>
181         <varlistentry>
182           <term>New sequents to prove:</term>
183           <listitem>
184             <para>None.</para>
185           </listitem>
186         </varlistentry>
187       </variablelist>
188     </para>
189   </sect1>
190   <sect1 id="tac_change">
191     <title><emphasis role="bold">change</emphasis> &pattern; <emphasis role="bold">with</emphasis> &sterm;</title>
192     <titleabbrev>change</titleabbrev>
193     <para><userinput>change patt with t</userinput></para>
194     <para>
195       <variablelist>
196         <varlistentry>
197           <term>Pre-conditions:</term>
198           <listitem>
199             <para>Each subterm matched by the pattern must be convertible
200              with the term <command>t</command> disambiguated in the context
201              of the matched subterm.</para>
202           </listitem>
203         </varlistentry>
204         <varlistentry>
205           <term>Action:</term>
206           <listitem>
207             <para>It replaces the subterms of the current sequent matched by
208              <command>patt</command> with the new term <command>t</command>.
209              For each subterm matched by the pattern, <command>t</command> is
210              disambiguated in the context of the subterm.</para>
211           </listitem>
212         </varlistentry>
213         <varlistentry>
214           <term>New sequents to prove:</term>
215           <listitem>
216             <para>None.</para>
217           </listitem>
218         </varlistentry>
219       </variablelist>
220     </para>
221   </sect1>
222   <sect1 id="tac_constructor">
223     <title><emphasis role="bold">constructor</emphasis> &nat;</title>
224     <titleabbrev>constructor</titleabbrev>
225     <para><userinput>constructor n</userinput></para>
226     <para>
227       <variablelist>
228         <varlistentry>
229           <term>Pre-conditions:</term>
230           <listitem>
231             <para>The conclusion of the current sequent must be
232              an inductive type or the application of an inductive type with
233              at least <command>n</command> constructors.</para>
234           </listitem>
235         </varlistentry>
236         <varlistentry>
237           <term>Action:</term>
238           <listitem>
239             <para>It applies the <command>n</command>-th constructor of the
240              inductive type of the conclusion of the current sequent.</para>
241           </listitem>
242         </varlistentry>
243         <varlistentry>
244           <term>New sequents to prove:</term>
245           <listitem>
246             <para>It opens a new sequent for each premise of the constructor
247              that can not be inferred by unification. For more details,
248              see the <command>apply</command> tactic.</para>
249           </listitem>
250         </varlistentry>
251       </variablelist>
252     </para>
253   </sect1>
254   <sect1 id="tac_contradiction">
255     <title><emphasis role="bold">contradiction</emphasis></title>
256     <titleabbrev>contradiction</titleabbrev>
257     <para><userinput>contradiction </userinput></para>
258     <para>
259       <variablelist>
260         <varlistentry>
261           <term>Pre-conditions:</term>
262           <listitem>
263             <para>There must be in the current context an hypothesis of type
264              <command>False</command>.</para>
265           </listitem>
266         </varlistentry>
267         <varlistentry>
268           <term>Action:</term>
269           <listitem>
270             <para>It closes the current sequent by applying an hypothesis of
271              type <command>False</command>.</para>
272           </listitem>
273         </varlistentry>
274         <varlistentry>
275           <term>New sequents to prove:</term>
276           <listitem>
277             <para>None</para>
278           </listitem>
279         </varlistentry>
280       </variablelist>
281     </para>
282   </sect1>
283   <sect1 id="tac_cut">
284     <title><emphasis role="bold">cut</emphasis> &sterm; [<emphasis role="bold">as</emphasis> &id;]</title>
285     <titleabbrev>cut</titleabbrev>
286     <para><userinput>cut P as H</userinput></para>
287     <para>
288       <variablelist>
289         <varlistentry>
290           <term>Pre-conditions:</term>
291           <listitem>
292             <para><command>P</command> must have type <command>Prop</command>.</para>
293           </listitem>
294         </varlistentry>
295         <varlistentry>
296           <term>Action:</term>
297           <listitem>
298             <para>It closes the current sequent.</para>
299           </listitem>
300         </varlistentry>
301         <varlistentry>
302           <term>New sequents to prove:</term>
303           <listitem>
304             <para>It opens two new sequents. The first one has an extra
305              hypothesis <command>H:P</command>. If <command>H</command> is
306              omitted, the name of the hypothesis is automatically generated.
307              The second sequent has conclusion <command>P</command> and
308              hypotheses the hypotheses of the current sequent to prove.</para>
309           </listitem>
310         </varlistentry>
311       </variablelist>
312     </para>
313   </sect1>
314   <sect1 id="tac_decompose">
315     <title><emphasis role="bold">decompose</emphasis> &id; [&id;]… &intros-spec;</title>
316     <titleabbrev>decompose</titleabbrev>
317     <para><userinput>decompose ???</userinput></para>
318     <para>
319       <variablelist>
320         <varlistentry>
321           <term>Pre-conditions:</term>
322           <listitem>
323             <para>TODO.</para>
324           </listitem>
325         </varlistentry>
326         <varlistentry>
327           <term>Action:</term>
328           <listitem>
329             <para>TODO.</para>
330           </listitem>
331         </varlistentry>
332         <varlistentry>
333           <term>New sequents to prove:</term>
334           <listitem>
335             <para>TODO.</para>
336           </listitem>
337         </varlistentry>
338       </variablelist>
339     </para>
340   </sect1>
341   <sect1 id="tac_demodulation">
342     <title><emphasis role="bold">demodulation</emphasis> &pattern;</title>
343     <titleabbrev>demodulation</titleabbrev>
344     <para><userinput>demodulation patt</userinput></para>
345     <para>
346       <variablelist>
347         <varlistentry>
348           <term>Pre-conditions:</term>
349           <listitem>
350             <para>None.</para>
351           </listitem>
352         </varlistentry>
353         <varlistentry>
354           <term>Action:</term>
355           <listitem>
356             <para>&TODO;</para>
357           </listitem>
358         </varlistentry>
359         <varlistentry>
360           <term>New sequents to prove:</term>
361           <listitem>
362             <para>None.</para>
363           </listitem>
364         </varlistentry>
365       </variablelist>
366     </para>
367   </sect1>
368   <sect1 id="tac_discriminate">
369     <title><emphasis role="bold">discriminate</emphasis> &sterm;</title>
370     <titleabbrev>discriminate</titleabbrev>
371     <para><userinput>discriminate p</userinput></para>
372     <para>
373       <variablelist>
374         <varlistentry>
375           <term>Pre-conditions:</term>
376           <listitem>
377             <para><command>p</command> must have type <command>K t<subscript>1</subscript> ... t<subscript>n</subscript> = K' t'<subscript>1</subscript> ... t'<subscript>m</subscript></command> where <command>K</command> and <command>K'</command> must be different constructors of the same inductive type and each argument list can be empty if
378 its constructor takes no arguments.</para>
379           </listitem>
380         </varlistentry>
381         <varlistentry>
382           <term>Action:</term>
383           <listitem>
384             <para>It closes the current sequent by proving the absurdity of
385              <command>p</command>.</para>
386           </listitem>
387         </varlistentry>
388         <varlistentry>
389           <term>New sequents to prove:</term>
390           <listitem>
391             <para>None.</para>
392           </listitem>
393         </varlistentry>
394       </variablelist>
395     </para>
396   </sect1>
397   <sect1 id="tac_elim">
398     <title><emphasis role="bold">elim</emphasis> &sterm; [<emphasis role="bold">using</emphasis> &sterm;] &intros-spec;</title>
399     <titleabbrev>elim</titleabbrev>
400     <para><userinput>elim t using th hyps</userinput></para>
401     <para>
402       <variablelist>
403         <varlistentry>
404           <term>Pre-conditions:</term>
405           <listitem>
406             <para><command>t</command> must inhabit an inductive type and
407              <command>th</command> must be an elimination principle for that
408              inductive type. If <command>th</command> is omitted the appropriate
409              standard elimination principle is chosen.</para>
410           </listitem>
411         </varlistentry>
412         <varlistentry>
413           <term>Action:</term>
414           <listitem>
415             <para>It proceeds by cases on the values of <command>t</command>,
416              according to the elimination principle <command>th</command>.
417             </para>
418           </listitem>
419         </varlistentry>
420         <varlistentry>
421           <term>New sequents to prove:</term>
422           <listitem>
423             <para>It opens one new sequent for each case. The names of
424              the new hypotheses are picked by <command>hyps</command>, if
425              provided. If hyps specifies also a number of hypotheses that
426              is less than the number of new hypotheses for a new sequent,
427              then the exceeding hypothesis will be kept as implications in
428              the conclusion of the sequent.</para>
429           </listitem>
430         </varlistentry>
431       </variablelist>
432     </para>
433   </sect1>
434   <sect1 id="tac_elimType">
435     <title><emphasis role="bold">elimType</emphasis> &sterm; [<emphasis role="bold">using</emphasis> &sterm;] &intros-spec;</title>
436     <titleabbrev>elimType</titleabbrev>
437     <para><userinput>elimType T using th hyps</userinput></para>
438     <para>
439       <variablelist>
440         <varlistentry>
441           <term>Pre-conditions:</term>
442           <listitem>
443             <para><command>T</command> must be an inductive type.</para>
444           </listitem>
445         </varlistentry>
446         <varlistentry>
447           <term>Action:</term>
448           <listitem>
449             <para>TODO (severely bugged now).</para>
450           </listitem>
451         </varlistentry>
452         <varlistentry>
453           <term>New sequents to prove:</term>
454           <listitem>
455             <para>TODO</para>
456           </listitem>
457         </varlistentry>
458       </variablelist>
459     </para>
460   </sect1>
461   <sect1 id="tac_exact">
462     <title><emphasis role="bold">exact</emphasis> &sterm;</title>
463     <titleabbrev>exact</titleabbrev>
464     <para><userinput>exact p</userinput></para>
465     <para>
466       <variablelist>
467         <varlistentry>
468           <term>Pre-conditions:</term>
469           <listitem>
470             <para>The type of <command>p</command> must be convertible
471              with the conclusion of the current sequent.</para>
472           </listitem>
473         </varlistentry>
474         <varlistentry>
475           <term>Action:</term>
476           <listitem>
477             <para>It closes the current sequent using <command>p</command>.</para>
478           </listitem>
479         </varlistentry>
480         <varlistentry>
481           <term>New sequents to prove:</term>
482           <listitem>
483             <para>None.</para>
484           </listitem>
485         </varlistentry>
486       </variablelist>
487     </para>
488   </sect1>
489   <sect1 id="tac_exists">
490     <title><emphasis role="bold">exists</emphasis></title>
491     <titleabbrev>exists</titleabbrev>
492     <para><userinput>exists </userinput></para>
493     <para>
494       <variablelist>
495         <varlistentry>
496           <term>Pre-conditions:</term>
497           <listitem>
498             <para>The conclusion of the current sequent must be
499              an inductive type or the application of an inductive type
500              with at least one constructor.</para>
501           </listitem>
502         </varlistentry>
503         <varlistentry>
504           <term>Action:</term>
505           <listitem>
506             <para>Equivalent to <command>constructor 1</command>.</para>
507           </listitem>
508         </varlistentry>
509         <varlistentry>
510           <term>New sequents to prove:</term>
511           <listitem>
512             <para>It opens a new sequent for each premise of the first
513              constructor of the inductive type that is the conclusion of the
514              current sequent. For more details, see the <command>constructor</command> tactic.</para>
515           </listitem>
516         </varlistentry>
517       </variablelist>
518     </para>
519   </sect1>
520   <sect1 id="tac_fail">
521     <title><emphasis role="bold">fail</emphasis></title>
522     <titleabbrev>fail</titleabbrev>
523     <para><userinput>fail</userinput></para>
524     <para>
525       <variablelist>
526         <varlistentry>
527           <term>Pre-conditions:</term>
528           <listitem>
529             <para>None.</para>
530           </listitem>
531         </varlistentry>
532         <varlistentry>
533           <term>Action:</term>
534           <listitem>
535             <para>This tactic always fail.</para>
536           </listitem>
537         </varlistentry>
538         <varlistentry>
539           <term>New sequents to prove:</term>
540           <listitem>
541             <para>N.A.</para>
542           </listitem>
543         </varlistentry>
544       </variablelist>
545     </para>
546   </sect1>
547   <sect1 id="tac_fold">
548     <title><emphasis role="bold">fold</emphasis> &reduction-kind; &sterm; &pattern;</title>
549     <titleabbrev>fold</titleabbrev>
550     <para><userinput>fold red t patt</userinput></para>
551     <para>
552       <variablelist>
553         <varlistentry>
554           <term>Pre-conditions:</term>
555           <listitem>
556             <para>The pattern must not specify the wanted term.</para>
557           </listitem>
558         </varlistentry>
559         <varlistentry>
560           <term>Action:</term>
561           <listitem>
562             <para>First of all it locates all the subterms matched by
563              <command>patt</command>. In the context of each matched subterm
564              it disambiguates the term <command>t</command> and reduces it
565              to its <command>red</command> normal form; then it replaces with
566              <command>t</command> every occurrence of the normal form in the
567              matched subterm.</para>
568           </listitem>
569         </varlistentry>
570         <varlistentry>
571           <term>New sequents to prove:</term>
572           <listitem>
573             <para>None.</para>
574           </listitem>
575         </varlistentry>
576       </variablelist>
577     </para>
578   </sect1>
579   <sect1 id="tac_fourier">
580     <title><emphasis role="bold">fourier</emphasis></title>
581     <titleabbrev>fourier</titleabbrev>
582     <para><userinput>fourier </userinput></para>
583     <para>
584       <variablelist>
585         <varlistentry>
586           <term>Pre-conditions:</term>
587           <listitem>
588             <para>The conclusion of the current sequent must be a linear
589              inequation over real numbers taken from standard library of
590              Coq. Moreover the inequations in the hypotheses must imply the
591              inequation in the conclusion of the current sequent.</para>
592           </listitem>
593         </varlistentry>
594         <varlistentry>
595           <term>Action:</term>
596           <listitem>
597             <para>It closes the current sequent by applying the Fourier method.</para>
598           </listitem>
599         </varlistentry>
600         <varlistentry>
601           <term>New sequents to prove:</term>
602           <listitem>
603             <para>None.</para>
604           </listitem>
605         </varlistentry>
606       </variablelist>
607     </para>
608   </sect1>
609   <sect1 id="tac_fwd">
610     <title><emphasis role="bold">fwd</emphasis> &id; [<emphasis role="bold">(</emphasis>[&id;]…<emphasis role="bold">)</emphasis>]</title>
611     <titleabbrev>fwd</titleabbrev>
612     <para><userinput>fwd ...TODO</userinput></para>
613     <para>
614       <variablelist>
615         <varlistentry>
616           <term>Pre-conditions:</term>
617           <listitem>
618             <para>TODO.</para>
619           </listitem>
620         </varlistentry>
621         <varlistentry>
622           <term>Action:</term>
623           <listitem>
624             <para>TODO.</para>
625           </listitem>
626         </varlistentry>
627         <varlistentry>
628           <term>New sequents to prove:</term>
629           <listitem>
630             <para>TODO.</para>
631           </listitem>
632         </varlistentry>
633       </variablelist>
634     </para>
635   </sect1>
636   <sect1 id="tac_generalize">
637     <title><emphasis role="bold">generalize</emphasis> &pattern; [<emphasis role="bold">as</emphasis> &id;]</title>
638     <titleabbrev>generalize</titleabbrev>
639     <para><userinput>generalize patt as H</userinput></para>
640     <para>
641       <variablelist>
642         <varlistentry>
643           <term>Pre-conditions:</term>
644           <listitem>
645             <para>All the terms matched by <command>patt</command> must be
646              convertible and close in the context of the current sequent.</para>
647           </listitem>
648         </varlistentry>
649         <varlistentry>
650           <term>Action:</term>
651           <listitem>
652             <para>It closes the current sequent by applying a stronger
653              lemma that is proved using the new generated sequent.</para>
654           </listitem>
655         </varlistentry>
656         <varlistentry>
657           <term>New sequents to prove:</term>
658           <listitem>
659             <para>It opens a new sequent where the current sequent conclusion
660              <command>G</command> is generalized to
661              <command>∀x.G{x/t}</command> where <command>{x/t}</command>
662              is a notation for the replacement with <command>x</command> of all
663              the occurrences of the term <command>t</command> matched by
664              <command>patt</command>. If <command>patt</command> matches no
665              subterm then <command>t</command> is defined as the
666              <command>wanted</command> part of the pattern.</para>
667           </listitem>
668         </varlistentry>
669       </variablelist>
670     </para>
671   </sect1>
672   <sect1 id="tac_id">
673     <title><emphasis role="bold">id</emphasis></title>
674     <titleabbrev>id</titleabbrev>
675     <para><userinput>id </userinput></para>
676     <para>
677       <variablelist>
678         <varlistentry>
679           <term>Pre-conditions:</term>
680           <listitem>
681             <para>None.</para>
682           </listitem>
683         </varlistentry>
684         <varlistentry>
685           <term>Action:</term>
686           <listitem>
687             <para>This identity tactic does nothing without failing.</para>
688           </listitem>
689         </varlistentry>
690         <varlistentry>
691           <term>New sequents to prove:</term>
692           <listitem>
693             <para>None.</para>
694           </listitem>
695         </varlistentry>
696       </variablelist>
697     </para>
698   </sect1>
699   <sect1 id="tac_injection">
700     <title><emphasis role="bold">injection</emphasis> &sterm;</title>
701     <titleabbrev><emphasis role="bold">injection</emphasis></titleabbrev>
702     <para><userinput>injection p</userinput></para>
703     <para>
704       <variablelist>
705         <varlistentry>
706           <term>Pre-conditions:</term>
707           <listitem>
708             <para><command>p</command> must have type <command>K t<subscript>1</subscript> ... t<subscript>n</subscript> = K t'<subscript>1</subscript> ... t'<subscript>n</subscript></command> where both argument lists are empty if
709 <command>K</command> takes no arguments.</para>
710           </listitem>
711         </varlistentry>
712         <varlistentry>
713           <term>Action:</term>
714           <listitem>
715             <para>It derives new hypotheses by injectivity of
716              <command>K</command>.</para>
717           </listitem>
718         </varlistentry>
719         <varlistentry>
720           <term>New sequents to prove:</term>
721           <listitem>
722             <para>The new sequent to prove is equal to the current sequent
723              with the additional hypotheses
724              <command>t<subscript>1</subscript>=t'<subscript>1</subscript></command> ... <command>t<subscript>n</subscript>=t'<subscript>n</subscript></command>.</para>
725           </listitem>
726         </varlistentry>
727       </variablelist>
728     </para>
729   </sect1>
730   <sect1 id="tac_intro">
731     <title><emphasis role="bold">intro</emphasis> [&id;]</title>
732     <titleabbrev>intro</titleabbrev>
733     <para><userinput>intro H</userinput></para>
734     <para>
735       <variablelist>
736         <varlistentry>
737           <term>Pre-conditions:</term>
738           <listitem>
739             <para>The conclusion of the sequent to prove must be an implication
740              or a universal quantification.</para>
741           </listitem>
742         </varlistentry>
743         <varlistentry>
744           <term>Action:</term>
745           <listitem>
746             <para>It applies the right introduction rule for implication,
747              closing the current sequent.</para>
748           </listitem>
749         </varlistentry>
750         <varlistentry>
751           <term>New sequents to prove:</term>
752           <listitem>
753             <para>It opens a new sequent to prove adding to the hypothesis
754              the antecedent of the implication and setting the conclusion
755              to the consequent of the implicaiton. The name of the new
756              hypothesis is <command>H</command> if provided; otherwise it
757              is automatically generated.</para>
758           </listitem>
759         </varlistentry>
760       </variablelist>
761     </para>
762   </sect1>
763   <sect1 id="tac_intros">
764     <title><emphasis role="bold">intros</emphasis> &intros-spec;</title>
765     <titleabbrev>intros</titleabbrev>
766     <para><userinput>intros hyps</userinput></para>
767     <para>
768       <variablelist>
769         <varlistentry>
770           <term>Pre-conditions:</term>
771           <listitem>
772             <para>If <command>hyps</command> specifies a number of hypotheses
773              to introduce, then the conclusion of the current sequent must
774              be formed by at least that number of imbricated implications
775              or universal quantifications.</para>
776           </listitem>
777         </varlistentry>
778         <varlistentry>
779           <term>Action:</term>
780           <listitem>
781             <para>It applies several times the right introduction rule for
782              implication, closing the current sequent.</para>
783           </listitem>
784         </varlistentry>
785         <varlistentry>
786           <term>New sequents to prove:</term>
787           <listitem>
788             <para>It opens a new sequent to prove adding a number of new
789              hypotheses equal to the number of new hypotheses requested.
790              If the user does not request a precise number of new hypotheses,
791              it adds as many hypotheses as possible.
792              The name of each new hypothesis is either popped from the
793              user provided list of names, or it is automatically generated when
794              the list is (or becomes) empty.</para>
795           </listitem>
796         </varlistentry>
797       </variablelist>
798     </para>
799   </sect1>
800   <sect1 id="tac_inversion">
801     <title><emphasis role="bold">inversion</emphasis> &sterm;</title>
802     <titleabbrev>inversion</titleabbrev>
803     <para><userinput>inversion t</userinput></para>
804     <para>
805       <variablelist>
806         <varlistentry>
807           <term>Pre-conditions:</term>
808           <listitem>
809             <para>The type of the term <command>t</command> must be an inductive
810              type or the application of an inductive type.</para>
811           </listitem>
812         </varlistentry>
813         <varlistentry>
814           <term>Action:</term>
815           <listitem>
816             <para>It proceeds by cases on <command>t</command> paying attention
817              to the constraints imposed by the actual &quot;right arguments&quot;
818              of the inductive type.</para>
819           </listitem>
820         </varlistentry>
821         <varlistentry>
822           <term>New sequents to prove:</term>
823           <listitem>
824             <para>It opens one new sequent to prove for each case in the
825              definition of the type of <command>t</command>. With respect to
826              a simple elimination, each new sequent has additional hypotheses
827              that states the equalities of the &quot;right parameters&quot;
828              of the inductive type with terms originally present in the
829              sequent to prove.</para>
830           </listitem>
831         </varlistentry>
832       </variablelist>
833     </para>
834   </sect1>
835   <sect1 id="tac_lapply">
836     <title><emphasis role="bold">lapply</emphasis> [<emphasis role="bold">depth=</emphasis>&nat;] &sterm; [<emphasis role="bold">to</emphasis> &sterm; [&sterm;]…] [<emphasis role="bold">using</emphasis> &id;]</title>
837     <titleabbrev>lapply</titleabbrev>
838     <para><userinput>lapply ???</userinput></para>
839     <para>
840       <variablelist>
841         <varlistentry>
842           <term>Pre-conditions:</term>
843           <listitem>
844             <para>TODO.</para>
845           </listitem>
846         </varlistentry>
847         <varlistentry>
848           <term>Action:</term>
849           <listitem>
850             <para>TODO.</para>
851           </listitem>
852         </varlistentry>
853         <varlistentry>
854           <term>New sequents to prove:</term>
855           <listitem>
856             <para>TODO.</para>
857           </listitem>
858         </varlistentry>
859       </variablelist>
860     </para>
861   </sect1>
862   <sect1 id="tac_left">
863     <title><emphasis role="bold">left</emphasis></title>
864     <titleabbrev>left</titleabbrev>
865     <para><userinput>left </userinput></para>
866     <para>
867       <variablelist>
868         <varlistentry>
869           <term>Pre-conditions:</term>
870           <listitem>
871             <para>The conclusion of the current sequent must be
872              an inductive type or the application of an inductive type
873              with at least one constructor.</para>
874           </listitem>
875         </varlistentry>
876         <varlistentry>
877           <term>Action:</term>
878           <listitem>
879             <para>Equivalent to <command>constructor 1</command>.</para>
880           </listitem>
881         </varlistentry>
882         <varlistentry>
883           <term>New sequents to prove:</term>
884           <listitem>
885             <para>It opens a new sequent for each premise of the first
886              constructor of the inductive type that is the conclusion of the
887              current sequent. For more details, see the <command>constructor</command> tactic.</para>
888           </listitem>
889         </varlistentry>
890       </variablelist>
891     </para>
892   </sect1>
893   <sect1 id="tac_letin">
894     <title><emphasis role="bold">letin</emphasis> &id; <emphasis role="bold">≝</emphasis> &sterm;</title>
895     <titleabbrev>letin</titleabbrev>
896     <para><userinput>letin x ≝ t</userinput></para>
897     <para>
898       <variablelist>
899         <varlistentry>
900           <term>Pre-conditions:</term>
901           <listitem>
902             <para>None.</para>
903           </listitem>
904         </varlistentry>
905         <varlistentry>
906           <term>Action:</term>
907           <listitem>
908             <para>It adds to the context of the current sequent to prove a new
909              definition <command>x ≝ t</command>.</para>
910           </listitem>
911         </varlistentry>
912         <varlistentry>
913           <term>New sequents to prove:</term>
914           <listitem>
915             <para>None.</para>
916           </listitem>
917         </varlistentry>
918       </variablelist>
919     </para>
920   </sect1>
921   <sect1 id="tac_normalize">
922     <title><emphasis role="bold">normalize</emphasis> &pattern;</title>
923     <titleabbrev>normalize</titleabbrev>
924     <para><userinput>normalize patt</userinput></para>
925     <para>
926       <variablelist>
927         <varlistentry>
928           <term>Pre-conditions:</term>
929           <listitem>
930             <para>None.</para>
931           </listitem>
932         </varlistentry>
933         <varlistentry>
934           <term>Action:</term>
935           <listitem>
936             <para>It replaces all the terms matched by <command>patt</command>
937              with their βδιζ-normal form.</para>
938           </listitem>
939         </varlistentry>
940         <varlistentry>
941           <term>New sequents to prove:</term>
942           <listitem>
943             <para>None.</para>
944           </listitem>
945         </varlistentry>
946       </variablelist>
947     </para>
948   </sect1>
949   <sect1 id="tac_paramodulation">
950     <title><emphasis role="bold">paramodulation</emphasis> &pattern;</title>
951     <titleabbrev>paramodulation</titleabbrev>
952     <para><userinput>paramodulation patt</userinput></para>
953     <para>
954       <variablelist>
955         <varlistentry>
956           <term>Pre-conditions:</term>
957           <listitem>
958             <para>TODO.</para>
959           </listitem>
960         </varlistentry>
961         <varlistentry>
962           <term>Action:</term>
963           <listitem>
964             <para>TODO.</para>
965           </listitem>
966         </varlistentry>
967         <varlistentry>
968           <term>New sequents to prove:</term>
969           <listitem>
970             <para>TODO.</para>
971           </listitem>
972         </varlistentry>
973       </variablelist>
974     </para>
975   </sect1>
976   <sect1 id="tac_reduce">
977     <title><emphasis role="bold">reduce</emphasis> &pattern;</title>
978     <titleabbrev>reduce</titleabbrev>
979     <para><userinput>reduce patt</userinput></para>
980     <para>
981       <variablelist>
982         <varlistentry>
983           <term>Pre-conditions:</term>
984           <listitem>
985             <para>None.</para>
986           </listitem>
987         </varlistentry>
988         <varlistentry>
989           <term>Action:</term>
990           <listitem>
991             <para>It replaces all the terms matched by <command>patt</command>
992              with their βδιζ-normal form.</para>
993           </listitem>
994         </varlistentry>
995         <varlistentry>
996           <term>New sequents to prove:</term>
997           <listitem>
998             <para>None.</para>
999           </listitem>
1000         </varlistentry>
1001       </variablelist>
1002     </para>
1003   </sect1>
1004   <sect1 id="tac_reflexivity">
1005     <title><emphasis role="bold">reflexivity</emphasis></title>
1006     <titleabbrev>reflexivity</titleabbrev>
1007     <para><userinput>reflexivity </userinput></para>
1008     <para>
1009       <variablelist>
1010         <varlistentry>
1011           <term>Pre-conditions:</term>
1012           <listitem>
1013             <para>The conclusion of the current sequent must be
1014              <command>t=t</command> for some term <command>t</command></para>
1015           </listitem>
1016         </varlistentry>
1017         <varlistentry>
1018           <term>Action:</term>
1019           <listitem>
1020             <para>It closes the current sequent by reflexivity
1021              of equality.</para>
1022           </listitem>
1023         </varlistentry>
1024         <varlistentry>
1025           <term>New sequents to prove:</term>
1026           <listitem>
1027             <para>None.</para>
1028           </listitem>
1029         </varlistentry>
1030       </variablelist>
1031     </para>
1032   </sect1>
1033   <sect1 id="tac_replace">
1034     <title><emphasis role="bold">replace</emphasis> &pattern; <emphasis role="bold">with</emphasis> &sterm;</title>
1035     <titleabbrev>change</titleabbrev>
1036     <para><userinput>change patt with t</userinput></para>
1037     <para>
1038       <variablelist>
1039         <varlistentry>
1040           <term>Pre-conditions:</term>
1041           <listitem>
1042             <para>None.</para>
1043           </listitem>
1044         </varlistentry>
1045         <varlistentry>
1046           <term>Action:</term>
1047           <listitem>
1048             <para>It replaces the subterms of the current sequent matched by
1049              <command>patt</command> with the new term <command>t</command>.
1050              For each subterm matched by the pattern, <command>t</command> is
1051              disambiguated in the context of the subterm.</para>
1052           </listitem>
1053         </varlistentry>
1054         <varlistentry>
1055           <term>New sequents to prove:</term>
1056           <listitem>
1057             <para>For each matched term <command>t'</command> it opens
1058              a new sequent to prove whose conclusion is
1059              <command>t'=t</command>.</para>
1060           </listitem>
1061         </varlistentry>
1062       </variablelist>
1063     </para>
1064   </sect1>
1065   <sect1 id="tac_rewrite">
1066     <title><emphasis role="bold">rewrite</emphasis> [<emphasis role="bold">&lt;</emphasis>|<emphasis role="bold">&gt;</emphasis>] &sterm; &pattern;</title>
1067     <titleabbrev>rewrite</titleabbrev>
1068     <para><userinput>rewrite dir p patt</userinput></para>
1069     <para>
1070       <variablelist>
1071         <varlistentry>
1072           <term>Pre-conditions:</term>
1073           <listitem>
1074             <para><command>p</command> must be the proof of an equality,
1075              possibly under some hypotheses.</para>
1076           </listitem>
1077         </varlistentry>
1078         <varlistentry>
1079           <term>Action:</term>
1080           <listitem>
1081             <para>It looks in every term matched by <command>patt</command>
1082              for all the occurrences of the
1083              left hand side of the equality that <command>p</command> proves
1084              (resp. the right hand side if <command>dir</command> is
1085              <command>&lt;</command>). Every occurence found is replaced with
1086              the opposite side of the equality.</para>
1087           </listitem>
1088         </varlistentry>
1089         <varlistentry>
1090           <term>New sequents to prove:</term>
1091           <listitem>
1092             <para>It opens one new sequent for each hypothesis of the
1093              equality proved by <command>p</command> that is not closed
1094              by unification.</para>
1095           </listitem>
1096         </varlistentry>
1097       </variablelist>
1098     </para>
1099   </sect1>
1100   <sect1 id="tac_right">
1101     <title><emphasis role="bold">right</emphasis></title>
1102     <titleabbrev>right</titleabbrev>
1103     <para><userinput>right </userinput></para>
1104     <para>
1105       <variablelist>
1106         <varlistentry>
1107           <term>Pre-conditions:</term>
1108           <listitem>
1109             <para>The conclusion of the current sequent must be
1110              an inductive type or the application of an inductive type with
1111              at least two constructors.</para>
1112           </listitem>
1113         </varlistentry>
1114         <varlistentry>
1115           <term>Action:</term>
1116           <listitem>
1117             <para>Equivalent to <command>constructor 2</command>.</para>
1118           </listitem>
1119         </varlistentry>
1120         <varlistentry>
1121           <term>New sequents to prove:</term>
1122           <listitem>
1123             <para>It opens a new sequent for each premise of the second
1124              constructor of the inductive type that is the conclusion of the
1125              current sequent. For more details, see the <command>constructor</command> tactic.</para>
1126           </listitem>
1127         </varlistentry>
1128       </variablelist>
1129     </para>
1130   </sect1>
1131   <sect1 id="tac_ring">
1132     <title><emphasis role="bold">ring</emphasis></title>
1133     <titleabbrev>ring</titleabbrev>
1134     <para><userinput>ring </userinput></para>
1135     <para>
1136       <variablelist>
1137         <varlistentry>
1138           <term>Pre-conditions:</term>
1139           <listitem>
1140             <para>The conclusion of the current sequent must be an
1141              equality over Coq's real numbers that can be proved using
1142              the ring properties of the real numbers only.</para>
1143           </listitem>
1144         </varlistentry>
1145         <varlistentry>
1146           <term>Action:</term>
1147           <listitem>
1148             <para>It closes the current sequent veryfying the equality by
1149              means of computation (i.e. this is a reflexive tactic, implemented
1150              exploiting the &quot;two level reasoning&quot; technique).</para>
1151           </listitem>
1152         </varlistentry>
1153         <varlistentry>
1154           <term>New sequents to prove:</term>
1155           <listitem>
1156             <para>None.</para>
1157           </listitem>
1158         </varlistentry>
1159       </variablelist>
1160     </para>
1161   </sect1>
1162   <sect1 id="tac_simplify">
1163     <title><emphasis role="bold">simplify</emphasis> &pattern;</title>
1164     <titleabbrev>simplify</titleabbrev>
1165     <para><userinput>simplify patt</userinput></para>
1166     <para>
1167       <variablelist>
1168         <varlistentry>
1169           <term>Pre-conditions:</term>
1170           <listitem>
1171             <para>None.</para>
1172           </listitem>
1173         </varlistentry>
1174         <varlistentry>
1175           <term>Action:</term>
1176           <listitem>
1177             <para>It replaces all the terms matched by <command>patt</command>
1178              with other convertible terms that are supposed to be simpler.</para>
1179           </listitem>
1180         </varlistentry>
1181         <varlistentry>
1182           <term>New sequents to prove:</term>
1183           <listitem>
1184             <para>None.</para>
1185           </listitem>
1186         </varlistentry>
1187       </variablelist>
1188     </para>
1189   </sect1>
1190   <sect1 id="tac_split">
1191     <title><emphasis role="bold">split</emphasis></title>
1192     <titleabbrev>split</titleabbrev>
1193     <para><userinput>split </userinput></para>
1194     <para>
1195       <variablelist>
1196         <varlistentry>
1197           <term>Pre-conditions:</term>
1198           <listitem>
1199             <para>The conclusion of the current sequent must be
1200              an inductive type or the application of an inductive type with
1201              at least one constructor.</para>
1202           </listitem>
1203         </varlistentry>
1204         <varlistentry>
1205           <term>Action:</term>
1206           <listitem>
1207             <para>Equivalent to <command>constructor 1</command>.</para>
1208           </listitem>
1209         </varlistentry>
1210         <varlistentry>
1211           <term>New sequents to prove:</term>
1212           <listitem>
1213             <para>It opens a new sequent for each premise of the first
1214              constructor of the inductive type that is the conclusion of the
1215              current sequent. For more details, see the <command>constructor</command> tactic.</para>
1216           </listitem>
1217         </varlistentry>
1218       </variablelist>
1219     </para>
1220   </sect1>
1221   <sect1 id="tac_symmetry">
1222     <title><emphasis role="bold">symmetry</emphasis></title>
1223     <titleabbrev>symmetry</titleabbrev>
1224     <para>The tactic <command>symmetry</command> </para>
1225     <para><userinput>symmetry </userinput></para>
1226     <para>
1227       <variablelist>
1228         <varlistentry>
1229           <term>Pre-conditions:</term>
1230           <listitem>
1231             <para>The conclusion of the current proof must be an equality.</para>
1232           </listitem>
1233         </varlistentry>
1234         <varlistentry>
1235           <term>Action:</term>
1236           <listitem>
1237             <para>It swaps the two sides of the equalityusing the symmetric
1238              property.</para>
1239           </listitem>
1240         </varlistentry>
1241         <varlistentry>
1242           <term>New sequents to prove:</term>
1243           <listitem>
1244             <para>None.</para>
1245           </listitem>
1246         </varlistentry>
1247       </variablelist>
1248     </para>
1249   </sect1>
1250   <sect1 id="tac_transitivity">
1251     <title><emphasis role="bold">transitivity</emphasis> &sterm;</title>
1252     <titleabbrev>transitivity</titleabbrev>
1253     <para><userinput>transitivity t</userinput></para>
1254     <para>
1255       <variablelist>
1256         <varlistentry>
1257           <term>Pre-conditions:</term>
1258           <listitem>
1259             <para>The conclusion of the current proof must be an equality.</para>
1260           </listitem>
1261         </varlistentry>
1262         <varlistentry>
1263           <term>Action:</term>
1264           <listitem>
1265             <para>It closes the current sequent by transitivity of the equality.</para>
1266           </listitem>
1267         </varlistentry>
1268         <varlistentry>
1269           <term>New sequents to prove:</term>
1270           <listitem>
1271             <para>It opens two new sequents <command>l=t</command> and
1272              <command>t=r</command> where <command>l</command> and <command>r</command> are the left and right hand side of the equality in the conclusion of
1273 the current sequent to prove.</para>
1274           </listitem>
1275         </varlistentry>
1276       </variablelist>
1277     </para>
1278   </sect1>
1279   <sect1 id="tac_unfold">
1280     <title><emphasis role="bold">unfold</emphasis> [&sterm;] &pattern;</title>
1281     <titleabbrev>unfold</titleabbrev>
1282     <para><userinput>unfold t patt</userinput></para>
1283     <para>
1284       <variablelist>
1285         <varlistentry>
1286           <term>Pre-conditions:</term>
1287           <listitem>
1288             <para>None.</para>
1289           </listitem>
1290         </varlistentry>
1291         <varlistentry>
1292           <term>Action:</term>
1293           <listitem>
1294             <para>It finds all the occurrences of <command>t</command>
1295              (possibly applied to arguments) in the subterms matched by
1296              <command>patt</command>. Then it δ-expands each occurrence,
1297              also performing β-reduction of the obtained term. If
1298              <command>t</command> is omitted it defaults to each
1299              subterm matched by <command>patt</command>.</para>
1300           </listitem>
1301         </varlistentry>
1302         <varlistentry>
1303           <term>New sequents to prove:</term>
1304           <listitem>
1305             <para>None.</para>
1306           </listitem>
1307         </varlistentry>
1308       </variablelist>
1309     </para>
1310   </sect1>
1311   <sect1 id="tac_whd">
1312     <title><emphasis role="bold">whd</emphasis> &pattern;</title>
1313     <titleabbrev>whd</titleabbrev>
1314     <para><userinput>whd patt</userinput></para>
1315     <para>
1316       <variablelist>
1317         <varlistentry>
1318           <term>Pre-conditions:</term>
1319           <listitem>
1320             <para>None.</para>
1321           </listitem>
1322         </varlistentry>
1323         <varlistentry>
1324           <term>Action:</term>
1325           <listitem>
1326             <para>It replaces all the terms matched by <command>patt</command>
1327              with their βδιζ-weak-head normal form.</para>
1328           </listitem>
1329         </varlistentry>
1330         <varlistentry>
1331           <term>New sequents to prove:</term>
1332           <listitem>
1333             <para>None.</para>
1334           </listitem>
1335         </varlistentry>
1336       </variablelist>
1337     </para>
1338   </sect1>
1339
1340 </chapter>
1341