src/HOL/Hyperreal/HTranscendental.thy
author paulson
Mon, 01 Mar 2004 11:52:59 +0100
changeset 14420 4e72cd222e0b
parent 13958 c1c67582c9b5
child 14430 5cb24165a2e1
permissions -rw-r--r--
converted Hyperreal/HTranscendental to Isar script
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     1
(*  Title       : HTranscendental.thy
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     2
    Author      : Jacques D. Fleuriot
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     3
    Copyright   : 2001 University of Edinburgh
14420
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
     4
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
     5
Converted to Isar and polished by lcp
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     6
*)
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     7
14420
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
     8
header{*Nonstandard Extensions of Transcendental Functions*}
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
     9
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    10
theory HTranscendental = Transcendental + IntFloor:
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    11
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    12
constdefs
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    13
14420
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    14
  exphr :: "real => hypreal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    15
    --{*define exponential function using standard part *}
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    16
    "exphr x ==  st(sumhr (0, whn, %n. inverse(real (fact n)) * (x ^ n)))" 
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    17
14420
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    18
  sinhr :: "real => hypreal"
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    19
    "sinhr x == st(sumhr (0, whn, %n. (if even(n) then 0 else
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    20
             ((-1) ^ ((n - 1) div 2))/(real (fact n))) * (x ^ n)))"
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    21
  
14420
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    22
  coshr :: "real => hypreal"
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    23
    "coshr x == st(sumhr (0, whn, %n. (if even(n) then
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    24
            ((-1) ^ (n div 2))/(real (fact n)) else 0) * x ^ n))"
14420
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    25
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    26
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    27
subsection{*Nonstandard Extension of Square Root Function*}
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    28
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    29
lemma STAR_sqrt_zero [simp]: "( *f* sqrt) 0 = 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    30
by (simp add: starfun hypreal_zero_num)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    31
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    32
lemma STAR_sqrt_one [simp]: "( *f* sqrt) 1 = 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    33
by (simp add: starfun hypreal_one_num)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    34
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    35
lemma hypreal_sqrt_pow2_iff: "(( *f* sqrt)(x) ^ 2 = x) = (0 \<le> x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    36
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    37
apply (auto simp add: hypreal_le hypreal_zero_num starfun hrealpow 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    38
                      real_sqrt_pow2_iff 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    39
            simp del: hpowr_Suc realpow_Suc)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    40
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    41
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    42
lemma hypreal_sqrt_gt_zero_pow2: "0 < x ==> ( *f* sqrt) (x) ^ 2 = x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    43
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    44
apply (auto intro: FreeUltrafilterNat_subset real_sqrt_gt_zero_pow2
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    45
            simp add: hypreal_less starfun hrealpow hypreal_zero_num 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    46
            simp del: hpowr_Suc realpow_Suc)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    47
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    48
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    49
lemma hypreal_sqrt_pow2_gt_zero: "0 < x ==> 0 < ( *f* sqrt) (x) ^ 2"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    50
by (frule hypreal_sqrt_gt_zero_pow2, auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    51
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    52
lemma hypreal_sqrt_not_zero: "0 < x ==> ( *f* sqrt) (x) \<noteq> 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    53
apply (frule hypreal_sqrt_pow2_gt_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    54
apply (auto simp add: numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    55
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    56
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    57
lemma hypreal_inverse_sqrt_pow2:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    58
     "0 < x ==> inverse (( *f* sqrt)(x)) ^ 2 = inverse x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    59
apply (cut_tac n1 = 2 and a1 = "( *f* sqrt) x" in power_inverse [symmetric])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    60
apply (auto dest: hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    61
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    62
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    63
lemma hypreal_sqrt_mult_distrib: 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    64
    "[|0 < x; 0 <y |] ==> ( *f* sqrt)(x*y) =  ( *f* sqrt)(x) * ( *f* sqrt)(y)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    65
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    66
apply (rule eq_Abs_hypreal [of y])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    67
apply (simp add: hypreal_zero_def starfun hypreal_mult hypreal_less hypreal_zero_num, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    68
apply (auto intro: real_sqrt_mult_distrib) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    69
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    70
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    71
lemma hypreal_sqrt_mult_distrib2:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    72
     "[|0\<le>x; 0\<le>y |] ==>  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    73
     ( *f* sqrt)(x*y) =  ( *f* sqrt)(x) * ( *f* sqrt)(y)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    74
by (auto intro: hypreal_sqrt_mult_distrib simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    75
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    76
lemma hypreal_sqrt_approx_zero [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    77
     "0 < x ==> (( *f* sqrt)(x) @= 0) = (x @= 0)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    78
apply (auto simp add: mem_infmal_iff [symmetric])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    79
apply (rule hypreal_sqrt_gt_zero_pow2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    80
apply (auto intro: Infinitesimal_mult 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    81
            dest!: hypreal_sqrt_gt_zero_pow2 [THEN ssubst] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    82
            simp add: numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    83
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    84
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    85
lemma hypreal_sqrt_approx_zero2 [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    86
     "0 \<le> x ==> (( *f* sqrt)(x) @= 0) = (x @= 0)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    87
by (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    88
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    89
lemma hypreal_sqrt_sum_squares [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    90
     "(( *f* sqrt)(x*x + y*y + z*z) @= 0) = (x*x + y*y + z*z @= 0)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    91
apply (rule hypreal_sqrt_approx_zero2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    92
apply (rule hypreal_le_add_order)+
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    93
apply (auto simp add: zero_le_square)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    94
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    95
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    96
lemma hypreal_sqrt_sum_squares2 [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    97
     "(( *f* sqrt)(x*x + y*y) @= 0) = (x*x + y*y @= 0)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    98
apply (rule hypreal_sqrt_approx_zero2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
    99
apply (rule hypreal_le_add_order)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   100
apply (auto simp add: zero_le_square)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   101
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   102
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   103
lemma hypreal_sqrt_gt_zero: "0 < x ==> 0 < ( *f* sqrt)(x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   104
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   105
apply (auto simp add: starfun hypreal_zero_def hypreal_less hypreal_zero_num, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   106
apply (auto intro: real_sqrt_gt_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   107
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   108
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   109
lemma hypreal_sqrt_ge_zero: "0 \<le> x ==> 0 \<le> ( *f* sqrt)(x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   110
by (auto intro: hypreal_sqrt_gt_zero simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   111
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   112
lemma hypreal_sqrt_hrabs [simp]: "( *f* sqrt)(x ^ 2) = abs(x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   113
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   114
apply (simp add: starfun hypreal_hrabs hypreal_mult numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   115
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   116
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   117
lemma hypreal_sqrt_hrabs2 [simp]: "( *f* sqrt)(x*x) = abs(x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   118
apply (rule hrealpow_two [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   119
apply (rule numeral_2_eq_2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   120
apply (rule hypreal_sqrt_hrabs)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   121
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   122
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   123
lemma hypreal_sqrt_hyperpow_hrabs [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   124
     "( *f* sqrt)(x pow (hypnat_of_nat 2)) = abs(x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   125
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   126
apply (simp add: starfun hypreal_hrabs hypnat_of_nat_eq hyperpow)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   127
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   128
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   129
lemma star_sqrt_HFinite: "\<lbrakk>x \<in> HFinite; 0 \<le> x\<rbrakk> \<Longrightarrow> ( *f* sqrt) x \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   130
apply (rule HFinite_square_iff [THEN iffD1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   131
apply (simp only: hypreal_sqrt_mult_distrib2 [symmetric], simp) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   132
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   133
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   134
lemma st_hypreal_sqrt:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   135
     "[| x \<in> HFinite; 0 \<le> x |] ==> st(( *f* sqrt) x) = ( *f* sqrt)(st x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   136
apply (rule power_inject_base [where n=1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   137
apply (auto intro!: st_zero_le hypreal_sqrt_ge_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   138
apply (rule st_mult [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   139
apply (rule_tac [3] hypreal_sqrt_mult_distrib2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   140
apply (rule_tac [5] hypreal_sqrt_mult_distrib2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   141
apply (auto simp add: st_hrabs st_zero_le star_sqrt_HFinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   142
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   143
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   144
lemma hypreal_sqrt_sum_squares_ge1 [simp]: "x \<le> ( *f* sqrt)(x ^ 2 + y ^ 2)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   145
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   146
apply (rule eq_Abs_hypreal [of y])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   147
apply (simp add: starfun hypreal_add hrealpow hypreal_le 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   148
            del: hpowr_Suc realpow_Suc)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   149
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   150
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   151
lemma HFinite_hypreal_sqrt:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   152
     "[| 0 \<le> x; x \<in> HFinite |] ==> ( *f* sqrt) x \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   153
apply (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   154
apply (rule HFinite_square_iff [THEN iffD1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   155
apply (drule hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   156
apply (simp add: numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   157
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   158
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   159
lemma HFinite_hypreal_sqrt_imp_HFinite:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   160
     "[| 0 \<le> x; ( *f* sqrt) x \<in> HFinite |] ==> x \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   161
apply (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   162
apply (drule HFinite_square_iff [THEN iffD2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   163
apply (drule hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   164
apply (simp add: numeral_2_eq_2 del: HFinite_square_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   165
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   166
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   167
lemma HFinite_hypreal_sqrt_iff [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   168
     "0 \<le> x ==> (( *f* sqrt) x \<in> HFinite) = (x \<in> HFinite)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   169
by (blast intro: HFinite_hypreal_sqrt HFinite_hypreal_sqrt_imp_HFinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   170
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   171
lemma HFinite_sqrt_sum_squares [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   172
     "(( *f* sqrt)(x*x + y*y) \<in> HFinite) = (x*x + y*y \<in> HFinite)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   173
apply (rule HFinite_hypreal_sqrt_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   174
apply (rule hypreal_le_add_order)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   175
apply (auto simp add: zero_le_square)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   176
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   177
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   178
lemma Infinitesimal_hypreal_sqrt:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   179
     "[| 0 \<le> x; x \<in> Infinitesimal |] ==> ( *f* sqrt) x \<in> Infinitesimal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   180
apply (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   181
apply (rule Infinitesimal_square_iff [THEN iffD2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   182
apply (drule hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   183
apply (simp add: numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   184
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   185
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   186
lemma Infinitesimal_hypreal_sqrt_imp_Infinitesimal:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   187
     "[| 0 \<le> x; ( *f* sqrt) x \<in> Infinitesimal |] ==> x \<in> Infinitesimal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   188
apply (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   189
apply (drule Infinitesimal_square_iff [THEN iffD1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   190
apply (drule hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   191
apply (simp add: numeral_2_eq_2 del: Infinitesimal_square_iff [symmetric])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   192
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   193
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   194
lemma Infinitesimal_hypreal_sqrt_iff [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   195
     "0 \<le> x ==> (( *f* sqrt) x \<in> Infinitesimal) = (x \<in> Infinitesimal)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   196
by (blast intro: Infinitesimal_hypreal_sqrt_imp_Infinitesimal Infinitesimal_hypreal_sqrt)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   197
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   198
lemma Infinitesimal_sqrt_sum_squares [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   199
     "(( *f* sqrt)(x*x + y*y) \<in> Infinitesimal) = (x*x + y*y \<in> Infinitesimal)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   200
apply (rule Infinitesimal_hypreal_sqrt_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   201
apply (rule hypreal_le_add_order)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   202
apply (auto simp add: zero_le_square)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   203
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   204
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   205
lemma HInfinite_hypreal_sqrt:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   206
     "[| 0 \<le> x; x \<in> HInfinite |] ==> ( *f* sqrt) x \<in> HInfinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   207
apply (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   208
apply (rule HInfinite_square_iff [THEN iffD1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   209
apply (drule hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   210
apply (simp add: numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   211
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   212
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   213
lemma HInfinite_hypreal_sqrt_imp_HInfinite:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   214
     "[| 0 \<le> x; ( *f* sqrt) x \<in> HInfinite |] ==> x \<in> HInfinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   215
apply (auto simp add: order_le_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   216
apply (drule HInfinite_square_iff [THEN iffD2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   217
apply (drule hypreal_sqrt_gt_zero_pow2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   218
apply (simp add: numeral_2_eq_2 del: HInfinite_square_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   219
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   220
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   221
lemma HInfinite_hypreal_sqrt_iff [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   222
     "0 \<le> x ==> (( *f* sqrt) x \<in> HInfinite) = (x \<in> HInfinite)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   223
by (blast intro: HInfinite_hypreal_sqrt HInfinite_hypreal_sqrt_imp_HInfinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   224
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   225
lemma HInfinite_sqrt_sum_squares [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   226
     "(( *f* sqrt)(x*x + y*y) \<in> HInfinite) = (x*x + y*y \<in> HInfinite)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   227
apply (rule HInfinite_hypreal_sqrt_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   228
apply (rule hypreal_le_add_order)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   229
apply (auto simp add: zero_le_square)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   230
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   231
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   232
lemma HFinite_exp [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   233
     "sumhr (0, whn, %n. inverse (real (fact n)) * x ^ n) \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   234
by (auto intro!: NSBseq_HFinite_hypreal NSconvergent_NSBseq 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   235
         simp add: starfunNat_sumr [symmetric] starfunNat hypnat_omega_def
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   236
                   convergent_NSconvergent_iff [symmetric] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   237
                   summable_convergent_sumr_iff [symmetric] summable_exp)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   238
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   239
lemma exphr_zero [simp]: "exphr 0 = 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   240
apply (simp add: exphr_def sumhr_split_add
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   241
                   [OF hypnat_one_less_hypnat_omega, symmetric]) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   242
apply (simp add: sumhr hypnat_zero_def starfunNat hypnat_one_def hypnat_add
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   243
                 hypnat_omega_def hypreal_add 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   244
            del: hypnat_add_zero_left)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   245
apply (simp add: hypreal_one_num [symmetric])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   246
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   247
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   248
lemma coshr_zero [simp]: "coshr 0 = 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   249
apply (simp add: coshr_def sumhr_split_add
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   250
                   [OF hypnat_one_less_hypnat_omega, symmetric]) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   251
apply (simp add: sumhr hypnat_zero_def starfunNat hypnat_one_def 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   252
         hypnat_add hypnat_omega_def st_add [symmetric] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   253
         hypreal_one_def [symmetric] hypreal_zero_def [symmetric]
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   254
       del: hypnat_add_zero_left)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   255
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   256
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   257
lemma STAR_exp_zero_approx_one [simp]: "( *f* exp) 0 @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   258
by (simp add: hypreal_zero_def hypreal_one_def starfun hypreal_one_num)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   259
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   260
lemma STAR_exp_Infinitesimal: "x \<in> Infinitesimal ==> ( *f* exp) x @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   261
apply (case_tac "x = 0")
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   262
apply (cut_tac [2] x = 0 in DERIV_exp)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   263
apply (auto simp add: NSDERIV_DERIV_iff [symmetric] nsderiv_def)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   264
apply (drule_tac x = x in bspec, auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   265
apply (drule_tac c = x in approx_mult1)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   266
apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   267
            simp add: mult_assoc)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   268
apply (rule approx_add_right_cancel [where d="-1"])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   269
apply (rule approx_sym [THEN [2] approx_trans2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   270
apply (auto simp add: mem_infmal_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   271
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   272
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   273
lemma STAR_exp_epsilon [simp]: "( *f* exp) epsilon @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   274
by (auto intro: STAR_exp_Infinitesimal)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   275
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   276
lemma STAR_exp_add: "( *f* exp)(x + y) = ( *f* exp) x * ( *f* exp) y"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   277
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   278
apply (rule eq_Abs_hypreal [of y])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   279
apply (simp add: starfun hypreal_add hypreal_mult exp_add)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   280
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   281
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   282
lemma exphr_hypreal_of_real_exp_eq: "exphr x = hypreal_of_real (exp x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   283
apply (simp add: exphr_def)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   284
apply (rule st_hypreal_of_real [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   285
apply (rule approx_st_eq, auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   286
apply (rule approx_minus_iff [THEN iffD2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   287
apply (auto simp add: mem_infmal_iff [symmetric] hypreal_of_real_def hypnat_zero_def hypnat_omega_def sumhr hypreal_minus hypreal_add)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   288
apply (rule NSLIMSEQ_zero_Infinitesimal_hypreal)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   289
apply (insert exp_converges [of x]) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   290
apply (simp add: sums_def) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   291
apply (drule LIMSEQ_const [THEN [2] LIMSEQ_add, where b = "- exp x"])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   292
apply (simp add: LIMSEQ_NSLIMSEQ_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   293
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   294
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   295
lemma starfun_exp_ge_add_one_self [simp]: "0 \<le> x ==> (1 + x) \<le> ( *f* exp) x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   296
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   297
apply (simp add: starfun hypreal_add hypreal_le hypreal_zero_num hypreal_one_num, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   298
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   299
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   300
(* exp (oo) is infinite *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   301
lemma starfun_exp_HInfinite:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   302
     "[| x \<in> HInfinite; 0 \<le> x |] ==> ( *f* exp) x \<in> HInfinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   303
apply (frule starfun_exp_ge_add_one_self)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   304
apply (rule HInfinite_ge_HInfinite, assumption)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   305
apply (rule order_trans [of _ "1+x"], auto) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   306
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   307
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   308
lemma starfun_exp_minus: "( *f* exp) (-x) = inverse(( *f* exp) x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   309
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   310
apply (simp add: starfun hypreal_inverse hypreal_minus exp_minus)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   311
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   312
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   313
(* exp (-oo) is infinitesimal *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   314
lemma starfun_exp_Infinitesimal:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   315
     "[| x \<in> HInfinite; x \<le> 0 |] ==> ( *f* exp) x \<in> Infinitesimal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   316
apply (subgoal_tac "\<exists>y. x = - y")
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   317
apply (rule_tac [2] x = "- x" in exI)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   318
apply (auto intro!: HInfinite_inverse_Infinitesimal starfun_exp_HInfinite
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   319
            simp add: starfun_exp_minus HInfinite_minus_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   320
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   321
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   322
lemma starfun_exp_gt_one [simp]: "0 < x ==> 1 < ( *f* exp) x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   323
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   324
apply (simp add: starfun hypreal_one_num hypreal_zero_num hypreal_less, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   325
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   326
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   327
(* needs derivative of inverse function
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   328
   TRY a NS one today!!!
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   329
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   330
Goal "x @= 1 ==> ( *f* ln) x @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   331
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   332
by (auto_tac (claset(),simpset() addsimps [hypreal_one_def]));
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   333
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   334
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   335
Goalw [nsderiv_def] "0r < x ==> NSDERIV ln x :> inverse x";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   336
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   337
*)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   338
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   339
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   340
lemma starfun_ln_exp [simp]: "( *f* ln) (( *f* exp) x) = x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   341
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   342
apply (simp add: starfun)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   343
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   344
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   345
lemma starfun_exp_ln_iff [simp]: "(( *f* exp)(( *f* ln) x) = x) = (0 < x)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   346
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   347
apply (simp add: starfun hypreal_zero_num hypreal_less)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   348
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   349
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   350
lemma starfun_exp_ln_eq: "( *f* exp) u = x ==> ( *f* ln) x = u"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   351
by (auto simp add: starfun)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   352
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   353
lemma starfun_ln_less_self [simp]: "0 < x ==> ( *f* ln) x < x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   354
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   355
apply (simp add: starfun hypreal_zero_num hypreal_less, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   356
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   357
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   358
lemma starfun_ln_ge_zero [simp]: "1 \<le> x ==> 0 \<le> ( *f* ln) x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   359
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   360
apply (simp add: starfun hypreal_zero_num hypreal_le hypreal_one_num, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   361
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   362
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   363
lemma starfun_ln_gt_zero [simp]: "1 < x ==> 0 < ( *f* ln) x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   364
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   365
apply (simp add: starfun hypreal_zero_num hypreal_less hypreal_one_num, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   366
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   367
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   368
lemma starfun_ln_not_eq_zero [simp]: "[| 0 < x; x \<noteq> 1 |] ==> ( *f* ln) x \<noteq> 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   369
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   370
apply (auto simp add: starfun hypreal_zero_num hypreal_less hypreal_one_num, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   371
apply (auto dest: ln_not_eq_zero) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   372
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   373
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   374
lemma starfun_ln_HFinite: "[| x \<in> HFinite; 1 \<le> x |] ==> ( *f* ln) x \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   375
apply (rule HFinite_bounded)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   376
apply (rule_tac [2] order_less_imp_le)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   377
apply (rule_tac [2] starfun_ln_less_self)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   378
apply (rule_tac [2] order_less_le_trans, auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   379
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   380
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   381
lemma starfun_ln_inverse: "0 < x ==> ( *f* ln) (inverse x) = -( *f* ln) x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   382
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   383
apply (simp add: starfun hypreal_zero_num hypreal_minus hypreal_inverse hypreal_less, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   384
apply (simp add: ln_inverse)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   385
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   386
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   387
lemma starfun_exp_HFinite: "x \<in> HFinite ==> ( *f* exp) x \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   388
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   389
apply (auto simp add: starfun HFinite_FreeUltrafilterNat_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   390
apply (rule bexI, rule_tac [2] lemma_hyprel_refl, auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   391
apply (rule_tac x = "exp u" in exI)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   392
apply (ultra, arith)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   393
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   394
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   395
lemma starfun_exp_add_HFinite_Infinitesimal_approx:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   396
     "[|x \<in> Infinitesimal; z \<in> HFinite |] ==> ( *f* exp) (z + x) @= ( *f* exp) z"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   397
apply (simp add: STAR_exp_add)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   398
apply (frule STAR_exp_Infinitesimal)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   399
apply (drule approx_mult2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   400
apply (auto intro: starfun_exp_HFinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   401
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   402
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   403
(* using previous result to get to result *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   404
lemma starfun_ln_HInfinite:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   405
     "[| x \<in> HInfinite; 0 < x |] ==> ( *f* ln) x \<in> HInfinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   406
apply (rule ccontr, drule HFinite_HInfinite_iff [THEN iffD2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   407
apply (drule starfun_exp_HFinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   408
apply (simp add: starfun_exp_ln_iff [THEN iffD2] HFinite_HInfinite_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   409
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   410
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   411
lemma starfun_exp_HInfinite_Infinitesimal_disj:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   412
 "x \<in> HInfinite ==> ( *f* exp) x \<in> HInfinite | ( *f* exp) x \<in> Infinitesimal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   413
apply (insert linorder_linear [of x 0]) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   414
apply (auto intro: starfun_exp_HInfinite starfun_exp_Infinitesimal)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   415
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   416
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   417
(* check out this proof!!! *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   418
lemma starfun_ln_HFinite_not_Infinitesimal:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   419
     "[| x \<in> HFinite - Infinitesimal; 0 < x |] ==> ( *f* ln) x \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   420
apply (rule ccontr, drule HInfinite_HFinite_iff [THEN iffD2])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   421
apply (drule starfun_exp_HInfinite_Infinitesimal_disj)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   422
apply (simp add: starfun_exp_ln_iff [symmetric] HInfinite_HFinite_iff
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   423
            del: starfun_exp_ln_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   424
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   425
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   426
(* we do proof by considering ln of 1/x *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   427
lemma starfun_ln_Infinitesimal_HInfinite:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   428
     "[| x \<in> Infinitesimal; 0 < x |] ==> ( *f* ln) x \<in> HInfinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   429
apply (drule Infinitesimal_inverse_HInfinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   430
apply (frule positive_imp_inverse_positive)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   431
apply (drule_tac [2] starfun_ln_HInfinite)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   432
apply (auto simp add: starfun_ln_inverse HInfinite_minus_iff)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   433
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   434
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   435
lemma starfun_ln_less_zero: "[| 0 < x; x < 1 |] ==> ( *f* ln) x < 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   436
apply (rule eq_Abs_hypreal [of x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   437
apply (simp add: hypreal_zero_num hypreal_one_num hypreal_less starfun, ultra)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   438
apply (auto intro: ln_less_zero) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   439
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   440
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   441
lemma starfun_ln_Infinitesimal_less_zero:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   442
     "[| x \<in> Infinitesimal; 0 < x |] ==> ( *f* ln) x < 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   443
apply (auto intro!: starfun_ln_less_zero simp add: Infinitesimal_def)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   444
apply (drule bspec [where x = 1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   445
apply (auto simp add: abs_if)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   446
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   447
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   448
lemma starfun_ln_HInfinite_gt_zero:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   449
     "[| x \<in> HInfinite; 0 < x |] ==> 0 < ( *f* ln) x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   450
apply (auto intro!: starfun_ln_gt_zero simp add: HInfinite_def)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   451
apply (drule bspec [where x = 1])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   452
apply (auto simp add: abs_if)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   453
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   454
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   455
(*
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   456
Goalw [NSLIM_def] "(%h. ((x powr h) - 1) / h) -- 0 --NS> ln x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   457
*)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   458
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   459
lemma HFinite_sin [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   460
     "sumhr (0, whn, %n. (if even(n) then 0 else  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   461
              ((- 1) ^ ((n - 1) div 2))/(real (fact n))) * x ^ n)  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   462
              \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   463
apply (auto intro!: NSBseq_HFinite_hypreal NSconvergent_NSBseq 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   464
            simp add: starfunNat_sumr [symmetric] starfunNat hypnat_omega_def
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   465
                      convergent_NSconvergent_iff [symmetric] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   466
                      summable_convergent_sumr_iff [symmetric])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   467
apply (simp only: One_nat_def summable_sin)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   468
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   469
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   470
lemma STAR_sin_zero [simp]: "( *f* sin) 0 = 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   471
by (simp add: starfun hypreal_zero_num)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   472
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   473
lemma STAR_sin_Infinitesimal [simp]: "x \<in> Infinitesimal ==> ( *f* sin) x @= x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   474
apply (case_tac "x = 0")
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   475
apply (cut_tac [2] x = 0 in DERIV_sin)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   476
apply (auto simp add: NSDERIV_DERIV_iff [symmetric] nsderiv_def hypreal_of_real_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   477
apply (drule bspec [where x = x], auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   478
apply (drule approx_mult1 [where c = x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   479
apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   480
           simp add: mult_assoc)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   481
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   482
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   483
lemma HFinite_cos [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   484
     "sumhr (0, whn, %n. (if even(n) then  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   485
            ((- 1) ^ (n div 2))/(real (fact n)) else  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   486
            0) * x ^ n) \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   487
by (auto intro!: NSBseq_HFinite_hypreal NSconvergent_NSBseq 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   488
         simp add: starfunNat_sumr [symmetric] starfunNat hypnat_omega_def
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   489
                   convergent_NSconvergent_iff [symmetric] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   490
                   summable_convergent_sumr_iff [symmetric] summable_cos)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   491
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   492
lemma STAR_cos_zero [simp]: "( *f* cos) 0 = 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   493
by (simp add: starfun hypreal_zero_num hypreal_one_num)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   494
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   495
lemma STAR_cos_Infinitesimal [simp]: "x \<in> Infinitesimal ==> ( *f* cos) x @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   496
apply (case_tac "x = 0")
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   497
apply (cut_tac [2] x = 0 in DERIV_cos)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   498
apply (auto simp add: NSDERIV_DERIV_iff [symmetric] nsderiv_def hypreal_of_real_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   499
apply (drule bspec [where x = x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   500
apply (auto simp add: hypreal_of_real_zero hypreal_of_real_one)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   501
apply (drule approx_mult1 [where c = x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   502
apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   503
            simp add: mult_assoc hypreal_of_real_one)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   504
apply (rule approx_add_right_cancel [where d = "-1"], auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   505
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   506
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   507
lemma STAR_tan_zero [simp]: "( *f* tan) 0 = 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   508
by (simp add: starfun hypreal_zero_num)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   509
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   510
lemma STAR_tan_Infinitesimal: "x \<in> Infinitesimal ==> ( *f* tan) x @= x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   511
apply (case_tac "x = 0")
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   512
apply (cut_tac [2] x = 0 in DERIV_tan)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   513
apply (auto simp add: NSDERIV_DERIV_iff [symmetric] nsderiv_def hypreal_of_real_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   514
apply (drule bspec [where x = x], auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   515
apply (drule approx_mult1 [where c = x])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   516
apply (auto intro: Infinitesimal_subset_HFinite [THEN subsetD]
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   517
             simp add: mult_assoc)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   518
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   519
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   520
lemma STAR_sin_cos_Infinitesimal_mult:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   521
     "x \<in> Infinitesimal ==> ( *f* sin) x * ( *f* cos) x @= x"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   522
apply (insert approx_mult_HFinite [of "( *f* sin) x" _ "( *f* cos) x" 1]) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   523
apply (simp add: Infinitesimal_subset_HFinite [THEN subsetD])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   524
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   525
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   526
lemma HFinite_pi: "hypreal_of_real pi \<in> HFinite"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   527
by simp
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   528
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   529
(* lemmas *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   530
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   531
lemma lemma_split_hypreal_of_real:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   532
     "N \<in> HNatInfinite  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   533
      ==> hypreal_of_real a =  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   534
          hypreal_of_hypnat N * (inverse(hypreal_of_hypnat N) * hypreal_of_real a)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   535
by (simp add: mult_assoc [symmetric] HNatInfinite_not_eq_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   536
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   537
lemma STAR_sin_Infinitesimal_divide:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   538
     "[|x \<in> Infinitesimal; x \<noteq> 0 |] ==> ( *f* sin) x/x @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   539
apply (cut_tac x = 0 in DERIV_sin)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   540
apply (simp add: NSDERIV_DERIV_iff [symmetric] nsderiv_def hypreal_of_real_zero hypreal_of_real_one)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   541
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   542
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   543
(*------------------------------------------------------------------------*) 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   544
(* sin* (1/n) * 1/(1/n) @= 1 for n = oo                                   *)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   545
(*------------------------------------------------------------------------*)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   546
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   547
lemma lemma_sin_pi:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   548
     "n \<in> HNatInfinite  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   549
      ==> ( *f* sin) (inverse (hypreal_of_hypnat n))/(inverse (hypreal_of_hypnat n)) @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   550
apply (rule STAR_sin_Infinitesimal_divide)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   551
apply (auto simp add: HNatInfinite_not_eq_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   552
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   553
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   554
lemma STAR_sin_inverse_HNatInfinite:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   555
     "n \<in> HNatInfinite  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   556
      ==> ( *f* sin) (inverse (hypreal_of_hypnat n)) * hypreal_of_hypnat n @= 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   557
apply (frule lemma_sin_pi)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   558
apply (simp add: divide_inverse_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   559
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   560
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   561
lemma Infinitesimal_pi_divide_HNatInfinite: 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   562
     "N \<in> HNatInfinite  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   563
      ==> hypreal_of_real pi/(hypreal_of_hypnat N) \<in> Infinitesimal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   564
apply (simp add: divide_inverse_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   565
apply (auto intro: Infinitesimal_HFinite_mult2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   566
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   567
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   568
lemma pi_divide_HNatInfinite_not_zero [simp]:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   569
     "N \<in> HNatInfinite ==> hypreal_of_real pi/(hypreal_of_hypnat N) \<noteq> 0"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   570
by (simp add: HNatInfinite_not_eq_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   571
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   572
lemma STAR_sin_pi_divide_HNatInfinite_approx_pi:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   573
     "n \<in> HNatInfinite  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   574
      ==> ( *f* sin) (hypreal_of_real pi/(hypreal_of_hypnat n)) * hypreal_of_hypnat n  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   575
          @= hypreal_of_real pi"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   576
apply (frule STAR_sin_Infinitesimal_divide
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   577
               [OF Infinitesimal_pi_divide_HNatInfinite 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   578
                   pi_divide_HNatInfinite_not_zero])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   579
apply (auto simp add: hypreal_inverse_distrib)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   580
apply (rule approx_SReal_mult_cancel [of "inverse (hypreal_of_real pi)"])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   581
apply (auto intro: SReal_inverse simp add: divide_inverse_zero mult_ac)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   582
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   583
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   584
lemma STAR_sin_pi_divide_HNatInfinite_approx_pi2:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   585
     "n \<in> HNatInfinite  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   586
      ==> hypreal_of_hypnat n *  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   587
          ( *f* sin) (hypreal_of_real pi/(hypreal_of_hypnat n))  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   588
          @= hypreal_of_real pi"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   589
apply (rule mult_commute [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   590
apply (erule STAR_sin_pi_divide_HNatInfinite_approx_pi)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   591
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   592
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   593
lemma starfunNat_pi_divide_n_Infinitesimal: 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   594
     "N \<in> HNatInfinite ==> ( *fNat* (%x. pi / real x)) N \<in> Infinitesimal"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   595
by (auto intro!: Infinitesimal_HFinite_mult2 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   596
         simp add: starfunNat_mult [symmetric] divide_inverse_zero
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   597
                   starfunNat_inverse [symmetric] starfunNat_real_of_nat)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   598
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   599
lemma STAR_sin_pi_divide_n_approx:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   600
     "N \<in> HNatInfinite ==>  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   601
      ( *f* sin) (( *fNat* (%x. pi / real x)) N) @=  
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   602
      hypreal_of_real pi/(hypreal_of_hypnat N)"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   603
by (auto intro!: STAR_sin_Infinitesimal Infinitesimal_HFinite_mult2 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   604
         simp add: starfunNat_mult [symmetric] divide_inverse_zero
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   605
                   starfunNat_inverse_real_of_nat_eq)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   606
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   607
lemma NSLIMSEQ_sin_pi: "(%n. real n * sin (pi / real n)) ----NS> pi"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   608
apply (auto simp add: NSLIMSEQ_def starfunNat_mult [symmetric] starfunNat_real_of_nat)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   609
apply (rule_tac f1 = sin in starfun_stafunNat_o2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   610
apply (auto simp add: starfunNat_mult [symmetric] starfunNat_real_of_nat divide_inverse_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   611
apply (rule_tac f1 = inverse in starfun_stafunNat_o2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   612
apply (auto dest: STAR_sin_pi_divide_HNatInfinite_approx_pi 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   613
            simp add: starfunNat_real_of_nat mult_commute divide_inverse_zero)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   614
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   615
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   616
lemma NSLIMSEQ_cos_one: "(%n. cos (pi / real n))----NS> 1"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   617
apply (simp add: NSLIMSEQ_def, auto)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   618
apply (rule_tac f1 = cos in starfun_stafunNat_o2 [THEN subst])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   619
apply (rule STAR_cos_Infinitesimal)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   620
apply (auto intro!: Infinitesimal_HFinite_mult2 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   621
            simp add: starfunNat_mult [symmetric] divide_inverse_zero
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   622
                      starfunNat_inverse [symmetric] starfunNat_real_of_nat)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   623
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   624
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   625
lemma NSLIMSEQ_sin_cos_pi:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   626
     "(%n. real n * sin (pi / real n) * cos (pi / real n)) ----NS> pi"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   627
by (insert NSLIMSEQ_mult [OF NSLIMSEQ_sin_pi NSLIMSEQ_cos_one], simp)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   628
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   629
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   630
text{*A familiar approximation to @{term "cos x"} when @{term x} is small*}
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   631
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   632
lemma STAR_cos_Infinitesimal_approx:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   633
     "x \<in> Infinitesimal ==> ( *f* cos) x @= 1 - x ^ 2"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   634
apply (rule STAR_cos_Infinitesimal [THEN approx_trans])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   635
apply (auto simp add: Infinitesimal_approx_minus [symmetric] 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   636
            diff_minus add_assoc [symmetric] numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   637
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   638
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   639
lemma STAR_cos_Infinitesimal_approx2:
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   640
     "x \<in> Infinitesimal ==> ( *f* cos) x @= 1 - (x ^ 2)/2"
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   641
apply (rule STAR_cos_Infinitesimal [THEN approx_trans])
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   642
apply (auto intro: Infinitesimal_SReal_divide 
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   643
            simp add: Infinitesimal_approx_minus [symmetric] numeral_2_eq_2)
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   644
done
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   645
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   646
ML
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   647
{*
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   648
val STAR_sqrt_zero = thm "STAR_sqrt_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   649
val STAR_sqrt_one = thm "STAR_sqrt_one";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   650
val hypreal_sqrt_pow2_iff = thm "hypreal_sqrt_pow2_iff";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   651
val hypreal_sqrt_gt_zero_pow2 = thm "hypreal_sqrt_gt_zero_pow2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   652
val hypreal_sqrt_pow2_gt_zero = thm "hypreal_sqrt_pow2_gt_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   653
val hypreal_sqrt_not_zero = thm "hypreal_sqrt_not_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   654
val hypreal_inverse_sqrt_pow2 = thm "hypreal_inverse_sqrt_pow2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   655
val hypreal_sqrt_mult_distrib = thm "hypreal_sqrt_mult_distrib";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   656
val hypreal_sqrt_mult_distrib2 = thm "hypreal_sqrt_mult_distrib2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   657
val hypreal_sqrt_approx_zero = thm "hypreal_sqrt_approx_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   658
val hypreal_sqrt_approx_zero2 = thm "hypreal_sqrt_approx_zero2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   659
val hypreal_sqrt_sum_squares = thm "hypreal_sqrt_sum_squares";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   660
val hypreal_sqrt_sum_squares2 = thm "hypreal_sqrt_sum_squares2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   661
val hypreal_sqrt_gt_zero = thm "hypreal_sqrt_gt_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   662
val hypreal_sqrt_ge_zero = thm "hypreal_sqrt_ge_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   663
val hypreal_sqrt_hrabs = thm "hypreal_sqrt_hrabs";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   664
val hypreal_sqrt_hrabs2 = thm "hypreal_sqrt_hrabs2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   665
val hypreal_sqrt_hyperpow_hrabs = thm "hypreal_sqrt_hyperpow_hrabs";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   666
val star_sqrt_HFinite = thm "star_sqrt_HFinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   667
val st_hypreal_sqrt = thm "st_hypreal_sqrt";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   668
val hypreal_sqrt_sum_squares_ge1 = thm "hypreal_sqrt_sum_squares_ge1";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   669
val HFinite_hypreal_sqrt = thm "HFinite_hypreal_sqrt";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   670
val HFinite_hypreal_sqrt_imp_HFinite = thm "HFinite_hypreal_sqrt_imp_HFinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   671
val HFinite_hypreal_sqrt_iff = thm "HFinite_hypreal_sqrt_iff";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   672
val HFinite_sqrt_sum_squares = thm "HFinite_sqrt_sum_squares";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   673
val Infinitesimal_hypreal_sqrt = thm "Infinitesimal_hypreal_sqrt";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   674
val Infinitesimal_hypreal_sqrt_imp_Infinitesimal = thm "Infinitesimal_hypreal_sqrt_imp_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   675
val Infinitesimal_hypreal_sqrt_iff = thm "Infinitesimal_hypreal_sqrt_iff";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   676
val Infinitesimal_sqrt_sum_squares = thm "Infinitesimal_sqrt_sum_squares";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   677
val HInfinite_hypreal_sqrt = thm "HInfinite_hypreal_sqrt";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   678
val HInfinite_hypreal_sqrt_imp_HInfinite = thm "HInfinite_hypreal_sqrt_imp_HInfinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   679
val HInfinite_hypreal_sqrt_iff = thm "HInfinite_hypreal_sqrt_iff";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   680
val HInfinite_sqrt_sum_squares = thm "HInfinite_sqrt_sum_squares";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   681
val HFinite_exp = thm "HFinite_exp";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   682
val exphr_zero = thm "exphr_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   683
val coshr_zero = thm "coshr_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   684
val STAR_exp_zero_approx_one = thm "STAR_exp_zero_approx_one";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   685
val STAR_exp_Infinitesimal = thm "STAR_exp_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   686
val STAR_exp_epsilon = thm "STAR_exp_epsilon";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   687
val STAR_exp_add = thm "STAR_exp_add";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   688
val exphr_hypreal_of_real_exp_eq = thm "exphr_hypreal_of_real_exp_eq";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   689
val starfun_exp_ge_add_one_self = thm "starfun_exp_ge_add_one_self";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   690
val starfun_exp_HInfinite = thm "starfun_exp_HInfinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   691
val starfun_exp_minus = thm "starfun_exp_minus";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   692
val starfun_exp_Infinitesimal = thm "starfun_exp_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   693
val starfun_exp_gt_one = thm "starfun_exp_gt_one";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   694
val starfun_ln_exp = thm "starfun_ln_exp";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   695
val starfun_exp_ln_iff = thm "starfun_exp_ln_iff";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   696
val starfun_exp_ln_eq = thm "starfun_exp_ln_eq";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   697
val starfun_ln_less_self = thm "starfun_ln_less_self";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   698
val starfun_ln_ge_zero = thm "starfun_ln_ge_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   699
val starfun_ln_gt_zero = thm "starfun_ln_gt_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   700
val starfun_ln_not_eq_zero = thm "starfun_ln_not_eq_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   701
val starfun_ln_HFinite = thm "starfun_ln_HFinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   702
val starfun_ln_inverse = thm "starfun_ln_inverse";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   703
val starfun_exp_HFinite = thm "starfun_exp_HFinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   704
val starfun_exp_add_HFinite_Infinitesimal_approx = thm "starfun_exp_add_HFinite_Infinitesimal_approx";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   705
val starfun_ln_HInfinite = thm "starfun_ln_HInfinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   706
val starfun_exp_HInfinite_Infinitesimal_disj = thm "starfun_exp_HInfinite_Infinitesimal_disj";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   707
val starfun_ln_HFinite_not_Infinitesimal = thm "starfun_ln_HFinite_not_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   708
val starfun_ln_Infinitesimal_HInfinite = thm "starfun_ln_Infinitesimal_HInfinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   709
val starfun_ln_less_zero = thm "starfun_ln_less_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   710
val starfun_ln_Infinitesimal_less_zero = thm "starfun_ln_Infinitesimal_less_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   711
val starfun_ln_HInfinite_gt_zero = thm "starfun_ln_HInfinite_gt_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   712
val HFinite_sin = thm "HFinite_sin";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   713
val STAR_sin_zero = thm "STAR_sin_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   714
val STAR_sin_Infinitesimal = thm "STAR_sin_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   715
val HFinite_cos = thm "HFinite_cos";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   716
val STAR_cos_zero = thm "STAR_cos_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   717
val STAR_cos_Infinitesimal = thm "STAR_cos_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   718
val STAR_tan_zero = thm "STAR_tan_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   719
val STAR_tan_Infinitesimal = thm "STAR_tan_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   720
val STAR_sin_cos_Infinitesimal_mult = thm "STAR_sin_cos_Infinitesimal_mult";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   721
val HFinite_pi = thm "HFinite_pi";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   722
val lemma_split_hypreal_of_real = thm "lemma_split_hypreal_of_real";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   723
val STAR_sin_Infinitesimal_divide = thm "STAR_sin_Infinitesimal_divide";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   724
val lemma_sin_pi = thm "lemma_sin_pi";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   725
val STAR_sin_inverse_HNatInfinite = thm "STAR_sin_inverse_HNatInfinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   726
val Infinitesimal_pi_divide_HNatInfinite = thm "Infinitesimal_pi_divide_HNatInfinite";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   727
val pi_divide_HNatInfinite_not_zero = thm "pi_divide_HNatInfinite_not_zero";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   728
val STAR_sin_pi_divide_HNatInfinite_approx_pi = thm "STAR_sin_pi_divide_HNatInfinite_approx_pi";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   729
val STAR_sin_pi_divide_HNatInfinite_approx_pi2 = thm "STAR_sin_pi_divide_HNatInfinite_approx_pi2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   730
val starfunNat_pi_divide_n_Infinitesimal = thm "starfunNat_pi_divide_n_Infinitesimal";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   731
val STAR_sin_pi_divide_n_approx = thm "STAR_sin_pi_divide_n_approx";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   732
val NSLIMSEQ_sin_pi = thm "NSLIMSEQ_sin_pi";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   733
val NSLIMSEQ_cos_one = thm "NSLIMSEQ_cos_one";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   734
val NSLIMSEQ_sin_cos_pi = thm "NSLIMSEQ_sin_cos_pi";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   735
val STAR_cos_Infinitesimal_approx = thm "STAR_cos_Infinitesimal_approx";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   736
val STAR_cos_Infinitesimal_approx2 = thm "STAR_cos_Infinitesimal_approx2";
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   737
*}
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   738
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   739
4e72cd222e0b converted Hyperreal/HTranscendental to Isar script
paulson
parents: 13958
diff changeset
   740
end