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