Skip to content

chore(GroupTheory): make smul_eq_self_of_mem_zpowers to_additive - #42764

Open
attilavjda wants to merge 1 commit into
leanprover-community:masterfrom
attilavjda:chore/to-additive-stabiliser-zpowers-clean
Open

chore(GroupTheory): make smul_eq_self_of_mem_zpowers to_additive#42764
attilavjda wants to merge 1 commit into
leanprover-community:masterfrom
attilavjda:chore/to-additive-stabiliser-zpowers-clean

Conversation

@attilavjda

Copy link
Copy Markdown
Contributor

This PR makes smul_eq_self_of_mem_zpowers amenable to @[to_additive] by reproving it via the action stabilizer and Subgroup.zpowers_le.

This allows the additive counterpart to be generated automatically, removing the hand-written additive proof and the to_additive existing workaround.

Used Aristotle AI to find this refactor and help write the proof.


Open in Gitpod

@github-actions github-actions Bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Aug 14, 2026
@github-actions

Copy link
Copy Markdown

Welcome new contributor!

Thank you for contributing to Mathlib! If you haven't done so already, please review our contribution guidelines, as well as the style guide and naming conventions. In particular, we kindly remind contributors that we have guidelines regarding the use of AI when making pull requests.

We use a review queue to manage reviews. If your PR does not appear there, it is probably because it is not successfully building (i.e., it doesn't have a green checkmark), has the awaiting-author tag, or another reason described in the Lifecycle of a PR. The review dashboard has a dedicated webpage which shows whether your PR is on the review queue, and (if not), why.

If you haven't already done so, please come to https://leanprover.zulipchat.com/, introduce yourself, and mention your new PR.

Thank you again for joining our community.

@github-actions github-actions Bot added the tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip label Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

PR summary 4a7c367bdb

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

- vadd_eq_self_of_mem_zmultiples

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

  • +0 new declarations
  • −0 removed declarations

No declaration differences.


Decrease in strong tech debt: (relative, absolute) = (1.00, 0.00)
Current number Change Type (strong)
418 -1 porting notes
No changes to weak technical debt.

Current commit 4a7c367bdb
Reference commit 4d476f6d44

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-group-theory Group theory label Aug 14, 2026
Comment thread Mathlib/GroupTheory/OrderOfElement.lean Outdated
exact zpow_pow_orderOf

@[to_additive]
theorem smul_eq_self_of_mem_zpowers {α : Type*} [MulAction G α] (hx : x ∈ Subgroup.zpowers y)

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.

I'm not sure if OrderOfElement is necessarily the right file for this anymore?

@attilavjda attilavjda Aug 14, 2026

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.

moving it to a stabilizer or zpowers file would pull in an import, what do you think, maybe leave it?

Mathlib/GroupTheory/GroupAction/Basic.lean the stabilizer file needs only one extra import

@tb65536 tb65536 added the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 14, 2026
@SnirBroshi

Copy link
Copy Markdown
Collaborator

Could you use backticks to make the title a bit easier to parse? e.g.

tag `smul_eq_self_of_mem_zpowers` with `to_additive`

@attilavjda attilavjda changed the title chore(GroupTheory): make smul_eq_self_of_mem_zpowers to_additive chore(GroupTheory): make smul_eq_self_of_mem_zpowers to_additive Aug 14, 2026
@attilavjda
attilavjda force-pushed the chore/to-additive-stabiliser-zpowers-clean branch from 6545ebc to 4a7c367 Compare August 14, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-author A reviewer has asked the author a question or requested changes. new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! t-group-theory Group theory tech debt Tracking cross-cutting technical debt, see e.g. the "Technical debt counters" stream on zulip

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants