X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fhelp%2FC%2Fsec_tactics.xml;h=0fabbbf7ca5f8a68167a62bcaa68334f59363eb3;hb=a3f4c0a8b4328cb9a9fe3b4c2e577be2a258675c;hp=01d9ea63e32cb82e1cd27895f849e9cc08a0b21c;hpb=f4bb8432019fd82d361e30923b8e6e6206a4d481;p=helm.git diff --git a/matita/help/C/sec_tactics.xml b/matita/help/C/sec_tactics.xml index 01d9ea63e..0fabbbf7c 100644 --- a/matita/help/C/sec_tactics.xml +++ b/matita/help/C/sec_tactics.xml @@ -1,14 +1,27 @@ - Tactics + Tactics + + + Quick reference card + + &tacticref; + + - <emphasis role="bold">absurd</emphasis> &sterm; + absurd absurd absurd P + + Synopsis: + + absurd &sterm; + + Pre-conditions: @@ -33,11 +46,17 @@ - <emphasis role="bold">apply</emphasis> &sterm; + apply apply apply t + + Synopsis: + + apply &sterm; + + Pre-conditions: @@ -67,12 +86,73 @@ + + applyS + applyS + applyS t auto_params + + + + Synopsis: + + applyS &sterm; &autoparams; + + + + Pre-conditions: + + t must have type + T1 → ... → + Tn → G. + + + + Action: + + applyS is useful when + apply fails because the current goal + and the conclusion of the applied theorems are extensionally + equivalent up to instantiation of metavariables, but cannot + be unified. E.g. the goal is P(n*O+m) and + the theorem to be applied proves ∀m.P(m+O). + + + It tries to automatically rewrite the current goal using + auto paramodulation + to make it unifiable with G. + Then it closes the current sequent by applying + t to n + implicit arguments (that become new sequents). + The auto_params parameters are passed + directly to auto paramodulation. + + + + + New sequents to prove: + + It opens a new sequent for each premise + Ti that is not + instantiated by unification. Ti is + the conclusion of the i-th new sequent to + prove. + + + + + - <emphasis role="bold">assumption</emphasis> + assumption assumption assumption + + Synopsis: + + assumption + + Pre-conditions: @@ -96,20 +176,26 @@ - <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>] + auto auto - auto depth=d width=w paramodulation full + auto params + + Synopsis: + + auto &autoparams; + + Pre-conditions: None, but the tactic may fail finding a proof if every proof is in the search space that is pruned away. Pruning is - controlled by d and w. + controlled by the optional params. Moreover, only lemmas whose type signature is a subset of the signature of the current sequent are considered. The signature of - a sequent is ...TODO + a sequent is ...&TODO; @@ -129,24 +215,89 @@ + + cases + cases + + cases t hyps + + + + + Synopsis: + + + cases + &term; [([&id;]…)] + + + + + Pre-conditions: + + + t must inhabit an inductive type + + + + + Action: + + + It proceed by cases on t. The new generated + hypothesis in each branch are named according to + hyps. + + + + + New sequents to prove: + + One new sequent for each constructor of the type of + t. Each sequent has a new hypothesis for + each argument of the constructor. + + + + + - <emphasis role="bold">clear</emphasis> &id; + clear clear - clear H + + clear H1 ... Hm + + + Synopsis: + + + clear + &id; [&id;…] + + + Pre-conditions: - H must be an hypothesis of the - current sequent to prove. + + + H1 ... Hm + must be hypotheses of the + current sequent to prove. + Action: - It hides the hypothesis H from the - current sequent. + + It hides the hypotheses + + H1 ... Hm + from the current sequent. + @@ -159,11 +310,17 @@ - <emphasis role="bold">clearbody</emphasis> &id; + clearbody clearbody clearbody H + + Synopsis: + + clearbody &id; + + Pre-conditions: @@ -187,12 +344,70 @@ + + compose + compose + compose n t1 with t2 hyps + + + + Synopsis: + + compose [&nat;] &sterm; [with &sterm;] [&intros-spec;] + + + + Pre-conditions: + + + + + + Action: + + Composes t1 with t2 in every possible way + n times introducing generated terms + as if intros hyps was issued. + If t1:∀x:A.B[x] and + t2:∀x,y:A.B[x]→B[y]→C[x,y] it generates: + + + λx,y:A.t2 x y (t1 x) : ∀x,y:A.B[y]→C[x,y] + + + λx,y:A.λH:B[x].t2 x y H (t1 y) : ∀x,y:A.B[x]→C[x,y] + + + + + If t2 is omitted it composes + t1 + with every hypothesis that can be introduced. + n iterates the process. + + + + New sequents to prove: + + The same, but with more hypothesis eventually introduced + by the &intros-spec;. + + + + + - <emphasis role="bold">change</emphasis> <pattern> <emphasis role="bold">with</emphasis> &sterm; + change change change patt with t + + Synopsis: + + change &pattern; with &sterm; + + Pre-conditions: @@ -220,11 +435,17 @@ - <emphasis role="bold">constructor</emphasis> &nat; + constructor constructor constructor n + + Synopsis: + + constructor &nat; + + Pre-conditions: @@ -252,11 +473,17 @@ - <emphasis role="bold">contradiction</emphasis> + contradiction contradiction contradiction + + Synopsis: + + contradiction + + Pre-conditions: @@ -281,11 +508,17 @@ - <emphasis role="bold">cut</emphasis> &sterm; [<emphasis role="bold">as</emphasis> &id;] + cut cut cut P as H + + Synopsis: + + cut &sterm; [as &id;] + + Pre-conditions: @@ -312,50 +545,117 @@ - <emphasis role="bold">decompose</emphasis> &id; [&id;]… [<intros_spec>] + decompose decompose - decompose ??? + + decompose as H1 ... Hm + + + Synopsis: + + + decompose + [as &id;…] + + + Pre-conditions: - TODO. + None. Action: - TODO. + + For each each premise H of type + T in the current context where + T is a non-recursive inductive type without + right parameters and of sort Prop or CProp, the tactic runs + + elim H as H1 ... Hm + , clears H and runs itself + recursively on each new premise introduced by + elim in the opened sequents. + New sequents to prove: - TODO. + + The ones generated by all the elim tactics run. + - - <emphasis role="bold">discriminate</emphasis> &sterm; - discriminate - discriminate p + + demodulate + demodulate + demodulate + + Synopsis: + + demodulate + + Pre-conditions: - p must have type K t1 ... tn = K' t'1 ... t'm where K and K' must be different constructors of the same inductive type and each argument list can be empty if -its constructor takes no arguments. + None. Action: - It closes the current sequent by proving the absurdity of - p. + &TODO; + + + + New sequents to prove: + + None. + + + + + + + destruct + destruct + destruct p + + + + Synopsis: + + destruct &sterm; + + + + Pre-conditions: + + p must have type E1 = E2 where the two sides of the equality are possibly applied constructors of an inductive type. + + + + Action: + + The tactic recursively compare the two sides of the equality + looking for different constructors in corresponding position. + If two of them are found, the tactic closes the current sequent + by proving the absurdity of p. Otherwise + it adds a new hypothesis for each leaf of the formula that + states the equality of the subformulae in the corresponding + positions on the two sides of the equality. + @@ -368,11 +668,17 @@ its constructor takes no arguments. - <emphasis role="bold">elim</emphasis> &sterm; [<emphasis role="bold">using</emphasis> &sterm;] [<intros_spec>] + elim elim elim t using th hyps + + Synopsis: + + elim &sterm; [using &sterm;] &intros-spec; + + Pre-conditions: @@ -405,11 +711,17 @@ its constructor takes no arguments. - <emphasis role="bold">elimType</emphasis> &sterm; [<emphasis role="bold">using</emphasis> &sterm;] [<intros_spec>] + elimType elimType elimType T using th hyps + + Synopsis: + + elimType &sterm; [using &sterm;] &intros-spec; + + Pre-conditions: @@ -432,11 +744,17 @@ its constructor takes no arguments. - <emphasis role="bold">exact</emphasis> &sterm; + exact exact exact p + + Synopsis: + + exact &sterm; + + Pre-conditions: @@ -460,11 +778,17 @@ its constructor takes no arguments. - <emphasis role="bold">exists</emphasis> + exists exists exists + + Synopsis: + + exists + + Pre-conditions: @@ -491,11 +815,17 @@ its constructor takes no arguments. - <emphasis role="bold">fail</emphasis> + fail fail fail + + Synopsis: + + fail + + Pre-conditions: @@ -518,11 +848,17 @@ its constructor takes no arguments. - <emphasis role="bold">fold</emphasis> <reduction_kind> &sterm; <pattern> + fold fold fold red t patt + + Synopsis: + + fold &reduction-kind; &sterm; &pattern; + + Pre-conditions: @@ -550,11 +886,17 @@ its constructor takes no arguments. - <emphasis role="bold">fourier</emphasis> + fourier fourier fourier + + Synopsis: + + fourier + + Pre-conditions: @@ -580,38 +922,67 @@ its constructor takes no arguments. - <emphasis role="bold">fwd</emphasis> &id; [<ident list>] + fwd fwd - fwd ...TODO + fwd H as H0 ... Hn + + Synopsis: + + fwd &id; [as &id; [&id;]…] + + Pre-conditions: - TODO. + + The type of H must be the premise of a + forward simplification theorem. + Action: - TODO. + + This tactic is under development. + It simplifies the current context by removing + H using the following methods: + forward application (by lapply) of a suitable + simplification theorem, chosen automatically, of which the type + of H is a premise, + decomposition (by decompose), + rewriting (by rewrite). + H0 ... Hn + are passed to the tactics fwd invokes, as + names for the premise they introduce. + New sequents to prove: - TODO. + + The ones opened by the tactics fwd invokes. + - <emphasis role="bold">generalize</emphasis> <pattern> [<emphasis role="bold">as</emphasis> &id;] + generalize generalize generalize patt as H + + Synopsis: + + generalize &pattern; [as &id;] + + Pre-conditions: @@ -643,69 +1014,50 @@ its constructor takes no arguments. - <emphasis role="bold">id</emphasis> + id id id - - Pre-conditions: + + Synopsis: - None. - - - - Action: - - This identity tactic does nothing without failing. + id - - New sequents to prove: - - None. - - - - - - - <emphasis role="bold">injection</emphasis> &sterm; - injection - injection p - - Pre-conditions: - p must have type K t1 ... tn = K t'1 ... t'n where both argument lists are empty if -K takes no arguments. + None. Action: - It derives new hypotheses by injectivity of - K. + This identity tactic does nothing without failing. New sequents to prove: - The new sequent to prove is equal to the current sequent - with the additional hypotheses - t1=t'1 ... tn=t'n. + None. - <emphasis role="bold">intro</emphasis> [&id;] + intro intro intro H + + Synopsis: + + intro [&id;] + + Pre-conditions: @@ -734,11 +1086,17 @@ its constructor takes no arguments. - <emphasis role="bold">intros</emphasis> <intros_spec> + intros intros intros hyps + + Synopsis: + + intros &intros-spec; + + Pre-conditions: @@ -771,11 +1129,17 @@ its constructor takes no arguments. - <emphasis role="bold">inversion</emphasis> &sterm; + inversion inversion inversion t + + Synopsis: + + inversion &sterm; + + Pre-conditions: @@ -806,38 +1170,87 @@ its constructor takes no arguments. - <emphasis role="bold">lapply</emphasis> [<emphasis role="bold">depth=</emphasis>&nat;] &sterm; [<emphasis role="bold">to</emphasis> <term list>] [<emphasis role="bold">using</emphasis> &id;] + lapply lapply - lapply ??? + + lapply linear depth=d t + to t1, ..., tn as H + + + Synopsis: + + + lapply + [linear] + [depth=&nat;] + &sterm; + [to + &sterm; + [,&sterm;…] + ] + [as &id;] + + + Pre-conditions: - TODO. + + t must have at least d + independent premises and n must not be + greater than d. + Action: - TODO. + + Invokes letin H ≝ (t ? ... ?) + with enough ?'s to reach the + d-th independent premise of + t + (d is maximum if unspecified). + Then istantiates (by apply) with + t1, ..., tn + the ?'s corresponding to the first + n independent premises of + t. + Usually the other ?'s preceding the + n-th independent premise of + t are istantiated as a consequence. + If the linear flag is specified and if + t, t1, ..., tn + are (applications of) premises in the current context, they are + cleared. + New sequents to prove: - TODO. + + The ones opened by the tactics lapply invokes. + - <emphasis role="bold">left</emphasis> + left left left + + Synopsis: + + left + + Pre-conditions: @@ -864,11 +1277,17 @@ its constructor takes no arguments. - <emphasis role="bold">letin</emphasis> &id; <emphasis role="bold">≝</emphasis> &sterm; + letin letin letin x ≝ t + + Synopsis: + + letin &id; ≝ &sterm; + + Pre-conditions: @@ -892,11 +1311,17 @@ its constructor takes no arguments. - <emphasis role="bold">normalize</emphasis> <pattern> + normalize normalize normalize patt + + Synopsis: + + normalize &pattern; + + Pre-conditions: @@ -919,39 +1344,18 @@ its constructor takes no arguments. - - <emphasis role="bold">paramodulation</emphasis> <pattern> - paramodulation - paramodulation patt - - - - Pre-conditions: - - TODO. - - - - Action: - - TODO. - - - - New sequents to prove: - - TODO. - - - - - - <emphasis role="bold">reduce</emphasis> <pattern> + reduce reduce reduce patt + + Synopsis: + + reduce &pattern; + + Pre-conditions: @@ -975,11 +1379,17 @@ its constructor takes no arguments. - <emphasis role="bold">reflexivity</emphasis> + reflexivity reflexivity reflexivity + + Synopsis: + + reflexivity + + Pre-conditions: @@ -1004,11 +1414,17 @@ its constructor takes no arguments. - <emphasis role="bold">replace</emphasis> <pattern> <emphasis role="bold">with</emphasis> &sterm; + replace change change patt with t + + Synopsis: + + replace &pattern; with &sterm; + + Pre-conditions: @@ -1036,11 +1452,17 @@ its constructor takes no arguments. - <emphasis role="bold">rewrite</emphasis> [<emphasis role="bold"><</emphasis>|<emphasis role="bold">></emphasis>] &sterm; <pattern> + rewrite rewrite rewrite dir p patt + + Synopsis: + + rewrite [<|>] &sterm; &pattern; + + Pre-conditions: @@ -1071,11 +1493,17 @@ its constructor takes no arguments. - <emphasis role="bold">right</emphasis> + right right right + + Synopsis: + + right + + Pre-conditions: @@ -1102,11 +1530,17 @@ its constructor takes no arguments. - <emphasis role="bold">ring</emphasis> + ring ring ring + + Synopsis: + + ring + + Pre-conditions: @@ -1133,11 +1567,17 @@ its constructor takes no arguments. - <emphasis role="bold">simplify</emphasis> <pattern> + simplify simplify simplify patt + + Synopsis: + + simplify &pattern; + + Pre-conditions: @@ -1161,11 +1601,17 @@ its constructor takes no arguments. - <emphasis role="bold">split</emphasis> + split split split + + Synopsis: + + split + + Pre-conditions: @@ -1191,13 +1637,59 @@ its constructor takes no arguments. + + + subst + subst + subst + + + + Synopsis: + + subst + + + + Pre-conditions: + + None. + + + + Action: + + For each premise of the form + H: x = t or H: t = x + where x is a local variable and + t does not depend on x, + the tactic rewrites H wherever + x appears clearing H and + x afterwards. + + + + New sequents to prove: + + The one opened by the applied tactics. + + + + + - <emphasis role="bold">symmetry</emphasis> + symmetry symmetry The tactic symmetry symmetry + + Synopsis: + + symmetry + + Pre-conditions: @@ -1221,11 +1713,17 @@ its constructor takes no arguments. - <emphasis role="bold">transitivity</emphasis> &sterm; + transitivity transitivity transitivity t + + Synopsis: + + transitivity &sterm; + + Pre-conditions: @@ -1250,11 +1748,17 @@ the current sequent to prove. - <emphasis role="bold">unfold</emphasis> [&sterm;] <pattern> + unfold unfold unfold t patt + + Synopsis: + + unfold [&sterm;] &pattern; + + Pre-conditions: @@ -1282,11 +1786,17 @@ the current sequent to prove. - <emphasis role="bold">whd</emphasis> <pattern> + whd whd whd patt + + Synopsis: + + whd &pattern; + + Pre-conditions: