Skip to content

refactor: SetSemiring as a 1-field structure#37603

Open
Parcly-Taxel wants to merge 1 commit intoleanprover-community:masterfrom
Parcly-Taxel:setsemiring1fs
Open

refactor: SetSemiring as a 1-field structure#37603
Parcly-Taxel wants to merge 1 commit intoleanprover-community:masterfrom
Parcly-Taxel:setsemiring1fs

Conversation

@Parcly-Taxel
Copy link
Copy Markdown
Collaborator

@Parcly-Taxel Parcly-Taxel commented Apr 3, 2026

@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Apr 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 3, 2026

PR summary caa79c2e3c

Import changes exceeding 2%

% File
+14.85% Mathlib.Data.Set.Semiring

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Data.Set.Semiring 485 557 +72 (+14.85%)
Import changes for all files
Files Import difference
Mathlib.Data.Set.Semiring 72

Declarations diff

+ distribLattice
+ equiv
+ instIdemSemiring
+ instNonAssocSemiring
+ instNonUnitalSemiring
+ instance : Add (SetSemiring α) where add s t := ⟨s.down ∪ t.down⟩
+ instance : Mul (SetSemiring α) where mul s t := ⟨image2 (· * ·) s.down t.down⟩
+ instance : One (SetSemiring α) where one := ⟨1⟩
+ instance : OrderBot (SetSemiring α)
+ instance : PartialOrder (SetSemiring α)
+ instance : Zero (SetSemiring α) where zero := ⟨∅⟩
+ lattice
+ le
+ linearOrder
+ lt
+ lt_def
+ max
+ max_def
+ min
+ min_def
+ ord
+ ord_def
+ partialOrder
+ preorder
+ semilatticeInf
+ semilatticeSup
++ le_def
- down
- instance (priority := 100) IdemSemiring.toOrderBot [IdemSemiring α] : OrderBot α
- instance : Add (SetSemiring α) where add s t := (s.down ∪ t.down).up
- instance : One (SetSemiring α) where one := (1 : Set α).up
- instance : Zero (SetSemiring α) where zero := (∅ : Set α).up
- instance [Monoid α] : IdemSemiring (SetSemiring α)
- instance [MulOneClass α] : NonAssocSemiring (SetSemiring α)
- instance [Semigroup α] : NonUnitalSemiring (SetSemiring α)

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

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

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


Decrease in tech debt: (relative, absolute) = (2.00, 0.00)
Current number Change Type
6899 -2 backward.isDefEq.respectTransparency

Current commit 7d62089e41
Reference commit caa79c2e3c

You can run this locally as

./scripts/reporting/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

Choose a reason for hiding this comment

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

What's the motivation here? Can this be a separate PR?

Copy link
Copy Markdown
Collaborator Author

@Parcly-Taxel Parcly-Taxel Apr 3, 2026

Choose a reason for hiding this comment

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

It is already in a separate PR awaiting review, #35963.

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.

Ah but then this PR is blocked by that one! I have updated the PR description accordingly

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.

This too should be a separate PR, please 😄

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@mathlib-dependent-issues mathlib-dependent-issues bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Apr 3, 2026
@mathlib-dependent-issues
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) large-import Automatically added label for PRs with a significant increase in transitive imports

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants