-
Notifications
You must be signed in to change notification settings - Fork 330
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
feat: Equivs for AddMonoidAlgebras #7219
base: master
Are you sure you want to change the base?
Conversation
@[simps] | ||
def ringHomCongrLeft {R S G : Type _} [Semiring R] [Semiring S] [AddZeroClass G] (f : R →+* S) : | ||
AddMonoidAlgebra R G →+* AddMonoidAlgebra S G := | ||
{ Finsupp.mapRange.addMonoidHom f.toAddMonoidHom with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you use one of the lift
functions can you avoid needing to prove the map_mul'
?
{ ringHomCongrLeft f.toRingHom with | ||
toFun := (Finsupp.mapRange f f.map_zero : AddMonoidAlgebra R G → AddMonoidAlgebra S G) | ||
commutes' := fun r => by | ||
-- Porting note: was `ext` | ||
refine Finsupp.ext fun a => ?_ | ||
simp_rw [AddMonoidAlgebra.coe_algebraMap, Function.comp_apply, Finsupp.mapRange_single] | ||
congr 2 | ||
rw [AlgHom.map_algebraMap] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can get here more quickly via AlgHom.ofLinearMap
(or similar) and using the linear version of Finsupp.mapRange
@eric-wieser I didn't see how to apply your suggestions immediately; if you have a moment to share some more details, that would be appreciated, but if not, I'm happy to poke some more. |
def mapDomainAlgEquiv (k A : Type _) [CommSemiring k] [Semiring A] [Algebra k A] {G H : Type _} | ||
[AddMonoid G] [AddMonoid H] (f : G ≃+ H) : AddMonoidAlgebra A G ≃ₐ[k] AddMonoidAlgebra A H := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(added in #6567)
def algAutCongrLeft {k R G : Type _} [CommSemiring k] [Semiring R] [Algebra k R] [AddMonoid G] : | ||
(R ≃ₐ[k] R) →* AddMonoidAlgebra R G ≃ₐ[k] AddMonoidAlgebra R G where | ||
toFun f := algEquivCongrLeft f | ||
map_one' := by | ||
ext | ||
refine Finsupp.ext fun a => ?_ | ||
simp [Finsupp.mapRange_apply] | ||
map_mul' x y := by | ||
ext | ||
refine Finsupp.ext fun a => ?_ | ||
simp [Finsupp.mapRange_apply] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The content of this and mapDomainAlgAut
below is basically the comp
/trans
and id
/refl
lemmas I mentioned here, so one more reason to add them. Maybe we could do with these lemmas without making them bundled morphisms?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@negiizhao, is this the only result you actually need in #6718? If so, I'd be inclined not to both with all the Ring
versions of things, since you wanted the algebra version anyway.
Extracted from #6718.