Skip to content

[Merged by Bors] - fix(GroupTheory/Complement): adjust statement of existsUnique_smul_mem - #45408

Closed
lua-vr wants to merge 1 commit into
leanprover-community:masterfrom
lua-vr:fix-iscomplement
Closed

lua-vr wants to merge 1 commit into
leanprover-community:masterfrom
lua-vr:fix-iscomplement

Conversation

@lua-vr

@lua-vr lua-vr commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

The previous statement mixed left and right multiplication, so it required CommGroup. It also used smul/vadd for no reason (other than that fitting better in the original application it was made for).

This splits it into left and right versions not assuming commutativity, and uses mul/add.

Also moves it to a better place in the file.


The previous version came from an automated split #45380, and the original file was a draft.

@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

PR summary 30164500bb

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff (regex)

+ existsUnique_mul_mem_left
+ existsUnique_mul_mem_right
+ existsUnique_smul_mem
- IsComplement.existsUnique_smul_mem

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

  • +4 new declarations
  • −0 removed declarations
+AddSubgroup.IsComplement.existsUnique_add_mem_left
+AddSubgroup.IsComplement.existsUnique_add_mem_right
+Subgroup.IsComplement.existsUnique_mul_mem_left
+Subgroup.IsComplement.existsUnique_mul_mem_right

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

Current commit 30164500bb
Reference commit 6100109f1d

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-group-theory Group theory label Oct 28, 2026
@lua-vr lua-vr changed the title fix(GroupTheory/Complement): existsUnique_smul_mem improvements fix(GroupTheory/Complement): drop CommGroup in existsUnique_smul_mem Oct 28, 2026
@lua-vr
lua-vr marked this pull request as draft October 28, 2026 14:17
@lua-vr lua-vr changed the title fix(GroupTheory/Complement): drop CommGroup in existsUnique_smul_mem feat(GroupTheory/Complement): improvements to existsUnique_smul_mem Oct 28, 2026
@lua-vr lua-vr changed the title feat(GroupTheory/Complement): improvements to existsUnique_smul_mem fix(GroupTheory/Complement): improvements to existsUnique_smul_mem Oct 28, 2026
@lua-vr lua-vr changed the title fix(GroupTheory/Complement): improvements to existsUnique_smul_mem fix(GroupTheory/Complement): adjust statement of existsUnique_smul_mem Oct 28, 2026
@lua-vr
lua-vr marked this pull request as ready for review October 28, 2026 14:45

@grunweg grunweg left a comment

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.

Thanks for adding both versions. This begs the question: can these be unified, perhaps using to_dual on one of the statements? (The duplication is not too bad, so I would be fine with merging them as-is, but if we can avoid it, of course we should.)

@grunweg grunweg added the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 28, 2026
@lua-vr

lua-vr commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

@grunweg I don't think to_dual supports this. There is MulOpposite, but it can't be used with additional lemmas, and the rest of the file is also duplicating the left/right versions.

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author Reply -awaiting-author to remove the label on your PR once you have addressed all comments. label Oct 28, 2026
@grunweg

grunweg commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

I see. Sounds like it would be scope creep then. This time, I'd appreciate a close look by somebody who knows this corner of the library better than me!
maintainer merge?

@github-actions

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Oct 28, 2026

@tb65536 tb65536 left a comment

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.

These seem like better lemmas to me.

@adomani

adomani commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

Thanks!

bors merge

@mathlib-bors mathlib-bors Bot added the ready-to-merge This PR has been sent to bors. label Oct 28, 2026
@mathlib-triage mathlib-triage Bot removed the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Oct 28, 2026
mathlib-bors Bot pushed a commit that referenced this pull request Oct 28, 2026
#45408)

The previous statement mixed left and right multiplication, so it required `CommGroup`. It also used `smul`/`vadd` for no reason (other than that fitting better in the original application it was made for). 

This splits it into left and right versions not assuming commutativity, and uses `mul`/`add`.

Also moves it to a better place in the file.
@mathlib-bors mathlib-bors Bot added the bors-staging This PR is currently being built by bors on the staging branch. label Oct 28, 2026
@mathlib-bors

mathlib-bors Bot commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

@mathlib-bors mathlib-bors Bot changed the title fix(GroupTheory/Complement): adjust statement of existsUnique_smul_mem [Merged by Bors] - fix(GroupTheory/Complement): adjust statement of existsUnique_smul_mem Oct 28, 2026
@mathlib-bors mathlib-bors Bot closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bors-staging This PR is currently being built by bors on the staging branch. ready-to-merge This PR has been sent to bors. t-group-theory Group theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants