Skip to content

[Merged by Bors] - feat: grind annotations for Finset.sdiff - #29427

Closed
kim-em wants to merge 7 commits into
leanprover-community:masterfrom
kim-em:grind_finset_sdiff
Closed

kim-em wants to merge 7 commits into
leanprover-community:masterfrom
kim-em:grind_finset_sdiff

Conversation

@kim-em

@kim-em kim-em commented Sep 8, 2025 •

Copy link
Copy Markdown
Contributor

Note that grind often will not instantiate equational lemmas that are not fully applied, so we need to split some theorems into versions for simp and versions for grind.

Moves:

  • sup_eq_union -> sup_eq_union'
  • inf_eq_inter -> inf_eq_inter'

@github-actions github-actions Bot added the t-data Data (lists, quotients, numbers, etc) label Sep 8, 2025
@github-actions

github-actions Bot commented Sep 8, 2025 •

Copy link
Copy Markdown

PR summary 3b21e242da

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Data.Finset.SDiff 404 403 -1 (-0.25%)
Import changes for all files
Files Import difference
3 files Mathlib.Data.Finset.Basic Mathlib.Data.Finset.SDiff Mathlib.Data.Fintype.Inv
-1

Declarations diff

+ inf_eq_inter'
+ nontrivial_def
+ sup_eq_union'

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

· rw [sup_eq_union, mem_sdiff, mem_union]
exact ⟨Or.inl hat, hav⟩
· rw [← erase_sdiff_comm, sup_eq_union, erase_union_distrib, erase_eq_of_notMem hau]
· simp [← erase_sdiff_comm, erase_union_distrib, erase_eq_of_notMem hau]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

(Note to future readers: this is because sup_eq_union now has arguments, so it only gets rewritten once.)

Comment thread scripts/noshake.json
"Mathlib.Data.FunLike.Basic": ["Mathlib.Logic.Function.Basic"],
"Mathlib.Data.Finsupp.Notation": ["Mathlib.Data.Finsupp.Single"],
"Mathlib.Data.Finset.Insert": ["Mathlib.Data.Finset.Attr"],
"Mathlib.Data.Finset.Image": ["Mathlib.Data.Finset.Lattice.Lemmas"],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Weird that shake doesn't pick up on the insert_eq used in Data.Finset.Image, but it is indeed a necessary import.

@Vierkantor Vierkantor left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm happy with these changes. @eric-wieser, any last comments?

bors d=@eric-wieser

@mathlib-bors

mathlib-bors Bot commented Sep 16, 2025

Copy link
Copy Markdown
Contributor

✌️ eric-wieser 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 Sep 16, 2025
Comment thread Mathlib/Data/Finset/Lattice/Basic.lean Resolved
@mathlib-bors

mathlib-bors Bot commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

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

@kim-em

kim-em commented Sep 22, 2025

Copy link
Copy Markdown
Contributor Author

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Sep 22, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Sep 22, 2025
Note that `grind` often will not instantiate equational lemmas that are not fully applied, so we need to split some theorems into versions for `simp` and versions for `grind`.

Moves:
- sup_eq_union -> sup_eq_union'
- inf_eq_inter -> inf_eq_inter'
@mathlib-bors

mathlib-bors Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

Build failed:

@bryangingechen

Copy link
Copy Markdown
Contributor

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Sep 22, 2025
Note that `grind` often will not instantiate equational lemmas that are not fully applied, so we need to split some theorems into versions for `simp` and versions for `grind`.

Moves:
- sup_eq_union -> sup_eq_union'
- inf_eq_inter -> inf_eq_inter'
@mathlib-bors

mathlib-bors Bot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat: grind annotations for Finset.sdiff [Merged by Bors] - feat: grind annotations for Finset.sdiff Sep 22, 2025
@mathlib-bors mathlib-bors Bot closed this Sep 22, 2025
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
Note that `grind` often will not instantiate equational lemmas that are not fully applied, so we need to split some theorems into versions for `simp` and versions for `grind`.

Moves:
- sup_eq_union -> sup_eq_union'
- inf_eq_inter -> inf_eq_inter'
zhuyizheng pushed a commit to zhuyizheng/mathlib4 that referenced this pull request Oct 2, 2025
Note that `grind` often will not instantiate equational lemmas that are not fully applied, so we need to split some theorems into versions for `simp` and versions for `grind`.

Moves:
- sup_eq_union -> sup_eq_union'
- inf_eq_inter -> inf_eq_inter'
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). ready-to-merge This PR has been sent to bors. t-data Data (lists, quotients, numbers, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants