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(algebra/module/ordered): redefine ordered_module as ordered_smul #8930

Closed
wants to merge 26 commits into from

Conversation

pechersky
Copy link
Collaborator

@pechersky pechersky commented Aug 31, 2021

One would like to talk about ordered_monoid R (with_top R), but the module constraint is too strict to allow this.

The definition of ordered_monoid works if it is loosened to has_scalar R M. Most of the proofs that are part of its API need at most smul_with_zero. So it has been loosened to smul_with_zero, since a lawless ordered_monoid wouldn't do much.

In the ordered_field portion, module has been loosened to mul_action_with_zero.

order_dual instances of smul instances have also been generalized to better transmit. There are more generalizations possible, but seem out of scope for a single PR.

Unfortunately, these generalizations exposed a gnarly misalignment between prod.has_lt and prod.has_le, which have incompatible definitions, when inferred through separate paths. In particular, the lt definition of generated by prod.preorder is different than the core prod.has_lt. Due to this, the prod.ordered_monoid instance has not been generalized.


Open in Gitpod

@pechersky pechersky added awaiting-review The author would like community review of the PR 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 Aug 31, 2021
@github-actions github-actions bot added the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Aug 31, 2021
@github-actions github-actions bot removed the blocked-by-other-PR This PR depends on another PR which is still in the queue. A bot manages this label via PR comment. label Sep 1, 2021
@github-actions
Copy link

github-actions bot commented Sep 1, 2021

🎉 Great news! Looks like all the dependencies have been resolved:

💡 To add or remove a dependency please update this issue/PR description.

Brought to you by Dependent Issues (:robot: ). Happy coding!

@pechersky pechersky 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 Sep 1, 2021
@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 3, 2021
@pechersky pechersky changed the title feat(algebra/module/ordered): loosen ordered_module to smul_with_zero feat(algebra/module/ordered): redefine ordered_module as ordered_smul Sep 3, 2021
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 3, 2021
@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 3, 2021
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Sep 3, 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 Sep 6, 2021
bors bot pushed a commit that referenced this pull request Sep 6, 2021
…mul` (#8930)

One would like to talk about `ordered_monoid R (with_top R)`, but the `module` constraint is too strict to allow this.

The definition of `ordered_monoid` works if it is loosened to `has_scalar R M`. Most of the proofs that are part of its API need at most `smul_with_zero`. So it has been loosened to `smul_with_zero`, since a lawless `ordered_monoid` wouldn't do much.

In the `ordered_field` portion, `module` has been loosened to `mul_action_with_zero`.

`order_dual` instances of `smul` instances have also been generalized to better transmit. There are more generalizations possible, but seem out of scope for a single PR.

Unfortunately, these generalizations exposed a gnarly misalignment between `prod.has_lt` and `prod.has_le`, which have incompatible definitions, when inferred through separate paths. In particular, the `lt` definition of generated by `prod.preorder` is different than the core `prod.has_lt`. Due to this, the `prod.ordered_monoid` instance has not been generalized.



Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com>
@bors
Copy link

bors bot commented Sep 6, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/module/ordered): redefine ordered_module as ordered_smul [Merged by Bors] - feat(algebra/module/ordered): redefine ordered_module as ordered_smul Sep 6, 2021
@bors bors bot closed this Sep 6, 2021
@bors bors bot deleted the pechersky/ordered-module-smul branch September 6, 2021 14:26
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

2 participants