Theory Arithmetic_Series_Complex

Up to index of Isabelle/HOL/HOL-Complex/ex

theory Arithmetic_Series_Complex
imports Complex_Main
begin

(*  Title:      HOL/Complex/ex/Arithmetic_Series_Complex
    ID:         $Id: Arithmetic_Series_Complex.thy,v 1.2 2006/04/26 05:01:33 kleing Exp $
    Author:     Benjamin Porter, 2006
*)


header {* Arithmetic Series for Reals *}

theory Arithmetic_Series_Complex
imports Complex_Main 
begin

lemma arith_series_real:
  "(2::real) * (∑i∈{..<n}. a + of_nat i * d) =
  of_nat n * (a + (a + of_nat(n - 1)*d))"
proof -
  have
    "((1::real) + 1) * (∑i∈{..<n}. a + of_nat(i)*d) =
    of_nat(n) * (a + (a + of_nat(n - 1)*d))"
    by (rule arith_series_general)
  thus ?thesis by simp
qed

end

lemma arith_series_real:

  2 * (∑i<n. a + real_of_nat i * d) =
  real_of_nat n * (a + (a + real_of_nat (n - 1) * d))