`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.
10 lines
269 B
Text
10 lines
269 B
Text
open nat tactic
|
|
constant zeroadd (a : nat) : 0 + a = a
|
|
|
|
meta definition xrewrite (th_name : name) : tactic unit :=
|
|
do th ← mk_const th_name,
|
|
rewrite_target th,
|
|
try reflexivity
|
|
|
|
example (a : nat) : (0 + a) + (0 + a) + (0 + a) = a + a + a :=
|
|
by xrewrite `zeroadd
|