Skip to content

[Merged by Bors] - feat(FinitelyPresentedGroup): Additivize everything and add ℤ instance #38311

Closed
homeowmorphism wants to merge 3 commits intoleanprover-community:masterfrom
homeowmorphism:FinitelyPresented.AddGroup
Closed

[Merged by Bors] - feat(FinitelyPresentedGroup): Additivize everything and add ℤ instance #38311
homeowmorphism wants to merge 3 commits intoleanprover-community:masterfrom
homeowmorphism:FinitelyPresented.AddGroup

Conversation

@homeowmorphism
Copy link
Copy Markdown
Contributor

@homeowmorphism homeowmorphism commented Apr 20, 2026

We add to_additive annotations to the FinitelyPresentedGroup.lean API and show that it works with the AddGroup.IsFinitelyPresented ℤ as a test example.

Co-pilot and Gemini 3.1 Pro were used to assist in these changes.


Open in Gitpod

@homeowmorphism homeowmorphism marked this pull request as draft April 20, 2026 19:58
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 20, 2026

This pull request is now in draft mode. No active bors state needed cleanup.

While this PR remains draft, bors will ignore commands on this PR. Mark it ready for review before using commands like bors r+ or bors try.

@github-actions github-actions Bot added merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) t-group-theory Group theory and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Apr 20, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 21, 2026

PR summary a535bdc11a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ AddGroup.IsFinitelyPresented
+ instance : AddGroup.IsFinitelyPresented ℤ
+ instance [Finite α] : IsFinitelyPresented (FreeGroup α) := by
- instance [Finite α] : Group.IsFinitelyPresented (FreeGroup α) := by

You can run this locally as follows
## summary with just the declaration names:
./scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh contains some details about this script.


No changes to technical debt.

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

@homeowmorphism homeowmorphism marked this pull request as ready for review April 21, 2026 10:47
@homeowmorphism homeowmorphism changed the title feat(FinitelyPresentedGroup): Additivise definitions and add ℤ instance feat(FinitelyPresentedGroup): Additivize everything and add ℤ instance Apr 21, 2026
@kbuzzard
Copy link
Copy Markdown
Member

Excellent -- thanks! Probably this should have been done with the original PR. Thanks also for the docstrings on theorems -- these are far less common than they should be.

bors merge

@mathlib-triage mathlib-triage Bot added the ready-to-merge This PR has been sent to bors. label Apr 21, 2026
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 21, 2026

Merge conflict.

Merge or rebase master into this PR and resolve the conflict, then someone with permission can run bors r+ or bors retry.

@homeowmorphism homeowmorphism force-pushed the FinitelyPresented.AddGroup branch from 7fa37f6 to d5bdee7 Compare April 21, 2026 16:23
@homeowmorphism
Copy link
Copy Markdown
Contributor Author

homeowmorphism commented Apr 21, 2026

It looks like bors had difficulty merging both this and #36873 at the same time. I believe I have resolved the issue. @kbuzzard would you mind taking a look and merging again?

I probably don't have permission but just in case: bors r+.

@kbuzzard
Copy link
Copy Markdown
Member

bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Apr 21, 2026
#38311)

We add `to_additive` annotations to the FinitelyPresentedGroup.lean API and show that it works with the `AddGroup.IsFinitelyPresented ℤ` as a test example. 

Co-pilot and Gemini 3.1 Pro were used to assist in these changes.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors Bot commented Apr 21, 2026

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(FinitelyPresentedGroup): Additivize everything and add ℤ instance [Merged by Bors] - feat(FinitelyPresentedGroup): Additivize everything and add ℤ instance Apr 21, 2026
@mathlib-bors mathlib-bors Bot closed this Apr 21, 2026
@homeowmorphism homeowmorphism deleted the FinitelyPresented.AddGroup branch April 21, 2026 20:45
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-group-theory Group theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants