lean4-htt/old_tests/tests/lean/interactive/goal_info.lean
2018-04-10 12:56:55 -07:00

40 lines
926 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

constant addc {a b : nat} : a + b = b + a
constant addassoc {a b c : nat} : (a + b) + c = a + (b + c)
constant zadd (a : nat) : 0 + a = a
open nat
example : ∀ n m : , n + m = m + n :=
begin
intros n m,
induction m with m' ih,
--^ "command": "info"
{ change n + 0 = 0 + n, simp [zadd] },
--^ "command": "info"
{ change succ (n + m') = succ m' + n,
rw [succ_add, ih]
--^ "command":"info"
}
end
example : ∀ n m : , n + m = m + n :=
begin
intros n m,
induction m with m' ih,
{ change n + 0 = 0 + n, simp [zadd] },
--^ "command": "info"
{ change succ (n + m') = succ m' + n,
rw [succ_add, ih]
}
end
example : ∀ n m : , n + m = m + n :=
begin
intros n m,
induction m with m' ih,
{ change n + 0 = 0 + n, simp [zadd] },
--^ "command": "info"
{ change succ (n + m') = succ m' + n,
rw [succ_add, ih]
}
end