src/HOL/Integ/IntDef.ML
changeset 7428 80838c2af97b
parent 7375 2cb340e66d15
child 8937 7328d7c8d201
equal deleted inserted replaced
7427:e5a5d59dd513 7428:80838c2af97b
   186 by (rtac (zadd_assoc RS trans) 1);
   186 by (rtac (zadd_assoc RS trans) 1);
   187 by (rtac (zadd_commute RS arg_cong) 1);
   187 by (rtac (zadd_commute RS arg_cong) 1);
   188 qed "zadd_left_commute";
   188 qed "zadd_left_commute";
   189 
   189 
   190 (*Integer addition is an AC operator*)
   190 (*Integer addition is an AC operator*)
   191 val zadd_ac = [zadd_assoc,zadd_commute,zadd_left_commute];
   191 bind_thms ("zadd_ac", [zadd_assoc,zadd_commute,zadd_left_commute]);
   192 
   192 
   193 Goalw [int_def] "(int m) + (int n) = int (m + n)";
   193 Goalw [int_def] "(int m) + (int n) = int (m + n)";
   194 by (simp_tac (simpset() addsimps [zadd]) 1);
   194 by (simp_tac (simpset() addsimps [zadd]) 1);
   195 qed "zadd_int";
   195 qed "zadd_int";
   196 
   196 
   323 by (rtac (zmult_assoc RS trans) 1);
   323 by (rtac (zmult_assoc RS trans) 1);
   324 by (rtac (zmult_commute RS arg_cong) 1);
   324 by (rtac (zmult_commute RS arg_cong) 1);
   325 qed "zmult_left_commute";
   325 qed "zmult_left_commute";
   326 
   326 
   327 (*Integer multiplication is an AC operator*)
   327 (*Integer multiplication is an AC operator*)
   328 val zmult_ac = [zmult_assoc, zmult_commute, zmult_left_commute];
   328 bind_thms ("zmult_ac", [zmult_assoc, zmult_commute, zmult_left_commute]);
   329 
   329 
   330 Goal "((z1::int) + z2) * w = (z1 * w) + (z2 * w)";
   330 Goal "((z1::int) + z2) * w = (z1 * w) + (z2 * w)";
   331 by (res_inst_tac [("z","z1")] eq_Abs_Integ 1);
   331 by (res_inst_tac [("z","z1")] eq_Abs_Integ 1);
   332 by (res_inst_tac [("z","z2")] eq_Abs_Integ 1);
   332 by (res_inst_tac [("z","z2")] eq_Abs_Integ 1);
   333 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);
   333 by (res_inst_tac [("z","w")] eq_Abs_Integ 1);