fix nth_rewrite warning

This commit is contained in:
Kevin Buzzard
2024-01-24 16:51:35 +00:00
parent e180fc9093
commit 270a98ce19
2 changed files with 14 additions and 16 deletions

View File

@@ -138,6 +138,20 @@ will change the goal to `succ 1 + succ 1 = 4`.
-/ -/
TacticDoc «repeat» TacticDoc «repeat»
/--
## Summary
If `h : X = Y` and there are several `X`s in the goal, then
`nth_rewrite 3 [h]` will just change the third `X` to a `Y`.
## Example
If the goal is `2 + 2 = 4` then `nth_rewrite 2 [two_eq_succ_one]`
will change the goal to `2 + succ 1 = 4`. In contrast, `rw [two_eq_succ_one]`
will change the goal to `succ 1 + succ 1 = 4`.
-/
TacticDoc nth_rewrite
NewTactic rw NewTactic rw
NewHiddenTactic «repeat» nth_rewrite NewHiddenTactic «repeat» nth_rewrite

View File

@@ -10,22 +10,6 @@ TheoremTab "012"
namespace MyNat namespace MyNat
/--
## Summary
If `h : X = Y` and there are several `X`s in the goal, then
`nth_rewrite 3 [h]` will just change the third `X` to a `Y`.
## Example
If the goal is `2 + 2 = 4` then `nth_rewrite 2 [two_eq_succ_one]`
will change the goal to `2 + succ 1 = 4`. In contrast, `rw [two_eq_succ_one]`
will change the goal to `succ 1 + succ 1 = 4`.
-/
TacticDoc nth_rewrite
NewHiddenTactic nth_rewrite
Introduction Introduction
" Good luck! " Good luck!