lean4-htt/tests/lean/unfold1.lean
Leonardo de Moura 9f6e71b374 feat(library/tactic): add "approximate" parameter to apply_core and rewrite_core
If this parameter is set to true, then approximate unification is
used.

closes #1208
2016-12-10 10:24:05 -08:00

17 lines
436 B
Text

open tactic
meta definition rewriteH (Hname : name) : tactic unit :=
do get_local Hname >>= rewrite_core reducible tt tt occurrences.all ff,
try reflexivity
example (l : list nat) : list.append l [] = l :=
by do
get_local `l >>= λ H, induction_core semireducible H `list.rec_on [`h, `t, `iH],
--
dunfold [`list.append],
trace_state,
trace "------",
reflexivity,
dunfold [`list.append],
trace_state,
rewriteH `iH