doc: add more detail to the split tactic docs (#1988)

Co-authored-by: Mac <tydeu@hatpress.net>
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
This commit is contained in:
Jeremy Salwen 2023-01-09 07:12:39 -05:00 committed by GitHub
parent de0a569781
commit 60f30addc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -625,8 +625,16 @@ macro_rules | `(tactic| trivial) => `(tactic| simp)
syntax "trivial" : tactic
/--
The `split` tactic is useful for breaking nested if-then-else and match expressions in cases.
For a `match` expression with `n` cases, the `split` tactic generates at most `n` subgoals
The `split` tactic is useful for breaking nested if-then-else and `match` expressions into separate cases.
For a `match` expression with `n` cases, the `split` tactic generates at most `n` subgoals.
For example, given `n : Nat`, and a target `if n = 0 then Q else R`, `split` will generate
one goal with hypothesis `n = 0` and target `Q`, and a second goal with hypothesis
`¬n = 0` and target `R`. Note that the introduced hypothesis is unnamed, and is commonly
renamed used the `case` or `next` tactics.
- `split` will split the goal (target).
- `split at h` will split the hypothesis `h`.
-/
syntax (name := split) "split " (colGt term)? (location)? : tactic