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] - chore: use Qq in new Gamma positivity extension #7900

Closed
wants to merge 2 commits into from

Conversation

dwrensha
Copy link
Member

Adds Qq static checking, as requested in this comment: #7888 (comment)

The have pa' : Q(..) := pa lines are necessary to sort out typeclass instances of LE and LT.


Open in Gitpod

@dwrensha dwrensha added awaiting-review The author would like community review of the PR t-meta Tactics, attributes or user commands labels Oct 24, 2023
@dwrensha dwrensha changed the title chore: use Qq in new Gamma positivity function chore: use Qq in new Gamma positivity extension Oct 24, 2023
let pa' ← mkAppM ``Gamma_nonneg_of_nonneg #[pa]
pure (.nonnegative pa')
have pa' : Q(0 ≤ $a) := pa
pure (.nonnegative (q(Gamma_nonneg_of_nonneg $pa') : Q(0 ≤ $e)))
Copy link
Member

Choose a reason for hiding this comment

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

You should be able to do


  | .positive (pa : Q(0 < $a)) =>
    pure (.positive (q(Gamma_pos_of_pos $pa) : Q(0 < $e)))
  | .nonnegative (pa : Q(0 ≤ $a)) =>
    pure (.nonnegative (q(Gamma_nonneg_of_nonneg $pa) : Q(0 ≤ $e)))

Copy link
Member Author

Choose a reason for hiding this comment

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

Aha! Done.

@alexjbest
Copy link
Member

This makes me think we need some sort of Strictness.map to make it easier to write extensions like this that apply monotonicity lemmas in both cases, I don't know how that plays with qq though

@alexjbest alexjbest 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 Oct 26, 2023
@dwrensha dwrensha 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 26, 2023
@alexjbest
Copy link
Member

maintainer merge

@github-actions
Copy link

🚀 Pull request has been placed on the maintainer queue by alexjbest.

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

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review The author would like community review of the PR labels Oct 26, 2023
bors bot pushed a commit that referenced this pull request Oct 26, 2023
Adds Qq static checking, as requested in this comment: #7888 (comment)

The `have pa' : Q(..) := pa` lines are necessary to sort out typeclass instances of `LE` and `LT`.
@bors
Copy link

bors bot commented Oct 26, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title chore: use Qq in new Gamma positivity extension [Merged by Bors] - chore: use Qq in new Gamma positivity extension Oct 26, 2023
@bors bors bot closed this Oct 26, 2023
@bors bors bot deleted the positivity-gamma-qq branch October 26, 2023 15:43
grunweg pushed a commit that referenced this pull request Nov 1, 2023
Adds Qq static checking, as requested in this comment: #7888 (comment)

The `have pa' : Q(..) := pa` lines are necessary to sort out typeclass instances of `LE` and `LT`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR has been sent to bors. t-meta Tactics, attributes or user commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants