aboutsummaryrefslogtreecommitdiff
path: root/tactics
AgeCommit message (Collapse)Author
2016-06-27Shrink Proofs/Obligations by default and deprecateMatthieu Sozeau
Fix bug in Shrink obligations with Program in the process. Fix implementation of shrink for abstract proofs - Update doc in term.mli to reflect the fact that let-in's are part of what is returned by [decompose_lam_assum].
2016-06-27Typeclasses: fix treatment of exceptions in compatMatthieu Sozeau
2016-06-27Typeclasses: mark unresolvable goals in new implementationMatthieu Sozeau
2016-06-27We want tclORELSE to catch exceptions on backtrackingsMatthieu Sozeau
2016-06-27Merge branch 'v8.5'Pierre-Marie Pédrot
2016-06-24Optimize the subst tactic.Pierre-Marie Pédrot
Use a much dumber algorithm to recognize the shape of equalities.
2016-06-24Optmimize the subst tactic.Pierre-Marie Pédrot
Take advantage that the provided term is always a variable in Equality.is_eq_x.
2016-06-24Optimize the subst tactic.Pierre-Marie Pédrot
Do not evar-normalize the argument provided by afterHyp.
2016-06-24Optimization in the subst tactic.Pierre-Marie Pédrot
Do not normalize all goals beforehand.
2016-06-24Optimization in the subst tactic.Pierre-Marie Pédrot
Do not evar-normalize the term to substitute with. The engine should be insensitive to this kind of modification.
2016-06-24Optimization in the subst tactic.Pierre-Marie Pédrot
We use simple variable substitution instead of full-power term matching.
2016-06-20Small optimization in clear_body.Pierre-Marie Pédrot
We do not check that an hypothesis is used in context declarations that occur before it.
2016-06-18Adding an "as" clause to specialize.Hugo Herbelin
Comments -------- - The tactic specialize conveys a somehow intuitive reasoning concept and I would support continuing maintaining it even if the design comes in my opinion with some oddities. (Note that the experience of MathComp and SSReflect also suggests that specialize is an interesting concept in itself). There are two variants to specialize: - specialize (H args) with H an hypothesis looks natural: we specialize H with extra arguments and the "as pattern" clause comes naturally as an extension of it, destructuring the result using the pattern. - specialize term with bindings makes the choice of fully applying the term filling missing expressions with bindings and to then behave as generalize. Wouldn't we like a more fine-grained approach and the result to remain in the context? In this second case, the "as" clause works as if the term were posed in the context with "pose proof".
2016-06-18Giving a more natural semantics to injection by default.Hugo Herbelin
There were three versions of injection: 1. "injection term" without "as" clause: was leaving hypotheses on the goal in reverse order 2. "injection term as ipat", first version: was introduction hypotheses using ipat in reverse order without checking that the number of ipat was the size of the injection (activated with "Unset Injection L2R Pattern Order") 3. "injection term as ipat", second version: was introduction hypotheses using ipat in left-to-right order checking that the number of ipat was the size of the injection and clearing the injecting term by default if an hypothesis (activated with "Set Injection L2R Pattern Order", default one from 8.5) There is now: 4. "injection term" without "as" clause, new version: introducing the components of the injection in the context in left-to-right order using default intro-patterns "?" and clearing the injecting term by default if an hypothesis (activated with "Set Structural Injection") The new versions 3. and 4. are the "expected" ones in the sense that they have the following good properties: - introduction in the context is in the natural left-to-right order - "injection" behaves the same with and without "as", always introducing the hypotheses in the goal what corresponds to the natural expectation as the changes I made in the proof scripts for adaptation confirm - clear the "injection" hypothesis when an hypothesis which is the natural expectation as the changes I made in the proof scripts for adaptation confirm The compatibility can be preserved by "Unset Structural Injection" or by calling "simple injection". The flag is currently off.
2016-06-18Exporting a generic argument induction_arg. As a consequence,Hugo Herbelin
simplifying and generalizing the grammar entries for injection, discriminate and simplify_eq.
2016-06-18A cleaning phase around delayed induction arg + exporting force_induction_arg.Hugo Herbelin
2016-06-18Adding eintros to respect the e- prefix policy.Hugo Herbelin
In pat%constr, creating new evars is now allowed only if "eintros" is given, i.e. "intros" checks that no evars are created, and similarly e.g. for "injection ... as ... pat%constr". The form "eintros [...]" or "eintros ->" with the case analysis or rewrite creating evars is now also supported. This is not a commitment to say that it is good to have an e- modifier to tactics. It is just to be consistent with the existing convention. It seems to me that the "no e-" variants are good for beginners. However, expert might prefer to use the e-variants by default. Opinions from teachers and users would be useful. To be possibly done: do that [= ...] work on hypotheses with side conditions or parameters based on the idea that they apply the full injection and not only the restriction of it to goals which are exactly an equality, as it is today.
2016-06-16Typeclasses:rename solve_instantiation* & use HookMatthieu Sozeau
2016-06-16Fix resolve_one_typeclass to use the new engineMatthieu Sozeau
2016-06-16Bind resolve_one_typeclass to 8.5 or 8.6 resolutionMatthieu Sozeau
2016-06-16Put autoapply back, lost during rebaseMatthieu Sozeau
2016-06-16Cleanup and refactoringMatthieu Sozeau
2016-06-16Extend Hint Mode to handle the no-head-evar caseMatthieu Sozeau
Suggested by R. Krebbers and C. Cohen, this makes modes more applicable, by allowing to trigger resolution on partially instantiated indices. This is a rough but fast approximation of the pattern on which one would like instances to apply.
2016-06-16Revise syntax of Hint CutMatthieu Sozeau
As noticed by C. Cohen it was confusingly different from standard notation.
2016-06-16Purely refactoring and code/API cleanup.Matthieu Sozeau
Fix test-suite files
2016-06-16bteauto: a Proofview.tactic for multiple goalsMatthieu Sozeau
Add an option to force backtracking at toplevel, which is used by default when calling typeclasses eauto on a set of goals. They might be depended on by other subgoals, so the tactic should be backtracking by default, a once can make it not backtrack.
2016-06-16Typeclasses: allow shelved subgoalsMatthieu Sozeau
Be more lenient, allowing non-class subgoals to remain after resolution, this seems necessary when launching resolution in goals containing evars. Also put a tclONCE when hints don't need to backtrack.
2016-06-16Minor cleanupMatthieu Sozeau
2016-06-16Typeclasses: refine the eauto tacticMatthieu Sozeau
- Treat shelved dependent subgoals that might not be resolved after some proof search correctly by restarting their resolution as soon as possible (if they are typeclasses in only_classes mode). - Treat dependencies between goals better, avoiding backtracking more often when dependencies allow.
2016-06-16Typeclasses: verbosity and Limit Intros optionsMatthieu Sozeau
To deactivate the limitation of introductions (which was added to avoid eta expansions in proof terms). This can cause huge blowups due to dumb backtracking. The arrow introduction rule is reversible, so better do it eagerly!
2016-06-16typeclass resolution: add two compatibility optionsMatthieu Sozeau
Set Typeclasses Compatibility "8.5". uses the old resolution tactic (off by default, but useful for debugging incompatibilities) Set Typeclasses Unification Compatibility "8.5". uses the old clenv unification tactic in resolution even with the new proof engine (on by default for now). Also fix the 8.5-compatible unification with the new engine resolution function, by using with_shelf and unshelve.
2016-06-16Fix incorrect caching of local hints w.r.t sectionsMatthieu Sozeau
2016-06-16Compat with ocaml 4.01Matthieu Sozeau
2016-06-16Fix iterative deepening strategy failing too earlyMatthieu Sozeau
Report limit exceeded on _any_ branch so that we pursue search if it was reached at least once. Add example by N. Tabareau in test-suite.
2016-06-16Implement limited proof search and iterative deepening.Matthieu Sozeau
Fix typo in proofview
2016-06-16Typeclasses eauto based on new proof engine,Matthieu Sozeau
with full backtracking across multiple goals.
2016-06-16A stronger invariant on the syntax of TacAssert, what allows for aHugo Herbelin
simpler re-printing of assert. Also fixing the precedence for printing "by" clause.
2016-06-16Merge 'pr/191' into trunkEnrico Tassi
2016-06-16Merge PR #100: fresh now accepts more things than just identifiers.Pierre-Marie Pédrot
2016-06-14Merge branch 'bug4450' into v8.5Matthieu Sozeau
2016-06-14Goal selectors are now tacticals and can be used as such.Cyprien Mangin
This allows to write things like this: split; 2: intro _; exact I or like this: eexists ?[x]; ?[x]: exact 0; trivial This has the side-effect on making the '?' before '[x]' mandatory.
2016-06-13Merge branch 'v8.5'Pierre-Marie Pédrot
2016-06-11Fixing a try with in apply that has become too weak in 8.5.Hugo Herbelin
Don't know however what should be the right guard to this try. Now using catchable_exception, but even in 8.4, Failure was caught, which is strange.
2016-06-09Adding a bit of documentation in the mli.Pierre-Marie Pédrot
2016-06-09Improve the interpretation scope of arguments of an ltac match.Hugo Herbelin
Now, type_scope is consistently used whether it is an hypothesis or the conclusion, and consistently not used when in "context". The question of a compatibility support, e.g., as suggested by Jason, using a scope is still open though. See reports #3050 and #4398.
2016-06-09Univs/(e)auto: fix bug #4450 polymorphic exact hintsMatthieu Sozeau
The exact and e_exact tactics were not registering the universes and constraints of the hint correctly. Now using the same connect_hint_clenv as unify_resolve, they do. Also correct the implementation of prepare_hint to normalize the universes of the hint before abstracting its undefined universes. They are going to be refreshed at each application. This means that eauto using term can use multiple different instantiations of the universes of term if term introduces new universes. If we want just one instantiation then the term should be abbreviated in the goal first.
2016-06-07Fixing #4787 (Unset Bracketing Last Introduction Pattern not working).Hugo Herbelin
2016-06-05Removing the Q_constr file.Pierre-Marie Pédrot
2016-06-05Moving Hipattern to a regular ML file.Pierre-Marie Pédrot
2016-06-05Removing PATTERN uses in Hipattern.Pierre-Marie Pédrot