Skip to content

[Merged by Bors] - feat(Algebra): submonoids and submodules inherit cancellations - #27955

Closed
staroperator wants to merge 3 commits into
leanprover-community:masterfrom
staroperator:submonoid_cancel
Closed

staroperator wants to merge 3 commits into
leanprover-community:masterfrom
staroperator:submonoid_cancel

Conversation

@staroperator

Copy link
Copy Markdown
Collaborator

Submonoid, AddSubmonoid and Submodule inherit (left/right) cancellation properties from the base type.


Open in Gitpod

@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Aug 5, 2025
@github-actions

github-actions Bot commented Aug 5, 2025 •

Copy link
Copy Markdown

PR summary b24ea32363

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ isCancelAdd
+ isCancelMul
+ isLeftCancelAdd
+ isLeftCancelMul
+ isRightCancelAdd
+ isRightCancelMul

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

@eric-wieser eric-wieser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

bors merge

Could you do sub(semi)ring and subalgebra too in a follow up PR, along with IsCancelMulZero?

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Aug 5, 2025
mathlib-bors Bot pushed a commit that referenced this pull request Aug 5, 2025
`Submonoid`, `AddSubmonoid` and `Submodule` inherit (left/right) cancellation properties from the base type.
@mathlib-bors

mathlib-bors Bot commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Algebra): submonoids and submodules inherit cancellations [Merged by Bors] - feat(Algebra): submonoids and submodules inherit cancellations Aug 5, 2025
@mathlib-bors mathlib-bors Bot closed this Aug 5, 2025
@staroperator

Copy link
Copy Markdown
Collaborator Author

Thanks!

bors merge

Could you do sub(semi)ring and subalgebra too in a follow up PR, along with IsCancelMulZero?

@eric-wieser Sure! I realized that I should redefine these for MulMemClass so that they can automatically apply to submodule, subsemiring, subalgebra, etc. I have made #27992 for this (and also for IsCancelMulZero).

Equilibris pushed a commit to Equilibris/mathlib4 that referenced this pull request Aug 7, 2025
…rover-community#27955)

`Submonoid`, `AddSubmonoid` and `Submodule` inherit (left/right) cancellation properties from the base type.
Paul-Lez pushed a commit to Paul-Lez/mathlib4 that referenced this pull request Aug 23, 2025
…rover-community#27955)

`Submonoid`, `AddSubmonoid` and `Submodule` inherit (left/right) cancellation properties from the base type.
Paul-Lez pushed a commit to Paul-Lez/mathlib4 that referenced this pull request Aug 23, 2025
…rover-community#27955)

`Submonoid`, `AddSubmonoid` and `Submodule` inherit (left/right) cancellation properties from the base type.
mathlib-bors Bot pushed a commit that referenced this pull request Sep 30, 2025
This PR:
1. adds `Is{Left,Right}Cancel{Add,Mul,MulZero}` instances for `{Add,Mul,MulZero}MemClass` etc.
2. removes the duplicated instances for `Submonoid` and `Submodule` which are introduced in #27955 (benchmark results show there isn't large difference with duplicated instances).

Thanks @Vierkantor's help in benchmarks.

Co-authored-by: Anne C.A. Baanen <[email protected]>
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
…ty#27992)

This PR:
1. adds `Is{Left,Right}Cancel{Add,Mul,MulZero}` instances for `{Add,Mul,MulZero}MemClass` etc.
2. removes the duplicated instances for `Submonoid` and `Submodule` which are introduced in leanprover-community#27955 (benchmark results show there isn't large difference with duplicated instances).

Thanks @Vierkantor's help in benchmarks.

Co-authored-by: Anne C.A. Baanen <[email protected]>
mitchell-horner pushed a commit to mitchell-horner/mathlib4 that referenced this pull request Oct 6, 2025
…ty#27992)

This PR:
1. adds `Is{Left,Right}Cancel{Add,Mul,MulZero}` instances for `{Add,Mul,MulZero}MemClass` etc.
2. removes the duplicated instances for `Submonoid` and `Submodule` which are introduced in leanprover-community#27955 (benchmark results show there isn't large difference with duplicated instances).

Thanks @Vierkantor's help in benchmarks.

Co-authored-by: Anne C.A. Baanen <[email protected]>
BeibeiX0 pushed a commit to BeibeiX0/mathlib4 that referenced this pull request Nov 7, 2025
…ty#27992)

This PR:
1. adds `Is{Left,Right}Cancel{Add,Mul,MulZero}` instances for `{Add,Mul,MulZero}MemClass` etc.
2. removes the duplicated instances for `Submonoid` and `Submodule` which are introduced in leanprover-community#27955 (benchmark results show there isn't large difference with duplicated instances).

Thanks @Vierkantor's help in benchmarks.

Co-authored-by: Anne C.A. Baanen <[email protected]>
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-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants