Repository navigation
fix(simplify): honour the proof-local head filter on every path - #1213
Merged
Merged
Conversation
The proof-local default head filter set by `hint -[f]` / `hint +[f]`
was only read by the explicit `simplify` / `cbv` tactics. Every other
simplification path -- `/=`, `//`, `done`, `progress`, `trivial`,
`auto`, and the conversion checks behind `apply` / `exact` / `rewrite`
-- threaded the proof-local context (`user_local`) but never its head
filter, so a rule the proof had excluded kept firing there:
hint simplify fE.
lemma t : f 0 = 1.
proof. hint -[f]. rewrite /=. (* rewrote `f 0` anyway *)
Resolve the default filter in `EcReduction.reduce_user_gen` instead:
an explicit use-site filter wins, otherwise the proof-local default of
`ri.user_local` applies. Every path that threads `user_local` now
honours it, and the front-ends need no special casing.
Also thread the proof-local context into the remaining bare `full_red`
reductions of the goal layer, so that they see locally added rules and
the filter as well: `t_lazy_match`, `t_intros_x`, `t_elim_r`, the
rewrite-pattern search of `LowRewrite`, and `process_delta`.
Not covered: the name computation of intro patterns and the generic
`destruct_product` of `EcProofTyping`, which have no goal at hand.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The proof-local default head filter set by
hint -[f]/hint +[f]was only read by the explicit
simplify/cbvtactics. Every othersimplification path --
/=,//,done,progress,trivial,auto, and the conversion checks behindapply/exact/rewrite-- threaded the proof-local context (
user_local) but never its headfilter, so a rule the proof had excluded kept firing there:
Resolve the default filter in
EcReduction.reduce_user_geninstead:an explicit use-site filter wins, otherwise the proof-local default of
ri.user_localapplies. Every path that threadsuser_localnowhonours it, and the front-ends need no special casing.
Also thread the proof-local context into the remaining bare
full_redreductions of the goal layer, so that they see locally added rules and
the filter as well:
t_lazy_match,t_intros_x,t_elim_r, therewrite-pattern search of
LowRewrite, andprocess_delta.Not covered: the name computation of intro patterns and the generic
destruct_productofEcProofTyping, which have no goal at hand.