`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.
18 lines
382 B
Text
18 lines
382 B
Text
open tactic
|
|
|
|
meta definition rewriteH (Hname : name) : tactic unit :=
|
|
do do h ← get_local Hname,
|
|
rewrite_target h,
|
|
try reflexivity
|
|
|
|
example (l : list nat) : list.append l [] = l :=
|
|
by do
|
|
get_local `l >>= λ H, induction H [`h, `t, `iH],
|
|
--
|
|
dunfold [`list.append],
|
|
trace_state,
|
|
trace "------",
|
|
reflexivity,
|
|
dunfold [`list.append],
|
|
trace_state,
|
|
rewriteH `iH
|