Skip to content

[Merged by Bors] - feat(Data/Polynomial/Module) : define an R[X] module, given a linear map. - #7728

Closed
rmhi wants to merge 45 commits into
masterfrom
CompAEval
Closed

[Merged by Bors] - feat(Data/Polynomial/Module) : define an R[X] module, given a linear map.#7728
rmhi wants to merge 45 commits into
masterfrom
CompAEval

Conversation

@rmhi

@rmhi rmhi commented Oct 17, 2023

Copy link
Copy Markdown
Collaborator

Given an element a in an R-algebra A and an A-module M,
define an R[X]-module Module.AEval R M a, whose elements correspond to
elements of M, and where the action of f : R[X] is f • m = aeval a f • m.
Equivalently, X • m = a • m.

This module is abbreviated to Module.AEval' φ in the special case that A is the algebra of R-linear maps and φ : M → M is an R-linear map.

This is needed in #7419.


Open in Gitpod

@rmhi rmhi added the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Oct 17, 2023
@rmhi
rmhi requested a review from riccardobrasca October 17, 2023 10:00
@rmhi rmhi added awaiting-review and removed awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. labels Oct 17, 2023
Comment thread Mathlib/Data/Polynomial/Module.lean Outdated
@alexjbest

Copy link
Copy Markdown
Member

This sounds like it has the same goal as https://leanprover-community.github.io/mathlib4_docs/Mathlib/RingTheory/FiniteType.html#modulePolynomialOfEndo, this PR should redefine that material in terms of this I think. (I think using a type synonym is probably a nicer way to go, and it looks like you added more api here)

@riccardobrasca

Copy link
Copy Markdown
Member

This sounds like it has the same goal as https://leanprover-community.github.io/mathlib4_docs/Mathlib/RingTheory/FiniteType.html#modulePolynomialOfEndo, this PR should redefine that material in terms of this I think. (I think using a type synonym is probably a nicer way to go, and it looks like you added more api here)

Why is this in Mathlib.RingTheory.FiniteType?! Nice found BTW.

@alexjbest

Copy link
Copy Markdown
Member

I think because its only used to prove the result below! But it really shouldn't be indeed

Comment thread Mathlib/Data/Polynomial/Module.lean Outdated
Comment on lines +374 to +377
instance : AddCommMonoid <| AEval R M a := by assumption
instance : Module R <| AEval R M a := by assumption
instance : Module A <| AEval R M a := by assumption
instance : IsScalarTower R A <| AEval R M a := by assumption

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It took me a minute to work out how these proofs even work, I think using inferInstanceAs (AddCommMonoid M) is probably cleaner

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for showing me that; it is much clearer.

Comment thread Mathlib/Data/Polynomial/Module.lean Outdated
@rmhi rmhi added awaiting-author A reviewer has asked the author a question or requested changes. and removed awaiting-review labels Oct 17, 2023
@rmhi

rmhi commented Oct 18, 2023

Copy link
Copy Markdown
Collaborator Author

This sounds like it has the same goal as https://leanprover-community.github.io/mathlib4_docs/Mathlib/RingTheory/FiniteType.html#modulePolynomialOfEndo, this PR should redefine that material in terms of this I think. (I think using a type synonym is probably a nicer way to go, and it looks like you added more api here)

Thanks very much for that; I didn't think it was already in Mathlib. I'll try doing what you suggest.

@alexjbest

Copy link
Copy Markdown
Member

I think it should still go in Polynomial/Module if that works though, just add an import to that from the finitetype file, as Riccardo says FiniteType is a non-obvious place for this construction to live

@rmhi

rmhi commented Oct 18, 2023

Copy link
Copy Markdown
Collaborator Author

I think it should still go in Polynomial/Module if that works though, just add an import to that from the finitetype file, as Riccardo says FiniteType is a non-obvious place for this construction to live

Thanks, I've switched that around now. I also needed to swap the imports, so that now FiniteType imports Polynomial/Module, whereas previously it was the other way around. I've moved my code to the start of Polynomial/Module, because it is now used later down that file. I have left Vasconcelos' theorem in FiniteType, but its proof now uses AEval' instead of ModulePolynomialOfEndo. This avoids the creation of instances at the start of the proof, and also a have statement, which is a lemma for AEval'.

@rmhi rmhi added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Oct 18, 2023
rmhi and others added 5 commits October 30, 2023 16:40
@rmhi

rmhi commented Oct 30, 2023

Copy link
Copy Markdown
Collaborator Author

Many thanks for all you help!

@rmhi rmhi added awaiting-review and removed awaiting-author A reviewer has asked the author a question or requested changes. labels Oct 30, 2023

@riccardobrasca riccardobrasca left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry again for the long review time, but this is very good now, thanks! (I've left a couple of trivial comments.)

bors d+

Comment thread Mathlib/Data/Polynomial/Module.lean Outdated
Comment thread Mathlib/Data/Polynomial/Module.lean
Comment thread Mathlib/Data/Polynomial/Module.lean
Comment thread Mathlib/Data/Polynomial/Module.lean
Comment thread Mathlib/Data/Polynomial/Module.lean
@bors

bors Bot commented Nov 1, 2023

Copy link
Copy Markdown

✌️ rmhi can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed awaiting-review labels Nov 1, 2023
rmhi and others added 3 commits November 1, 2023 13:50
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
Comment thread Mathlib/Data/Polynomial/Module.lean Outdated
rmhi and others added 2 commits November 1, 2023 13:52
Co-authored-by: Riccardo Brasca <riccardo.brasca@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@rmhi

rmhi commented Nov 1, 2023

Copy link
Copy Markdown
Collaborator Author

bors r+

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors

bors Bot commented Nov 1, 2023

Copy link
Copy Markdown

Canceled.

@rmhi

rmhi commented Nov 1, 2023

Copy link
Copy Markdown
Collaborator Author

bors r+

bors Bot pushed a commit that referenced this pull request Nov 1, 2023
…map. (#7728)

Given an element `a` in an `R`-algebra `A` and an `A`-module `M`,
define an `R[X]`-module `Module.AEval R M a`, whose elements correspond to
elements of `M`, and where the action of `f : R[X]` is `f • m = aeval a f • m`. 
Equivalently, `X • m = a • m`.

This module is abbreviated to `Module.AEval' φ` in the special case that `A` is the algebra of `R`-linear maps and `φ : M → M` is an `R`-linear map.

This is needed in #7419.



Co-authored-by: Richard M. Hill <86743862+rmhi@users.noreply.github.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@bors

bors Bot commented Nov 1, 2023

Copy link
Copy Markdown

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors Bot changed the title feat(Data/Polynomial/Module) : define an R[X] module, given a linear map. [Merged by Bors] - feat(Data/Polynomial/Module) : define an R[X] module, given a linear map. Nov 1, 2023
@bors bors Bot closed this Nov 1, 2023
@bors
bors Bot deleted the CompAEval branch November 1, 2023 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants