src/HOL/ex/NatSum.ML
changeset 8869 9ba7ef8a765b
parent 8842 b90d653bd089
child 8932 c1d0f7495714
equal deleted inserted replaced
8868:851693e780d6 8869:9ba7ef8a765b
    11 Thanks to Sloane's On-Line Encyclopedia of Integer Sequences,
    11 Thanks to Sloane's On-Line Encyclopedia of Integer Sequences,
    12   http://www.research.att.com/~njas/sequences/
    12   http://www.research.att.com/~njas/sequences/
    13 *)
    13 *)
    14 
    14 
    15 Addsimps [add_mult_distrib, add_mult_distrib2];
    15 Addsimps [add_mult_distrib, add_mult_distrib2];
       
    16 Addsimps [diff_mult_distrib, diff_mult_distrib2];
    16 
    17 
    17 (*The sum of the first n odd numbers equals n squared.*)
    18 (*The sum of the first n odd numbers equals n squared.*)
    18 Goal "sum (%i. Suc(i+i)) n = n*n";
    19 Goal "sum (%i. Suc(i+i)) n = n*n";
    19 by (induct_tac "n" 1);
    20 by (induct_tac "n" 1);
    20 by Auto_tac;
    21 by Auto_tac;