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

refactor(data/polynomial): use monoid_algebra.lift and aeval #2492

Closed
wants to merge 27 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Apr 22, 2020

  • use monoid_algebra instead of add_monoid_algebra;
  • redefine aeval using monoid_algebra.lift;
  • use it to define eval etc.

@urkud urkud added the WIP Work in progress label Apr 22, 2020
I wonder why it fails to unify instances in `polynomial.algebra`.
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.

LaGTM


variables {R A}

theorem aeval_def' :
aeval R A x p = monoid_algebra.lift R (multiplicative ℕ) A (powers_hom A x) p := rfl
theorem aeval_def' : aeval R A x p = add_monoid_algebra.lift R ℕ A (powers_hom A x) p := rfl
Copy link
Member

Choose a reason for hiding this comment

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

The right hand side looks quite intimidating compared to p.eval x. Is this the new simp-normal-form?

Copy link
Member

Choose a reason for hiding this comment

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

In general there seem to be very few simp-lemmas for aeval. I would expect simp-lemmas for aeval_X and aeval_C.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is not a simp lemma. This is a lemma “show me an ugly definition, I want to apply some theorem about add_monoid_algebra.lift”. I'll see if it can be removed. You can find aeval_X and aeval_C below.

Copy link
Member

Choose a reason for hiding this comment

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

Ok, thanks for explaining. It certainly can stay.

@jcommelin
Copy link
Member

Thanks for doing all this refactoring work!

@semorrison
Copy link
Collaborator

What happened to this PR? I've lost track of plans to refactor polynomials.

@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Aug 13, 2020
@urkud urkud closed this Feb 8, 2022
@urkud urkud deleted the polynomial-review branch February 8, 2022 03:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-conflict Please `git merge origin/master` then a bot will remove this label. WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants