2 <!-- ============ Tactics ====================== -->
3 <chapter id="sec_tactics">
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>
13 <term>Pre-conditions:</term>
15 <para><command>P</command> must have type <command>Prop</command>.</para>
21 <para>It closes the current sequent by eliminating an
26 <term>New sequents to prove:</term>
28 <para>It opens two new sequents of conclusion <command>P</command>
29 and <command>¬P</command>.</para>
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>
42 <term>Pre-conditions:</term>
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>
54 <para>It closes the current sequent by applying <command>t</command> to <command>n</command> implicit arguments (that become new sequents).</para>
58 <term>New sequents to prove:</term>
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
70 <sect1 id="tac_assumption">
71 <title><emphasis role="bold">assumption</emphasis></title>
72 <titleabbrev>assumption</titleabbrev>
73 <para><userinput>assumption </userinput></para>
77 <term>Pre-conditions:</term>
79 <para>There must exist an hypothesis whose type can be unified with
80 the conclusion of the current sequent.</para>
86 <para>It closes the current sequent exploiting an hypothesis.</para>
90 <term>New sequents to prove:</term>
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>
105 <term>Pre-conditions:</term>
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>
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>
124 <term>New sequents to prove:</term>
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>
139 <term>Pre-conditions:</term>
141 <para><command>H</command> must be an hypothesis of the
142 current sequent to prove.</para>
148 <para>It hides the hypothesis <command>H</command> from the
149 current sequent.</para>
153 <term>New sequents to prove:</term>
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>
168 <term>Pre-conditions:</term>
170 <para><command>H</command> must be an hypothesis of the
171 current sequent to prove.</para>
177 <para>It hides the definiens of a definition in the current
178 sequent context. Thus the definition becomes an hypothesis.</para>
182 <term>New sequents to prove:</term>
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>
197 <term>Pre-conditions:</term>
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>
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>
214 <term>New sequents to prove:</term>
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>
229 <term>Pre-conditions:</term>
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>
239 <para>It applies the <command>n</command>-th constructor of the
240 inductive type of the conclusion of the current sequent.</para>
244 <term>New sequents to prove:</term>
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>
254 <sect1 id="tac_contradiction">
255 <title><emphasis role="bold">contradiction</emphasis></title>
256 <titleabbrev>contradiction</titleabbrev>
257 <para><userinput>contradiction </userinput></para>
261 <term>Pre-conditions:</term>
263 <para>There must be in the current context an hypothesis of type
264 <command>False</command>.</para>
270 <para>It closes the current sequent by applying an hypothesis of
271 type <command>False</command>.</para>
275 <term>New sequents to prove:</term>
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>
290 <term>Pre-conditions:</term>
292 <para><command>P</command> must have type <command>Prop</command>.</para>
298 <para>It closes the current sequent.</para>
302 <term>New sequents to prove:</term>
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>
314 <sect1 id="tac_decompose">
315 <title><emphasis role="bold">decompose</emphasis> &id; [&id;]… &intros-spec;</title>
316 <titleabbrev>decompose</titleabbrev>
318 decompose (T<subscript>1</subscript> ... T<subscript>n</subscript>) H hips
323 <term>Pre-conditions:</term>
326 <command>H</command> must inhabit one inductive type among
328 T<subscript>1</subscript> ... T<subscript>n</subscript>
330 and the types of a predefined list.
338 Runs <command>elim H hyps</command>, clears H and tries to run
339 itself recursively on each new identifier introduced by
340 <command>elim</command> in the opened sequents.
345 <term>New sequents to prove:</term>
348 The ones generated by all the <command>elim</command> tactics run.
355 <sect1 id="tac_demodulation">
356 <title><emphasis role="bold">demodulation</emphasis> &pattern;</title>
357 <titleabbrev>demodulation</titleabbrev>
358 <para><userinput>demodulation patt</userinput></para>
362 <term>Pre-conditions:</term>
374 <term>New sequents to prove:</term>
382 <sect1 id="tac_discriminate">
383 <title><emphasis role="bold">discriminate</emphasis> &sterm;</title>
384 <titleabbrev>discriminate</titleabbrev>
385 <para><userinput>discriminate p</userinput></para>
389 <term>Pre-conditions:</term>
391 <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
392 its constructor takes no arguments.</para>
398 <para>It closes the current sequent by proving the absurdity of
399 <command>p</command>.</para>
403 <term>New sequents to prove:</term>
411 <sect1 id="tac_elim">
412 <title><emphasis role="bold">elim</emphasis> &sterm; [<emphasis role="bold">using</emphasis> &sterm;] &intros-spec;</title>
413 <titleabbrev>elim</titleabbrev>
414 <para><userinput>elim t using th hyps</userinput></para>
418 <term>Pre-conditions:</term>
420 <para><command>t</command> must inhabit an inductive type and
421 <command>th</command> must be an elimination principle for that
422 inductive type. If <command>th</command> is omitted the appropriate
423 standard elimination principle is chosen.</para>
429 <para>It proceeds by cases on the values of <command>t</command>,
430 according to the elimination principle <command>th</command>.
435 <term>New sequents to prove:</term>
437 <para>It opens one new sequent for each case. The names of
438 the new hypotheses are picked by <command>hyps</command>, if
439 provided. If hyps specifies also a number of hypotheses that
440 is less than the number of new hypotheses for a new sequent,
441 then the exceeding hypothesis will be kept as implications in
442 the conclusion of the sequent.</para>
448 <sect1 id="tac_elimType">
449 <title><emphasis role="bold">elimType</emphasis> &sterm; [<emphasis role="bold">using</emphasis> &sterm;] &intros-spec;</title>
450 <titleabbrev>elimType</titleabbrev>
451 <para><userinput>elimType T using th hyps</userinput></para>
455 <term>Pre-conditions:</term>
457 <para><command>T</command> must be an inductive type.</para>
463 <para>TODO (severely bugged now).</para>
467 <term>New sequents to prove:</term>
475 <sect1 id="tac_exact">
476 <title><emphasis role="bold">exact</emphasis> &sterm;</title>
477 <titleabbrev>exact</titleabbrev>
478 <para><userinput>exact p</userinput></para>
482 <term>Pre-conditions:</term>
484 <para>The type of <command>p</command> must be convertible
485 with the conclusion of the current sequent.</para>
491 <para>It closes the current sequent using <command>p</command>.</para>
495 <term>New sequents to prove:</term>
503 <sect1 id="tac_exists">
504 <title><emphasis role="bold">exists</emphasis></title>
505 <titleabbrev>exists</titleabbrev>
506 <para><userinput>exists </userinput></para>
510 <term>Pre-conditions:</term>
512 <para>The conclusion of the current sequent must be
513 an inductive type or the application of an inductive type
514 with at least one constructor.</para>
520 <para>Equivalent to <command>constructor 1</command>.</para>
524 <term>New sequents to prove:</term>
526 <para>It opens a new sequent for each premise of the first
527 constructor of the inductive type that is the conclusion of the
528 current sequent. For more details, see the <command>constructor</command> tactic.</para>
534 <sect1 id="tac_fail">
535 <title><emphasis role="bold">fail</emphasis></title>
536 <titleabbrev>fail</titleabbrev>
537 <para><userinput>fail</userinput></para>
541 <term>Pre-conditions:</term>
549 <para>This tactic always fail.</para>
553 <term>New sequents to prove:</term>
561 <sect1 id="tac_fold">
562 <title><emphasis role="bold">fold</emphasis> &reduction-kind; &sterm; &pattern;</title>
563 <titleabbrev>fold</titleabbrev>
564 <para><userinput>fold red t patt</userinput></para>
568 <term>Pre-conditions:</term>
570 <para>The pattern must not specify the wanted term.</para>
576 <para>First of all it locates all the subterms matched by
577 <command>patt</command>. In the context of each matched subterm
578 it disambiguates the term <command>t</command> and reduces it
579 to its <command>red</command> normal form; then it replaces with
580 <command>t</command> every occurrence of the normal form in the
581 matched subterm.</para>
585 <term>New sequents to prove:</term>
593 <sect1 id="tac_fourier">
594 <title><emphasis role="bold">fourier</emphasis></title>
595 <titleabbrev>fourier</titleabbrev>
596 <para><userinput>fourier </userinput></para>
600 <term>Pre-conditions:</term>
602 <para>The conclusion of the current sequent must be a linear
603 inequation over real numbers taken from standard library of
604 Coq. Moreover the inequations in the hypotheses must imply the
605 inequation in the conclusion of the current sequent.</para>
611 <para>It closes the current sequent by applying the Fourier method.</para>
615 <term>New sequents to prove:</term>
624 <title><emphasis role="bold">fwd</emphasis> &id; [<emphasis role="bold">(</emphasis>[&id;]…<emphasis role="bold">)</emphasis>]</title>
625 <titleabbrev>fwd</titleabbrev>
626 <para><userinput>fwd ...TODO</userinput></para>
630 <term>Pre-conditions:</term>
642 <term>New sequents to prove:</term>
650 <sect1 id="tac_generalize">
651 <title><emphasis role="bold">generalize</emphasis> &pattern; [<emphasis role="bold">as</emphasis> &id;]</title>
652 <titleabbrev>generalize</titleabbrev>
653 <para><userinput>generalize patt as H</userinput></para>
657 <term>Pre-conditions:</term>
659 <para>All the terms matched by <command>patt</command> must be
660 convertible and close in the context of the current sequent.</para>
666 <para>It closes the current sequent by applying a stronger
667 lemma that is proved using the new generated sequent.</para>
671 <term>New sequents to prove:</term>
673 <para>It opens a new sequent where the current sequent conclusion
674 <command>G</command> is generalized to
675 <command>∀x.G{x/t}</command> where <command>{x/t}</command>
676 is a notation for the replacement with <command>x</command> of all
677 the occurrences of the term <command>t</command> matched by
678 <command>patt</command>. If <command>patt</command> matches no
679 subterm then <command>t</command> is defined as the
680 <command>wanted</command> part of the pattern.</para>
687 <title><emphasis role="bold">id</emphasis></title>
688 <titleabbrev>id</titleabbrev>
689 <para><userinput>id </userinput></para>
693 <term>Pre-conditions:</term>
701 <para>This identity tactic does nothing without failing.</para>
705 <term>New sequents to prove:</term>
713 <sect1 id="tac_injection">
714 <title><emphasis role="bold">injection</emphasis> &sterm;</title>
715 <titleabbrev><emphasis role="bold">injection</emphasis></titleabbrev>
716 <para><userinput>injection p</userinput></para>
720 <term>Pre-conditions:</term>
722 <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
723 <command>K</command> takes no arguments.</para>
729 <para>It derives new hypotheses by injectivity of
730 <command>K</command>.</para>
734 <term>New sequents to prove:</term>
736 <para>The new sequent to prove is equal to the current sequent
737 with the additional hypotheses
738 <command>t<subscript>1</subscript>=t'<subscript>1</subscript></command> ... <command>t<subscript>n</subscript>=t'<subscript>n</subscript></command>.</para>
744 <sect1 id="tac_intro">
745 <title><emphasis role="bold">intro</emphasis> [&id;]</title>
746 <titleabbrev>intro</titleabbrev>
747 <para><userinput>intro H</userinput></para>
751 <term>Pre-conditions:</term>
753 <para>The conclusion of the sequent to prove must be an implication
754 or a universal quantification.</para>
760 <para>It applies the right introduction rule for implication,
761 closing the current sequent.</para>
765 <term>New sequents to prove:</term>
767 <para>It opens a new sequent to prove adding to the hypothesis
768 the antecedent of the implication and setting the conclusion
769 to the consequent of the implicaiton. The name of the new
770 hypothesis is <command>H</command> if provided; otherwise it
771 is automatically generated.</para>
777 <sect1 id="tac_intros">
778 <title><emphasis role="bold">intros</emphasis> &intros-spec;</title>
779 <titleabbrev>intros</titleabbrev>
780 <para><userinput>intros hyps</userinput></para>
784 <term>Pre-conditions:</term>
786 <para>If <command>hyps</command> specifies a number of hypotheses
787 to introduce, then the conclusion of the current sequent must
788 be formed by at least that number of imbricated implications
789 or universal quantifications.</para>
795 <para>It applies several times the right introduction rule for
796 implication, closing the current sequent.</para>
800 <term>New sequents to prove:</term>
802 <para>It opens a new sequent to prove adding a number of new
803 hypotheses equal to the number of new hypotheses requested.
804 If the user does not request a precise number of new hypotheses,
805 it adds as many hypotheses as possible.
806 The name of each new hypothesis is either popped from the
807 user provided list of names, or it is automatically generated when
808 the list is (or becomes) empty.</para>
814 <sect1 id="tac_inversion">
815 <title><emphasis role="bold">inversion</emphasis> &sterm;</title>
816 <titleabbrev>inversion</titleabbrev>
817 <para><userinput>inversion t</userinput></para>
821 <term>Pre-conditions:</term>
823 <para>The type of the term <command>t</command> must be an inductive
824 type or the application of an inductive type.</para>
830 <para>It proceeds by cases on <command>t</command> paying attention
831 to the constraints imposed by the actual "right arguments"
832 of the inductive type.</para>
836 <term>New sequents to prove:</term>
838 <para>It opens one new sequent to prove for each case in the
839 definition of the type of <command>t</command>. With respect to
840 a simple elimination, each new sequent has additional hypotheses
841 that states the equalities of the "right parameters"
842 of the inductive type with terms originally present in the
843 sequent to prove.</para>
849 <sect1 id="tac_lapply">
850 <title><emphasis role="bold">lapply</emphasis> [<emphasis role="bold">depth=</emphasis>&nat;] &sterm; [<emphasis role="bold">to</emphasis> &sterm; [&sterm;]…] [<emphasis role="bold">as</emphasis> &id;]</title>
851 <titleabbrev>lapply</titleabbrev>
854 to t<subscript>1</subscript>, ..., t<subscript>n</subscript> as H
859 <term>Pre-conditions:</term>
871 <term>New sequents to prove:</term>
879 <sect1 id="tac_left">
880 <title><emphasis role="bold">left</emphasis></title>
881 <titleabbrev>left</titleabbrev>
882 <para><userinput>left </userinput></para>
886 <term>Pre-conditions:</term>
888 <para>The conclusion of the current sequent must be
889 an inductive type or the application of an inductive type
890 with at least one constructor.</para>
896 <para>Equivalent to <command>constructor 1</command>.</para>
900 <term>New sequents to prove:</term>
902 <para>It opens a new sequent for each premise of the first
903 constructor of the inductive type that is the conclusion of the
904 current sequent. For more details, see the <command>constructor</command> tactic.</para>
910 <sect1 id="tac_letin">
911 <title><emphasis role="bold">letin</emphasis> &id; <emphasis role="bold">≝</emphasis> &sterm;</title>
912 <titleabbrev>letin</titleabbrev>
913 <para><userinput>letin x ≝ t</userinput></para>
917 <term>Pre-conditions:</term>
925 <para>It adds to the context of the current sequent to prove a new
926 definition <command>x ≝ t</command>.</para>
930 <term>New sequents to prove:</term>
938 <sect1 id="tac_normalize">
939 <title><emphasis role="bold">normalize</emphasis> &pattern;</title>
940 <titleabbrev>normalize</titleabbrev>
941 <para><userinput>normalize patt</userinput></para>
945 <term>Pre-conditions:</term>
953 <para>It replaces all the terms matched by <command>patt</command>
954 with their βδιζ-normal form.</para>
958 <term>New sequents to prove:</term>
966 <sect1 id="tac_paramodulation">
967 <title><emphasis role="bold">paramodulation</emphasis> &pattern;</title>
968 <titleabbrev>paramodulation</titleabbrev>
969 <para><userinput>paramodulation patt</userinput></para>
973 <term>Pre-conditions:</term>
985 <term>New sequents to prove:</term>
993 <sect1 id="tac_reduce">
994 <title><emphasis role="bold">reduce</emphasis> &pattern;</title>
995 <titleabbrev>reduce</titleabbrev>
996 <para><userinput>reduce patt</userinput></para>
1000 <term>Pre-conditions:</term>
1006 <term>Action:</term>
1008 <para>It replaces all the terms matched by <command>patt</command>
1009 with their βδιζ-normal form.</para>
1013 <term>New sequents to prove:</term>
1021 <sect1 id="tac_reflexivity">
1022 <title><emphasis role="bold">reflexivity</emphasis></title>
1023 <titleabbrev>reflexivity</titleabbrev>
1024 <para><userinput>reflexivity </userinput></para>
1028 <term>Pre-conditions:</term>
1030 <para>The conclusion of the current sequent must be
1031 <command>t=t</command> for some term <command>t</command></para>
1035 <term>Action:</term>
1037 <para>It closes the current sequent by reflexivity
1042 <term>New sequents to prove:</term>
1050 <sect1 id="tac_replace">
1051 <title><emphasis role="bold">replace</emphasis> &pattern; <emphasis role="bold">with</emphasis> &sterm;</title>
1052 <titleabbrev>change</titleabbrev>
1053 <para><userinput>change patt with t</userinput></para>
1057 <term>Pre-conditions:</term>
1063 <term>Action:</term>
1065 <para>It replaces the subterms of the current sequent matched by
1066 <command>patt</command> with the new term <command>t</command>.
1067 For each subterm matched by the pattern, <command>t</command> is
1068 disambiguated in the context of the subterm.</para>
1072 <term>New sequents to prove:</term>
1074 <para>For each matched term <command>t'</command> it opens
1075 a new sequent to prove whose conclusion is
1076 <command>t'=t</command>.</para>
1082 <sect1 id="tac_rewrite">
1083 <title><emphasis role="bold">rewrite</emphasis> [<emphasis role="bold"><</emphasis>|<emphasis role="bold">></emphasis>] &sterm; &pattern;</title>
1084 <titleabbrev>rewrite</titleabbrev>
1085 <para><userinput>rewrite dir p patt</userinput></para>
1089 <term>Pre-conditions:</term>
1091 <para><command>p</command> must be the proof of an equality,
1092 possibly under some hypotheses.</para>
1096 <term>Action:</term>
1098 <para>It looks in every term matched by <command>patt</command>
1099 for all the occurrences of the
1100 left hand side of the equality that <command>p</command> proves
1101 (resp. the right hand side if <command>dir</command> is
1102 <command><</command>). Every occurence found is replaced with
1103 the opposite side of the equality.</para>
1107 <term>New sequents to prove:</term>
1109 <para>It opens one new sequent for each hypothesis of the
1110 equality proved by <command>p</command> that is not closed
1111 by unification.</para>
1117 <sect1 id="tac_right">
1118 <title><emphasis role="bold">right</emphasis></title>
1119 <titleabbrev>right</titleabbrev>
1120 <para><userinput>right </userinput></para>
1124 <term>Pre-conditions:</term>
1126 <para>The conclusion of the current sequent must be
1127 an inductive type or the application of an inductive type with
1128 at least two constructors.</para>
1132 <term>Action:</term>
1134 <para>Equivalent to <command>constructor 2</command>.</para>
1138 <term>New sequents to prove:</term>
1140 <para>It opens a new sequent for each premise of the second
1141 constructor of the inductive type that is the conclusion of the
1142 current sequent. For more details, see the <command>constructor</command> tactic.</para>
1148 <sect1 id="tac_ring">
1149 <title><emphasis role="bold">ring</emphasis></title>
1150 <titleabbrev>ring</titleabbrev>
1151 <para><userinput>ring </userinput></para>
1155 <term>Pre-conditions:</term>
1157 <para>The conclusion of the current sequent must be an
1158 equality over Coq's real numbers that can be proved using
1159 the ring properties of the real numbers only.</para>
1163 <term>Action:</term>
1165 <para>It closes the current sequent veryfying the equality by
1166 means of computation (i.e. this is a reflexive tactic, implemented
1167 exploiting the "two level reasoning" technique).</para>
1171 <term>New sequents to prove:</term>
1179 <sect1 id="tac_simplify">
1180 <title><emphasis role="bold">simplify</emphasis> &pattern;</title>
1181 <titleabbrev>simplify</titleabbrev>
1182 <para><userinput>simplify patt</userinput></para>
1186 <term>Pre-conditions:</term>
1192 <term>Action:</term>
1194 <para>It replaces all the terms matched by <command>patt</command>
1195 with other convertible terms that are supposed to be simpler.</para>
1199 <term>New sequents to prove:</term>
1207 <sect1 id="tac_split">
1208 <title><emphasis role="bold">split</emphasis></title>
1209 <titleabbrev>split</titleabbrev>
1210 <para><userinput>split </userinput></para>
1214 <term>Pre-conditions:</term>
1216 <para>The conclusion of the current sequent must be
1217 an inductive type or the application of an inductive type with
1218 at least one constructor.</para>
1222 <term>Action:</term>
1224 <para>Equivalent to <command>constructor 1</command>.</para>
1228 <term>New sequents to prove:</term>
1230 <para>It opens a new sequent for each premise of the first
1231 constructor of the inductive type that is the conclusion of the
1232 current sequent. For more details, see the <command>constructor</command> tactic.</para>
1238 <sect1 id="tac_symmetry">
1239 <title><emphasis role="bold">symmetry</emphasis></title>
1240 <titleabbrev>symmetry</titleabbrev>
1241 <para>The tactic <command>symmetry</command> </para>
1242 <para><userinput>symmetry </userinput></para>
1246 <term>Pre-conditions:</term>
1248 <para>The conclusion of the current proof must be an equality.</para>
1252 <term>Action:</term>
1254 <para>It swaps the two sides of the equalityusing the symmetric
1259 <term>New sequents to prove:</term>
1267 <sect1 id="tac_transitivity">
1268 <title><emphasis role="bold">transitivity</emphasis> &sterm;</title>
1269 <titleabbrev>transitivity</titleabbrev>
1270 <para><userinput>transitivity t</userinput></para>
1274 <term>Pre-conditions:</term>
1276 <para>The conclusion of the current proof must be an equality.</para>
1280 <term>Action:</term>
1282 <para>It closes the current sequent by transitivity of the equality.</para>
1286 <term>New sequents to prove:</term>
1288 <para>It opens two new sequents <command>l=t</command> and
1289 <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
1290 the current sequent to prove.</para>
1296 <sect1 id="tac_unfold">
1297 <title><emphasis role="bold">unfold</emphasis> [&sterm;] &pattern;</title>
1298 <titleabbrev>unfold</titleabbrev>
1299 <para><userinput>unfold t patt</userinput></para>
1303 <term>Pre-conditions:</term>
1309 <term>Action:</term>
1311 <para>It finds all the occurrences of <command>t</command>
1312 (possibly applied to arguments) in the subterms matched by
1313 <command>patt</command>. Then it δ-expands each occurrence,
1314 also performing β-reduction of the obtained term. If
1315 <command>t</command> is omitted it defaults to each
1316 subterm matched by <command>patt</command>.</para>
1320 <term>New sequents to prove:</term>
1328 <sect1 id="tac_whd">
1329 <title><emphasis role="bold">whd</emphasis> &pattern;</title>
1330 <titleabbrev>whd</titleabbrev>
1331 <para><userinput>whd patt</userinput></para>
1335 <term>Pre-conditions:</term>
1341 <term>Action:</term>
1343 <para>It replaces all the terms matched by <command>patt</command>
1344 with their βδιζ-weak-head normal form.</para>
1348 <term>New sequents to prove:</term>