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(Tactic): clean up q() notation #10227

Closed
wants to merge 3 commits into from

Conversation

eric-wieser
Copy link
Member

There is no need to write (q(some_lemma)), q(some_lemma) already has the right precedence. This also removes some by exacts that were either cargo-culted, or fixed by a recent change to Lean / Quote4.


Open in Gitpod

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.
@eric-wieser eric-wieser added awaiting-review easy < 20s of review time. See the lifecycle page for guidelines. t-meta Tactics, attributes or user commands labels Feb 3, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 5, 2024
@eric-wieser eric-wieser removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. label Feb 5, 2024
@@ -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))
Copy link
Collaborator

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:

Suggested change
pure (.nonnegative q(zpow_bit0_nonneg $a $m))
return .nonnegative q(zpow_bit0_nonneg $a $m)

Copy link
Member Author

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.

Copy link
Collaborator

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...

Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

maintainer merge

Copy link

github-actions bot commented Feb 5, 2024

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

Copy link
Contributor

@Vierkantor Vierkantor 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 labels Feb 6, 2024
mathlib-bors bot pushed a commit that referenced this pull request Feb 6, 2024
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.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 6, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Feb 6, 2024
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.
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 6, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore(Tactic): clean up q() notation [Merged by Bors] - chore(Tactic): clean up q() notation Feb 6, 2024
@mathlib-bors mathlib-bors bot closed this Feb 6, 2024
@mathlib-bors mathlib-bors bot deleted the eric-wieser/qq-no-paren branch February 6, 2024 13:18
atarnoam pushed a commit that referenced this pull request Feb 9, 2024
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. 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

5 participants