8000 feat: equivalence of tree maps by Rob23oba · Pull Request #8210 · leanprover/lean4 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

feat: equivalence of tree maps #8210

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
Jun 10, 2025
Merged

Conversation

Rob23oba
Copy link
Contributor
@Rob23oba Rob23oba commented May 2, 2025

This PR adds an equivalence relation to tree maps akin to the existing one for hash maps. In order to get many congruence lemmas to eventually use for defining functions on extensional tree maps, almost all of the remaining tree map functions have also been given lemmas to relate them to list functions, although these aren't currently used to prove lemmas other than congruence lemmas.

@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 May 2, 2025
@leanprover-community-bot
Copy link
Collaborator
leanprover-community-bot commented May 2, 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 29fc6a46a86a8cc5d6214a325351a50891ff94d8 --onto d26d7973ad39eab976ed351255ee30f038439944. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-02 21:37:55)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 29fc6a46a86a8cc5d6214a325351a50891ff94d8 --onto afab374305fb2327036e4fe1ab799fc8928425b7. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-03 23:18:38)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 29fc6a46a86a8cc5d6214a325351a50891ff94d8 --onto ef603cf37d20dce48eda63f740b83480faedd613. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-05 14:22:22)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 29fc6a46a86a8cc5d6214a325351a50891ff94d8 --onto af51e3e4b1c655df43476972c4d9aeae76e49046. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-06 17:22:43)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 3481f43130125ebbae42d49582c6096aeb842e76 --onto 6ca31baa55e4b29c9667085736863f9ca840b16c. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-15 19:14:51)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 0e96318c72741c4acf837af757cb5b5304b64a60 --onto ca9b3eb75f3f794d3d526a7c37da389175b317a2. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-16 15:39:06)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 5e40f4af52c50ff670c2b09b87930b42ff30a6ba --onto 4eccb5b4792c270ad10ac059b9672a8845961079. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-22 18:05:42)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase 6afa8208ec99dd16554a9ede609706d27e2bc360 --onto 4eccb5b4792c270ad10ac059b9672a8845961079. You can force Mathlib CI using the force-mathlib-ci label. (2025-05-23 17:13:00)
  • ❗ Batteries/Mathlib CI will not be attempted unless your PR branches off the nightly-with-mathlib branch. Try git rebase ebf5fbd294b379dcaf4a7a6da0a6934b035e61d4 --onto 9b9dd8546a123d746580649b239f26c26d370d20. You can force Mathlib CI using the force-mathlib-ci label. (2025-06-05 14:57:00)

@github-actions github-actions bot added the changelog-library Library label May 3, 2025
@TwoFX
Copy link
Member
TwoFX commented May 16, 2025

(note: as long as this PR is marked as a draft, I'm assuming you don't want it to be reviewed yet. If you want me to look at something, please mark the PR as ready or ping me here or on Zulip)

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 far, just a few small remarks

@TwoFX TwoFX removed the awaiting-review Waiting for someone to review the PR label Jun 10, 2025
@Rob23oba Rob23oba marked this pull request as ready for review June 10, 2025 10:18
@Rob23oba Rob23oba requested review from digama0 and kim-em as code owners June 10, 2025 10:18
@github-actions github-actions bot added the awaiting-review Waiting for someone to review the PR label Jun 10, 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, thanks!

@@ -22,7 +22,7 @@ universe u v w

variable {α : Type u} {β : Type v} {cmp : α → α → Ordering}

namespace Std.TreeMap
namespace Std.TreeSet
Copy link
Member

Choose a reason for hiding this comment

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

Oops, nice catch.

@TwoFX TwoFX added this pull request to the merge queue Jun 10, 2025
Merged via the queue into leanprover:master with commit be4ebb8 Jun 10, 2025
14 checks passed
kim-em added a commit to leanprover/reference-manual that referenced this pull request Jun 11, 2025
algebraic-dev pushed a commit to algebraic-dev/lean4 that referenced this pull request Jun 18, 2025
This PR adds an equivalence relation to tree maps akin to the existing
one for hash maps. In order to get many congruence lemmas to eventually
use for defining functions on extensional tree maps, almost all of the
remaining tree map functions have also been given lemmas to relate them
to list functions, although these aren't currently used to prove lemmas
other than congruence lemmas.
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 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.

3 participants
0