src/HOL/Complex/CSeries.thy
author nipkow
Mon, 16 Aug 2004 14:22:27 +0200
changeset 15131 c69542757a4d
parent 15085 5693a977a767
child 15140 322485b816ac
permissions -rw-r--r--
New theory header syntax.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     1
(*  Title       : CSeries.thy
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     3
    Copyright   : 2002  University of Edinburgh
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     4
*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
     5
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
     6
header{*Finite Summation and Infinite Series for Complex Numbers*}
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
     7
15131
c69542757a4d New theory header syntax.
nipkow
parents: 15085
diff changeset
     8
theory CSeries
c69542757a4d New theory header syntax.
nipkow
parents: 15085
diff changeset
     9
import CStar
c69542757a4d New theory header syntax.
nipkow
parents: 15085
diff changeset
    10
begin
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    11
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    12
consts sumc :: "[nat,nat,(nat=>complex)] => complex"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    13
primrec
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    14
   sumc_0:   "sumc m 0 f = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    15
   sumc_Suc: "sumc m (Suc n) f = (if n < m then 0 else sumc m n f + f(n))"
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    16
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    17
(*  
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    18
constdefs
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    19
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    20
   needs convergence of complex sequences  
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    21
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    22
  csums  :: [nat=>complex,complex] => bool     (infixr 80)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    23
   "f sums s  == (%n. sumr 0 n f) ----C> s"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    24
  
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    25
   csummable :: (nat=>complex) => bool
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    26
   "csummable f == (EX s. f csums s)"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    27
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    28
   csuminf   :: (nat=>complex) => complex
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    29
   "csuminf f == (@s. f csums s)"
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    30
*)
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
    31
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    32
lemma sumc_Suc_zero [simp]: "sumc (Suc n) n f = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    33
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    34
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    35
lemma sumc_eq_bounds [simp]: "sumc m m f = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    36
by (induct_tac "m", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    37
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    38
lemma sumc_Suc_eq [simp]: "sumc m (Suc m) f = f(m)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    39
by auto
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    40
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    41
lemma sumc_add_lbound_zero [simp]: "sumc (m+k) k f = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    42
by (induct_tac "k", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    43
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    44
lemma sumc_add: "sumc m n f + sumc m n g = sumc m n (%n. f n + g n)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    45
apply (induct_tac "n")
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    46
apply (auto simp add: add_ac)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    47
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    48
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    49
lemma sumc_mult: "r * sumc m n f = sumc m n (%n. r * f n)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    50
apply (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    51
apply (auto simp add: right_distrib)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    52
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    53
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    54
lemma sumc_split_add [rule_format]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    55
     "n < p --> sumc 0 n f + sumc n p f = sumc 0 p f"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    56
apply (induct_tac "p") 
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    57
apply (auto dest!: leI dest: le_anti_sym)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    58
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    59
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    60
lemma sumc_split_add_minus:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    61
     "n < p ==> sumc 0 p f + - sumc 0 n f = sumc n p f"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    62
apply (drule_tac f1 = f in sumc_split_add [symmetric])
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    63
apply (simp add: add_ac)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    64
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    65
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    66
lemma sumc_cmod: "cmod(sumc m n f) \<le> sumr m n (%i. cmod(f i))"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    67
apply (induct_tac "n")
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    68
apply (auto intro: complex_mod_triangle_ineq [THEN order_trans])
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    69
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    70
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    71
lemma sumc_fun_eq [rule_format (no_asm)]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    72
     "(\<forall>r. m \<le> r & r < n --> f r = g r) --> sumc m n f = sumc m n g"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    73
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    74
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    75
lemma sumc_const [simp]: "sumc 0 n (%i. r) = complex_of_real (real n) * r"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    76
apply (induct_tac "n")
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 14406
diff changeset
    77
apply (auto simp add: left_distrib real_of_nat_Suc)
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    78
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    79
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    80
lemma sumc_add_mult_const:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    81
     "sumc 0 n f + -(complex_of_real(real n) * r) = sumc 0 n (%i. f i + -r)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    82
by (simp add: sumc_add [symmetric])
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    83
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    84
lemma sumc_diff_mult_const: 
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    85
     "sumc 0 n f - (complex_of_real(real n)*r) = sumc 0 n (%i. f i - r)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    86
by (simp add: diff_minus sumc_add_mult_const)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    87
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    88
lemma sumc_less_bounds_zero [rule_format]: "n < m --> sumc m n f = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    89
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    90
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    91
lemma sumc_minus: "sumc m n (%i. - f i) = - sumc m n f"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    92
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    93
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    94
lemma sumc_shift_bounds: "sumc (m+k) (n+k) f = sumc m n (%i. f(i + k))"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    95
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    96
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    97
lemma sumc_minus_one_complexpow_zero [simp]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    98
     "sumc 0 (2*n) (%i. (-1) ^ Suc i) = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
    99
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   100
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   101
lemma sumc_interval_const [rule_format (no_asm)]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   102
     "(\<forall>n. m \<le> Suc n --> f n = r) & m \<le> na  
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 14406
diff changeset
   103
      --> sumc m na f = (complex_of_real(real (na - m)) * r)"
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   104
apply (induct_tac "na")
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 14406
diff changeset
   105
apply (auto simp add: Suc_diff_le real_of_nat_Suc left_distrib)
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   106
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   107
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   108
lemma sumc_interval_const2 [rule_format (no_asm)]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   109
     "(\<forall>n. m \<le> n --> f n = r) & m \<le> na  
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   110
      --> sumc m na f = (complex_of_real(real (na - m)) * r)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   111
apply (induct_tac "na")
15013
34264f5e4691 new treatment of binary numerals
paulson
parents: 14406
diff changeset
   112
apply (auto simp add: left_distrib Suc_diff_le real_of_nat_Suc)
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   113
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   114
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   115
(*** 
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   116
Goal "(\<forall>n. m \<le> n --> 0 \<le> cmod(f n)) & m < k --> cmod(sumc 0 m f) \<le> cmod(sumc 0 k f)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   117
by (induct_tac "k" 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   118
by (Step_tac 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   119
by (ALLGOALS(asm_full_simp_tac (simpset() addsimps [less_Suc_eq_le])));
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   120
by (ALLGOALS(dres_inst_tac [("x","n")] spec));
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   121
by (Step_tac 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   122
by (dtac le_imp_less_or_eq 1 THEN Step_tac 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   123
by (dtac add_mono 2)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   124
by (dres_inst_tac [("i","sumr 0 m f")] (order_refl RS add_mono) 1);
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   125
by Auto_tac
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   126
qed_spec_mp "sumc_le";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   127
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   128
Goal "!!f g. (\<forall>r. m \<le> r & r < n --> f r \<le> g r) \
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   129
\                --> sumc m n f \<le> sumc m n g";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   130
by (induct_tac "n" 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   131
by (auto_tac (claset() addIs [add_mono],
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   132
    simpset() addsimps [le_def]));
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   133
qed_spec_mp "sumc_le2";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   134
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   135
Goal "(\<forall>n. 0 \<le> f n) --> 0 \<le> sumc m n f";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   136
by (induct_tac "n" 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   137
by Auto_tac
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   138
by (dres_inst_tac [("x","n")] spec 1);
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   139
by (arith_tac 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   140
qed_spec_mp "sumc_ge_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   141
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   142
Goal "(\<forall>n. m \<le> n --> 0 \<le> f n) --> 0 \<le> sumc m n f";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   143
by (induct_tac "n" 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   144
by Auto_tac
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   145
by (dres_inst_tac [("x","n")] spec 1);
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   146
by (arith_tac 1)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   147
qed_spec_mp "sumc_ge_zero2";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   148
***)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   149
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   150
lemma sumr_cmod_ge_zero [iff]: "0 \<le> sumr m n (%n. cmod (f n))"
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15013
diff changeset
   151
by (induct_tac "n", auto simp add: add_increasing) 
14406
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   152
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   153
lemma rabs_sumc_cmod_cancel [simp]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   154
     "abs (sumr m n (%n. cmod (f n))) = (sumr m n (%n. cmod (f n)))"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   155
by (simp add: abs_if linorder_not_less)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   156
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   157
lemma sumc_one_lb_complexpow_zero [simp]: "sumc 1 n (%n. f(n) * 0 ^ n) = 0"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   158
apply (induct_tac "n")
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   159
apply (case_tac [2] "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   160
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   161
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   162
lemma sumc_diff: "sumc m n f - sumc m n g = sumc m n (%n. f n - g n)"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   163
by (simp add: diff_minus sumc_add [symmetric] sumc_minus)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   164
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   165
lemma sumc_subst [rule_format (no_asm)]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   166
     "(\<forall>p. (m \<le> p & p < m + n --> (f p = g p))) --> sumc m n f = sumc m n g"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   167
by (induct_tac "n", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   168
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   169
lemma sumc_group [simp]:
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   170
     "sumc 0 n (%m. sumc (m * k) (m*k + k) f) = sumc 0 (n * k) f"
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   171
apply (subgoal_tac "k = 0 | 0 < k", auto)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   172
apply (induct_tac "n")
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   173
apply (auto simp add: sumc_split_add add_commute)
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   174
done
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   175
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   176
ML
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   177
{*
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   178
val sumc_Suc_zero = thm "sumc_Suc_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   179
val sumc_eq_bounds = thm "sumc_eq_bounds";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   180
val sumc_Suc_eq = thm "sumc_Suc_eq";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   181
val sumc_add_lbound_zero = thm "sumc_add_lbound_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   182
val sumc_add = thm "sumc_add";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   183
val sumc_mult = thm "sumc_mult";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   184
val sumc_split_add = thm "sumc_split_add";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   185
val sumc_split_add_minus = thm "sumc_split_add_minus";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   186
val sumc_cmod = thm "sumc_cmod";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   187
val sumc_fun_eq = thm "sumc_fun_eq";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   188
val sumc_const = thm "sumc_const";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   189
val sumc_add_mult_const = thm "sumc_add_mult_const";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   190
val sumc_diff_mult_const = thm "sumc_diff_mult_const";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   191
val sumc_less_bounds_zero = thm "sumc_less_bounds_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   192
val sumc_minus = thm "sumc_minus";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   193
val sumc_shift_bounds = thm "sumc_shift_bounds";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   194
val sumc_minus_one_complexpow_zero = thm "sumc_minus_one_complexpow_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   195
val sumc_interval_const = thm "sumc_interval_const";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   196
val sumc_interval_const2 = thm "sumc_interval_const2";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   197
val sumr_cmod_ge_zero = thm "sumr_cmod_ge_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   198
val rabs_sumc_cmod_cancel = thm "rabs_sumc_cmod_cancel";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   199
val sumc_one_lb_complexpow_zero = thm "sumc_one_lb_complexpow_zero";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   200
val sumc_diff = thm "sumc_diff";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   201
val sumc_subst = thm "sumc_subst";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   202
val sumc_group = thm "sumc_group";
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   203
*}
e447f23bbe2d conversion of Complex/CSeries to Isar script
paulson
parents: 13957
diff changeset
   204
13957
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   205
end
10dbf16be15f new session Complex for the complex numbers
paulson
parents:
diff changeset
   206