-
Notifications
You must be signed in to change notification settings - Fork 262
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(Tactic): clean up q()
notation
#10227
Conversation
There is no need to write `(q(some_lemma))`, `q(some_lemma)` already has the right precedence. This also removes some `by exact`s that were either cargo-culted, or fixed by a recent change to Lean / Quote4.
@@ -254,7 +254,7 @@ def evalZPow : PositivityExt where eval {u α} zα pα e := do | |||
have m : Q(ℕ) := mkRawNatLit (n / 2) | |||
haveI' : $b =Q $m + $m := ⟨⟩ -- b = bit0 m | |||
haveI' : $e =Q $a ^ $b := ⟨⟩ | |||
pure (by exact .nonnegative q(zpow_bit0_nonneg $a $m)) | |||
pure (.nonnegative q(zpow_bit0_nonneg $a $m)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could eliminate one more pair of brackets like so:
pure (.nonnegative q(zpow_bit0_nonneg $a $m)) | |
return .nonnegative q(zpow_bit0_nonneg $a $m) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return
isn't safe after ~q()
matching due to leanprover-community/quote4#21, so I'd prefer not to risk breaking random things here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware that return
is different to pure
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maintainer merge
🚀 Pull request has been placed on the maintainer queue by YaelDillies. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
bors merge
There is no need to write `(q(some_lemma))`, `q(some_lemma)` already has the right precedence. This also removes some `by exact`s that were either cargo-culted, or fixed by a recent change to Lean / Quote4.
Build failed (retrying...): |
There is no need to write `(q(some_lemma))`, `q(some_lemma)` already has the right precedence. This also removes some `by exact`s that were either cargo-culted, or fixed by a recent change to Lean / Quote4.
Pull request successfully merged into master. Build succeeded: |
q()
notationq()
notation
There is no need to write `(q(some_lemma))`, `q(some_lemma)` already has the right precedence. This also removes some `by exact`s that were either cargo-culted, or fixed by a recent change to Lean / Quote4.
There is no need to write
(q(some_lemma))
,q(some_lemma)
already has the right precedence. This also removes someby exact
s that were either cargo-culted, or fixed by a recent change to Lean / Quote4.