Skip to content

Conversation

@linesthatinterlace
Copy link
Contributor

@linesthatinterlace linesthatinterlace commented Nov 7, 2025

This PR improves the API for List.indexesOf and List.findIdxs.

This depends on #1506. This is depended on by #1507

@github-actions github-actions bot added the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Nov 7, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Nov 7, 2025
@leanprover-community-bot
Copy link
Collaborator

leanprover-community-bot commented Nov 7, 2025

Mathlib CI status (docs):

@linesthatinterlace linesthatinterlace force-pushed the idxsOf branch 2 times, most recently from d62488a to ecfd677 Compare November 10, 2025 10:03
@eric-wieser
Copy link
Member

c) This allows us to prove (with minimal labour - i.e. automation is handling most of it!) a neat enumeration result between indices of a list and the collection of elements with their counts.

I think this would be best split to a separate PR.

@linesthatinterlace
Copy link
Contributor Author

Agreed re: separate PR. I am currently working on splitting this one out. See #1506 which focuses on the name change.

@linesthatinterlace
Copy link
Contributor Author

Please ignore my force pushes above - I was trying to rebase onto #1506 and I think something badly messed up.

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author. label Nov 10, 2025
@linesthatinterlace
Copy link
Contributor Author

It's possible we should change the if in findIdxsValues to bif - there is some inconsistency about this in the library in general I think but I think bif is more common.

@linesthatinterlace linesthatinterlace changed the title feat: Extend the API of findIdxs and idxsOf and add enumeration functions. feat: Extend the API of findIdxs and idxsOf Nov 12, 2025
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author. label Nov 18, 2025
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict This PR has merge conflicts with the `main` branch which must be resolved by the author. label Nov 18, 2025
Copy link
Collaborator

@fgdorais fgdorais left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the docstrings with examples and document the use of start.

@fgdorais fgdorais added this pull request to the merge queue Nov 24, 2025
Merged via the queue into leanprover-community:main with commit 2688408 Nov 24, 2025
1 check passed
@github-actions github-actions bot removed the awaiting-review This PR is ready for review; the author thinks it is ready to be merged. label Nov 24, 2025
mathlib-bors bot pushed a commit to leanprover-community/mathlib4 that referenced this pull request Nov 25, 2025
After [batteries#1500](leanprover-community/batteries#1500) is merged:

- [x] Edit the lakefile to point to leanprover-community/batteries:main
- [x] Run lake update batteries
- [x] Merge leanprover-community/mathlib4:master
- [ ] Wait for CI and merge

Co-authored-by: leanprover-community-mathlib4-bot <[email protected]>
Co-authored-by: Wrenna Robson <[email protected]>
Co-authored-by: F. G. Dorais <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants