aboutsummaryrefslogtreecommitdiff
path: root/tactics
AgeCommit message (Collapse)Author
2014-10-21Small invariants in Rewrite code.Pierre-Marie Pédrot
2014-10-21Fixing decompose_app_rel in Rewrite.Pierre-Marie Pédrot
The old implementation did not beta-iota normalize before observing the head of the term, resulting in stange bugs.
2014-10-21Using new clausenv in rewrite.Pierre-Marie Pédrot
2014-10-20Removing re-typecheking from "refine" in no-check mode of the newHugo Herbelin
convert_concl/convert_hyp. This was actually probably the main source of inefficiency introduced on Oct 9 (see e.g. CoLoR), rather than nf_enter, as suspected in 3c2723f.
2014-10-17Revert "Essai où assert_style n'est utilisé que si pas visuellement une ↵Hugo Herbelin
équation;" which was committed by mistake. This reverts commit a53b44aa042cfded28c34205074f194de7e2e4ee.
2014-10-17Essai où assert_style n'est utilisé que si pas visuellement une équation;Hugo Herbelin
2014-10-16Relaxing again the test on types of replacements in tactic changeHugo Herbelin
(continuation of 3087e0012eb12833a79b and 1f05decaea97f1dc). It may be the case that the new expression lives in a higher sorts and the context where it is substituted in supports it. So, it is too strong to expect that, when the substituted objects are types, the sort of the new one is smaller than the sort of the original one. Consider e.g. Goal @eq Type nat nat. change nat with (@id Type nat). which is a correct replacement, even if (id Type nat) is in a higher sort. Introducing typing in "contextually" would be a big change for a little numbers of uses, so we instead (hackily) recheck the whole term (even though typing with evars uses evar_conv which accept to unify Type with Set, leading to wrongly accept "Goal @eq Set nat nat. change nat with (@id Type nat).". Evar conv is however rejecting Prop=Type.)
2014-10-16In convert_concl/convert_hyp: nf_enter -> enter.Hugo Herbelin
(Maybe one of the source of inefficiency introduced on Oct 9 - see e.g. CoLoR.)
2014-10-16Refresh to avoid algebraic universes on the right.Matthieu Sozeau
2014-10-16Goal: remove some functions from the compatibility layer.Arnaud Spiwack
The rest will take more work.
2014-10-16Goal: remove most of the API (make [Goal.goal] concrete).Arnaud Spiwack
We are left with the compatibility layer and a handful of primitives which require some thought to move.
2014-10-16Proofview.Refine: remove the handle type, and simplify the API.Arnaud Spiwack
Now, usual function from Evarutil are used to define evars instead of the variants from Proofview.Refine. The [update] primitive which tried to patch the difference between pretyping functions and the refine primitive is now replaced by the identity function.
2014-10-15Fix for bug #3618.Matthieu Sozeau
Fix typeclass resolution which was considering as subgoals of a tactic application unrelated pre-existing undefined evars.
2014-10-15Remaining tactics of the Auto module were put in the monad.Pierre-Marie Pédrot
2014-10-14Fix bug #3698: stack overflow due to eta+canonical structures inMatthieu Sozeau
unification.
2014-10-13Fixing "change" and "fold" after convert_hyp/convert_concl moved toHugo Herbelin
new proof engine in e824d4293. Because of the expansion made by "fold" and possibly by "change", checking the order of hypotheses is necessary in general in "reduce". Before, it was done by side-effect on reference "check", now it has to be explicit. To do for optimization: flag each of the red_expr conversion strategy according to whether they really need a check. Also renamed the e_reduce family to e_change to emphasize that some expansion can occur and that typing has to be rechecked. This fixes recent failure of CoLoR (and probably Ergo).
2014-10-13Add support for deactivating type class inference from induction/destruct.Hugo Herbelin
2014-10-10Fix segfault in native compiler on int31 division.Maxime Dénès
Thanks to Yves for reporting it!
2014-10-09Propagating name of goal to main subgoal in cut and conversion tactics.Hugo Herbelin
2014-10-09A version of convert_concl and convert_hyp in new proof engine.Hugo Herbelin
Not very optimized though (if we apply convert_hyp on any hyp, a new evar will be generated for every different hyp...).
2014-10-08Forgotten hints.ml{,i} files in 38b34dfffcc.Hugo Herbelin
2014-10-07Splitting out of auto.ml a file hints.ml dedicated to hints so as toHugo Herbelin
being able to export hints without tactics, vm, etc. to come with. Some functions moved to the new proof engine.
2014-10-07Removing debugging information committed by mistake.Hugo Herbelin
2014-10-06Make tclEFFECTS also update the env in the proof monadEnrico Tassi
2014-10-05Semantic fix of a refine in Rewrite.Pierre-Marie Pédrot
This code was wrong but luckily unused. It instantiated an evar with an instance where the let-in bindings were removed.
2014-10-05Check compatibility of types in change depending on whether it is aHugo Herbelin
term or a type. Continuation of 9a82982c1eb.
2014-10-03Fixing #3657 (check that both sides of a "change with" have the sameHugo Herbelin
type, what is necessary condition to ensure that the conversion of bodies will not raise an anomaly).
2014-10-02Fixing bug #2810 (autounfold on local variable declared as hint but cleared).Hugo Herbelin
2014-10-01Fixing nice printing of error reporting with ml tactics bound to ltac names.Hugo Herbelin
2014-10-01Made Tacsubst independent of Auto at linking time so that Tacenv doesHugo Herbelin
not draw Auto.
2014-09-30Seeing IntroWildcard as an action intro pattern rather than as a naming patternHugo Herbelin
(the action is "clear"). Added subst_intropattern which was missing since the introduction of ApplyOn intro patterns. Still to do: make "intros _ ?id" working without interferences when "id" is precisely the internal name used for hypotheses to discard.
2014-09-30Add syntax for naming new goals in refine: writing ?[id] instead of _Hugo Herbelin
will name the goal id; writing ?[?id] will use the first fresh name available based with prefix id. Tactics intro, rename, change, ... from logic.ml now preserve goal name; cut preserves goal name on its main premise.
2014-09-29Merging some functions from evarutil.ml/evd.ml.Hugo Herbelin
- Removed collect_evars which does not consider instance (use evars_of_term instead). - Also removed evars_of_evar_info which did not filter context (use evars_of_filterered_evar_info instead). This is consistent with printing goal contexts in the filtered way. Anyway, as of today, afaics goals filters are trivial because (if I interpret evarutil.ml correctly), evars with non-trivial filter necessarily occur in a conv pb. Conversely, conv pbs being solved when tactics are called, there should not be an evar used as a goal with a non-trivial filter.
2014-09-27Keyed unification option, compiling the whole standard libraryMatthieu Sozeau
(but deactivated still). Set Keyed Unification to activate the option, which changes subterm selection to _always_ use full conversion _after_ finding a subterm whose head/key matches the key of the term we're looking for. This applies to rewrite and higher-order unification in apply/elim/destruct. Most proof scripts already abide by these semantics. For those that don't, it's usually only a matter of using: Declare Equivalent Keys f g. This make keyed unification consider f and g to match as keys. This takes care of most cases of abbreviations: typically Def foo := bar and rewriting with a bar-headed lhs in a goal mentioning foo works once they're set equivalent. For canonical structures, these hints should be automatically declared. For non-global-reference headed terms, the key is the constructor name (Sort, Prod...). Evars and metas are no keys. INCOMPATIBILITIES: In FMapFullAVL, a Function definition doesn't go through with keyed unification on.
2014-09-27Remove auto's use of dummy goal, use the proper sigma for pattern_of_constr.Matthieu Sozeau
2014-09-27Make pattern_of_constr typed so that we can infer the proper patternsMatthieu Sozeau
for primitive projections, fixing bug #3661. Also fix expand_projection so that it does enough reduction to find the inductive type of its argument.
2014-09-27Add a boolean to indicate the unfolding state of a primitive projection,Matthieu Sozeau
so as to reproduce correctly the reduction behavior of existing projections, i.e. delta + iota. Make [projection] an abstract datatype in Names.ml, most of the patch is about using that abstraction. Fix unification.ml which tried canonical projections too early in presence of primitive projections.
2014-09-27Changed semantics of induction !id when a clause is given: don'tHugo Herbelin
authoritatively erase non-generalized hypotheses dependent on id.
2014-09-27Removing the last use of tclSENSITIVE in favour of tclNEWGOALS.Pierre-Marie Pédrot
Most of the code from Goal.Refine and related was moved to the one file that was using it, wiz. tactics.ml. Some additional care should be taken to clean up even more the remaining code.
2014-09-24Rename eq_constr functions in Evd to not break backward compatibilityMatthieu Sozeau
with existing ML code.
2014-09-24Make eq_pattern_test/eq_test work up to the equivalence of primitiveMatthieu Sozeau
projections with their eta-expanded constant form.
2014-09-24Using an or_var rather than the hack with loc for coding a pure identHugo Herbelin
as a disjunctive intropattern.
2014-09-24Added support for interpreting hyp lists in tactic notations.Hugo Herbelin
2014-09-23ATBR can't compile without the fix, as it uses setoid_rewrite to rewriteMatthieu Sozeau
under binders. This might incur a significant time penalty.
2014-09-23Fix bug in setoid_rewrite introduced by PMP's commits, which was creatingMatthieu Sozeau
two versions of the rewriting lemma, keeping useless evars around. This can now happen only when the rewrite lemma is used under binders... Fix to do next.
2014-09-21Rewrite.apply_lemma is written in state passing style.Pierre-Marie Pédrot
This removes a use of Evd.merge.
2014-09-21More invariants in the code of Refine.Pierre-Marie Pédrot
The hypinfo state is now refreshed at a proper time, which should reduce the overall number of calls to [decompose_applied_relation]. The state passing nature of the program is also more explicit, removing a use of Evd.merge. This patch should preserve semantics and efficiency.
2014-09-21Removing a nonsensical Errors.push.Pierre-Marie Pédrot
2014-09-18Fixing strange evarmap leak in goals.Pierre-Marie Pédrot
Goals have to be refreshed when observed, because the evarmap may have changed between the moment where the goal was generated and the moment the goal is used.
2014-09-17Be more conservative and keep the use of eq_constr in pretyping/ functions.Matthieu Sozeau