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

[Merged by Bors] - feat(field_theory/minimal_polynomial): add algebra_map_inj #5062

Closed
wants to merge 11 commits into from

Conversation

riccardobrasca
Copy link
Member

I have added algebra_map_inj that computes the minimal polynomial of an element of the base ring. It generalizes algebra_map that assumes the base ring to be a field. I left algebra_map since I think it is reasonable to have a lemma that works without proving explicitly that the algebra map is injective.

@riccardobrasca riccardobrasca added the awaiting-review The author would like community review of the PR label Nov 21, 2020
src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
riccardobrasca and others added 4 commits November 21, 2020 19:14
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
Co-authored-by: Bryan Gin-ge Chen <bryangingechen@gmail.com>
/--A minimal polynomial is not a unit.-/
/-- If `L/K` is a ring extension, and `x` is an element of `L` in the image of `K`,
then the minimal polynomial of `x` is `X - C x`. -/
lemma algebra_map_inj [nontrivial α] (a : α) (hf : function.injective (algebra_map α β))
Copy link
Member

Choose a reason for hiding this comment

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

This naming surprises me a bit - I'd expect this to be a proof of function.injective (algebra_map α β), not one that takes that as an assumption.

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps eq_if_algebra_map_inj?

Copy link
Member

Choose a reason for hiding this comment

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

Ah, I see this matches algebra_map and algebra_map' below.

Copy link
Member Author

Choose a reason for hiding this comment

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

I still have some problem with the name convention, so it is probably just my fault...

Copy link
Member

Choose a reason for hiding this comment

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

I'm inclined to say that we should fix the other names instead. But I don't have a very good suggestion atm.

Copy link
Member

Choose a reason for hiding this comment

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

It seems Kevin's comment about is_integral α (algebra_map α β a) applies to minimal_polynomial.algebra_map too - it has no need for that condition, right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that's why there is algebra_map'. It is exactly algebra_map without that assumption. We can remove one of them I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to clarify: I added inj in the name to distinguish it fromalgebra_map, but the injectivity, although necessary, does not need to appear in the name. Indeed I don't see any concrete situation where one want to speak about a minimal polynomial without the injectivity condition (for example the minimal polynomial is not even unique in that case... something quite weird)

Copy link
Member

Choose a reason for hiding this comment

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

Perhaps these should be:

  • minimal_polynomial.eq_X_sub_C_if_algebra_map_inj (currently minimal_polynomial.algebra_map_inj)
  • minimal_polynomial.eq_X_sub_C (currently minimal_polynomial.algebra_map')
  • Remove minimal_polynomial.algebra_map as the hypothesis is always true

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 I like that (with _if_ changed to _of_).

src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
@jcommelin jcommelin 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 Nov 27, 2020
@riccardobrasca riccardobrasca 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 Nov 27, 2020
@jcommelin
Copy link
Member

I'm still unhappy about those names. But otherwise this looks fine. What do you think of Eric's suggestions?
If we can fix those names, then this is ready for merging.

@riccardobrasca
Copy link
Member Author

Now they are minimal_polynomial.eq_X_sub_C_of_algebra_map_inj and minimal_polynomial.eq_X_sub_C. They seem reasonable to me.

src/field_theory/minimal_polynomial.lean Show resolved Hide resolved
src/field_theory/minimal_polynomial.lean Outdated Show resolved Hide resolved
@Vierkantor Vierkantor 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 Dec 3, 2020
Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>
@riccardobrasca riccardobrasca 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 Dec 3, 2020
Copy link
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

Thanks!

bors r+

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Dec 3, 2020
bors bot pushed a commit that referenced this pull request Dec 3, 2020
I have added `algebra_map_inj` that computes the minimal polynomial of an element of the base ring. It generalizes `algebra_map` that assumes the base ring to be a field. I left `algebra_map` since I think it is reasonable to have a lemma that works without proving explicitly that the algebra map is injective.
@bors
Copy link

bors bot commented Dec 3, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(field_theory/minimal_polynomial): add algebra_map_inj [Merged by Bors] - feat(field_theory/minimal_polynomial): add algebra_map_inj Dec 3, 2020
@bors bors bot closed this Dec 3, 2020
@bors bors bot deleted the min_poly_alg_map branch December 3, 2020 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants