Skip to content

[Merged by Bors] - feat(Positivity): add support for positivity [h₁, h₂] syntax#30388

Closed
HugLycan wants to merge 20 commits intoleanprover-community:masterfrom
HugLycan:feat/positivity-with-hyps
Closed

[Merged by Bors] - feat(Positivity): add support for positivity [h₁, h₂] syntax#30388
HugLycan wants to merge 20 commits intoleanprover-community:masterfrom
HugLycan:feat/positivity-with-hyps

Conversation

@HugLycan
Copy link
Copy Markdown
Contributor

@HugLycan HugLycan commented Oct 9, 2025

Related issue: #2427


This PR adds support for positivity [h₁, h₂] syntax.

@fpvandoorn

Open in Gitpod

@github-actions github-actions bot added new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-meta Tactics, attributes or user commands labels Oct 9, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 9, 2025

PR summary 4e56e21745

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

Copy link
Copy Markdown
Contributor

@grunweg grunweg left a comment

Choose a reason for hiding this comment

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

Thank you for working on this; I have wanted this feature for a while!

It would be nice to document this a bit better, so users can learn what this does by just reading the documentation. (I'm also very curious to see how much of mathlib could be simplified with this, but that should probably happen in a separate pull request.)

@grunweg grunweg added the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 10, 2025
Copy link
Copy Markdown
Contributor

@grunweg grunweg left a comment

Choose a reason for hiding this comment

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

Looks good to me, with one tiny tweak. @fpvandoorn Would you like to take a final look?

Co-authored-by: Michael Rothgang <rothgang@math.uni-bonn.de>
@HugLycan
Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 10, 2025
@fpvandoorn
Copy link
Copy Markdown
Member

fpvandoorn commented Oct 16, 2025

This looks good to me.

Are you now also happy with this @thorimur? There is one deviation from your suggestion, because the macro_rules doesn't work for an empty list of arguments (superfluous ;). Now both patterns "fire" on the empty list, but one of them quickly leads to a syntax error.

bors d=thorimur

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 16, 2025

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

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 16, 2025
HugLycan and others added 3 commits October 16, 2025 23:31
Co-authored-by: Thomas R. Murrills <68410468+thorimur@users.noreply.github.com>
Co-authored-by: Thomas R. Murrills <68410468+thorimur@users.noreply.github.com>
@thorimur
Copy link
Copy Markdown
Contributor

Thanks again for this PR and for bearing with the changes through the review process! :) 🎉

P.S. I've edited the PR description such that the mention of the related issue is above the ---, and thus will appear in the commit message when merged. :)

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Oct 16, 2025
@thorimur thorimur mentioned this pull request Oct 16, 2025
2 tasks
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 16, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Positivity): add support for positivity [h₁, h₂] syntax [Merged by Bors] - feat(Positivity): add support for positivity [h₁, h₂] syntax Oct 16, 2025
@mathlib-bors mathlib-bors bot closed this Oct 16, 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.
Jlh18 pushed a commit to Jlh18/mathlib4 that referenced this pull request Oct 24, 2025
…mmunity#30654)

Since leanprover-community#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.
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
…mmunity#30654)

Since leanprover-community#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.
mathlib-bors bot pushed a commit that referenced this pull request Jan 19, 2026
This PR adds support for the `finiteness [h, h']` syntax. This can be combined with the existing versions, such as supporting aesop clauses or the `finiteness?` and `finiteness_nonterminal` variants. This allows golfing mathlib in a few places.

While adding tests, we take the opportunity to also test `finiteness?` and adding aesop clauses: these were previously untested. We also improve the tactic doc-string slightly: making it fully confirm to the new style guidelines is left for a future PR.

This PR is inspired by #30388.
mathlib-bors bot pushed a commit that referenced this pull request Jan 19, 2026
This PR adds support for the `finiteness [h, h']` syntax. This can be combined with the existing versions, such as supporting aesop clauses or the `finiteness?` and `finiteness_nonterminal` variants. This allows golfing mathlib in a few places.

While adding tests, we take the opportunity to also test `finiteness?` and adding aesop clauses: these were previously untested. We also improve the tactic doc-string slightly: making it fully confirm to the new style guidelines is left for a future PR.

This PR is inspired by #30388.
mathlib-bors bot pushed a commit that referenced this pull request Jan 19, 2026
This PR adds support for the `finiteness [h, h']` syntax. This can be combined with the existing versions, such as supporting aesop clauses or the `finiteness?` and `finiteness_nonterminal` variants. This allows golfing mathlib in a few places.

While adding tests, we take the opportunity to also test `finiteness?` and adding aesop clauses: these were previously untested. We also improve the tactic doc-string slightly: making it fully confirm to the new style guidelines is left for a future PR.

This PR is inspired by #30388.
goliath-klein pushed a commit to PrParadoxy/mathlib4 that referenced this pull request Jan 24, 2026
…munity#34039)

This PR adds support for the `finiteness [h, h']` syntax. This can be combined with the existing versions, such as supporting aesop clauses or the `finiteness?` and `finiteness_nonterminal` variants. This allows golfing mathlib in a few places.

While adding tests, we take the opportunity to also test `finiteness?` and adding aesop clauses: these were previously untested. We also improve the tactic doc-string slightly: making it fully confirm to the new style guidelines is left for a future PR.

This PR is inspired by leanprover-community#30388.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-meta Tactics, attributes or user commands

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants