casesm, cases_type, constructorm tactics #
These tactics implement repeated cases / constructor on anything satisfying a predicate.
Core tactic for casesm and cases_type. Calls cases on all fvars in g for which
matcher ldecl.type returns true.
recursive: if true, it calls itself repeatedly on the resulting subgoalsallowSplit: if false, it will skip any hypotheses wherecasesreturns more than one subgoal.throwOnNoMatch: if true, then throws an error if no match is found
Equations
Instances For
Elaborate a list of terms with holes into a list of patterns.
Equations
Instances For
Returns true if any of the patterns match the expression.
Equations
Instances For
Common implementation of casesm and casesm!.
Equations
Instances For
casesm papplies thecasestactic to a hypothesish : typeiftypematches the patternp.casesm p_1, ..., p_napplies thecasestactic to a hypothesish : typeiftypematches one of the given patterns.casesm* pis a more efficient and compact version of· repeat casesm p. It is more efficient because the pattern is compiled once.casesm! ponly appliescasesif the number of resulting subgoals is <= 1.
Example: The following tactic destructs all conjunctions and disjunctions in the current context.
casesm* _ ∨ _, _ ∧ _
Equations
Instances For
casesm papplies thecasestactic to a hypothesish : typeiftypematches the patternp.casesm p_1, ..., p_napplies thecasestactic to a hypothesish : typeiftypematches one of the given patterns.casesm* pis a more efficient and compact version of· repeat casesm p. It is more efficient because the pattern is compiled once.casesm! ponly appliescasesif the number of resulting subgoals is <= 1.
Example: The following tactic destructs all conjunctions and disjunctions in the current context.
casesm* _ ∨ _, _ ∧ _
Equations
Instances For
Common implementation of cases_type and cases_type!.
Equations
Instances For
cases_type Iapplies thecasestactic to a hypothesish : (I ...)cases_type I_1 ... I_napplies thecasestactic to a hypothesish : (I_1 ...)or ... orh : (I_n ...)cases_type* Iis shorthand for· repeat cases_type Icases_type! Ionly appliescasesif the number of resulting subgoals is <= 1.
Example: The following tactic destructs all conjunctions and disjunctions in the current goal.
cases_type* Or And
Equations
Instances For
cases_type Iapplies thecasestactic to a hypothesish : (I ...)cases_type I_1 ... I_napplies thecasestactic to a hypothesish : (I_1 ...)or ... orh : (I_n ...)cases_type* Iis shorthand for· repeat cases_type Icases_type! Ionly appliescasesif the number of resulting subgoals is <= 1.
Example: The following tactic destructs all conjunctions and disjunctions in the current goal.
cases_type* Or And
Equations
Instances For
Core tactic for constructorm. Calls constructor on all subgoals for which
matcher ldecl.type returns true.
recursive: if true, it calls itself repeatedly on the resulting subgoalsthrowOnNoMatch: if true, throws an error if no match is found
Equations
Instances For
Auxiliary for constructorMatching. Accumulates generated subgoals in acc.
constructorm p_1, ..., p_napplies theconstructortactic to the main goal iftypematches one of the given patterns.constructorm* pis a more efficient and compact version of· repeat constructorm p. It is more efficient because the pattern is compiled once.
Example: The following tactic proves any theorem like True ∧ (True ∨ True) consisting of
and/or/true:
constructorm* _ ∨ _, _ ∧ _, True