lean4-htt/tests/lean/unfold1.lean
2016-07-18 15:46:56 -04:00

17 lines
459 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"