Skip to content

fix(crush): the activated simplify databases apply to every reduction of crush - #1227

Merged
strub merged 1 commit into
comm-algebrafrom
fix/crush-hint-dbs
Nov 3, 2026
Merged

strub merged 1 commit into
comm-algebrafrom
fix/crush-hint-dbs

Conversation

@strub

@strub strub commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Since 61ffaf6 (proof-local [-delta op] / [+delta op] overrides), the head reductions of t_lazy_match (the shape matching of split, elim, ... under /> and progress) and the closing simplification of t_crush / t_crush_fwd take the proof-local simplify context reduced to its opacity overrides, i.e. the default database only. A rule of a database activated with hint +db is invisible exactly in the reductions that perform delta: a rule whose argument needs an unfolding first (g (sw c c).`2 with g c = true in db) never applies inside crush, while the same rule in the default database does.

Found on the jasmin-nist Keccak safety proofs after moving the ByteArrayInit hints to a named database: the witnesses go through swap_, and auto => /> * left is_init ((swap_ a b).`2) k l goals to the provers (two files failing, avx2 22 s -> 199 s).

These reductions now take the goal's whole simplify context (activated databases, local rules, opacity overrides), as the simplification passes do. Regression test tests/hint-db-crush.ec (fails on comm-algebra, passes here).

… of crush

The head reductions that expose the goal's shape in t_lazy_match (split,
elim, ... under `/>` and `progress`) and the closing simplification of
t_crush / t_crush_fwd took the proof-local simplify context reduced to
its opacity overrides, that is the default database only. A rule of a
database activated with `hint +db` was then invisible exactly where delta
happens: a rule whose argument needs an unfolding first (`g (sw c c).`2`
with `g c = true` in `db`) never applied inside crush, while the same rule
in the default database did.

These reductions now take the goal's whole simplify context (activated
databases, local rules, opacity overrides), as the simplification passes
do. Regression test in tests/hint-db-crush.ec.
@strub
strub force-pushed the fix/crush-hint-dbs branch from cfc7503 to 0587206 Compare November 3, 2026 12:12
@strub strub self-assigned this Nov 3, 2026
@strub strub added the yolo-pr Don't bother reviewing, I will merge label Nov 3, 2026
@strub
strub merged commit f088e54 into comm-algebra Nov 3, 2026
20 checks passed
@strub
strub deleted the fix/crush-hint-dbs branch November 3, 2026 12:51
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