Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

[Merged by Bors] - refactor(algebra/{dual_number,triv_sq_zero_ext}): support non-commutative rings #18384

Closed
wants to merge 9 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Feb 4, 2023

This changes the definition of multiplication on triv_sq_zero_ext R M as follows

-x * y = (x.1 * y.1, x.1 • y.2 + y.1 • x.2)
+x * y = (x.1 * y.1, x.1 • y.2 + op y.1 • x.2)

which for R=M gives the more natural x.1 * y.2 + x.2 * y.1 in the second term instead of x.1 * y.2 + y.1 * x.2.

This adds some slightly annoying typeclass arguments that could eventually be cleaned up by #10716; but that PR has rotted under the mathlib4 tide. Either way, the weird typeclass arguments needed with triv_sq_zero_ext R M are all invisible when working with dual_number R.

This is motivated by wanting to talk about dual_number (quaternion R) or dual_number (matrix n n R).

Unfortunately this breaks the topological_semiring instance (making it need an @ and trigger the fails_quickly linter), but this instance isn't really interesting anyway.


Open in Gitpod

@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR t-algebra Algebra (groups, rings, fields etc) labels Feb 4, 2023
@eric-wieser eric-wieser changed the title refactor(algebra/dual_number): support non-commutative rings refactor(algebra/{dual_number,triv_sq_zero_ext}): support non-commutative rings Feb 4, 2023
src/algebra/triv_sq_zero_ext.lean Outdated Show resolved Hide resolved
src/algebra/triv_sq_zero_ext.lean Outdated Show resolved Hide resolved
@j-loreaux
Copy link
Collaborator

This looks fine to me. The topological_semiring issue is annoying, but not worth preventing this.

maintainer merge

@github-actions
Copy link

🚀 Pull request has been placed on the maintainer queue by j-loreaux.

@ocfnash
Copy link
Collaborator

ocfnash commented Feb 22, 2023

Two superficial comments but otherwise LGTM.

bors d+

@bors
Copy link

bors bot commented Feb 22, 2023

✌️ 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.

@github-actions github-actions bot added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels Feb 22, 2023
@ocfnash
Copy link
Collaborator

ocfnash commented Feb 23, 2023

bors merge

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label Feb 23, 2023
bors bot pushed a commit that referenced this pull request Feb 23, 2023
…tive rings (#18384)

This changes the definition of multiplication on `triv_sq_zero_ext R M` as follows
```diff
-x * y = (x.1 * y.1, x.1 • y.2 + y.1 • x.2)
+x * y = (x.1 * y.1, x.1 • y.2 + op y.1 • x.2)
```
which for `R=M` gives the more natural `x.1 * y.2 + x.2 * y.1` in the second term instead of  `x.1 * y.2 + y.1 * x.2`.

This adds some slightly annoying typeclass arguments that could eventually be cleaned up by #10716; but that PR has rotted under the mathlib4 tide. Either way, the weird typeclass arguments needed with `triv_sq_zero_ext R M` are all invisible when working with `dual_number R`.

This is motivated by wanting to talk about `dual_number (quaternion R)` or  `dual_number (matrix n n R)`.

Unfortunately this breaks the `topological_semiring` instance (making it need an `@` and trigger the `fails_quickly` linter), but this instance isn't really interesting anyway.
@bors
Copy link

bors bot commented Feb 23, 2023

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(algebra/{dual_number,triv_sq_zero_ext}): support non-commutative rings [Merged by Bors] - refactor(algebra/{dual_number,triv_sq_zero_ext}): support non-commutative rings Feb 23, 2023
@bors bors bot closed this Feb 23, 2023
@bors bors bot deleted the eric-wieser/tsze-noncomm branch February 23, 2023 13:47
@eric-wieser eric-wieser restored the eric-wieser/tsze-noncomm branch February 23, 2023 17:27
bors bot pushed a commit that referenced this pull request Mar 15, 2023
Some more results following on from #18384.

For now this just has the list lemmas. The multiset and finset lemmas are hard to state cleanly.
@YaelDillies YaelDillies deleted the eric-wieser/tsze-noncomm branch May 19, 2023 16:49
@YaelDillies YaelDillies restored the eric-wieser/tsze-noncomm branch May 19, 2023 16:49
@YaelDillies YaelDillies deleted the eric-wieser/tsze-noncomm branch May 19, 2023 16:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
delegated The PR author may merge after reviewing final suggestions. ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) t-algebra Algebra (groups, rings, fields etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants