mathlib4 icon indicating copy to clipboard operation
mathlib4 copied to clipboard

doc: add reassoc docstring

Open kbuzzard opened this issue 1 year ago • 1 comments
trafficstars

Add docstring for @[reassoc] attribute.


Open in Gitpod

Note that, in contrast to when I'm adding maths docstrings, here I know far less about what I'm talking about (in particular I can't read the source code to verify that what I'm saying corresponds to what is written). I'm making this PR because of a general frustration about attributes not being documented properly. This PR makes the docstring added here appear when hovering over @[reassoc]. My sources are the module docstring for the attribute, and the comment here by Markus Himmel. I also fix a couple of typos in the module docstring.

kbuzzard avatar Jul 05 '24 14:07 kbuzzard

PR summary 0364e4957c

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

No declarations were harmed in the making of this PR! 🐙

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

github-actions[bot] avatar Jul 05 '24 14:07 github-actions[bot]

It looks good to me. If you would like, you may also mention that the combination @[simp, reassoc] is possible. This can be useful for lemmas of the form f = a ≫ b, i.e. no composition in the LHS, but we may occasionally want to apply the _assoc version in the other direction: replacing a ≫ b ≫ h by f ≫ h.

joelriou avatar Jul 05 '24 21:07 joelriou

Thanks!

bors d+

joelriou avatar Jul 06 '24 09:07 joelriou

:v: kbuzzard can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

mathlib-bors[bot] avatar Jul 06 '24 09:07 mathlib-bors[bot]

bors r+

kbuzzard avatar Jul 06 '24 23:07 kbuzzard

Pull request successfully merged into master.

Build succeeded:

mathlib-bors[bot] avatar Jul 06 '24 23:07 mathlib-bors[bot]