aboutsummaryrefslogtreecommitdiff
path: root/mathcomp/field/separable.v
AgeCommit message (Collapse)Author
2018-04-16[separable] put clear switch near viewEnrico
Dear devs, in an attempt to simplify the code of intro patterns we came up with a proposal that: - simplifies the code of the plugin - breaks only one line in the entire mathcomp, the one fixed by this patch. The code we want to simplify is the one deferring clear switches inside an intro pattern. The implementation is tricky because just delaying the clear switch until the end of the pattern is not enough, for example: ``` move=> {x} /andP[x y]. ``` In this case `x` is both cleared and used. In order to be able to use `x`, given that the clear has not been performed yet, we rename `x` into `_x_` (when `{x}` is executed) so that when `x` is later executed we can use the name `x`, and then `.` is executed clear `_x_` instead of `x`. So systematically "always rename now & clear later" seem to be OK, but it is not. The extra complication is that "rename" may break later intro pattern using terms as views. Eg ``` move=> {x} /andP[Ha Hb] /x. ``` What the code does today is: - when `{x}` is execute look-ahead in the patter and see if `x` is used as a name to be introduced - if so, "rename" - otherwise don't rename (just delay) This way of doing things is not only complicated but also incomplete, Eg ``` move=> {x} /orP[x | /x]. ``` would misbehave, since the look-ahead is not "semantic". Anyway, the proposed behavior is: - `{x}` always renames now and clears (the renamed) later - `{clears}/views` is always "compiled" as `/views{clears}` (most of the occurrences in the library are ok with this simpler rule, but for the one fixed in this PR). - bonus: support `{}/view` (as in `rewrite {}rule`) to signal that the immediately following `view` has to be cleared, that is `{}/v` compiled as `/v{v}`. What do you think? ``` ```
2018-02-21Change Implicit Arguments to Arguments in fieldJasper Hugunin
2018-02-06running semi-automated linting on the whole libraryCyril Cohen
2017-10-30Fix obsolete vernacular syntax for locality.Maxime Dénès
It was emitting a deprecation warning and will soon be removed from Coq.
2016-11-07update copyright bannerAssia Mahboubi
2015-12-04Remove spurious injectionsGeorges Gonthier
2015-07-28update copyright bannerEnrico Tassi
2015-07-17Updating files + reorganizing everythingCyril Cohen
2015-04-09field for v8.5Cyril Cohen
2015-03-09Initial commitEnrico Tassi