-
Notifications
You must be signed in to change notification settings - Fork 608
feat: make let
and have
term syntaxes be consistent
#8914
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR modifies `let` and `have` syntaxes to be consistent with each other. Adds configuration options; for example, `have` is equivalent to `let +nondep`, for *nondependent* lets. Other options include `+usedOnly` (for `let_tmp`), `+zeta` (for `letI`/`haveI`), and `+postponeValue` (for `let_delayed)`. There is also `let (eq := h) x := v; b` for introducing `h : x = v` when elaborating `b`. The `eq` option works for pattern matching as well, for example `let (eq := h) (x, y) := p; b`. Future PRs will add these options to tactic syntax as well, once a stage0 update has been done.
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jun 21, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jun 21, 2025
Mathlib CI status (docs):
|
let
and have
syntaxes consistentlet
and have
term syntaxes be consistent
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/batteries
that referenced
this pull request
Jun 22, 2025
leanprover-community-mathlib4-bot
added a commit
to leanprover-community/mathlib4
that referenced
this pull request
Jun 22, 2025
kmill
added a commit
to kmill/lean4
that referenced
this pull request
Jun 22, 2025
This PR does a first pass at cleaning things up after a stage0 update for leanprover#8914.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 22, 2025
This PR does a first pass at cleaning things up for #8914 after a stage0 update.
kmill
added a commit
to kmill/lean4
that referenced
this pull request
Jun 22, 2025
…ormat This PR is a followup to leanprover#8914, fixing an oversight where `letIdDeclBinders` is was not updated with the new format. This just means that we will need another stage0 update and cleanup. This PR does stage0 cleanup that is possible at this moment.
kmill
added a commit
to kmill/lean4
that referenced
this pull request
Jun 22, 2025
This PR finishes post-stage0-cleanup after leanprover#8914 and leanprover#8929. Also: - adds configuration options for `haveI` and `letI` terms. - adds `letConfig` parser alias
wkrozowski
pushed a commit
to wkrozowski/lean4
that referenced
this pull request
Jun 24, 2025
) This PR modifies `let` and `have` term syntaxes to be consistent with each other. Adds configuration options; for example, `have` is equivalent to `let +nondep`, for *nondependent* lets. Other options include `+usedOnly` (for `let_tmp`), `+zeta` (for `letI`/`haveI`), and `+postponeValue` (for `let_delayed)`. There is also `let (eq := h) x := v; b` for introducing `h : x = v` when elaborating `b`. The `eq` option works for pattern matching as well, for example `let (eq := h) (x, y) := p; b`. Future PRs will add these options to tactic syntax, once a stage0 update has been done.
wkrozowski
pushed a commit
to wkrozowski/lean4
that referenced
this pull request
Jun 24, 2025
This PR does a first pass at cleaning things up for leanprover#8914 after a stage0 update.
wkrozowski
pushed a commit
to wkrozowski/lean4
that referenced
this pull request
Jun 24, 2025
…ormat (leanprover#8929) This PR is a followup to leanprover#8914, fixing an oversight where `letIdDeclBinders` is was not updated with the new format. This relies on some bootstrapping code to stay in place, but we do bootstrap cleanup that is currently possible.
wkrozowski
pushed a commit
to wkrozowski/lean4
that referenced
this pull request
Jun 24, 2025
This PR finishes post-stage0-cleanup after leanprover#8914 and leanprover#8929. Also: - adds configuration options for `haveI` and `letI` terms. - adds `letConfig` parser alias
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
builds-mathlib
CI has verified that Mathlib builds against this PR
changelog-language
Language features, tactics, and metaprograms
toolchain-available
A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR modifies
let
andhave
term syntaxes to be consistent with each other. Adds configuration options; for example,have
is equivalent tolet +nondep
, for nondependent lets. Other options include+usedOnly
(forlet_tmp
),+zeta
(forletI
/haveI
), and+postponeValue
(forlet_delayed)
. There is alsolet (eq := h) x := v; b
for introducingh : x = v
when elaboratingb
. Theeq
option works for pattern matching as well, for examplelet (eq := h) (x, y) := p; b
.Future PRs will add these options to tactic syntax, once a stage0 update has been done.