Skip to content

[Merged by Bors] - feat(finiteness): support finiteness [h, h'] syntax#34039

Closed
grunweg wants to merge 8 commits intoleanprover-community:masterfrom
grunweg:finiteness-have
Closed

[Merged by Bors] - feat(finiteness): support finiteness [h, h'] syntax#34039
grunweg wants to merge 8 commits intoleanprover-community:masterfrom
grunweg:finiteness-have

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Jan 16, 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.


Open in Gitpod

…heses

And slightly rewrite the doc-strings to conform more closely to the guidelines.
Also include tests for using aesop clauses and finiteness?.
@grunweg grunweg added the t-meta Tactics, attributes or user commands label Jan 16, 2026
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jan 16, 2026

@fpvandoorn We discussed this briefly. @Vierkantor in case you'd like to look at the new doc-string formatting (entirely optional --- but it would be good to land this PR before polishing finiteness' doc-string).

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jan 16, 2026

PR summary d498a88e35

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
Member

@fpvandoorn fpvandoorn left a comment

Choose a reason for hiding this comment

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

LGTM

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 19, 2026

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

@ghost ghost added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Jan 19, 2026
grunweg and others added 2 commits January 19, 2026 16:29
Co-authored-by: Floris van Doorn <fpvdoorn@gmail.com>
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jan 19, 2026

Thanks for the review!
bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Jan 19, 2026
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.
fpvandoorn pushed a commit to fpvandoorn/carleson that referenced this pull request Jan 19, 2026
* Original motivation: can
leanprover-community/mathlib4#34023 be used to
golf some proofs?
* When leanprover-community/mathlib4#34039
(`finiteness [h, h']` syntax) is merged, it will also be interesting to
try using it more.
* And leanprover-community/mathlib4#34133
(positivity bugfix) might also help with using positivity/finiteness
more.

---------

Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 19, 2026

Build failed (retrying...):

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.
@fpvandoorn
Copy link
Copy Markdown
Member

bors r-

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 19, 2026

Canceled.

@ghost ghost removed ready-to-merge This PR has been sent to bors. delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). labels Jan 19, 2026
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jan 19, 2026

CI passes, and this PR state was essentially approved by Floris (except for a suggestion which sadly didn't work; I'll obviously be happy to fix it in a follow-up PR). Let me go ahead and bors it:
bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Jan 19, 2026
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
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jan 19, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(finiteness): support finiteness [h, h'] syntax [Merged by Bors] - feat(finiteness): support finiteness [h, h'] syntax Jan 19, 2026
@mathlib-bors mathlib-bors bot closed this Jan 19, 2026
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

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.

3 participants