X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fhelp%2FC%2Fsec_tactics.xml;h=ff8d099c0180101efba481ec0f7cd16ed0308ace;hb=76917216be769918258c90e486bb7c06d81b70b4;hp=fb695879f35cb92c8748f9b937647b8ce0b5fbd6;hpb=9c67c1566df112f5c35d752361bd02b6a3742993;p=helm.git diff --git a/matita/help/C/sec_tactics.xml b/matita/help/C/sec_tactics.xml index fb695879f..ff8d099c0 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; + + - absurd &term; + absurd absurd absurd P + + Synopsis: + + absurd &sterm; + + Pre-conditions: @@ -33,11 +46,17 @@ - apply &term; + 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. + + + + + assumption assumption assumption + + Synopsis: + + assumption + + Pre-conditions: @@ -96,20 +176,26 @@ - auto [depth=&nat;] [width=&nat;] [paramodulation] [full] + 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; @@ -130,23 +216,42 @@ - clear &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 +264,17 @@ - clearbody &id; + clearbody clearbody clearbody H + + Synopsis: + + clearbody &id; + + Pre-conditions: @@ -188,11 +299,17 @@ - change <pattern> with &term; + change change change patt with t + + Synopsis: + + change &pattern; with &sterm; + + Pre-conditions: @@ -220,11 +337,17 @@ - constructor &nat; + constructor constructor constructor n + + Synopsis: + + constructor &nat; + + Pre-conditions: @@ -257,6 +380,12 @@ contradiction + + Synopsis: + + contradiction + + Pre-conditions: @@ -281,11 +410,17 @@ - cut &term; [as &id;] + cut cut cut P as H + + Synopsis: + + cut &sterm; [as &id;] + + Pre-conditions: @@ -312,50 +447,126 @@ - decompose &id; [&id;]… [<intros_spec>] + decompose decompose - decompose ??? + + decompose (T1 ... Tn) + H as H1 ... Hm + + + Synopsis: + + + decompose + [( + &id;… + )] + [&id;] + [as &id;…] + + + Pre-conditions: - TODO. + + H must inhabit one inductive type among + + T1 ... Tn + + and the types of a predefined list. + Action: - TODO. + + Runs + elim H H1 ... Hm + , clears H and tries to run itself + recursively on each new identifier introduced by + elim in the opened sequents. + If H is not provided tries this operation on + each premise in the current context. + New sequents to prove: - TODO. + + The ones generated by all the elim tactics run. + - - discriminate &term; - 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 +579,17 @@ its constructor takes no arguments. - elim &term; [using &term;] [<intros_spec>] + elim elim elim t using th hyps + + Synopsis: + + elim &sterm; [using &sterm;] &intros-spec; + + Pre-conditions: @@ -405,11 +622,17 @@ its constructor takes no arguments. - elimType &term; [using &term;] [<intros_spec>] + elimType elimType elimType T using th hyps + + Synopsis: + + elimType &sterm; [using &sterm;] &intros-spec; + + Pre-conditions: @@ -432,11 +655,17 @@ its constructor takes no arguments. - exact &term; + exact exact exact p + + Synopsis: + + exact &sterm; + + Pre-conditions: @@ -465,6 +694,12 @@ its constructor takes no arguments. exists + + Synopsis: + + exists + + Pre-conditions: @@ -491,11 +726,17 @@ its constructor takes no arguments. - fail - failt + fail + fail fail + + Synopsis: + + fail + + Pre-conditions: @@ -518,11 +759,17 @@ its constructor takes no arguments. - fold <reduction_kind> &term; <pattern> + fold fold fold red t patt + + Synopsis: + + fold &reduction-kind; &sterm; &pattern; + + Pre-conditions: @@ -555,6 +802,12 @@ its constructor takes no arguments. fourier + + Synopsis: + + fourier + + Pre-conditions: @@ -580,38 +833,67 @@ its constructor takes no arguments. - fwd &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. + - generalize <pattern> [as &id;] + generalize generalize generalize patt as H + + Synopsis: + + generalize &pattern; [as &id;] + + Pre-conditions: @@ -648,64 +930,45 @@ its constructor takes no arguments. id - - Pre-conditions: - - None. - - - - Action: + + Synopsis: - This identity tactic does nothing without failing. + id - - New sequents to prove: - - None. - - - - - - - injection &term; - 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. - intro [&id;] + intro intro intro H + + Synopsis: + + intro [&id;] + + Pre-conditions: @@ -734,11 +997,17 @@ its constructor takes no arguments. - intros <intros_spec> + intros intros intros hyps + + Synopsis: + + intros &intros-spec; + + Pre-conditions: @@ -771,11 +1040,17 @@ its constructor takes no arguments. - inversion &term; + inversion inversion inversion t + + Synopsis: + + inversion &sterm; + + Pre-conditions: @@ -806,27 +1081,70 @@ its constructor takes no arguments. - lapply [depth=&nat;] &term; [to <term list>] [using &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. + @@ -838,6 +1156,12 @@ its constructor takes no arguments. left + + Synopsis: + + left + + Pre-conditions: @@ -864,11 +1188,17 @@ its constructor takes no arguments. - letin &id; ≝ &term; + letin letin letin x ≝ t + + Synopsis: + + letin &id; ≝ &sterm; + + Pre-conditions: @@ -892,11 +1222,17 @@ its constructor takes no arguments. - normalize <pattern> + normalize normalize normalize patt + + Synopsis: + + normalize &pattern; + + Pre-conditions: @@ -919,39 +1255,18 @@ its constructor takes no arguments. - - paramodulation <pattern> - paramodulation - paramodulation patt - - - - Pre-conditions: - - TODO. - - - - Action: - - TODO. - - - - New sequents to prove: - - TODO. - - - - - - reduce <pattern> + reduce reduce reduce patt + + Synopsis: + + reduce &pattern; + + Pre-conditions: @@ -980,6 +1295,12 @@ its constructor takes no arguments. reflexivity + + Synopsis: + + reflexivity + + Pre-conditions: @@ -1004,11 +1325,17 @@ its constructor takes no arguments. - replace <pattern> with &term; + replace change change patt with t + + Synopsis: + + replace &pattern; with &sterm; + + Pre-conditions: @@ -1036,11 +1363,17 @@ its constructor takes no arguments. - rewrite [<|>] &term; <pattern> + rewrite rewrite rewrite dir p patt + + Synopsis: + + rewrite [<|>] &sterm; &pattern; + + Pre-conditions: @@ -1076,6 +1409,12 @@ its constructor takes no arguments. right + + Synopsis: + + right + + Pre-conditions: @@ -1107,6 +1446,12 @@ its constructor takes no arguments. ring + + Synopsis: + + ring + + Pre-conditions: @@ -1133,11 +1478,17 @@ its constructor takes no arguments. - simplify <pattern> + simplify simplify simplify patt + + Synopsis: + + simplify &pattern; + + Pre-conditions: @@ -1166,6 +1517,12 @@ its constructor takes no arguments. split + + Synopsis: + + split + + Pre-conditions: @@ -1191,6 +1548,46 @@ 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. + + + + + symmetry symmetry @@ -1198,6 +1595,12 @@ its constructor takes no arguments. symmetry + + Synopsis: + + symmetry + + Pre-conditions: @@ -1221,11 +1624,17 @@ its constructor takes no arguments. - transitivity &term; + transitivity transitivity transitivity t + + Synopsis: + + transitivity &sterm; + + Pre-conditions: @@ -1250,11 +1659,17 @@ the current sequent to prove. - unfold [&term;] <pattern> + unfold unfold unfold t patt + + Synopsis: + + unfold [&sterm;] &pattern; + + Pre-conditions: @@ -1282,11 +1697,17 @@ the current sequent to prove. - whd <pattern> + whd whd whd patt + + Synopsis: + + whd &pattern; + + Pre-conditions: