chore(Algebra/Polynomial/Module): workaround for backward.inferInstanceAs#39011
Open
Vierkantor wants to merge 1 commit intoleanprover-community:masterfrom
Open
Conversation
…ceAs This PR, like leanprover-community#38990, works around a `backward.inferInstanceAs` compatibility flag introduced by identifying `PolynomialModule` with `Finsupp` in our definitions. We introduce a new dsimp lemma `funLike_eq` that transfers the `FunLike` instances, and now we can use `PolynomialModule`'s `FunLike` instance, instead of the custom `CoeFun` instance. This is not a great approach, but it seems the least painful for the short term. The alternative would be to strictly enforce the defeq barrier between `PolynomialModule` and `Finsupp`, which would mean a substantial rewrite of this corner of Mathlib. We can't make `PolynomialModule` an `@[implicit_reducible]`, because we need different multiplication on it than `Finsupp` has.
PR summary 8885ca9642Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
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.
This PR, like #38990, works around a
backward.inferInstanceAscompatibility flag introduced by identifyingPolynomialModulewithFinsuppin our definitions. We introduce a new dsimp lemmafunLike_eqthat transfers theFunLikeinstances, and now we can usePolynomialModule'sFunLikeinstance, instead of the customCoeFuninstance.This is not a great approach, but it seems the least painful for the short term. The alternative would be to strictly enforce the defeq barrier between
PolynomialModuleandFinsupp, which would mean a substantial rewrite of this corner of Mathlib. We can't makePolynomialModulean@[implicit_reducible], because we need different multiplication on it thanFinsupphas.