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(data/monoid_algebra): k →+* monoid_algebra k G #2412

Closed
wants to merge 4 commits into from

Conversation

semorrison
Copy link
Collaborator

The ring homomorphism k →+* monoid_algebra k G, given by including in as functions supported at the multiplicative identity of G, and a few associated lemmas.

@semorrison semorrison added the awaiting-review The author would like community review of the PR label Apr 14, 2020
@abentkamp
Copy link
Collaborator

Looks nice!

Can't we use to_additive to prove the lemmas single_one.central and module_smul_eq for the additive counterpart?

I think single.add_monoid_hom already exists as lapply in linear_algebra/finsupp.lean. Maybe it's not ideal that finsupp is split into several files. I think this happened because we did not want dependencies of /data on /linear_algebra. Is that still something you want to keep up?

@semorrison
Copy link
Collaborator Author

Thanks! I hadn't known about lapply. I do think we should avoid piling too much maths into the data directory. In fact, now that we're building polynomials on top of monoid algebras, perhaps we should even be moving polynomials out entirely.

Let me have a think about how to connect up with lapply.

@semorrison semorrison added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Apr 14, 2020
@semorrison
Copy link
Collaborator Author

Oh, no, they are quite different. lapply is the evaluation-at-a-point morphism, while single.add_monoid_hom is the include-as-functions-supported-at-a-point morphism,

@abentkamp
Copy link
Collaborator

Sorry, I meant single.linear_map and lapply are the same.

@semorrison
Copy link
Collaborator Author

And I'm pretty sure that we're well beyond the reach of to_additive by now. In [add_]monoid_algebra k G, the fact that k is usually a ring means that to_additive is hopelessly confused. There's no way to tell it that it's only the multiplications internal to G that we want to translate into additions: it gets distracted by the multiplications in k as well.

@abentkamp
Copy link
Collaborator

And I'm pretty sure that we're well beyond the reach of to_additive by now. In [add_]monoid_algebra k G, the fact that k is usually a ring means that to_additive is hopelessly confused. There's no way to tell it that it's only the multiplications internal to G that we want to translate into additions: it gets distracted by the multiplications in k as well.

Ok, I see.

@semorrison
Copy link
Collaborator Author

No, they're still not:

single.linear_map [ring γ] [add_comm_group β] [module γ β] (a : α) : β →ₗ[γ] (α →₀ β)

while

lapply [ring R] [add_comm_group M] [module R M] (a : α) : (α →₀ M) →ₗ[R] M

@abentkamp
Copy link
Collaborator

Oh no, I don't know what's wrong with me today :D. I meant lsingle and single.linear_map. Sorry about this!

@semorrison
Copy link
Collaborator Author

No worries. I didn't know the contents of that file at all, so this is very helpful! :-)

@semorrison
Copy link
Collaborator Author

It looks like an easy solution is to delete my finsupp.single.linear_map. I've added a pointer in the doc string of finsupp.single.add_monoid_hom to finsupp.lsingle.

If anyone wants to hold forth on naming conventions for these "functions bundled as an X" definitions, I'm happy to listen.

@semorrison semorrison added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Apr 14, 2020
@abentkamp
Copy link
Collaborator

Concerning the comments in your proofs, I am afraid that I am not good enough at golfing to help you out there.

For me, it looks ready to merge now, but I do not have the power to approve :-).

@semorrison
Copy link
Collaborator Author

All good, someone will come by. :-) It's super helpful to have reviews from non-maintainers, too.

@semorrison
Copy link
Collaborator Author

It looks like this is largely duplicative with #2366. I'll probably close this in a moment.

@semorrison semorrison closed this Apr 15, 2020
@robertylewis robertylewis deleted the finsupp_single_hom branch August 23, 2020 11:36
@semorrison semorrison removed the awaiting-review The author would like community review of the PR label Sep 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants