lean4-htt/tests/lean/run/xrewrite1.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

10 lines
306 B
Text

open nat tactic
constant zeroadd (a : nat) : 0 + a = a
meta definition xrewrite (th_name : name) : tactic unit :=
do th ← mk_const th_name,
rewrite_core semireducible tt tt occurrences.all ff th,
try reflexivity
example (a : nat) : (0 + a) + (0 + a) + (0 + a) = a + a + a :=
by xrewrite `zeroadd