Skip to content

Conversation

@datokrat
Copy link
Contributor

@datokrat datokrat commented Feb 6, 2026

This PR improves the slice API with lemmas for drop/take operations on Subarray and more lemmas about Std.Slice.fold, Std.Slice.foldM and Std.Slice.forIn. It also changes the simp and grind annotations for Slice-related lemmas. Lemmas converting between slices of different shapes are no longer simp/grind-annotated because they often complicated lemmas and hindered automation.

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

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 9b7a8eb7c88aa4c93cb59ba07777c1827daec2fa --onto 75d7f7eb227bc54dc6ea3d8ead090ee4180debaf. You can force Mathlib CI using the force-mathlib-ci label. (2026-02-06 15:54:42)

@leanprover-bot
Copy link
Collaborator

leanprover-bot commented Feb 6, 2026

Reference manual CI status:

  • ❗ Reference manual CI will not be attempted unless your PR branches off the nightly-with-manual branch. Try git rebase 9b7a8eb7c88aa4c93cb59ba07777c1827daec2fa --onto 75d7f7eb227bc54dc6ea3d8ead090ee4180debaf. You can force reference manual CI using the force-manual-ci label. (2026-02-06 15:54:44)
  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-02-08 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-09 14:14:42)

@datokrat datokrat force-pushed the paul/slices/improvements2 branch from 352363c to a7b0fc6 Compare February 9, 2026 07:49
mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 9, 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 9, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 9, 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 9, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

@datokrat datokrat marked this pull request as ready for review February 10, 2026 08:59
@datokrat datokrat requested a review from TwoFX as a code owner February 10, 2026 08:59
@datokrat datokrat added the changelog-library Library label Feb 10, 2026
@datokrat
Copy link
Contributor Author

!radar

@leanprover-radar
Copy link

leanprover-radar commented Feb 10, 2026

Benchmark results for 8e874ca against 39c26fc are in! @datokrat

  • 🟥 build//instructions: +4.8G (+0.04%)

Medium changes (1🟥)

  • 🟥 build/module/Init.Data.Slice.Lemmas//bytes .olean: +16kiB (+22.96%)

Small changes (6✅, 12🟥)

  • 🟥 build/module/Init.Data.Slice.Array.Lemmas//bytes .ilean: +15kiB (+16.56%)
  • 🟥 build/module/Init.Data.Slice.Array.Lemmas//bytes .olean: +40kiB (+19.09%)
  • 🟥 build/module/Init.Data.Slice.Array.Lemmas//bytes .olean.private: +311kiB (+35.13%) (reduced significance based on *//lines)
  • 🟥 build/module/Init.Data.Slice.Array.Lemmas//bytes .olean.server: +5kiB (+14.78%)
  • 🟥 build/module/Init.Data.Slice.Array.Lemmas//instructions: +2.8G (+23.00%) (reduced significance based on *//lines)
  • build/module/Init.Data.Slice.Lemmas//bytes .ilean: -3kiB (-22.54%) (reduced significance based on *//lines)
  • build/module/Init.Data.Slice.Lemmas//bytes .olean.server: -1kiB (-27.20%) (reduced significance based on *//lines)
  • 🟥 build/module/Init.Data.Slice.Lemmas//instructions: +69.2M (+7.40%) (reduced significance based on absolute threshold)
  • 🟥 build/module/Init.Data.Slice.List.Lemmas//instructions: +485.4M (+7.67%) (reduced significance based on *//lines)
  • build/module/Lean.Elab.PreDefinition.MkInhabitant//instructions: -18.0M (-0.54%)
  • 🟥 build/module/Lean.Elab.Tactic.Grind.LintExceptions//instructions: +23.6M (+1.79%)
  • build/module/Lean.Meta.HasNotBit//instructions: -15.3M (-1.42%)
  • build/module/Lean.Server.Completion//instructions: -21.0M (-1.16%)
  • build/module/Lean.Server.Snapshots//instructions: -20.8M (-1.97%)
  • 🟥 build/module/Std.Data.Iterators.Lemmas.Producers.Slice//bytes .ilean: +4kiB (+31.38%) (reduced significance based on *//lines)
  • 🟥 build/module/Std.Data.Iterators.Lemmas.Producers.Slice//bytes .olean.private: +10kiB (+56.35%) (reduced significance based on *//lines)
  • 🟥 build/module/Std.Data.Iterators.Lemmas.Producers.Slice//bytes .olean.server: +696B (+16.32%)
  • 🟥 build/module/Std.Data.Iterators.Lemmas.Producers.Slice//instructions: +155.3M (+22.17%) (reduced significance based on *//lines)

@datokrat datokrat added this pull request to the merge queue Feb 10, 2026
Merged via the queue into master with commit df26bea Feb 10, 2026
30 of 31 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-library Library 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.

3 participants