Skip to content

feat(Algebra.GroupWithZero): generalize SMulZeroClass to MonoidWithZero and lift MulDistribMulAction to nonZeroDivisors#40604

Open
xroblot wants to merge 2 commits into
leanprover-community:masterfrom
xroblot:feat/MulDistribMulAction-smul-zero
Open

feat(Algebra.GroupWithZero): generalize SMulZeroClass to MonoidWithZero and lift MulDistribMulAction to nonZeroDivisors#40604
xroblot wants to merge 2 commits into
leanprover-community:masterfrom
xroblot:feat/MulDistribMulAction-smul-zero

Conversation

@xroblot

@xroblot xroblot commented Jun 14, 2026

Copy link
Copy Markdown
Collaborator

Generalize the instance SMulZeroClass α β
under [Group α] [GroupWithZero β] [MulDistribMulAction α β]to [Group α] [MonoidWithZero β] [MulDistribMulAction α β].

From an action [Group G] [MonoidWithZero M] [MulDistribMulAction G M], use this instance to construct an action on the nonzero divisors of 'M'.

🤖 This PR was extracted from the SKW project by Claude.

…tance from GroupWithZero to MonoidWithZero

The existing instance `SMulZeroClass α β` under `[Group α] [GroupWithZero β] [MulDistribMulAction α β]`
is generalized: `GroupWithZero β` is weakened to `MonoidWithZero β`. The proof that `g • 0 = 0`
uses only `smul_mul'`, `smul_inv_smul` (group invertibility of `α`), `zero_mul`, and `mul_zero`,
so it does not require the invertibility of nonzero elements of `β`.
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown

PR summary 198f3e199d

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ MulDistribMulAction.instSMulZeroClass
+ instMulActionNonZeroDivisors
+ instMulDistribMulActionNonZeroDivisors
+ instSMulNonZeroDivisors
+ nonZeroDivisors.val_smul
+ smul_mem_nonZeroDivisors
+ smul_mem_nonZeroDivisorsLeft
+ smul_mem_nonZeroDivisorsRight
- instance : SMulZeroClass α β

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

Computed after the build finishes.


No changes to strong technical debt.

No changes to weak technical debt.

Current commit 198f3e199d
Reference commit 6923f2f175

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

@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Jun 14, 2026
@github-actions

github-actions Bot commented Jun 14, 2026

Copy link
Copy Markdown

✅ PR Title Formatted Correctly

The title of this PR has been updated to match our commit style conventions.
Thank you!

@xroblot xroblot added the WIP Work in progress label Jun 14, 2026
…ds zero to zero; lift to nonZeroDivisors

- Generalize the `SMulZeroClass α β` instance in `GroupWithZero.Action.Defs` from
  `[GroupWithZero β]` to `[MonoidWithZero β]`: the proof uses only `smul_mul'`,
  `smul_inv_smul`, and `mul_zero`, with no need for invertibility in `β`.
- Add `smul_mem_nonZeroDivisorsLeft/Right`, `smul_mem_nonZeroDivisors`, and instances
  `SMul G M₀⁰`, `MulAction G M₀⁰`, `MulDistribMulAction G M₀⁰` in `NonZeroDivisors`.
@xroblot xroblot changed the title feat(Algebra.GroupWithZero.Action.Defs): generalize SMulZeroClass instance to MonoidWithZero feat(Algebra.GroupWithZero): generalize SMulZeroClass to MonoidWithZero and lift MulDistribMulAction to nonZeroDivisors Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t-algebra Algebra (groups, rings, fields, etc) WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant