lean4-htt/tests/lean/unfold1.lean
Leonardo de Moura d3c340a30c feat(library/init/meta): improve induction tactic interface
It uses .rec recursor when it is not specified
2017-02-17 10:58:51 -08:00

17 lines
404 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 H [`h, `t, `iH],
--
dunfold [`list.append],
trace_state,
trace "------",
reflexivity,
dunfold [`list.append],
trace_state,
rewriteH `iH