aboutsummaryrefslogtreecommitdiff
path: root/test-suite/success/destruct.v
AgeCommit message (Collapse)Author
2019-01-24Make `Instance` without a body always open a proof.Maxime Dénès
2018-05-17Introduce an option to allow nested lemma, and turn it off by default.Théo Zimmermann
2017-11-08Merge PR #922: New beta-iota compatibility refinementsMaxime Dénès
2017-10-19Moving bug numbers to BZ# format in the test-suite.Théo Zimmermann
Compared to the original proposition (59a594b in #960), this commit only changes files containing bug numbers that are also PR numbers.
2017-08-21Fixing a new regresssion with 8.4 wrt to βι-normalization of created hyps.Hugo Herbelin
Formerly, mk_refgoals in logic.ml was applying full βι on new Meta-based goals. We simulate part of this βι-normalization in pose_all_metas_as_evars. I suspect that we don't βι-normalize goals more than in 8.4 by doing that, since all Metas would have eventually gone to mk_refgoals, but difficult to know for sure as there were probably metas turned to evars (and hence a priori not βι-normalized) even when logic.ml was used more pervasively. However, βι-normalizing is a priori a better heuristic than no βι-normalizing, independently of what it was in 8.4 and before (even if, ideally, I would personally lean towards preferring a "chirurgical" substitution with reduction only at the place of substitution).
2016-02-13Do not give a name to anonymous evars anymore. See bug #4547.Pierre-Marie Pédrot
The current solution may not be totally ideal though. We generate names for anonymous evars on the fly at printing time, based on the Evar_kind data they are wearing. This means in particular that the printed name of an anonymous evar may change in the future because some unrelate evar has been solved or introduced.
2015-12-05Changing "destruct !hyp" into "destruct (hyp)" (and similarly for induction)Hugo Herbelin
based on a suggestion of Guillaume M. (done like this in ssreflect). This is actually consistent with the hack of using "destruct (1)" to mean the term 1 by opposition to the use of "destruct 1" to mean the first non-dependent hypothesis of the goal.
2015-11-07Tests for syntax "Show id" and [id]:tac (shelved or not).Hugo Herbelin
2014-12-04Take benefit of improved name preservation of evars in e2fa65fcc.Hugo Herbelin
2014-12-02When solving ?id{args} = ?id'{args'}, give preference to ?id:=?id' ifHugo Herbelin
possible, which is the "natural" way to orient an equation. At least it matters for matching subterms against patterns, so that it is the pattern variables which are substituted if ever the subterm has itself existential variables, as in: Goal exists x, S x = x. eexists. destruct (S _).
2014-11-18Fixing a little bug with nested but convertible occurrences in "destruct at".Hugo Herbelin
2014-11-14Preserving the good effect of 014e5ac92a on not leaving dangling localHugo Herbelin
definitions while keeping some compatibility on when to generalize when an index also occur in a parameter (effect on PersistentUnionFind for instance).
2014-11-13Removing yet another source of remaining local definitions.Hugo Herbelin
2014-11-06Restoring clear_flag (thanks a lot to jonikelee to notice it).Hugo Herbelin
2014-11-06Optimizing when to clear generalized hypotheses in destruct.Hugo Herbelin
Removing blocking of generalization on destructed hypothesis introduced on Nov 2. It was a bad idea as shown by bug #3790 on eliminating v:Vector n, keeping an equality.
2014-11-06Removing "destruct" test not yet working.Hugo Herbelin
2014-11-03Subtle swap of lines to preserve VarInstance src field before checkingHugo Herbelin
for residual unifiable evars (otherwise "thin" from logic.ml, erases the src field) + typo.
2014-11-03Fix to 844431761 on improving elimination with indices, getting rid ofHugo Herbelin
intrusive residual local definitions + more conservative strategy for which variables are not generalized (point 2 of 4df1ddc6d6bd07073).
2014-11-02Improving elimination with indices, getting rid of intrusive residualHugo Herbelin
local definitions...
2014-11-02Some reorganization of the code for destruct/induction:Hugo Herbelin
- It removes some redundancies. - It fixes failures when destructing a term mentioning goal hypotheses x1, ..., xn or a term which is a section variable x when this term is in a type with indices, and the indices also occur in the type of one of x1, ..., xn, or of x. - It fixes non-respect of eliminator type when completing pattern possibly given by a prefix. - It fixes b2e1d4ea930c which was dealing with the case when the term was a section variable (it was unfortunately also breaking some compatibility about which variables variable were generalized in induction and which variables were automatically cleared because unselected).
2014-11-02Fixing file destruct.v.Hugo Herbelin
2014-10-31Enlarge the cases where the like first selection is used in destruct.Hugo Herbelin
This is now a "like first" strategy iff there is no occurrences selected in either the goal or in one of the hypotheses possibly given in an "in" clause. Before, it was "like first" if and only if no "in" clause was given at all.
2014-10-31Listing a few examples of destruct showing unsatisfactory behaviors.Hugo Herbelin
2014-10-31Avoid "destruct H" to apply on H itself when H is a section variable.Hugo Herbelin
Need some contorsion for not using the general scheme of naming based which uses the hypothesis name as base ident, and for instead keeping a name generated on the type of the section variable, as it was before for section variables (example of incompatibility in FMapPositive).
2014-10-27Making destruct on idents with maximal implicit arguments working, byHugo Herbelin
keeping them as open holes. When these arguments are class instances, this restores compatibility with the 8.4 search for subterms from non-fully applied patterns which was using conversion on the instances.
2014-10-27Ensuring compatibility when an hypothesis used for destruct isHugo Herbelin
dependent in the goal without being fully applied: it cannot be erased. This used to work in 8.4 when the hypothesis was in an empty type. I fixed this and (somehow arbitrarily) generalized the non-erasing to other inductive types instead of failing.
2014-10-27Fixing clash in test destruct.v.Hugo Herbelin
2014-10-26Fixing destruct/induction with a using clause on a non-inductive type,Hugo Herbelin
that was broken by commit bf01856940 + use types from induction scheme to restrict selection of pattern + accept matching from partially applied term when using "using".
2014-10-25This commit introduces changes in induction and destruct.Hugo Herbelin
The main change is that selection of subterm is made similar whether the given term is fully applied or not. - The selection of subterm now works as follows depending on whether the "at" is given, of whether the subterm is fully applied or not, and whether there are incompatible subterms matching the pattern. In particular, we have: "at" given | subterm fully applied | | incompatible subterms | | | Y Y - it works like in 8.4 Y N - this was broken in 8.4 ("at" was ineffective and it was finding all subterms syntactically equal to the first one which matches) N Y Y it now finds all subterms like the first one which matches while in 8.4 it used to fail (I hope it is not a too risky in-draft for a semantics we would regret...) (e.g. "destruct (S _)" on goal "S x = S y + S x" now selects the two occurrences of "S x" while it was failing before) N Y N it works like in 8.4 N N - it works like in 8.4, selecting all subterms like the first one which matches - Note that the "historical" semantics, when looking for a subterm, to select all subterms that syntactically match the first subterm to match the pattern (looking from left to right) is now internally called "like first". - Selection of subterms can now find the type by pattern-matching (useful e.g. for "induction (nat_rect _ _ _ _)") - A version of Unification.w_unify w/o any conversion is used for finding the subterm: it could be easily replaced by an other matching algorithm. In particular, "destruct H" now works on a goal such as "H:True -> x<=y |- P y". Secondary change is in the interpretation of terms with existential variables: - When several arguments are given, interpretation is delayed at the time of execution - Because we aim at eventually accepting "edestruct c" with unresolved holes in c, we need the sigma obtained from c to be an extension of the sigma of the tactics, while before, we just type-checked c independently of the sigma of the tactic - Finishing the resolution of evars (using type classes, candidates, pending conversion problems) is made slightly cleaner: it now takes three states: a term is evaluated in state sigma, leading to state sigma' >= sigma, with evars finally solved in state sigma'' >= sigma'; we solve evars in the diff of sigma' and sigma and report the solution in sigma'' - We however renounce to give now a success semantics to "edestruct c" when "c" has unresolved holes, waiting instead for a decision on what to do in the case of a similar eapply (see mail to coqdev). An auxiliary change is that an "in" clause can be attached to each component of a "destruct t, u, v", etc. Incidentally, make_abstraction does not do evar resolution itself any longer.
2014-08-28Fixing an unnatural selection of subterms larger than expected in theHugo Herbelin
presence of let-ins.
2014-08-18Fixing unification of subterms identified by patterns.Hugo Herbelin
2011-10-25Fixing "destruct" test.herbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14594 85f007b7-540e-0410-9357-904b9bb8a0f7
2011-10-22Use full conversion for checking type of holes in destruct over aherbelin
pattern; this fixes stupid causes of failure of destruct shown by compiling contrib Containers. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14579 85f007b7-540e-0410-9357-904b9bb8a0f7
2011-06-10Fixing another bug with "_" intro pattern.herbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14185 85f007b7-540e-0410-9357-904b9bb8a0f7
2011-06-10Made use of "_" in repeated use of intros_patterns work (withherbelin
application to "destruct t as (_,H)" in the dependent case, and so on). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14183 85f007b7-540e-0410-9357-904b9bb8a0f7
2009-10-04Removal of trailing spaces.serpyc
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12371 85f007b7-540e-0410-9357-904b9bb8a0f7
2009-09-27Fixed two tests that was incorrectly typed in former revisions 12348 and 12356.herbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12359 85f007b7-540e-0410-9357-904b9bb8a0f7
2009-09-27Delay the choice of eliminator in destruct/induction until we know ifherbelin
a dependent scheme is needed or not (this allows for instance "destruct H" when H is propositional and dependent in the context to work). Modest attempt to clarify the basic components used and invariants preserved when sharing the code for functional induction and for destruct/induction. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12356 85f007b7-540e-0410-9357-904b9bb8a0f7
2009-09-17Delete trailing whitespaces in all *.{v,ml*} filesglondu
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12337 85f007b7-540e-0410-9357-904b9bb8a0f7
2009-02-23Add support for dependent "destruct" over terms in dependent types.herbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11944 85f007b7-540e-0410-9357-904b9bb8a0f7
2008-06-18Propagation des révisions 11144 et 11136 de la 8.2 vers le trunkherbelin
(résolution entre autres des bugs 1882, 1883, 1884). git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@11145 85f007b7-540e-0410-9357-904b9bb8a0f7
2008-04-13Bugs, nettoyage, et améliorations diversesherbelin
- vérification de la cohérence des ident pour éviter une option -R avec des noms non parsables (la vérification est faite dans id_of_string ce qui est très exigeant; faudrait-il une solution plus souple ?) - correction message d'erreur inapproprié dans le apply qui descend dans les conjonctions - nettoyage autour de l'échec en présence de métas dans le prim_refiner - nouveau message d'erreur quand des variables ne peuvent être instanciées - quelques simplifications et davantage de robustesse dans inversion - factorisation du code de constructor and co avec celui de econstructor and co Documentation des tactiques - edestruct/einduction/ecase/eelim et nouveautés apply - nouvelle sémantique des intropatterns disjonctifs et documentation des pattern -> et <- - relecture de certaines parties du chapitre tactique git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@10785 85f007b7-540e-0410-9357-904b9bb8a0f7
2006-12-13Dépliage du terme d'induction avant suppression quand celui-ci est unherbelin
terme arbitraire, possiblement dépendant, qui a été transformé en let-in (cf success/destruct.v) git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@9447 85f007b7-540e-0410-9357-904b9bb8a0f7
2006-05-31Fusion destruct.v et Destruct.v (MacOS X ne sait pas distinguer la casseherbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@8884 85f007b7-540e-0410-9357-904b9bb8a0f7
2005-12-21Abandon tests syntaxe v7; remplacement des .v par des fichiers en syntaxe v8herbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@7693 85f007b7-540e-0410-9357-904b9bb8a0f7
2004-06-02commentaireherbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5789 85f007b7-540e-0410-9357-904b9bb8a0f7
2004-05-20Protection du destruct pour vérifier que ce n'est pas une anomalie, à ↵herbelin
défaut de faire réussir la tactique git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5754 85f007b7-540e-0410-9357-904b9bb8a0f7
2004-05-02Ajout test bug 711herbelin
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5720 85f007b7-540e-0410-9357-904b9bb8a0f7