Skip to content

Conversation

@fgdorais
Copy link
Contributor

@fgdorais fgdorais commented Sep 30, 2025

This PR adds lemmas forall_fin_zero and exists_fin_zero. It also marks lemmas forall_fin_zero, forall_fin_one, forall_fin_two, exists_fin_zero, exists_fin_one, exists_fin_two with simp attribute.

Closes #10629

@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 Sep 30, 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 dfd3d185300df044fa087d3fa166cb6fb3bd8269 --onto 7d55c033e1f0ad8cb7c2b9ab72e5db40ce192222. You can force Mathlib CI using the force-mathlib-ci label. (2025-09-30 19:45:03)

@leanprover-bot
Copy link
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 dfd3d185300df044fa087d3fa166cb6fb3bd8269 --onto d3dda9f6d4428a906c096067ecb75e432afc4615. You can force reference manual CI using the force-manual-ci label. (2025-09-30 19:45:04)

@digama0
Copy link
Collaborator

digama0 commented Sep 30, 2025

this needs benchmarking, I think the reason it doesn't exist is because it has a too-generic discrimination tree key

@fgdorais
Copy link
Contributor Author

fgdorais commented Sep 30, 2025

I'd be happy to see a benchmark but this suggests it's not too generic:

#discr_tree_simp_key forall_fin_zero -- ∀  (Fin 0)
#discr_tree_simp_key exists_fin_zero -- @Exists (Fin 0) _

See also the RFC discussion #10629

@TwoFX
Copy link
Member

TwoFX commented Oct 7, 2025

!bench

@leanprover-radar
Copy link

leanprover-radar commented Oct 7, 2025

Benchmark results for 107bef7 against dfd3d18 are in! @TwoFX

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 107bef7.
There were significant changes against commit dfd3d18:

  Benchmark   Metric                       Change
  ==========================================================
+ stdlib      let-to-have transformation    -2.0%  (-32.8 σ)
+ stdlib      process pre-definitions       -3.3% (-118.8 σ)

@TwoFX
Copy link
Member

TwoFX commented Oct 7, 2025

@fgdorais, this PR looks fine to me but it's still a draft, is it still waiting for something?

@fgdorais
Copy link
Contributor Author

fgdorais commented Oct 7, 2025

The RFC hasn't been approved.

@fgdorais fgdorais marked this pull request as ready for review October 7, 2025 14:35
@fgdorais fgdorais requested a review from kim-em as a code owner October 7, 2025 14:35
@TwoFX TwoFX added the changelog-library Library label Oct 7, 2025
@TwoFX TwoFX added this pull request to the merge queue Oct 7, 2025
Merged via the queue into leanprover:master with commit 43da17a Oct 7, 2025
23 of 24 checks passed
nomeata added a commit to leanprover-community/batteries that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog-library Library 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.

RFC: add simp lemmas for quantification over Fin 0

6 participants