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/order/nonneg): properties about the nonnegative cone #9598

Closed
wants to merge 19 commits into from

Conversation

fpvandoorn
Copy link
Member

@fpvandoorn fpvandoorn commented Oct 7, 2021

  • Provide various classes on the type {x : α // 0 ≤ x} where α has some order (and algebraic) structure.
  • Use this to automatically derive the classes on nnreal.
  • We currently do not yet define conditionally_complete_linear_order_bot nnreal using nonneg, since that causes some errors (I think Lean then thinks that there are two orders that are not definitionally equal (unfolding only instances)).
  • We leave a bunch of example lines in nnreal to show that nnreal has all the old classes. These could also be removed, if desired.
  • We currently only give some instances and simp/norm_cast lemmas. This could be expanded in the future.

Open in Gitpod

@fpvandoorn fpvandoorn added the awaiting-author A reviewer has asked the author a question or requested changes label Oct 7, 2021
@fpvandoorn fpvandoorn 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 Oct 8, 2021
@jcommelin
Copy link
Member

Thanks 🎉

If CI passes, please remove the label awaiting-CI and merge this yourself, by adding a comment bors r+.

bors d+

@bors
Copy link

bors bot commented Oct 8, 2021

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

@jcommelin jcommelin added awaiting-CI The author would like to see what CI has to say before doing more work. ready-for-bors labels Oct 8, 2021
@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Oct 8, 2021
Comment on lines +45 to +54
/-- If `Sup ∅ ≤ a` then `{x : α // a ≤ x}` is a `conditionally_complete_linear_order_bot`. -/
@[reducible]
protected noncomputable def conditionally_complete_linear_order_bot
[conditionally_complete_linear_order α] {a : α} (h : Sup ∅ ≤ a) :
conditionally_complete_linear_order_bot {x : α // a ≤ x} :=
{ cSup_empty := (function.funext_iff.1
(@subset_Sup_def α (set.Ici a) _ ⟨⟨a, le_rfl⟩⟩) ∅).trans $ subtype.eq $
by { cases h.lt_or_eq with h2 h2, { simp [h2.not_le] }, simp [h2] },
..nonneg.order_bot,
.. @ord_connected_subset_conditionally_complete_linear_order α (set.Ici a) _ ⟨⟨a, le_rfl⟩⟩ _ }
Copy link
Member

Choose a reason for hiding this comment

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

Should this be defined on set.IcI like the semilattice_inf_bot isntance above is?

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 could, but order.lattice_intervals currently doesn't import order.conditionally_complete_lattice...

src/algebra/order/nonneg.lean Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label Oct 8, 2021
@fpvandoorn
Copy link
Member Author

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Oct 13, 2021
bors bot pushed a commit that referenced this pull request Oct 13, 2021
)

* Provide various classes on the type `{x : α // 0 ≤ x}` where `α` has some order (and algebraic) structure.
* Use this to automatically derive the classes on `nnreal`.
* We currently do not yet define `conditionally_complete_linear_order_bot nnreal` using nonneg, since that causes some errors (I think Lean then thinks that there are two orders that are not definitionally equal (unfolding only instances)).
* We leave a bunch of `example` lines in `nnreal` to show that `nnreal` has all the old classes. These could also be removed, if desired.
* We currently only give some instances and simp/norm_cast lemmas. This could be expanded in the future.



Co-authored-by: Floris van Doorn <fpv@andrew.cmu.edu>
Co-authored-by: Johan Commelin <johan@commelin.net>
@bors
Copy link

bors bot commented Oct 13, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(algebra/order/nonneg): properties about the nonnegative cone [Merged by Bors] - feat(algebra/order/nonneg): properties about the nonnegative cone Oct 13, 2021
@bors bors bot closed this Oct 13, 2021
@bors bors bot deleted the nonneg_nnreal branch October 13, 2021 17:57
@eric-wieser eric-wieser added the hacktoberfest-accepted Without this label hacktoberfest is scared off by bors label Oct 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. hacktoberfest-accepted Without this label hacktoberfest is scared off by bors ready-for-bors 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