feat(simplify): delta[f g] forces unfolding of listed operators - #1108
Merged
Conversation
bgregoir
approved these changes
Sep 3, 2026
`simplify delta` unfolds every transparent definition and `simplify f g`
unfolds only `f` and `g`, but nothing could express both at once: full
delta plus forced unfolding of operators declared `[opaque]`. The
grammar had no production for it, and `pdelta : pqsymbol list option`
could not represent it (`None` = all transparent, `Some l` = only `l`).
`pdelta` is now a record `{ pd_all; pd_ops }`. `delta[f g]` sets both,
accepted after `simplify`/`cbv` and in the keyword-less form, and
composes with a trailing `hint` clause. Listed operators reduce with
`Force`, the rest with `IfTransparent` when `pd_all` is set and
`IfApplied` otherwise. Existing spellings keep their meaning.
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.
simplify deltaunfolds every transparent definition andsimplify f gunfolds only
fandg, but nothing could express both at once: fulldelta plus forced unfolding of operators declared
[opaque]. Thegrammar had no production for it, and
pdelta : pqsymbol list optioncould not represent it (
None= all transparent,Some l= onlyl).pdeltais now a record{ pd_all; pd_ops }.delta[f g]sets both,accepted after
simplify/cbvand in the keyword-less form, andcomposes with a trailing
hintclause. Listed operators reduce withForce, the rest withIfTransparentwhenpd_allis set andIfAppliedotherwise. Existing spellings keep their meaning.