Skip to content

feat(simplify): proof-local reduction-opacity overrides - #1245

Merged
strub merged 1 commit into
mainfrom
feat/delta-overrides
Nov 24, 2026
Merged

strub merged 1 commit into
mainfrom
feat/delta-overrides

Conversation

@strub

@strub strub commented Nov 24, 2026

Copy link
Copy Markdown
Member

The hint clause gains two items, -delta op and +delta op, at every
granularity: proof-local, tactic-local and per call.

hint -delta f.
with hint -delta f (done).
simplify hint -delta f.

-delta op blocks the delta- and iota-reduction (match-fix) of op;
+delta op allows it, even when op is declared [opaque]. An
explicit unfolding (cbv op, rewrite /op) still unfolds.

The overrides live in the proof-local simplify context and travel with
user_local. They are consulted at the match-fix sites of
EcReduction and EcCallbyValue, and at the delta sites.

The reductions of crush that used a fixed strategy, namely the head
reductions of t_lazy_match and the closing simplification of
t_crush and t_crush_fwd, now take the whole proof-local simplify
context: its activated databases, local rules and opacity overrides.
A rule of a database activated with hint +db used to be invisible
there, so a rule that applies only after an unfolding never fired
inside />, while the same rule in the default database did.

Tests in tests/hint-delta-opacity.ec and tests/hint-db-crush.ec.

The hint clause gains two items, `-delta op` and `+delta op`, at every
granularity: proof-local, tactic-local and per call.

    hint -delta f.
    with hint -delta f (done).
    simplify hint -delta f.

`-delta op` blocks the delta- and iota-reduction (match-fix) of `op`;
`+delta op` allows it, even when `op` is declared `[opaque]`. An
explicit unfolding (`cbv op`, `rewrite /op`) still unfolds.

The overrides live in the proof-local simplify context and travel with
`user_local`. They are consulted at the match-fix sites of
EcReduction and EcCallbyValue, and at the delta sites.

The reductions of crush that used a fixed strategy, namely the head
reductions of `t_lazy_match` and the closing simplification of
`t_crush` and `t_crush_fwd`, now take the whole proof-local simplify
context: its activated databases, local rules and opacity overrides.
A rule of a database activated with `hint +db` used to be invisible
there, so a rule that applies only after an unfolding never fired
inside `/>`, while the same rule in the default database did.

Tests in tests/hint-delta-opacity.ec and tests/hint-db-crush.ec.
@strub strub self-assigned this Nov 24, 2026
@strub strub added the yolo-pr Don't bother reviewing, I will merge label Nov 24, 2026
@strub
strub merged commit b78184c into main Nov 24, 2026
20 checks passed
@strub
strub deleted the feat/delta-overrides branch November 24, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

yolo-pr Don't bother reviewing, I will merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant