chore: avoid declaring duplicate instances LE String and LT String#39003
Open
TwoFX wants to merge 1 commit intoleanprover-community:masterfrom
Open
chore: avoid declaring duplicate instances LE String and LT String#39003TwoFX wants to merge 1 commit intoleanprover-community:masterfrom
LE String and LT String#39003TwoFX wants to merge 1 commit intoleanprover-community:masterfrom
Conversation
PR summary 15ab76c080Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
Member
|
My guess would be that until core (or this PR) ships |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since forever, mathlib has declared
LE StringandLT Stringinstances which are propositionally, but not definitionally, equal to theLE StringandLT Stringinstances that have shipped with core. This regularly leads to problems with automation that expects instances to be canonical, most recently as described in leanprover/lean4#13544.This PR demotes the mathlib instances to definitions, and redefines the
LinearOrder Stringinstance to use the core-provided instances rather than the ones defined in mathlib. It also redeclares the theoremsString.lt_iff_toList_ltandString.le_iff_toList_leto be about the core-provided instances rather than the mathlib ones, and the theorems about the mathlib instances are now calledString.lt_iff_toList_lt'andString.le_iff_toList_le'.Deprecating the material related to the mathlib instances would be a logical next step, but it might make sense to wait with this until core ships more API for
LE StringandLT String(right now it ships none).