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

[Merged by Bors] - doc(algebra/algebra/basic): expand the docstring #10221

Closed
wants to merge 5 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Nov 8, 2021

This doesn't rule out having a better way to spell "non-unital non-associative algebra" in future, but let's document how it can be done today.

Much of this description is taken from my talk at CICM's FMM.


Open in Gitpod

@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR docs This PR is about documentation labels Nov 8, 2021
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Nov 9, 2021
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Nov 9, 2021
src/algebra/algebra/basic.lean Outdated Show resolved Hide resolved
@PatrickMassot
Copy link
Member

The new docstring is nice but it gets cut off in tool tips. So it should begin with a short explanation.

@robertylewis
Copy link
Member

I guess it makes sense to put this as the docstring to algebra instead of the module doc, but it might be good to mention in the module doc where these design decisions are discussed.

@robertylewis robertylewis added awaiting-author A reviewer has asked the author a question or requested changes and removed awaiting-review The author would like community review of the PR labels Nov 9, 2021
@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR and removed awaiting-author A reviewer has asked the author a question or requested changes labels Dec 14, 2021
@eric-wieser
Copy link
Member Author

I decided that this probably made more sense in an "implementation notes" section after all.

Comment on lines +63 to +70
1. ```lean
variables [comm_semiring R] [semiring A]
variables [algebra R A]
```
2. ```lean
variables [comm_semiring R] [semiring A]
variables [module R A] [smul_comm_class R A A] [is_scalar_tower R A A]
```
Copy link
Member

Choose a reason for hiding this comment

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

I would state even more clearly: (1) is the preferred way of working with associative unital algebras. Something like

You should always use the first approach when working with associative unital algebras, but if you want to weaken any condition on either R or A you can mimic the second approach.

Other than that. LGTM.

bors d+

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added that at the end.

@bors
Copy link

bors bot commented Dec 15, 2021

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

@fpvandoorn fpvandoorn 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 Dec 15, 2021
@eric-wieser
Copy link
Member Author

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 Dec 15, 2021
bors bot pushed a commit that referenced this pull request Dec 15, 2021
This doesn't rule out having a better way to spell "non-unital non-associative algebra" in future, but let's document how it can be done today.

Much of this description is taken from [my talk at CICM's FMM](https://eric-wieser.github.io/fmm-2021/#/algebras).
@bors
Copy link

bors bot commented Dec 15, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title doc(algebra/algebra/basic): expand the docstring [Merged by Bors] - doc(algebra/algebra/basic): expand the docstring Dec 15, 2021
@bors bors bot closed this Dec 15, 2021
@bors bors bot deleted the eric-wieser/algebra-docs branch December 15, 2021 19:57
Comment on lines +1498 to +1501

example {R A} [comm_semiring R] [semiring A]
[module R A] [smul_comm_class R A A] [is_scalar_tower R A A] : algebra R A :=
algebra.of_module smul_mul_assoc mul_smul_comm
Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think I actually meant to commit this, but I guess it's harmless!

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. docs This PR is about documentation 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.

6 participants