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] - chore: replace anonymous morphism constructors with named fields #7015

Closed
wants to merge 17 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Sep 7, 2023

This makes it easier to refactor the order or inheritance structure of morphisms without having to change all of the anonymous constructors.

This is far from exhaustive.


Open in Gitpod

@eric-wieser eric-wieser added awaiting-review awaiting-CI t-algebra Algebra (groups, rings, fields etc) labels Sep 7, 2023
Comment on lines -786 to +787
protected def subtype : H →* G :=
⟨⟨((↑) : H → G), rfl⟩, fun _ _ => rfl
protected def subtype : H →* G where
toFun := ((↑) : H → G); map_one' := rfl; map_mul' _ _ := rfl
Copy link
Member Author

@eric-wieser eric-wieser Sep 7, 2023

Choose a reason for hiding this comment

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

This is a good example of where the angle bracket nesting was just confusing

@@ -19,19 +19,36 @@ variable {G H : Type*}
def AddEquiv.toMultiplicative [AddZeroClass G] [AddZeroClass H] :
G ≃+ H ≃ (Multiplicative G ≃* Multiplicative H) where
toFun f :=
⟨⟨AddMonoidHom.toMultiplicative f.toAddMonoidHom,
AddMonoidHom.toMultiplicative f.symm.toAddMonoidHom, f.1.3, f.1.4⟩, f.2⟩
invFun f := ⟨⟨f.toMonoidHom, f.symm.toMonoidHom, f.1.3, f.1.4⟩, f.2⟩
Copy link
Member Author

Choose a reason for hiding this comment

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

This was incorrectly-typed

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the blocked-by-other-PR This PR depends on another PR to Mathlib label Sep 7, 2023
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the blocked-by-other-PR This PR depends on another PR to Mathlib label Sep 8, 2023
@leanprover-community-mathlib4-bot
Copy link
Collaborator

This PR/issue depends on:

Copy link
Member

@jcommelin jcommelin 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 merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Sep 12, 2023
bors bot pushed a commit that referenced this pull request Sep 12, 2023
This makes it easier to refactor the order or inheritance structure of morphisms without having to change all of the anonymous constructors.

This is far from exhaustive.
@bors
Copy link

bors bot commented Sep 12, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 12, 2023
This makes it easier to refactor the order or inheritance structure of morphisms without having to change all of the anonymous constructors.

This is far from exhaustive.
@bors
Copy link

bors bot commented Sep 12, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title chore: replace anonymous morphism constructors with named fields [Merged by Bors] - chore: replace anonymous morphism constructors with named fields Sep 12, 2023
@bors bors bot closed this Sep 12, 2023
@bors bors bot deleted the eric-wieser/less-anonymous branch September 12, 2023 14:05
kodyvajjha pushed a commit that referenced this pull request Sep 22, 2023
This makes it easier to refactor the order or inheritance structure of morphisms without having to change all of the anonymous constructors.

This is far from exhaustive.
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-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants