Skip to content

[Merged by Bors] - feat: instances for ZeroHom and OneHom#27305

Closed
eric-wieser wants to merge 10 commits intomasterfrom
eric-wieser/zeroHom-instances
Closed

[Merged by Bors] - feat: instances for ZeroHom and OneHom#27305
eric-wieser wants to merge 10 commits intomasterfrom
eric-wieser/zeroHom-instances

Conversation

@eric-wieser
Copy link
Copy Markdown
Member

@eric-wieser eric-wieser commented Jul 20, 2025

This is motivated by wanting to write some lemmas about how the def in #27272 behaves on addition and scalar multiplcation, which requires these operations to first be defined.

This shows that ZeroHom forms an AddCommGroup and Module, as well as analogous intermediate statements and OneHom results.


Open in Gitpod

@eric-wieser eric-wieser added the WIP Work in progress label Jul 20, 2025
@github-actions github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Jul 20, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 20, 2025

PR summary e71ae4c6d7

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ OneHom.instCommGroup
+ OneHom.instCommMonoid
+ OneHom.instGroup
+ OneHom.instIntPow
+ OneHom.instMonoid
+ OneHom.instPow
+ OneHom.pow_apply
+ OneHom.zpow_apply
+ ZeroHom.instIntSMul
+ ZeroHom.instNatSMul
+ coe_div
+ coe_inv
+ coe_mul
+ coe_smul
+ div_apply
+ div_comp
+ instModule
+ instance [MonoidWithZero M] [MulActionWithZero M B] : MulActionWithZero M (ZeroHom A B)
+ instance [One M] [DivisionMonoid N] : Div (OneHom M N)
+ instance [One M] [InvOneClass N] : Inv (OneHom M N)
+ instance [One M] [MulOneClass N] : Mul (OneHom M N)
+ instance [One M] [MulOneClass N] [IsCancelMul N] : IsCancelMul (OneHom M N)
+ instance [One M] [MulOneClass N] [IsLeftCancelMul N] : IsLeftCancelMul (OneHom M N)
+ instance [One M] [MulOneClass N] [IsRightCancelMul N] : IsRightCancelMul (OneHom M N)
+ instance [SMul M N] [SMulZeroClass M B] [SMulZeroClass N B] [IsScalarTower M N B] :
+ instance [SMulZeroClass M B] : SMulZeroClass M (ZeroHom A B)
+ instance [SMulZeroClass M B] [SMulZeroClass Mᵐᵒᵖ B] [IsCentralScalar M B] :
+ instance [SMulZeroClass M B] [SMulZeroClass N B] [SMulCommClass M N B] :
+ instance [Zero M] [SMulWithZero M B] : SMulWithZero M (ZeroHom A B)
+ inv_apply
+ inv_comp
+ mul_apply
+ mul_comp
+ smul_apply
+ smul_comp

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

@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 22, 2025
@eric-wieser eric-wieser force-pushed the eric-wieser/zeroHom-instances branch from 83c9586 to 44c09ad Compare July 22, 2025 22:16
@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Jul 22, 2025
@mathlib4-dependent-issues-bot mathlib4-dependent-issues-bot removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 23, 2025
@mathlib4-dependent-issues-bot
Copy link
Copy Markdown
Collaborator

This PR/issue depends on:

@eric-wieser eric-wieser force-pushed the eric-wieser/zeroHom-instances branch from 2fc0eed to 651d639 Compare July 23, 2025 09:40
@github-actions github-actions bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Jul 23, 2025
mathlib-bors bot pushed a commit that referenced this pull request Jul 23, 2025
…7386)

This matches the Pi and Prod files in the same folder, and moves non-modules instances upstream to the `GroupWithZero` folder.

The instances for AddMonoidHom have been generalized, the rest have been moved without changes.

This is some cleanup ahead of #27305, which makes it clearer where the new `ZeroHom` instances there should go.
@eric-wieser eric-wieser changed the title feat: instances for ZeroHom feat: instances for ZeroHom and OneHom Jul 23, 2025
@eric-wieser eric-wieser removed the WIP Work in progress label Jul 23, 2025
callesonne pushed a commit to callesonne/mathlib4 that referenced this pull request Jul 24, 2025
…anprover-community#27386)

This matches the Pi and Prod files in the same folder, and moves non-modules instances upstream to the `GroupWithZero` folder.

The instances for AddMonoidHom have been generalized, the rest have been moved without changes.

This is some cleanup ahead of leanprover-community#27305, which makes it clearer where the new `ZeroHom` instances there should go.
hrmacbeth pushed a commit to szqzs/mathlib4 that referenced this pull request Jul 28, 2025
…anprover-community#27386)

This matches the Pi and Prod files in the same folder, and moves non-modules instances upstream to the `GroupWithZero` folder.

The instances for AddMonoidHom have been generalized, the rest have been moved without changes.

This is some cleanup ahead of leanprover-community#27305, which makes it clearer where the new `ZeroHom` instances there should go.
Equilibris pushed a commit to Equilibris/mathlib4 that referenced this pull request Aug 7, 2025
…anprover-community#27386)

This matches the Pi and Prod files in the same folder, and moves non-modules instances upstream to the `GroupWithZero` folder.

The instances for AddMonoidHom have been generalized, the rest have been moved without changes.

This is some cleanup ahead of leanprover-community#27305, which makes it clearer where the new `ZeroHom` instances there should go.
Copy link
Copy Markdown
Contributor

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks!

maintainer delegate

@github-actions
Copy link
Copy Markdown

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

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 14, 2025
Copy link
Copy Markdown
Contributor

@adomani adomani left a comment

Choose a reason for hiding this comment

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

Thanks!

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 14, 2025

✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Aug 14, 2025
@eric-wieser eric-wieser added the auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. label Sep 2, 2025
@ghost
Copy link
Copy Markdown

ghost commented Sep 6, 2025

As this PR is labelled auto-merge-after-CI, we are now sending it to bors:

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Sep 6, 2025
mathlib-bors bot pushed a commit that referenced this pull request Sep 6, 2025
This is motivated by wanting to write some lemmas about how the def in #27272 behaves on addition and scalar multiplcation, which requires these operations to first be defined.

This shows that `ZeroHom` forms an `AddCommGroup` and `Module`, as well as analogous intermediate statements and `OneHom` results.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Sep 6, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: instances for ZeroHom and OneHom [Merged by Bors] - feat: instances for ZeroHom and OneHom Sep 6, 2025
@mathlib-bors mathlib-bors bot closed this Sep 6, 2025
@mathlib-bors mathlib-bors bot deleted the eric-wieser/zeroHom-instances branch September 6, 2025 10:49
CBirkbeck pushed a commit to CBirkbeck/mathlib4 that referenced this pull request Sep 8, 2025
This is motivated by wanting to write some lemmas about how the def in leanprover-community#27272 behaves on addition and scalar multiplcation, which requires these operations to first be defined.

This shows that `ZeroHom` forms an `AddCommGroup` and `Module`, as well as analogous intermediate statements and `OneHom` results.
yuanyi-350 pushed a commit to yuanyi-350/yuanyi_mathlib4 that referenced this pull request Sep 10, 2025
This is motivated by wanting to write some lemmas about how the def in leanprover-community#27272 behaves on addition and scalar multiplcation, which requires these operations to first be defined.

This shows that `ZeroHom` forms an `AddCommGroup` and `Module`, as well as analogous intermediate statements and `OneHom` results.
robertmaxton42 pushed a commit to robertmaxton42/mathlib4 that referenced this pull request Sep 11, 2025
This is motivated by wanting to write some lemmas about how the def in leanprover-community#27272 behaves on addition and scalar multiplcation, which requires these operations to first be defined.

This shows that `ZeroHom` forms an `AddCommGroup` and `Module`, as well as analogous intermediate statements and `OneHom` results.
joelriou pushed a commit to joelriou/mathlib4 that referenced this pull request Oct 2, 2025
This is motivated by wanting to write some lemmas about how the def in leanprover-community#27272 behaves on addition and scalar multiplcation, which requires these operations to first be defined.

This shows that `ZeroHom` forms an `AddCommGroup` and `Module`, as well as analogous intermediate statements and `OneHom` results.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-after-CI Please do not add manually. Requests for a bot to merge automatically once CI is done. delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). 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.

5 participants