Skip to content

Commit b6d8c7d

Browse files
committed
chore(Tactic/Abel): improve abel tactic docstring
This PR (re)writes the docstring for the `abel` tactic, to consistently match the official style guide, to make sure they are complete while not getting too long. I moved the section on future work to the module docs (since this seems unlikely to be relevant any time soon), and having a big header disrupts the flow of the docstring.
1 parent d72a3c3 commit b6d8c7d

1 file changed

Lines changed: 15 additions & 17 deletions

File tree

Mathlib/Tactic/Abel.lean

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ public import Mathlib.Util.AtomM.Recurse
1515
1616
Evaluate expressions in the language of additive, commutative monoids and groups.
1717
18+
## Future work
19+
20+
* In mathlib 3, `abel` accepted additional optional arguments:
21+
```
22+
syntax "abel" (&" raw" <|> &" term")? (location)? : tactic
23+
```
24+
It is undecided whether these features should be restored eventually.
25+
1826
-/
1927

2028
public meta section
@@ -29,35 +37,25 @@ initialize registerTraceClass `abel
2937
initialize registerTraceClass `abel.detail
3038

3139
/--
32-
Tactic for evaluating equations in the language of
33-
*additive*, commutative monoids and groups.
40+
`abel` solves equations in the language of *additive*, commutative monoids and groups.
3441
3542
`abel` and its variants work as both tactics and conv tactics.
3643
3744
* `abel1` fails if the target is not an equality that is provable by the axioms of
3845
commutative monoids/groups.
3946
* `abel_nf` rewrites all group expressions into a normal form.
40-
* In tactic mode, `abel_nf at h` can be used to rewrite in a hypothesis.
47+
* `abel_nf at h` rewrites in a hypothesis.
4148
* `abel_nf (config := cfg)` allows for additional configuration:
42-
* `red`: the reducibility setting (overridden by `!`)
43-
* `zetaDelta`: if true, local let variables can be unfolded (overridden by `!`)
44-
* `recursive`: if true, `abel_nf` will also recurse into atoms
45-
* `abel!`, `abel1!`, `abel_nf!` will use a more aggressive reducibility setting to identify atoms.
46-
47-
For example:
49+
* `red`: the reducibility setting (overridden by `!`).
50+
* `zetaDelta`: if true, local `let` variables can be unfolded (overridden by `!`).
51+
* `recursive`: if true, `abel_nf` also recurses into atoms.
52+
* `abel!`, `abel1!`, `abel_nf!` use a more aggressive reducibility setting to identify atoms.
4853
54+
Examples:
4955
```
5056
example [AddCommMonoid α] (a b : α) : a + (b + a) = a + a + b := by abel
5157
example [AddCommGroup α] (a : α) : (3 : ℤ) • a = a + (2 : ℤ) • a := by abel
5258
```
53-
54-
## Future work
55-
56-
* In mathlib 3, `abel` accepted additional optional arguments:
57-
```
58-
syntax "abel" (&" raw" <|> &" term")? (location)? : tactic
59-
```
60-
It is undecided whether these features should be restored eventually.
6159
-/
6260
syntax (name := abel) "abel" "!"? : tactic
6361

0 commit comments

Comments
 (0)