Conversation
PR summary 98794fd91aImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
| ‹IsScalarTower P S R› | ||
|
|
||
| instance {S : Type*} [Ring S] [CommRing R] [Algebra R S] : | ||
| Algebra (WithVal v) S := ‹Algebra R S› |
There was a problem hiding this comment.
Would it make sense to have the explicit ringHom/Iso between R and WithVal v, and then compose it with the algebraMap R S, so that these instances don't pierce through the defeq?
There was a problem hiding this comment.
I had a play around with this just now -- I think there's an issue with the composition approach although it's a bit unclear to me why. I think it's got something to do with RingHom.toAlgebra and Algebra.compHom starting from CommSemiring R to infer certain instances, while we have to start at Ring or CommRing (because we need Ring for Valuation), e.g., I get this error when trying to use RingHom.toAlgebra:
synthesized type class instance is not definitionally equal to expression inferred by typing rules, synthesized
@Distrib.toMul (WithVal v)
(@NonUnitalNonAssocSemiring.toDistrib (WithVal v) NonUnitalNonAssocCommSemiring.toNonUnitalNonAssocSemiring)
inferred
@Distrib.toMul (WithVal v)
(@NonUnitalNonAssocSemiring.toDistrib (WithVal v) NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring)Although maybe I'm missing something here?
There was a problem hiding this comment.
do you have a branch with this attempt? it'd be easier to take a look there.
There was a problem hiding this comment.
I don't have a branch, just did this locally, but this is what I tried below WithVal.equiv:
instance {S : Type*} [Ring S] [CommRing R] [Algebra R S] :
Algebra (WithVal v) S := Algebra.compHom (equiv v).symm|
Thanks! bors merge |
|
Pull request successfully merged into master. Build succeeded: |
WithVal APIWithVal API
Upstream fixes to errors generated in FLT following the refactor of
HeightOneSpectrum.adicCompletionin #22055WithValAPIWithValalternative toadicValued_apply