Skip to content

feat: hash map lemmas for filter, map and filterMap#7400

Merged
TwoFX merged 107 commits intoleanprover:masterfrom
Rob23oba:hashmap-filter-map
Apr 17, 2025
Merged

feat: hash map lemmas for filter, map and filterMap#7400
TwoFX merged 107 commits intoleanprover:masterfrom
Rob23oba:hashmap-filter-map

Conversation

@Rob23oba
Copy link
Contributor

@Rob23oba Rob23oba commented Mar 8, 2025

This PR adds lemmas for the filter, map and filterMap functions of the hash map.

@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 Mar 8, 2025
@ghost
Copy link

ghost commented Mar 8, 2025

Mathlib CI status (docs):

  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase b9f8a859e7f354f026de7c910e17ce29e23678f9 --onto ca0d8226192e7c0cdcc71d6322c3226ad4f73f30. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-08 20:51:52)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase da2d877019c3cc393c24b18919e4c7829bc3b9fe --onto ca0d8226192e7c0cdcc71d6322c3226ad4f73f30. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-09 07:27:37)
  • ✅ Mathlib branch lean-pr-testing-7400 has successfully built against this PR. (2025-03-10 18:41:15) View Log
  • ✅ Mathlib branch lean-pr-testing-7400 has successfully built against this PR. (2025-03-10 19:39:30) View Log
  • ✅ Mathlib branch lean-pr-testing-7400 has successfully built against this PR. (2025-03-11 17:12:12) View Log
  • ✅ Mathlib branch lean-pr-testing-7400 has successfully built against this PR. (2025-03-11 19:35:28) View Log
  • 🟡 Mathlib branch lean-pr-testing-7400 build against this PR was cancelled. (2025-03-11 21:01:27) View Log
  • 🟡 Mathlib branch lean-pr-testing-7400 build this PR didn't complete normally. (2025-03-11 21:45:47) View Log
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 137f5595204c48ec9442711f0e9e43228e40a07c --onto 8fc8e8ed19ef218022f5a94cbf5e472e3b777e44. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-13 12:33:12)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 137f5595204c48ec9442711f0e9e43228e40a07c --onto c1d145e9d70569274ac868805b4a8591d09718af. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-13 17:49:59)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 07ee2eea21545fb055f1a8bdb848e2a419502c97 --onto c1d145e9d70569274ac868805b4a8591d09718af. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-13 20:58:56)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 07ee2eea21545fb055f1a8bdb848e2a419502c97 --onto d5f01f2db1efd18034421ae2f40120d1c608f3c0. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-15 22:06:58)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5a5e83c26c2c74948e32e103e155fb57079e8e6c --onto d32a7b250ad20477d55034488d89a050fbf70af5. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-17 18:22:15)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase a5348f4bdc95c5a327817b5c62ee9f99ec8a0bfa --onto a97813e11f962bc422a03c30b7e29dd2eefb92c8. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-19 18:26:39)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase c66cb00c0fbdc28636a0ebe7c0ac264e68ecd15b --onto a97813e11f962bc422a03c30b7e29dd2eefb92c8. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-20 20:18:48)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5fb990fcbd8d56e61e4276adcbe6deb19b5d7c64 --onto 060b2fe46fe728934744ee52271b92ab74cbd5b4. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-28 18:00:17)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 107eb845847456ef554a763b16d579284b11ac53 --onto 12a21e79c71880424321d62e60449863c504048a. You can force Mathlib CI using the force-mathlib-ci label. (2025-03-31 10:49:08)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 107eb845847456ef554a763b16d579284b11ac53 --onto 2edfe2e9cffd55e3c79291628ae091b942291ec9. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-01 10:51:40)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 83067d67d65efe4818205ddb3f9b2ab824735b10 --onto 1ee7e1a9d8a67d1d8dcf6a17ac5c92bc2c7e0fac. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-03 15:10:01)
  • ❗ Batteries CI can not be attempted yet, as the nightly-testing-2025-04-06 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Batteries CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-06 13:06:43)
  • ❗ Mathlib CI can not be attempted yet, as the nightly-testing-2025-04-06 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-mathlib, Mathlib CI should run now. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-07 09:18:08)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase acd6b13d7692c2bf2314c09e406a178407d02743 --onto da55b2e19b6af219f43f3599f1a72151799eb524. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-07 15:52:51)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase acd6b13d7692c2bf2314c09e406a178407d02743 --onto 0f2ede45d50d8fc8cc542517867a9d6a29f805a3. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-08 07:43:03)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase acd6b13d7692c2bf2314c09e406a178407d02743 --onto 388b6f045bd6d79df9b503d55eef6688ceb8f647. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-09 17:50:35)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 0669a0470407e46d1ae26be8e201e214d5a91e74 --onto deef1c2739a331899b0e536312e65e9815059014. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-12 09:24:34)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 7cca594a4a567ad801dc0cefc3d1adcd0e141ec7 --onto 020b8834c3e06da1cd1682431b6fa8d52206c8ec. You can force Mathlib CI using the force-mathlib-ci label. (2025-04-16 14:44:30)

ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 10, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 10, 2025
@ghost ghost added the builds-mathlib CI has verified that Mathlib builds against this PR label Mar 10, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 10, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 10, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 11, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 11, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 11, 2025
ghost pushed a commit to leanprover-community/mathlib4 that referenced this pull request Mar 11, 2025
ghost pushed a commit to leanprover-community/batteries that referenced this pull request Mar 11, 2025
@github-actions github-actions bot added awaiting-review Waiting for someone to review the PR and removed awaiting-author Waiting for PR author to address issues labels Apr 13, 2025
Copy link
Member

@TwoFX TwoFX left a comment

Choose a reason for hiding this comment

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

Looking very good, so this is mainly blocked on #7855.

else
haveI h' : k' ∈ m := mem_alter_of_beq_eq_false (Bool.not_eq_true _ ▸ heq) |>.mp h
m[k']'h' :=
m[(k')]'h' :=
Copy link
Member

Choose a reason for hiding this comment

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

Why is this suddenly needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

Without the brackets Lean inteprets this term as containing the string ']' and because of that raises an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

A space helps alternatively as well.

Copy link
Contributor Author

@Rob23oba Rob23oba Apr 16, 2025

Choose a reason for hiding this comment

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

To be fair: it doesn't raise an error, but the formatting goes all weird because it treats ']' as a character literal and then [... := as an unclosed bracket.

@TwoFX TwoFX added awaiting-author Waiting for PR author to address issues and removed awaiting-review Waiting for someone to review the PR labels Apr 14, 2025
@Rob23oba Rob23oba marked this pull request as ready for review April 16, 2025 14:15
@Rob23oba Rob23oba requested a review from kim-em as a code owner April 16, 2025 14:15
@github-actions github-actions bot added the changelog-library Library label Apr 16, 2025
@github-actions github-actions bot added awaiting-review Waiting for someone to review the PR and removed awaiting-author Waiting for PR author to address issues labels Apr 16, 2025
Copy link
Member

@TwoFX TwoFX left a comment

Choose a reason for hiding this comment

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

Great work as always, thanks a lot!

@TwoFX TwoFX added this pull request to the merge queue Apr 17, 2025
Merged via the queue into leanprover:master with commit acfc9c5 Apr 17, 2025
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-review Waiting for someone to review the PR builds-mathlib CI has verified that Mathlib builds against this PR 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.

4 participants