Skip to content

fix: let Meta.zetaReduce zeta reduce have expressions#12695

Merged
kmill merged 3 commits intomasterfrom
kmill_fix_10850
Feb 27, 2026
Merged

fix: let Meta.zetaReduce zeta reduce have expressions#12695
kmill merged 3 commits intomasterfrom
kmill_fix_10850

Conversation

@kmill
Copy link
Collaborator

@kmill kmill commented Feb 25, 2026

This PR fixes a bug in Meta.zetaReduce where have expressions were not being zeta reduced. It also adds a feature where applications of local functions are beta reduced, and another where zeta-delta reduction can be disabled. These are all controllable by flags:

  • zetaDelta (default: true) enables unfolding local definitions
  • zetaHave (default: true) enables zeta reducing have expressions
  • beta (default: true) enables beta reducing applications of local definitions

Closes #10850

@kmill kmill added the changelog-language Language features and metaprograms label Feb 25, 2026
@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 Feb 25, 2026
@leanprover-bot
Copy link
Collaborator

leanprover-bot commented Feb 25, 2026

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-02-23-rev2 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-02-25 17:21:15)
  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 38682c4d4a31d4c717ff98c05c0dc8809f8c5400 --onto 8038a8b8904f89ad9542c8eda11379f8f006eab1. You can force reference manual CI using the force-manual-ci label. (2026-02-26 18:55:04)
  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase adf3e5e6612e709c65e8edabae6b54590ca46c4d --onto 8038a8b8904f89ad9542c8eda11379f8f006eab1. You can force reference manual CI using the force-manual-ci label. (2026-02-26 23:26:12)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 25, 2026
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Feb 25, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 25, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Feb 25, 2026
@mathlib-lean-pr-testing
Copy link

mathlib-lean-pr-testing bot commented Feb 25, 2026

Mathlib CI status (docs):

  • ✅ Mathlib branch lean-pr-testing-12695 has successfully built against this PR. (2026-02-25 18:16:22) View Log
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 38682c4d4a31d4c717ff98c05c0dc8809f8c5400 --onto c595413fccaa47ebdc399d9b817c17425687fc26. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-26 18:55:01)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase adf3e5e6612e709c65e8edabae6b54590ca46c4d --onto c595413fccaa47ebdc399d9b817c17425687fc26. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-26 23:26:11)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 25, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 25, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 26, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 26, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 26, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 26, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

This PR fixes a bug in `Meta.zetaReduce` where `have` expressions were not being zeta reduced. It also adds a feature where applications of local functions are beta reduced while zeta reduced, and another where zeta-delta reduction can be disabled. These are all controllable by flags:
- `zetaDelta` (default: true) enables unfolding local definitions
- `zetaHave` (default: true) enables zeta reducing `have` expressions
- `beta` (default: true) enables beta reducing applications of local definitions

Closes #10850
@kmill kmill added this pull request to the merge queue Feb 27, 2026
Merged via the queue into master with commit 005f6ae Feb 27, 2026
17 checks passed
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 and metaprograms mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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.

have expressions are not zeta-reduced using Meta.zetaReduce

2 participants