-
Notifications
You must be signed in to change notification settings - Fork 298
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/lie): replace local instance with type synonym #16154
Conversation
A Lie ring can be viewed as a `non_unital_non_assoc_semiring` by using its bracket operator as the multiplication. Defining this as an instance causes diamonds because all rings are also Lie rings, so there are two incompatible multiplications on the same type. Instead of the previous approach, of making this a `def` and only locally enabling the instance being careful not to cause diamonds, we use a type synonym that is guaranteed to have only one multiplication operator. Someone who knows more about Lie theory should definitely check that the changes make mathematical sense. Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/.60lie_ring.2Eto_non_unital_non_assoc_semiring.60
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very neat, thanks!
One minor remark about the doc string.
bors d+
✌️ Vierkantor can now approve this pull request. To approve and merge a pull request, simply reply with |
bors merge |
A Lie ring can be viewed as a `non_unital_non_assoc_semiring` by using its bracket operator as the multiplication. Defining this as an instance causes diamonds because all rings are also Lie rings, so there are two incompatible multiplications on the same type. Instead of the previous approach, of making this a `def` and only locally enabling the instance being careful not to cause diamonds, we use a type synonym that is guaranteed to have only one multiplication operator. Someone who knows more about Lie theory should definitely check that the changes make mathematical sense. Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/.60lie_ring.2Eto_non_unital_non_assoc_semiring.60
Pull request successfully merged into master. Build succeeded: |
A Lie ring can be viewed as a
non_unital_non_assoc_semiring
by using its bracket operator as the multiplication. Defining this as an instance causes diamonds because all rings are also Lie rings, so there are two incompatible multiplications on the same type.Instead of the previous approach, of making this a
def
and only locally enabling the instance being careful not to cause diamonds, we use a type synonym that is guaranteed to have only one multiplication operator.Someone who knows more about Lie theory should definitely check that the changes make mathematical sense.
Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/.60lie_ring.2Eto_non_unital_non_assoc_semiring.60