equal
deleted
inserted
replaced
1149 Goal "!n::nat. m <= n --> m <= foldl op+ n ns"; |
1149 Goal "!n::nat. m <= n --> m <= foldl op+ n ns"; |
1150 by (induct_tac "ns" 1); |
1150 by (induct_tac "ns" 1); |
1151 by Auto_tac; |
1151 by Auto_tac; |
1152 qed_spec_mp "start_le_sum"; |
1152 qed_spec_mp "start_le_sum"; |
1153 |
1153 |
1154 Goal "n : set ns ==> n <= foldl op+ 0 ns"; |
1154 Goal "!!n::nat. n : set ns ==> n <= foldl op+ 0 ns"; |
1155 by (force_tac (claset() addIs [start_le_sum], |
1155 by (force_tac (claset() addIs [start_le_sum], |
1156 simpset() addsimps [in_set_conv_decomp]) 1); |
1156 simpset() addsimps [in_set_conv_decomp]) 1); |
1157 qed "elem_le_sum"; |
1157 qed "elem_le_sum"; |
1158 |
1158 |
1159 Goal "!m. (foldl op+ m ns = 0) = (m=0 & (!n : set ns. n=0))"; |
1159 Goal "!m::nat. (foldl op+ m ns = 0) = (m=0 & (!n : set ns. n=0))"; |
1160 by (induct_tac "ns" 1); |
1160 by (induct_tac "ns" 1); |
1161 by Auto_tac; |
1161 by Auto_tac; |
1162 qed_spec_mp "sum_eq_0_conv"; |
1162 qed_spec_mp "sum_eq_0_conv"; |
1163 AddIffs [sum_eq_0_conv]; |
1163 AddIffs [sum_eq_0_conv]; |
1164 |
1164 |