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

feat: Equivs for AddMonoidAlgebras #7219

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Ruben-VandeVelde
Copy link
Collaborator


Extracted from #6718.

Open in Gitpod

@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-author A reviewer has asked the author a question or requested changes label Sep 17, 2023
@[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
Copy link
Member

@eric-wieser eric-wieser Sep 17, 2023

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'?

Comment on lines +55 to +62
{ 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] }
Copy link
Member

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 eric-wieser self-assigned this Sep 17, 2023
@Ruben-VandeVelde
Copy link
Collaborator Author

@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.

Comment on lines 120 to 121
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 :=
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(added in #6567)

Mathlib/Algebra/MonoidAlgebra/Equiv.lean Outdated Show resolved Hide resolved
Comment on lines 72 to 82
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]
Copy link
Contributor

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?

Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-author A reviewer has asked the author a question or requested changes t-algebra Algebra (groups, rings, fields, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants