6 goal Arith.thy "0 + (x + 0) = x + 0 + 0";
12 > goal Nat.thy "m+0 = m";
16 > by (res_inst_tac [("n","m")] induct 1);
20 2. !!x. x + 0 = x ==> Suc(x) + 0 = Suc(x)
21 > by (simp_tac add_ss 1);
24 1. !!x. x + 0 = x ==> Suc(x) + 0 = Suc(x)
25 > by (asm_simp_tac add_ss 1);
31 > goal Nat.thy "m+Suc(n) = Suc(m+n)";
33 m + Suc(n) = Suc(m + n)
34 1. m + Suc(n) = Suc(m + n)
35 val it = [] : thm list
36 > by (res_inst_tac [("n","m")] induct 1);
38 m + Suc(n) = Suc(m + n)
39 1. 0 + Suc(n) = Suc(0 + n)
40 2. !!x. x + Suc(n) = Suc(x + n) ==> Suc(x) + Suc(n) = Suc(Suc(x) + n)
42 > by (simp_tac add_ss 1);
44 m + Suc(n) = Suc(m + n)
45 1. !!x. x + Suc(n) = Suc(x + n) ==> Suc(x) + Suc(n) = Suc(Suc(x) + n)
49 > by (asm_simp_tac add_ss 1);
51 Suc(x) + Suc(n) == Suc(x + Suc(n))
53 x + Suc(n) == Suc(x + n)
55 Suc(x) + n == Suc(x + n)
57 Suc(Suc(x + n)) = Suc(Suc(x + n)) == True
59 m + Suc(n) = Suc(m + n)
65 > val prems = goal Nat.thy "(!!n. f(Suc(n)) = Suc(f(n))) ==> f(i+j) = i+f(j)";
68 1. f(i + j) = i + f(j)
70 f(Suc(?n)) = Suc(f(?n)) [!!n. f(Suc(n)) = Suc(f(n))]
72 > by (res_inst_tac [("n","i")] induct 1);
75 1. f(0 + j) = 0 + f(j)
76 2. !!x. f(x + j) = x + f(j) ==> f(Suc(x) + j) = Suc(x) + f(j)
77 > by (simp_tac f_ss 1);
80 1. !!x. f(x + j) = x + f(j) ==> f(Suc(x) + j) = Suc(x) + f(j)
81 > by (asm_simp_tac (f_ss addrews prems) 1);
88 > goal NatSum.thy "Suc(Suc(0))*sum(%i.i,Suc(n)) = n*Suc(n)";
90 Suc(Suc(0)) * sum(%i. i, Suc(n)) = n * Suc(n)
91 1. Suc(Suc(0)) * sum(%i. i, Suc(n)) = n * Suc(n)
93 > by (simp_tac natsum_ss 1);
95 Suc(Suc(0)) * sum(%i. i, Suc(n)) = n * Suc(n)
96 1. n + (n + (sum(%i. i, n) + sum(%i. i, n))) = n + n * n
98 > by (nat_ind_tac "n" 1);
100 Suc(Suc(0)) * sum(%i. i, Suc(n)) = n * Suc(n)
101 1. 0 + (0 + (sum(%i. i, 0) + sum(%i. i, 0))) = 0 + 0 * 0
102 2. !!n1. n1 + (n1 + (sum(%i. i, n1) + sum(%i. i, n1))) =
105 (Suc(n1) + (sum(%i. i, Suc(n1)) + sum(%i. i, Suc(n1)))) =
106 Suc(n1) + Suc(n1) * Suc(n1)
108 > by (simp_tac natsum_ss 1);
110 Suc(Suc(0)) * sum(%i. i, Suc(n)) = n * Suc(n)
111 1. !!n1. n1 + (n1 + (sum(%i. i, n1) + sum(%i. i, n1))) =
114 (Suc(n1) + (sum(%i. i, Suc(n1)) + sum(%i. i, Suc(n1)))) =
115 Suc(n1) + Suc(n1) * Suc(n1)
117 > by (asm_simp_tac natsum_ss 1);
119 Suc(Suc(0)) * sum(%i. i, Suc(n)) = n * Suc(n)