7a3aab60c6
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
14 lines
457 B
Text
14 lines
457 B
Text
Set: pp::colors
|
||
Set: pp::unicode
|
||
Imported 'macros'
|
||
Using: Nat
|
||
Assumed: Induction
|
||
Proved: Comm1
|
||
Proved: Comm2
|
||
theorem Comm2 : ∀ n m : ℕ, n + m = m + n :=
|
||
λ n : ℕ,
|
||
Induction
|
||
(λ x : ℕ, n + x = x + n)
|
||
(trans (Nat::add_zeror n) (symm (Nat::add_zerol n)))
|
||
(λ (m : ℕ) (iH : n + m = m + n),
|
||
trans (trans (Nat::add_succr n m) (subst (refl (n + m + 1)) iH)) (symm (Nat::add_succl m n)))
|