Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - refactor(algebra/direct_sum/basic): use the new polymorphic subobject API #14341

Closed
wants to merge 9 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented May 23, 2022

This doesn't let us deduplicate the lattice lemmas, but does eliminate the duplicate instances and definitions!

This merges:

  • direct_sum.add_submonoid_is_internal, direct_sum.add_subgroup_is_internal, direct_sum.submodule_is_internal into direct_sum.is_internal
  • direct_sum.add_submonoid_coe, direct_sum.add_subgroup_coe into direct_sum.coe_add_monoid_hom
  • direct_sum.add_submonoid_coe_ring_hom, direct_sum.add_subgroup_coe_ring_hom into direct_sum.coe_ring_hom
  • add_submonoid.gsemiring, add_subgroup.gsemiring, submodule.gsemiring into set_like.gsemiring
  • add_submonoid.gcomm_semiring, add_subgroup.gcomm_semiring, submodule.gcomm_semiring into set_like.gcomm_semiring

Renames

  • direct_sum.submodule_coe into direct_sum.coe_linear_map
  • direct_sum.submodule_coe_alg_hom into `direct_sum.coe_alg_hom

And adds:

  • set_like.gnon_unital_non_assoc_semiring, now that it doesn't need to be repeated three times!

A large number of related lemmas are also renamed to match the new definition names.

This was what originally motivated the set_like typeclass; thanks to @Vierkantor for doing the subobject follow up I never got around to!


Open in Gitpod

… API

This doesn't let us deduplicate the lattice lemmas, but does eliminate the duplicate instances and definitions!
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels May 23, 2022
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label May 23, 2022
Copy link
Collaborator

@Vierkantor Vierkantor left a comment

Choose a reason for hiding this comment

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

Nice work! I'm happy to see that basically nothing breaks apart from a few implicit parameters or heavy refls.

bors r+

@leanprover-community-bot-assistant leanprover-community-bot-assistant added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels May 24, 2022
bors bot pushed a commit that referenced this pull request May 24, 2022
… API (#14341)

This doesn't let us deduplicate the lattice lemmas, but does eliminate the duplicate instances and definitions!

This merges:

* `direct_sum.add_submonoid_is_internal`, `direct_sum.add_subgroup_is_internal`, `direct_sum.submodule_is_internal` into `direct_sum.is_internal`
* `direct_sum.add_submonoid_coe`, `direct_sum.add_subgroup_coe` into `direct_sum.coe_add_monoid_hom`
* `direct_sum.add_submonoid_coe_ring_hom`, `direct_sum.add_subgroup_coe_ring_hom` into `direct_sum.coe_ring_hom`
* `add_submonoid.gsemiring`, `add_subgroup.gsemiring`, `submodule.gsemiring` into `set_like.gsemiring`
* `add_submonoid.gcomm_semiring`, `add_subgroup.gcomm_semiring`, `submodule.gcomm_semiring` into `set_like.gcomm_semiring`

Renames

* `direct_sum.submodule_coe` into `direct_sum.coe_linear_map`
* `direct_sum.submodule_coe_alg_hom` into `direct_sum.coe_alg_hom

And adds:

* `set_like.gnon_unital_non_assoc_semiring`, now that it doesn't need to be repeated three times!

A large number of related lemmas are also renamed to match the new definition names.

This was what originally motivated the `set_like` typeclass; thanks to @Vierkantor for doing the subobject follow up I never got around to!
@bors
Copy link

bors bot commented May 24, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(algebra/direct_sum/basic): use the new polymorphic subobject API [Merged by Bors] - refactor(algebra/direct_sum/basic): use the new polymorphic subobject API May 24, 2022
@bors bors bot closed this May 24, 2022
@bors bors bot deleted the eric-wieser/direct_sum.is_internal branch May 24, 2022 15:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants