Skip to content

perf: try letToHave for dependent lets in cbv#12856

Draft
wkrozowski wants to merge 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/cbv-lettohave
Draft

perf: try letToHave for dependent lets in cbv#12856
wkrozowski wants to merge 1 commit intoleanprover:masterfrom
wkrozowski:wojciech/cbv-lettohave

Conversation

@wkrozowski
Copy link
Copy Markdown
Contributor

This PR makes the cbv tactic try letToHave on dependent let bindings
before falling back to zeta reduction. When the conversion succeeds, the
resulting non-dependent let is beta-reduced directly, avoiding unnecessary
zeta expansion.

This PR makes the `cbv` tactic try `letToHave` on dependent let bindings
before falling back to zeta reduction. When the conversion succeeds, the
resulting non-dependent let is beta-reduced directly, avoiding unnecessary
zeta expansion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wkrozowski wkrozowski requested a review from leodemoura as a code owner March 9, 2026 17:04
@wkrozowski wkrozowski added the changelog-tactics User facing tactics label Mar 9, 2026
@wkrozowski
Copy link
Copy Markdown
Contributor Author

!bench

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Mar 9, 2026

Benchmark results for b5a3c41 against e2b500b are in. There are no significant changes. @wkrozowski

  • 🟥 build//instructions: +27.3M (+0.00%)

Small changes (1✅, 1🟥)

  • 🟥 build/module/Lean.Meta.Tactic.Cbv.Main//instructions: +89.9M (+1.42%) (reduced significance based on *//lines)
  • lake/inundation/env//task-clock: -7ms (-4.44%)

@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 Mar 9, 2026
@mathlib-lean-pr-testing
Copy link
Copy Markdown

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase e2b500b204cacbb3149f42feda880c8bdfcab7db --onto 333ab1c6f0ce11f33551d6a736054cb72812cad9. You can force Mathlib CI using the force-mathlib-ci label. (2026-03-09 18:11:35)

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase e2b500b204cacbb3149f42feda880c8bdfcab7db --onto a165292462a973c20d3cc8c8b23a3ac2334a2a4a. You can force reference manual CI using the force-manual-ci label. (2026-03-09 18:11:37)

@wkrozowski wkrozowski marked this pull request as draft March 9, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-tactics User facing tactics 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.

3 participants