Skip to content

Conversation

grunweg
Copy link
Collaborator

@grunweg grunweg commented Oct 18, 2025

Since #30388, have := foo; positivity can be shortened to positivity [foo].
Make use of that when sensible.

I searched for all occurrences of have :.*\n\s*positi (using VS Code, i.e. using rg internally) and inspected them manually. In a few cases, keeping the have separate seemed more readable to me.


Open in Gitpod

@grunweg grunweg added awaiting-bench bench-after-CI Once the PR passes CI, comment `!bench` on the PR labels Oct 18, 2025
@grunweg grunweg requested a review from fpvandoorn October 18, 2025 17:12
Copy link

PR summary 94c059e90a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@leanprover-community-mathlib4-bot
Copy link
Collaborator

!bench

@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 562c75f.
There were no significant changes against commit 94c059e.

Copy link

File Instructions %
build -2.523⬝10⁹ (+0.00%)
CI run Lakeprof report

@github-actions github-actions bot removed the bench-after-CI Once the PR passes CI, comment `!bench` on the PR label Oct 18, 2025
@j-loreaux
Copy link
Collaborator

Yes, please! And thank you!

Can you please add a short blurb in the PR description saying how you found these occurrences? Was it just grep? It would be nice if we had a systematic way to find all of them, as I think there are surely more than this.

bors d+

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 18, 2025

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

@grunweg
Copy link
Collaborator Author

grunweg commented Oct 18, 2025

Yes, I grepped (added that to the PR description) --- and just realised why I only found so few hits. Thanks for the inspiration, follow-up incoming :-)

@grunweg
Copy link
Collaborator Author

grunweg commented Oct 18, 2025

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the ready-to-merge This PR has been sent to bors. label Oct 18, 2025
mathlib-bors bot pushed a commit that referenced this pull request Oct 18, 2025
Since #30388, `have := foo; positivity` can be shortened to `positivity [foo]`.
Make use of that when sensible.

I searched for all occurrences of `have :.*\n\s*positi` (using VS Code, i.e. using `rg` internally) and inspected them manually. In a few cases, keeping the `have` separate seemed more readable to me.
@grunweg
Copy link
Collaborator Author

grunweg commented Oct 18, 2025

Update: searching for have .*\n\s*positi yields one more actionable location (and 14 others). Am I overlooking something, or are there indeed only this few places?

@grunweg
Copy link
Collaborator Author

grunweg commented Oct 18, 2025

Filed the follow-up as #30656.

@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Oct 18, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title chore: use the positivity [h, h'] syntax when useful [Merged by Bors] - chore: use the positivity [h, h'] syntax when useful Oct 18, 2025
@mathlib-bors mathlib-bors bot closed this Oct 18, 2025
@grunweg grunweg deleted the golf-positivity-have branch October 18, 2025 21:17
mathlib-bors bot pushed a commit that referenced this pull request Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated ready-to-merge This PR has been sent to bors.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants