Skip to content

feat: use IsApply for AddConstMap - #45351

Open
EtienneC30 wants to merge 5 commits into
leanprover-community:masterfrom
EtienneC30:apply-addconstmap
Open

EtienneC30 wants to merge 5 commits into
leanprover-community:masterfrom
EtienneC30:apply-addconstmap

Conversation

@EtienneC30

Copy link
Copy Markdown
Member

Also add an abbrev that provides a monoid instance for a FunLike type satisfying (f * g) x = f (g x) and 1 x = x.


@EtienneC30 EtienneC30 added the t-algebra Algebra (groups, rings, fields, etc) label Oct 27, 2026
@github-actions github-actions Bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

PR summary 46d2f47f6f

Import changes exceeding 2%

% File
+3.78% Mathlib.Algebra.AddConstMap.Basic

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.AddConstMap.Basic 821 852 +31 (+3.78%)
Import changes for all files
Files Import difference
Mathlib.Algebra.AddConstMap.Basic Mathlib.Algebra.AddConstMap.Equiv 31

Declarations diff (regex)

+ compMonoid
+ instance : IsMulApplyEqComp (G →+c[a, a] G)
+ instance : IsNPowApplyEqIterate (G →+c[a, a] G)
+ instance : IsOneApplyEqSelf (G →+c[a, a] G)
+ instance : Monoid (G →+c[a, a] G) := fast_instance% FunLike.compMonoid
+ instance {K : Type*} [VAdd K H] [VAddAssocClass K H H] : IsVAddApply K (G →+c[a, b] H)
- instance : Monoid (G →+c[a, a] G)

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

  • +5 new declarations
  • −0 removed declarations
+AddConstMap.instIsMulApplyEqComp
+AddConstMap.instIsNPowApplyEqIterate
+AddConstMap.instIsOneApplyEqSelf
+AddConstMap.instIsVAddApply
+FunLike.compMonoid

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

Current commit 46d2f47f6f
Reference commit 401d9e6852

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

@EtienneC30
EtienneC30 marked this pull request as ready for review October 27, 2026 13:33
Comment thread Mathlib/Algebra/AddConstMap/Basic.lean Outdated
Comment thread Mathlib/Algebra/AddConstMap/Basic.lean Outdated
@mcdoll mcdoll added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 28, 2026
@EtienneC30 EtienneC30 removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 28, 2026

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

large-import Automatically added label for PRs with a significant increase in transitive imports t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants