Skip to content

feat(Data/Finsupp/Weight): add degree_strictMono - #43916

Open
qawbecrdtey wants to merge 4 commits into
leanprover-community:masterfrom
qawbecrdtey:data_finsupp_weight
Open

qawbecrdtey wants to merge 4 commits into
leanprover-community:masterfrom
qawbecrdtey:data_finsupp_weight

Conversation

@qawbecrdtey

Copy link
Copy Markdown
Contributor

Open in Gitpod

lemma degree_strictMono {R : Type*}
    [AddCommMonoid R] [PartialOrder R] [CanonicallyOrderedAdd R] [AddRightStrictMono R] :
    StrictMono (Finsupp.degree (σ := σ) (R := R))

@github-actions

github-actions Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

PR summary 644b02529a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ degree_strictMono

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

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

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

✅ Lean-aware diff — post-build, computed from the Lean environment (commit 644b025).

  • +1 new declarations
  • −0 removed declarations
+Finsupp.degree_strictMono

No changes to strong technical debt.
No changes to weak technical debt.

Current commit 644b02529a
Reference commit 54be26d06a

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.py 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).

@github-actions github-actions Bot added the t-data Data (lists, quotients, numbers, etc) label Sep 18, 2026
(Finset.sum_le_sum_of_subset (support_mono e)).trans (Finset.sum_le_sum fun _ _ ↦ e _)

lemma degree_strictMono {R : Type*}
[AddCommMonoid R] [PartialOrder R] [CanonicallyOrderedAdd R] [AddRightStrictMono R] :

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.

AddRightStrictMono has the following comment:

You should usually not use this very granular typeclass directly, but rather a typeclass like IsOrderedAddMonoid.

I'm not sure whether this lemma falls under "usually" or not, but you should explain your thinking in the PR summary.

awaiting-author

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

L304 uses add_lt_add_of_lt_of_le, which assumes AddRightStrictMono R. Unless there's a workaround, I guess this is reasonable.

This branch has not been deployed

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

Labels

t-data Data (lists, quotients, numbers, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants