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

11 lines
234 B
Text

def f : nat → nat → nat
| 0 := λ x, x
| (n+1) := λ x, x + 1
meta def check_expr (p : pexpr) (t : expr) : tactic unit :=
do e ← tactic.to_expr p, guard (t = e)
example (n : nat): f (n+1) n = n + 1 :=
begin
unfold f
end