lean4-htt/tests/lean/run/resolve_name_bug.lean
Leonardo de Moura 70b27fb2d3 feat(library/init/meta/interactive): unfold is now based on the simp framework
See issue #1694.

There is an orthogonal issue. `simp` (and consequently `unfold`) cannot be used to
reduce projections (e.g., `has_add.add`). This issue has been
previously raised by @Armael, but it was not addressed yet.
2017-07-02 11:30:48 -07:00

27 lines
413 B
Text

open tactic
constant f : nat → nat
meta def check_expr (p : pexpr) (t : expr) : tactic unit :=
do e ← to_expr p, guard (t = e)
namespace foo
axiom f_lemma1 : f 0 = 1
namespace bla
axiom f_lemma2 : f 1 = 2
def g (a : nat) := a + 1
example : g 0 = 1 :=
begin
unfold g
end
example : f (f 0) = 2 :=
by rewrite [f_lemma1, f_lemma2]
lemma ex2 : f (f 0) = 2 :=
by simp [f_lemma1, f_lemma2]
end bla
end foo