Skip to content
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

fix: replace the compare_self simp lemma with a less generic one #7222

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

datokrat
Copy link
Contributor

This PR removes the simp attribute from ReflCmp.compare_self because it matches arbitrary function applications. Instead, a new simp lemma ReflOrd.compare_self is introduced, which only matches applications of compare.

@datokrat datokrat added the changelog-library Library label Feb 25, 2025
@nomeata
Copy link
Collaborator

nomeata commented Feb 25, 2025

Is this an alternative to #7218? Do you want to comment there that that shouldn’t be merged if you want to do it differently?

@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc February 25, 2025 08:47 Inactive
@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 25, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Feb 25, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Feb 25, 2025
@datokrat
Copy link
Contributor Author

datokrat commented Feb 25, 2025

Is this an alternative to #7218? Do you want to comment there that that shouldn’t be merged if you want to do it differently?

Yes, Markus already knows about this -- #7218 conflicts with some more recent changes, so we concluded it would be best if I made the necessary changes. I'll add such a comment (didn't notice that the PR is not from Markus himself!)

@datokrat datokrat marked this pull request as ready for review February 25, 2025 09:19
@datokrat datokrat requested a review from TwoFX as a code owner February 25, 2025 09:19
@github-actions github-actions bot temporarily deployed to lean-lang.org/lean4/doc February 25, 2025 09:52 Inactive
@TwoFX TwoFX enabled auto-merge February 25, 2025 09:53
@TwoFX TwoFX added this pull request to the merge queue Feb 25, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Feb 25, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Feb 25, 2025
Merged via the queue into master with commit 2377f35 Feb 25, 2025
16 checks passed
luisacicolini pushed a commit to opencompl/lean4 that referenced this pull request Feb 25, 2025
…eanprover#7222)

This PR removes the `simp` attribute from `ReflCmp.compare_self` because
it matches arbitrary function applications. Instead, a new `simp` lemma
`ReflOrd.compare_self` is introduced, which only matches applications of
`compare`.

---------

Co-authored-by: Paul Reichert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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