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(data/polynomial/coeff): Add smul_eq_C_mul #7240

Closed
wants to merge 4 commits into from

Conversation

BoltonBailey
Copy link
Collaborator

@BoltonBailey BoltonBailey commented Apr 18, 2021

Adding a lemma polynomial.smul_eq_C_mul for single variate polynomials analogous to mv_polynomial.smul_eq_C_mul for multivariate.


Open in Gitpod

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

Lemma name and statement seems good, as it matches mv_polynomial

Any particular reason for putting in at this file? data.polynomial.monomial might be a better place.

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@BoltonBailey
Copy link
Collaborator Author

I initially wanted to put it in data.polynomial.monomial but my proof relies on lemmas from this file, and to import this file into data.polynomial.monomial would be a circular import. Seems like a similar thing has happened with C_mul_X_pow_eq_monomial which feels more appropriate in monomial but has ended up here.

@BoltonBailey
Copy link
Collaborator Author

It seems coeff imports monomial to use the C function and, single_eq_C_mul_X and monomial_eq_smul_X lemmas defined there, but it's not clear to me why C should be in the monomial file anyway. I would propose a refactor where C and the lemmas about it are moved to basic.lean, and the import is switched so that monomial imports coeff.

@eric-wieser
Copy link
Member

Another option is just to move polynomial.algebra_of_algebra to polynomial.basic (it's a one-line declaration!), and then smul_eq_C_mul can be proven by just algebra.smul_def

@BoltonBailey
Copy link
Collaborator Author

In the algebra_map definition of algebra_of_algebra, R is a comm_semiring. Whereas in the current version of this pull request, R does not have to be commutative.

@bryangingechen bryangingechen added the awaiting-review The author would like community review of the PR label Apr 22, 2021
Copy link
Member

@jcommelin jcommelin 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 merge

@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 Apr 30, 2021
bors bot pushed a commit that referenced this pull request Apr 30, 2021
Adding a lemma `polynomial.smul_eq_C_mul` for single variate polynomials analogous to `mv_polynomial.smul_eq_C_mul` for multivariate.
@bors
Copy link

bors bot commented Apr 30, 2021

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request May 1, 2021
Adding a lemma `polynomial.smul_eq_C_mul` for single variate polynomials analogous to `mv_polynomial.smul_eq_C_mul` for multivariate.
@bors
Copy link

bors bot commented May 1, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(data/polynomial/coeff): Add smul_eq_C_mul [Merged by Bors] - feat(data/polynomial/coeff): Add smul_eq_C_mul May 1, 2021
@bors bors bot closed this May 1, 2021
@bors bors bot deleted the BoltonBailey/smul_eq_C_mul branch May 1, 2021 05:11
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

4 participants