Theorem: N.add_comm (LeanTeaching/TD/TD02_sol.lean)

State before:
S : Type
image_zero : S
image_succ : N → S → S
n m a b c : N
⊢ a + b = b + a
Tactic:
induction a with
| zero =>
rw [zero_add',add_zero']
| succ a hrec =>
rw [succ_add,add_succ,hrec]
done
State after:
no goals

State before:
case zero
S : Type
image_zero : S
image_succ : N → S → S
n m a b c : N
⊢ zero + b = b + zero
Tactic:
rw [zero_add',add_zero']
State after:
no goals

State before:
case succ
S : Type
image_zero : S
image_succ : N → S → S
n m a✝ b c a : N
hrec : a + b = b + a
⊢ succ a + b = b + succ a
Tactic:
rw [succ_add,add_succ,hrec]
State after:
no goals