Skip to content

feat: grind annotations, Iter(M).sum and toList+take+(productive combinator) composition lemmas#12414

Draft
datokrat wants to merge 3 commits intopaul/base/iterators/improvements2from
paul/iterators/improvements2
Draft

feat: grind annotations, Iter(M).sum and toList+take+(productive combinator) composition lemmas#12414
datokrat wants to merge 3 commits intopaul/base/iterators/improvements2from
paul/iterators/improvements2

Conversation

@datokrat
Copy link
Contributor

@datokrat datokrat commented Feb 10, 2026

This PR adds (1) grind annotations, (2) Iter(M).sum with lemmas and (3) several new lemmas about composition of iterator combinators (map, take, drop, takeWhile, zip) and marks many existing lemmas with the grind = attribute. The new lemmas establish equalities such as ((it.map f).take k).toList = (it.take k).toList.map f, which are useful for equational reasoning on productive iterators.

@datokrat datokrat added the changelog-library Library label Feb 10, 2026
@datokrat datokrat force-pushed the paul/iterators/improvements2 branch from f17c051 to 3702bb8 Compare February 10, 2026 17:28
@datokrat datokrat changed the base branch from master to paul/base/iterators/improvements2 February 10, 2026 17:29
@datokrat datokrat changed the title feat: grind annotations and toList+take+(productive combinator) composition lemmas feat: grind annotations, Iter(M).sum and toList+take+(productive combinator) composition lemmas Feb 10, 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 10, 2026
@leanprover-bot
Copy link
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-02-09 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-10 18:29:12)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Feb 10, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Feb 10, 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 10, 2026
@mathlib-lean-pr-testing mathlib-lean-pr-testing bot added the breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan label Feb 10, 2026
@mathlib-lean-pr-testing
Copy link

Mathlib CI status (docs):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaks-mathlib This is not necessarily a blocker for merging: but there needs to be a plan 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.

2 participants