lean4-htt/tests/lean/interactive/goal_info.lean
Leonardo de Moura e2bf4fcddb fix(frontends/lean/tactic_notation): add skip tactic to save intermediate result
@kha, this commit fixes the issue: comma before a `{}` block will show the state inside the block.
2017-01-20 20:58:05 -08:00

40 lines
925 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