`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.
30 lines
415 B
Text
30 lines
415 B
Text
section
|
|
|
|
parameters x y : nat
|
|
def z := x + y
|
|
|
|
lemma h0 : z = y + x := add_comm _ _
|
|
|
|
open tactic
|
|
|
|
theorem foo₁ : z = y + x := -- doesn't work
|
|
begin
|
|
rw h0
|
|
end
|
|
|
|
|
|
|
|
|
|
theorem foo₃ : z = y + x := -- doesn't work
|
|
by rewrite h0
|
|
|
|
theorem foo₄ : z = y + x := -- doesn't work
|
|
begin
|
|
simp [h0]
|
|
end
|
|
|
|
theorem foo₅ : z = y + x := -- doesn't work
|
|
begin [smt]
|
|
ematch_using [h0]
|
|
end
|
|
end
|