lean4-htt/tests/lean/unfold1.lean
2016-07-29 13:03:23 -07:00

17 lines
431 B
Text

open tactic
meta_definition rewriteH (Hname : name) : tactic unit :=
do get_local Hname >>= rewrite_core reducible 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],
--
unfold [`list.append],
trace_state,
trace "------",
reflexivity,
unfold [`list.append],
trace_state,
rewriteH `iH