Skip to content

fix: simp +arith and grind loop on normalized Int equalities#13033

Merged
leodemoura merged 2 commits intomasterfrom
grind_12812
Mar 22, 2026
Merged

fix: simp +arith and grind loop on normalized Int equalities#13033
leodemoura merged 2 commits intomasterfrom
grind_12812

Conversation

@leodemoura
Copy link
Copy Markdown
Member

This PR adds r == e guards to the norm_eq_var and norm_eq_var_const branches of Int.Linear.simpEq?. Without these guards, simpEq? returns a non-trivial proof for already-normalized equations like x = -1, causing exists_prop_congr to fire repeatedly and build an infinitely growing term.

The existing Nat.simpCnstrPos? already had the equivalent guard (if r != lhs then ... else return none).

Closes #12812

)

This PR adds `r == e` guards to the `norm_eq_var` and `norm_eq_var_const`
branches of `Int.Linear.simpEq?`. Without these guards, `simpEq?` returns
a non-trivial proof for already-normalized equations like `x = -1`, causing
`exists_prop_congr` to fire repeatedly and build an infinitely growing term.

Closes #12812

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leodemoura leodemoura added bug Something isn't working changelog-tactics User facing tactics and removed bug Something isn't working labels Mar 22, 2026
@leodemoura leodemoura enabled auto-merge March 22, 2026 03:36
@leodemoura leodemoura disabled auto-merge March 22, 2026 03:36
@leodemoura leodemoura enabled auto-merge March 22, 2026 03:37
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@leodemoura leodemoura added this pull request to the merge queue Mar 22, 2026
Merged via the queue into master with commit dbfd0d3 Mar 22, 2026
15 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 and simp +arith cause deep recursion involving negative integer literal

1 participant