src/HOL/Hyperreal/Series.thy
author paulson
Tue, 19 Oct 2004 18:18:45 +0200
changeset 15251 bb6f072c8d10
parent 15234 ec91a90c604e
child 15360 300e09825d8b
permissions -rw-r--r--
converted some induct_tac to induct
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
     1
(*  Title       : Series.thy
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
     3
    Copyright   : 1998  University of Cambridge
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
     4
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
     5
Converted to Isar and polished by lcp
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
     6
*) 
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
     7
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
     8
header{*Finite Summation and Infinite Series*}
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
     9
15131
c69542757a4d New theory header syntax.
nipkow
parents: 15085
diff changeset
    10
theory Series
15140
322485b816ac import -> imports
nipkow
parents: 15131
diff changeset
    11
imports SEQ Lim
15131
c69542757a4d New theory header syntax.
nipkow
parents: 15085
diff changeset
    12
begin
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
    13
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    14
syntax sumr :: "[nat,nat,(nat=>real)] => real"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    15
translations
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    16
  "sumr m n f" => "setsum (f::nat=>real) (atLeastLessThan m n)"
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
    17
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
    18
constdefs
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    19
   sums  :: "[nat=>real,real] => bool"     (infixr "sums" 80)
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
    20
   "f sums s  == (%n. sumr 0 n f) ----> s"
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
    21
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    22
   summable :: "(nat=>real) => bool"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    23
   "summable f == (\<exists>s. f sums s)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    24
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    25
   suminf   :: "(nat=>real) => real"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    26
   "suminf f == (@s. f sums s)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    27
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    28
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    29
lemma sumr_Suc [simp]:
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    30
     "sumr m (Suc n) f = (if n < m then 0 else sumr m n f + f(n))"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    31
by (simp add: atLeastLessThanSuc)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    32
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    33
lemma sumr_add: "sumr m n f + sumr m n g = sumr m n (%n. f n + g n)"
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    34
by (simp add: setsum_addf)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    35
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    36
lemma sumr_mult: "r * sumr m n (f::nat=>real) = sumr m n (%n. r * f n)"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    37
by (simp add: setsum_mult)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    38
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    39
lemma sumr_split_add [rule_format]:
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    40
     "n < p --> sumr 0 n f + sumr n p f = sumr 0 p (f::nat=>real)"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    41
apply (induct "p", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    42
apply (rename_tac k) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    43
apply (subgoal_tac "n=k", auto) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    44
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    45
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    46
lemma sumr_split_add_minus:
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    47
     "n < p ==> sumr 0 p f + - sumr 0 n f = sumr n p (f::nat=>real)"
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    48
apply (drule_tac f1 = f in sumr_split_add [symmetric])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    49
apply (simp add: add_ac)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    50
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    51
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    52
lemma sumr_rabs: "abs(sumr m n  (f::nat=>real)) \<le> sumr m n (%i. abs(f i))"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    53
by (simp add: setsum_abs)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    54
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    55
lemma sumr_rabs_ge_zero [iff]: "0 \<le> sumr m n (%n. abs (f n))"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    56
by (simp add: setsum_abs_ge_zero)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    57
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    58
text{*Just a congruence rule*}
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    59
lemma sumr_fun_eq:
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    60
     "(\<forall>r. m \<le> r & r < n --> f r = g r) ==> sumr m n f = sumr m n g"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    61
by (auto intro: setsum_cong) 
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    62
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    63
lemma sumr_diff_mult_const: "sumr 0 n f - (real n*r) = sumr 0 n (%i. f i - r)"
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    64
by (simp add: diff_minus setsum_addf real_of_nat_def)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    65
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    66
lemma sumr_less_bounds_zero [simp]: "n < m ==> sumr m n f = 0"
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    67
by (simp add: atLeastLessThan_empty)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    68
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    69
lemma sumr_minus: "sumr m n (%i. - f i) = - sumr m n f"
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    70
by (simp add: Finite_Set.setsum_negf)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    71
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    72
lemma sumr_shift_bounds: "sumr (m+k) (n+k) f = sumr m n (%i. f(i + k))"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    73
by (induct "n", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    74
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    75
lemma sumr_minus_one_realpow_zero [simp]: "sumr 0 (2*n) (%i. (-1) ^ Suc i) = 0"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    76
by (induct "n", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    77
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    78
lemma sumr_interval_const:
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    79
     "\<lbrakk>\<forall>n. m \<le> Suc n --> f n = r; m \<le> k\<rbrakk> \<Longrightarrow> sumr m k f = (real(k-m) * r)"
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    80
apply (induct "k", auto) 
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    81
apply (drule_tac x = k in spec)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    82
apply (auto dest!: le_imp_less_or_eq)
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    83
apply (simp add: left_distrib real_of_nat_Suc split: nat_diff_split)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    84
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    85
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    86
lemma sumr_interval_const2:
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    87
     "[|\<forall>n. m \<le> n --> f n = r; m \<le> k|]
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    88
      ==> sumr m k f = (real (k - m) * r)"
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    89
apply (induct "k", auto) 
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    90
apply (drule_tac x = k in spec)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    91
apply (auto dest!: le_imp_less_or_eq)
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    92
apply (simp add: left_distrib real_of_nat_Suc split: nat_diff_split)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    93
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    94
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
    95
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    96
lemma sumr_le:
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    97
     "[|\<forall>n. m \<le> n --> 0 \<le> f n; m < k|] ==> sumr 0 m f \<le> sumr 0 k f"
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
    98
apply (induct "k")
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
    99
apply (auto simp add: less_Suc_eq_le)
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   100
apply (drule_tac x = k in spec, safe)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   101
apply (drule le_imp_less_or_eq, safe)
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
   102
apply (arith) 
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   103
apply (drule_tac a = "sumr 0 m f" in order_refl [THEN add_mono], auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   104
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   105
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   106
lemma sumr_le2 [rule_format (no_asm)]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   107
     "(\<forall>r. m \<le> r & r < n --> f r \<le> g r) --> sumr m n f \<le> sumr m n g"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   108
apply (induct "n")
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   109
apply (auto intro: add_mono simp add: le_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   110
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   111
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   112
lemma sumr_ge_zero: "(\<forall>n. m \<le> n --> 0 \<le> f n) --> 0 \<le> sumr m n f"
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   113
apply (induct "n", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   114
apply (drule_tac x = n in spec, arith)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   115
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   116
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   117
lemma rabs_sumr_rabs_cancel [simp]:
15229
1eb23f805c06 new simprules for abs and for things like a/b<1
paulson
parents: 15140
diff changeset
   118
     "abs (sumr m n (%k. abs (f k))) = (sumr m n (%k. abs (f k)))"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   119
by (induct "n", simp_all add: add_increasing)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   120
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   121
lemma sumr_zero [rule_format]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   122
     "\<forall>n. N \<le> n --> f n = 0 ==> N \<le> m --> sumr m n f = 0"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   123
by (induct "n", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   124
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   125
lemma Suc_le_imp_diff_ge2:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   126
     "[|\<forall>n. N \<le> n --> f (Suc n) = 0; Suc N \<le> m|] ==> sumr m n f = 0"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   127
apply (rule sumr_zero) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   128
apply (case_tac "n", auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   129
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   130
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   131
lemma sumr_one_lb_realpow_zero [simp]: "sumr (Suc 0) n (%n. f(n) * 0 ^ n) = 0"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   132
apply (induct "n")
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   133
apply (case_tac [2] "n", auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   134
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   135
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   136
lemma sumr_diff: "sumr m n f - sumr m n g = sumr m n (%n. f n - g n)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   137
by (simp add: diff_minus sumr_add [symmetric] sumr_minus)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   138
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   139
lemma sumr_subst [rule_format (no_asm)]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   140
     "(\<forall>p. m \<le> p & p < m+n --> (f p = g p)) --> sumr m n f = sumr m n g"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   141
by (induct "n", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   142
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   143
lemma sumr_bound [rule_format (no_asm)]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   144
     "(\<forall>p. m \<le> p & p < m + n --> (f(p) \<le> K))  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   145
      --> (sumr m (m + n) f \<le> (real n * K))"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   146
apply (induct "n")
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   147
apply (auto intro: add_mono simp add: left_distrib real_of_nat_Suc)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   148
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   149
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   150
lemma sumr_bound2 [rule_format (no_asm)]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   151
     "(\<forall>p. 0 \<le> p & p < n --> (f(p) \<le> K))  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   152
      --> (sumr 0 n f \<le> (real n * K))"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   153
apply (induct "n")
15047
fa62de5862b9 redefining sumr to be a translation to setsum
paulson
parents: 15003
diff changeset
   154
apply (auto intro: add_mono simp add: left_distrib real_of_nat_Suc add_commute)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   155
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   156
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   157
lemma sumr_group [simp]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   158
     "sumr 0 n (%m. sumr (m * k) (m*k + k) f) = sumr 0 (n * k) f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   159
apply (subgoal_tac "k = 0 | 0 < k", auto)
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   160
apply (induct "n")
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   161
apply (simp_all add: sumr_split_add add_commute)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   162
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   163
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   164
subsection{* Infinite Sums, by the Properties of Limits*}
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   165
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   166
(*----------------------
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   167
   suminf is the sum   
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   168
 ---------------------*)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   169
lemma sums_summable: "f sums l ==> summable f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   170
by (simp add: sums_def summable_def, blast)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   171
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   172
lemma summable_sums: "summable f ==> f sums (suminf f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   173
apply (simp add: summable_def suminf_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   174
apply (blast intro: someI2)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   175
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   176
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   177
lemma summable_sumr_LIMSEQ_suminf: 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   178
     "summable f ==> (%n. sumr 0 n f) ----> (suminf f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   179
apply (simp add: summable_def suminf_def sums_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   180
apply (blast intro: someI2)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   181
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   182
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   183
(*-------------------
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   184
    sum is unique                    
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   185
 ------------------*)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   186
lemma sums_unique: "f sums s ==> (s = suminf f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   187
apply (frule sums_summable [THEN summable_sums])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   188
apply (auto intro!: LIMSEQ_unique simp add: sums_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   189
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   190
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   191
(*
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   192
Goalw [sums_def,LIMSEQ_def] 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   193
     "(\<forall>m. n \<le> Suc m --> f(m) = 0) ==> f sums (sumr 0 n f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   194
by safe
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   195
by (res_inst_tac [("x","n")] exI 1);
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   196
by (safe THEN ftac le_imp_less_or_eq 1)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   197
by safe
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   198
by (dres_inst_tac [("f","f")] sumr_split_add_minus 1);
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   199
by (ALLGOALS (Asm_simp_tac));
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   200
by (dtac (conjI RS sumr_interval_const) 1);
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   201
by Auto_tac
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   202
qed "series_zero";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   203
next one was called series_zero2
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   204
**********************)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   205
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   206
lemma series_zero: 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   207
     "(\<forall>m. n \<le> m --> f(m) = 0) ==> f sums (sumr 0 n f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   208
apply (simp add: sums_def LIMSEQ_def, safe)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   209
apply (rule_tac x = n in exI)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   210
apply (safe, frule le_imp_less_or_eq, safe)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   211
apply (drule_tac f = f in sumr_split_add_minus, simp_all)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   212
apply (drule sumr_interval_const2, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   213
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   214
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   215
lemma sums_mult: "x sums x0 ==> (%n. c * x(n)) sums (c * x0)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   216
by (auto simp add: sums_def sumr_mult [symmetric]
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   217
         intro!: LIMSEQ_mult intro: LIMSEQ_const)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   218
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   219
lemma sums_divide: "x sums x' ==> (%n. x(n)/c) sums (x'/c)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   220
by (simp add: real_divide_def sums_mult mult_commute [of _ "inverse c"])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   221
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   222
lemma sums_diff: "[| x sums x0; y sums y0 |] ==> (%n. x n - y n) sums (x0-y0)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   223
by (auto simp add: sums_def sumr_diff [symmetric] intro: LIMSEQ_diff)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   224
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   225
lemma suminf_mult: "summable f ==> suminf f * c = suminf(%n. f n * c)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   226
by (auto intro!: sums_unique sums_mult summable_sums simp add: mult_commute)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   227
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   228
lemma suminf_mult2: "summable f ==> c * suminf f  = suminf(%n. c * f n)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   229
by (auto intro!: sums_unique sums_mult summable_sums)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   230
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   231
lemma suminf_diff:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   232
     "[| summable f; summable g |]   
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   233
      ==> suminf f - suminf g  = suminf(%n. f n - g n)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   234
by (auto intro!: sums_diff sums_unique summable_sums)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   235
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   236
lemma sums_minus: "x sums x0 ==> (%n. - x n) sums - x0"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   237
by (auto simp add: sums_def intro!: LIMSEQ_minus simp add: sumr_minus)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   238
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   239
lemma sums_group:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   240
     "[|summable f; 0 < k |] ==> (%n. sumr (n*k) (n*k + k) f) sums (suminf f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   241
apply (drule summable_sums)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   242
apply (auto simp add: sums_def LIMSEQ_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   243
apply (drule_tac x = r in spec, safe)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   244
apply (rule_tac x = no in exI, safe)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   245
apply (drule_tac x = "n*k" in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   246
apply (auto dest!: not_leE)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   247
apply (drule_tac j = no in less_le_trans, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   248
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   249
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   250
lemma sumr_pos_lt_pair_lemma:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   251
     "[|\<forall>d. - f (n + (d + d)) < f (Suc (n + (d + d)))|]
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   252
      ==> sumr 0 (n + Suc (Suc 0)) f \<le> sumr 0 (Suc (Suc 0) * Suc no + n) f"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   253
apply (induct "no", auto)
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   254
apply (drule_tac x = "Suc no" in spec)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   255
apply (simp add: add_ac) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   256
done
10751
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
   257
a81ea5d3dd41 separation of HOL-Hyperreal from HOL-Real
paulson
parents:
diff changeset
   258
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   259
lemma sumr_pos_lt_pair:
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   260
     "[|summable f; 
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   261
        \<forall>d. 0 < (f(n + (Suc(Suc 0) * d))) + f(n + ((Suc(Suc 0) * d) + 1))|]  
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   262
      ==> sumr 0 n f < suminf f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   263
apply (drule summable_sums)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   264
apply (auto simp add: sums_def LIMSEQ_def)
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   265
apply (drule_tac x = "f (n) + f (n + 1)" in spec)
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   266
apply (auto iff: real_0_less_add_iff)
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   267
   --{*legacy proof: not necessarily better!*}
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   268
apply (rule_tac [2] ccontr, drule_tac [2] linorder_not_less [THEN iffD1])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   269
apply (frule_tac [2] no=no in sumr_pos_lt_pair_lemma) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   270
apply (drule_tac x = 0 in spec, simp)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   271
apply (rotate_tac 1, drule_tac x = "Suc (Suc 0) * (Suc no) + n" in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   272
apply (safe, simp)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   273
apply (subgoal_tac "suminf f + (f (n) + f (n + 1)) \<le> sumr 0 (Suc (Suc 0) * (Suc no) + n) f")
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   274
apply (rule_tac [2] y = "sumr 0 (n+ Suc (Suc 0)) f" in order_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   275
prefer 3 apply assumption
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   276
apply (rule_tac [2] y = "sumr 0 n f + (f (n) + f (n + 1))" in order_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   277
apply simp_all 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   278
apply (subgoal_tac "suminf f \<le> sumr 0 (Suc (Suc 0) * (Suc no) + n) f")
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   279
apply (rule_tac [2] y = "suminf f + (f (n) + f (n + 1))" in order_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   280
prefer 3 apply simp 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   281
apply (drule_tac [2] x = 0 in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   282
 prefer 2 apply simp 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   283
apply (subgoal_tac "0 \<le> sumr 0 (Suc (Suc 0) * Suc no + n) f + - suminf f")
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   284
apply (simp add: abs_if) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   285
apply (auto simp add: linorder_not_less [symmetric])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   286
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   287
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   288
text{*A summable series of positive terms has limit that is at least as
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   289
great as any partial sum.*}
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   290
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   291
lemma series_pos_le: 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   292
     "[| summable f; \<forall>m. n \<le> m --> 0 \<le> f(m) |] ==> sumr 0 n f \<le> suminf f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   293
apply (drule summable_sums)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   294
apply (simp add: sums_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   295
apply (cut_tac k = "sumr 0 n f" in LIMSEQ_const)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   296
apply (erule LIMSEQ_le, blast) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   297
apply (rule_tac x = n in exI, clarify) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   298
apply (drule le_imp_less_or_eq)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   299
apply (auto intro: sumr_le)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   300
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   301
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   302
lemma series_pos_less:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   303
     "[| summable f; \<forall>m. n \<le> m --> 0 < f(m) |] ==> sumr 0 n f < suminf f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   304
apply (rule_tac y = "sumr 0 (Suc n) f" in order_less_le_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   305
apply (rule_tac [2] series_pos_le, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   306
apply (drule_tac x = m in spec, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   307
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   308
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   309
text{*Sum of a geometric progression.*}
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   310
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   311
lemma sumr_geometric: "x ~= 1 ==> sumr 0 n (%n. x ^ n) = (x ^ n - 1) / (x - 1)"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   312
apply (induct "n", auto)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   313
apply (rule_tac c1 = "x - 1" in real_mult_right_cancel [THEN iffD1])
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   314
apply (auto simp add: mult_assoc left_distrib  times_divide_eq)
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   315
apply (simp add: right_distrib diff_minus mult_commute)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   316
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   317
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   318
lemma geometric_sums: "abs(x) < 1 ==> (%n. x ^ n) sums (1/(1 - x))"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   319
apply (case_tac "x = 1")
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   320
apply (auto dest!: LIMSEQ_rabs_realpow_zero2 
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   321
        simp add: sumr_geometric sums_def diff_minus add_divide_distrib)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   322
apply (subgoal_tac "1 / (1 + -x) = 0/ (x - 1) + - 1/ (x - 1) ")
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   323
apply (erule ssubst)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   324
apply (rule LIMSEQ_add, rule LIMSEQ_divide)
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   325
apply (auto intro: LIMSEQ_const simp add: diff_minus minus_divide_right LIMSEQ_rabs_realpow_zero2)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   326
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   327
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   328
text{*Cauchy-type criterion for convergence of series (c.f. Harrison)*}
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   329
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   330
lemma summable_convergent_sumr_iff: "summable f = convergent (%n. sumr 0 n f)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   331
by (simp add: summable_def sums_def convergent_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   332
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   333
lemma summable_Cauchy:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   334
     "summable f =  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   335
      (\<forall>e. 0 < e --> (\<exists>N. \<forall>m n. N \<le> m --> abs(sumr m n f) < e))"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   336
apply (auto simp add: summable_convergent_sumr_iff Cauchy_convergent_iff [symmetric] Cauchy_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   337
apply (drule_tac [!] spec, auto) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   338
apply (rule_tac x = M in exI)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   339
apply (rule_tac [2] x = N in exI, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   340
apply (cut_tac [!] m = m and n = n in less_linear, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   341
apply (frule le_less_trans [THEN less_imp_le], assumption)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   342
apply (drule_tac x = n in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   343
apply (drule_tac x = m in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   344
apply (auto intro: abs_minus_add_cancel [THEN subst]
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   345
            simp add: sumr_split_add_minus abs_minus_add_cancel)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   346
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   347
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   348
text{*Comparison test*}
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   349
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   350
lemma summable_comparison_test:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   351
     "[| \<exists>N. \<forall>n. N \<le> n --> abs(f n) \<le> g n; summable g |] ==> summable f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   352
apply (auto simp add: summable_Cauchy)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   353
apply (drule spec, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   354
apply (rule_tac x = "N + Na" in exI, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   355
apply (rotate_tac 2)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   356
apply (drule_tac x = m in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   357
apply (auto, rotate_tac 2, drule_tac x = n in spec)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   358
apply (rule_tac y = "sumr m n (%k. abs (f k))" in order_le_less_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   359
apply (rule sumr_rabs)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   360
apply (rule_tac y = "sumr m n g" in order_le_less_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   361
apply (auto intro: sumr_le2 simp add: abs_interval_iff)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   362
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   363
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   364
lemma summable_rabs_comparison_test:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   365
     "[| \<exists>N. \<forall>n. N \<le> n --> abs(f n) \<le> g n; summable g |] 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   366
      ==> summable (%k. abs (f k))"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   367
apply (rule summable_comparison_test)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   368
apply (auto simp add: abs_idempotent)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   369
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   370
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   371
text{*Limit comparison property for series (c.f. jrh)*}
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   372
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   373
lemma summable_le:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   374
     "[|\<forall>n. f n \<le> g n; summable f; summable g |] ==> suminf f \<le> suminf g"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   375
apply (drule summable_sums)+
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   376
apply (auto intro!: LIMSEQ_le simp add: sums_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   377
apply (rule exI)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   378
apply (auto intro!: sumr_le2)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   379
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   380
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   381
lemma summable_le2:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   382
     "[|\<forall>n. abs(f n) \<le> g n; summable g |]  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   383
      ==> summable f & suminf f \<le> suminf g"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   384
apply (auto intro: summable_comparison_test intro!: summable_le)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   385
apply (simp add: abs_le_interval_iff)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   386
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   387
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   388
text{*Absolute convergence imples normal convergence*}
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   389
lemma summable_rabs_cancel: "summable (%n. abs (f n)) ==> summable f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   390
apply (auto simp add: sumr_rabs summable_Cauchy)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   391
apply (drule spec, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   392
apply (rule_tac x = N in exI, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   393
apply (drule spec, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   394
apply (rule_tac y = "sumr m n (%n. abs (f n))" in order_le_less_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   395
apply (auto intro: sumr_rabs)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   396
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   397
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   398
text{*Absolute convergence of series*}
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   399
lemma summable_rabs:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   400
     "summable (%n. abs (f n)) ==> abs(suminf f) \<le> suminf (%n. abs(f n))"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   401
by (auto intro: LIMSEQ_le LIMSEQ_imp_rabs summable_rabs_cancel summable_sumr_LIMSEQ_suminf sumr_rabs)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   402
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   403
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   404
subsection{* The Ratio Test*}
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   405
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   406
lemma rabs_ratiotest_lemma: "[| c \<le> 0; abs x \<le> c * abs y |] ==> x = (0::real)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   407
apply (drule order_le_imp_less_or_eq, auto)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   408
apply (subgoal_tac "0 \<le> c * abs y")
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   409
apply (simp add: zero_le_mult_iff, arith)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   410
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   411
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   412
lemma le_Suc_ex: "(k::nat) \<le> l ==> (\<exists>n. l = k + n)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   413
apply (drule le_imp_less_or_eq)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   414
apply (auto dest: less_imp_Suc_add)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   415
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   417
lemma le_Suc_ex_iff: "((k::nat) \<le> l) = (\<exists>n. l = k + n)"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   418
by (auto simp add: le_Suc_ex)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   419
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   420
(*All this trouble just to get 0<c *)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   421
lemma ratio_test_lemma2:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   422
     "[| \<forall>n. N \<le> n --> abs(f(Suc n)) \<le> c*abs(f n) |]  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   423
      ==> 0 < c | summable f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   424
apply (simp (no_asm) add: linorder_not_le [symmetric])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   425
apply (simp add: summable_Cauchy)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   426
apply (safe, subgoal_tac "\<forall>n. N \<le> n --> f (Suc n) = 0")
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   427
prefer 2 apply (blast intro: rabs_ratiotest_lemma)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   428
apply (rule_tac x = "Suc N" in exI, clarify)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   429
apply (drule_tac n=n in Suc_le_imp_diff_ge2, auto) 
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   430
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   431
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   432
lemma ratio_test:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   433
     "[| c < 1; \<forall>n. N \<le> n --> abs(f(Suc n)) \<le> c*abs(f n) |]  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   434
      ==> summable f"
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   435
apply (frule ratio_test_lemma2, auto)
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   436
apply (rule_tac g = "%n. (abs (f N) / (c ^ N))*c ^ n" 
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   437
       in summable_comparison_test)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   438
apply (rule_tac x = N in exI, safe)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   439
apply (drule le_Suc_ex_iff [THEN iffD1])
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   440
apply (auto simp add: power_add realpow_not_zero)
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   441
apply (induct_tac "na", auto simp add: times_divide_eq)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   442
apply (rule_tac y = "c*abs (f (N + n))" in order_trans)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   443
apply (auto intro: mult_right_mono simp add: summable_def)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   444
apply (simp add: mult_ac)
15234
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   445
apply (rule_tac x = "abs (f N) * (1/ (1 - c)) / (c ^ N)" in exI)
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   446
apply (rule sums_divide) 
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   447
apply (rule sums_mult) 
ec91a90c604e simplification tweaks for better arithmetic reasoning
paulson
parents: 15229
diff changeset
   448
apply (auto intro!: geometric_sums)
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   449
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   450
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   451
15085
5693a977a767 removed some [iff] declarations from RealDef.thy, concerning inequalities
paulson
parents: 15053
diff changeset
   452
text{*Differentiation of finite sum*}
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   453
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   454
lemma DERIV_sumr [rule_format (no_asm)]:
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   455
     "(\<forall>r. m \<le> r & r < (m + n) --> DERIV (%x. f r x) x :> (f' r x))  
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   456
      --> DERIV (%x. sumr m n (%n. f n x)) x :> sumr m n (%r. f' r x)"
15251
bb6f072c8d10 converted some induct_tac to induct
paulson
parents: 15234
diff changeset
   457
apply (induct "n")
14416
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   458
apply (auto intro: DERIV_add)
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   459
done
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   460
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   461
ML
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   462
{*
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   463
val sumr_Suc = thm"sumr_Suc";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   464
val sums_def = thm"sums_def";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   465
val summable_def = thm"summable_def";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   466
val suminf_def = thm"suminf_def";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   467
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   468
val sumr_add = thm "sumr_add";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   469
val sumr_mult = thm "sumr_mult";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   470
val sumr_split_add = thm "sumr_split_add";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   471
val sumr_rabs = thm "sumr_rabs";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   472
val sumr_fun_eq = thm "sumr_fun_eq";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   473
val sumr_diff_mult_const = thm "sumr_diff_mult_const";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   474
val sumr_minus_one_realpow_zero = thm "sumr_minus_one_realpow_zero";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   475
val sumr_le2 = thm "sumr_le2";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   476
val rabs_sumr_rabs_cancel = thm "rabs_sumr_rabs_cancel";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   477
val sumr_zero = thm "sumr_zero";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   478
val Suc_le_imp_diff_ge2 = thm "Suc_le_imp_diff_ge2";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   479
val sumr_one_lb_realpow_zero = thm "sumr_one_lb_realpow_zero";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   480
val sumr_diff = thm "sumr_diff";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   481
val sumr_subst = thm "sumr_subst";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   482
val sumr_bound = thm "sumr_bound";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   483
val sumr_bound2 = thm "sumr_bound2";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   484
val sumr_group = thm "sumr_group";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   485
val sums_summable = thm "sums_summable";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   486
val summable_sums = thm "summable_sums";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   487
val summable_sumr_LIMSEQ_suminf = thm "summable_sumr_LIMSEQ_suminf";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   488
val sums_unique = thm "sums_unique";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   489
val series_zero = thm "series_zero";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   490
val sums_mult = thm "sums_mult";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   491
val sums_divide = thm "sums_divide";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   492
val sums_diff = thm "sums_diff";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   493
val suminf_mult = thm "suminf_mult";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   494
val suminf_mult2 = thm "suminf_mult2";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   495
val suminf_diff = thm "suminf_diff";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   496
val sums_minus = thm "sums_minus";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   497
val sums_group = thm "sums_group";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   498
val sumr_pos_lt_pair_lemma = thm "sumr_pos_lt_pair_lemma";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   499
val sumr_pos_lt_pair = thm "sumr_pos_lt_pair";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   500
val series_pos_le = thm "series_pos_le";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   501
val series_pos_less = thm "series_pos_less";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   502
val sumr_geometric = thm "sumr_geometric";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   503
val geometric_sums = thm "geometric_sums";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   504
val summable_convergent_sumr_iff = thm "summable_convergent_sumr_iff";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   505
val summable_Cauchy = thm "summable_Cauchy";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   506
val summable_comparison_test = thm "summable_comparison_test";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   507
val summable_rabs_comparison_test = thm "summable_rabs_comparison_test";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   508
val summable_le = thm "summable_le";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   509
val summable_le2 = thm "summable_le2";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   510
val summable_rabs_cancel = thm "summable_rabs_cancel";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   511
val summable_rabs = thm "summable_rabs";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   512
val rabs_ratiotest_lemma = thm "rabs_ratiotest_lemma";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   513
val le_Suc_ex = thm "le_Suc_ex";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   514
val le_Suc_ex_iff = thm "le_Suc_ex_iff";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   515
val ratio_test_lemma2 = thm "ratio_test_lemma2";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   516
val ratio_test = thm "ratio_test";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   517
val DERIV_sumr = thm "DERIV_sumr";
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   518
*}
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   519
1f256287d4f0 converted Hyperreal/Series to Isar script
paulson
parents: 12018
diff changeset
   520
end