`rewrite` tactic improvements - Add support for `auto_param` and `opt_param` - Order new goals using the same strategies available for `apply` - Allow user to set configuration object in interactive mode. @Armael This commit should address the issue you raised about the order of new goals in the `rewrite` tactic. See new test tests/lean/run/rw1.lean for examples.
7 lines
252 B
Text
7 lines
252 B
Text
open tactic
|
||
|
||
example {α : Type} (f : α → α → α) (a b : α) (H₁ : a = b) (H₂ : f b a = a) :
|
||
let c := a in f c c = c :=
|
||
by do dsimp,
|
||
e ← get_local `H₁, rewrite_target e {occs := occurrences.pos [1]},
|
||
get_local `H₂ >>= exact
|