Skip to content

fix: grind fails to prove conjunction of independently provable goals#13024

Merged
leodemoura merged 1 commit intomasterfrom
grind_12581
Mar 21, 2026
Merged

fix: grind fails to prove conjunction of independently provable goals#13024
leodemoura merged 1 commit intomasterfrom
grind_12581

Conversation

@leodemoura
Copy link
Copy Markdown
Member

This PR fixes an issue where grind could prove each conjunct individually but failed on the conjunction. The root cause: solverAction's .propagated path calls processNewFacts which drains the newFacts queue, but the resulting propagation cascade (congruence closure, or-propagation, propagateForallPropDown) can call addNewRawFact, enqueuing to the separate newRawFacts queue. These raw facts were never drained.

The fix moves Solvers.mkAction from Types.lean to Intro.lean where it can compose the core solver action with assertAll, unconditionally draining newRawFacts after every solver step.

Closes #12581

This PR fixes an issue where `grind` could prove each conjunct individually
but failed on the conjunction. The root cause: `solverAction`'s `.propagated`
path calls `processNewFacts` which drains the `newFacts` queue, but the
resulting propagation cascade (congruence closure, or-propagation,
`propagateForallPropDown`) can call `addNewRawFact`, enqueuing to the separate
`newRawFacts` queue. These raw facts were never drained.

The fix moves `Solvers.mkAction` to `Intro.lean` where it can compose the
solver action with `assertAll`, unconditionally draining `newRawFacts` after
every solver step.

Closes #12581

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leodemoura leodemoura added the changelog-tactics User facing tactics label Mar 21, 2026
@leodemoura leodemoura enabled auto-merge March 21, 2026 16:55
@leodemoura leodemoura added this pull request to the merge queue Mar 21, 2026
Merged via the queue into master with commit 7897dc9 Mar 21, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-tactics User facing tactics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

grind fails to prove conjunction of two things it can prove

1 participant