lean4-htt/tests/lean/run/1804b.lean
Leonardo de Moura d428eca8a7 fix(library/equations_compiler,frontends/lean): private name support and alias generation for auxialiary declarations
fixes #1804

Remark: now, all auxiliary definitions in a private declaration share
the same "private" prefix.
2017-09-11 16:46:56 -07:00

41 lines
656 B
Text

namespace bla
private def foo (x : nat) : nat :=
match x with
| 0 := 1
| _ := 2
end
example (a : nat) (h : a = foo 0) : a = 1 :=
begin
simp [foo] at h,
guard_hyp h := a = 1,
exact h
end
example (a b : nat) (p : b = 0) (h : a = foo b) : a = 1 :=
begin
simp [foo] at h,
simp [p] at h,
simp [foo._match_1] at h,
guard_hyp h := a = 1,
exact h
end
example (a b : nat) (p : b = 0) (h : a = foo b) : a = 1 :=
begin
simp [foo] at h,
simp [p] at h,
simp [foo] at h,
guard_hyp h := a = 1,
exact h
end
example (a b : nat) (p : b = 0) (h : a = foo b) : a = 1 :=
begin
simp [foo, p] at h,
guard_hyp h := a = 1,
exact h
end
end bla