Skip to content

fix: avoid exposing Fin.foldl implementation - #14554

Draft
kernelpanic888 wants to merge 2 commits into
leanprover:masterfrom
kernelpanic888:codex/simp-heartbeats-14540
Draft

fix: avoid exposing Fin.foldl implementation#14554
kernelpanic888 wants to merge 2 commits into
leanprover:masterfrom
kernelpanic888:codex/simp-heartbeats-14540

Conversation

@kernelpanic888

@kernelpanic888 kernelpanic888 commented Jul 25, 2026

Copy link
Copy Markdown

This PR restores the performance boundary inside Fin.foldl, preventing simp only from descending through the recursive loop and exhausting the default heartbeat budget.

The outer Fin.foldl remains @[expose] so existing kernel reduction continues to work; only the inner loop is no longer semireducible.

Closes #14540.

The regression test simplifies the issue expression in a hypothesis at the default heartbeat limit. Follow-up commit 12c7e25f6c also preserves the existing finFoldKernelReduce behavior exposed by full CI.

@github-actions github-actions Bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jul 25, 2026
@mathlib-lean-pr-testing

Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2026-07-25 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2026-07-25 20:06:11)

@leanprover-bot leanprover-bot added the builds-manual CI has verified that the Lean Language Reference builds against this PR label Jul 25, 2026
@leanprover-bot

leanprover-bot commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Reference manual CI status:

leanprover-bot added a commit to leanprover/reference-manual that referenced this pull request Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

builds-manual CI has verified that the Lean Language Reference builds against this PR toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression in v4.33.0-rc1: simp triggers a max heartbeats error

3 participants