8000 feat: add `Meta.letToHave` and the `let_to_have` tactic by kmill · Pull Request #8954 · leanprover/lean4 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: add Meta.letToHave and the let_to_have tactic #8954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 24, 2025

Conversation

kmill
Copy link
Collaborator
@kmill kmill commented Jun 24, 2025

This PR adds a procedure that efficiently transforms let expressions into have expressions (Meta.letToHave). This is exposed as the let_to_have tactic.

It uses the withTrackingZetaDelta technique: the expression is typechecked, and any let variables that don't enter the zeta delta set are nondependent. The procedure uses a number of heuristics to limit the amount of typechecking performed. For example, it is ok to skip subexpressions that do not contain fvars, mvars, or lets.

This PR adds a procedure that efficiently transforms `let` expressions into `have` expressions (`Meta.letToHave`). This is exposed as the `let_to_have` tactic.
@kmill kmill 8000 requested review from leodemoura and kim-em as code owners June 24, 2025 01:21
@kmill kmill added the changelog-language Language features, tactics, and metaprograms label Jun 24, 2025
@kmill kmill enabled auto-merge June 24, 2025 01:23
@kmill kmill added this pull request to the merge queue Jun 24, 2025
@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 Jun 24, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 91a4e17b6d69afc77b1babcc3bb37f9833ff6b21 --onto db499e96aac8ad654c8ed5ab40c4e6885d38c9a1. You can force Mathlib CI using the force-mathlib-ci label. (2025-06-24 01:46:37)

Merged via the queue into leanprover:master with commit 71cf266 Jun 24, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-language Language features, tactics, and metaprograms 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.

2 participants
0