src/HOL/Hyperreal/HLog.ML
author paulson
Wed, 17 Dec 2003 16:23:52 +0100
changeset 14299 0b5c0b0a3eba
parent 13958 c1c67582c9b5
child 14331 8dbbb7cf3637
permissions -rw-r--r--
converted Hyperreal/HyperDef to Isar script
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     1
(*  Title       : HLog.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   : 2000,2001 University of Edinburgh
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     4
    Description : hyperreal base logarithms
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
Goalw [powhr_def]
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     8
    "(Abs_hypreal(hyprel `` {X})) powhr (Abs_hypreal(hyprel `` {Y})) = \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
     9
\    Abs_hypreal(hyprel `` {%n.  (X n) powr (Y n)})";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    10
by (auto_tac (claset(),simpset() addsimps [starfun,hypreal_mult,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    11
    powr_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    12
qed "powhr";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    13
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    14
Goal "1 powhr a = 1";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    15
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    16
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_one_num]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    17
qed "powhr_one_eq_one";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    18
Addsimps [powhr_one_eq_one];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    19
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    20
Goal "[| 0 < x; 0 < y |] ==> (x * y) powhr a = (x powhr a) * (y powhr a)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    21
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    22
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    23
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    24
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_zero_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    25
    hypreal_mult,hypreal_less]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    26
by (ultra_tac (claset(),simpset() addsimps [powr_mult]) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    27
qed "powhr_mult";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    28
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    29
Goalw [hypreal_zero_def] "0 < x powhr a";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    30
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    31
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    32
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_less,hypreal_zero_num]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    33
qed "powhr_gt_zero";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    34
Addsimps [powhr_gt_zero];
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 "x powhr a ~= 0";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    37
by (rtac ((powhr_gt_zero RS hypreal_not_refl2) RS not_sym) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    38
qed "powhr_not_zero";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    39
Addsimps [powhr_not_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
Goalw [hypreal_divide_def]
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    42
     "(Abs_hypreal(hyprel `` {X}))/(Abs_hypreal(hyprel `` {Y})) = \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    43
\     (Abs_hypreal(hyprel `` {%n. (X n)/(Y n)}))";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    44
by (case_tac "Abs_hypreal (hyprel `` {Y}) = 0" 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    45
by (auto_tac (claset(),simpset() addsimps [HYPREAL_DIVISION_BY_ZERO,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    46
    hypreal_zero_num,hypreal_inverse,hypreal_mult]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    47
by (ALLGOALS(ultra_tac (claset(),simpset() addsimps [real_divide_def])));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    48
qed "hypreal_divide";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    49
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    50
Goal "[| 0 < x; 0 < y |] ==> (x / y) powhr a = (x powhr a)/(y powhr a)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    51
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    52
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    53
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    54
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_divide,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    55
    hypreal_zero_num,hypreal_less]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    56
by (ultra_tac (claset(),simpset() addsimps [powr_divide]) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    57
qed "powhr_divide";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    58
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    59
Goal "x powhr (a + b) = (x powhr a) * (x powhr b)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    60
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    61
by (res_inst_tac [("z","b")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    62
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    63
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_add,hypreal_mult,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    64
    powr_add]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    65
qed "powhr_add";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    66
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    67
Goal "(x powhr a) powhr b = x powhr (a * b)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    68
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    69
by (res_inst_tac [("z","b")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    70
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    71
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_mult,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    72
    powr_powr]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    73
qed "powhr_powhr";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    74
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    75
Goal "(x powhr a) powhr b = (x powhr b) powhr a";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    76
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    77
by (res_inst_tac [("z","b")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    78
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    79
by (auto_tac (claset(),simpset() addsimps [powhr,powr_powr_swap]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    80
qed "powhr_powhr_swap";
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 "x powhr (-a) = inverse (x powhr a)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    83
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    84
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    85
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_minus,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    86
    hypreal_inverse,hypreal_less,powr_minus]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    87
qed "powhr_minus";
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
Goalw [hypreal_divide_def] "x powhr (-a) = 1/(x powhr a)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    90
by (simp_tac (simpset() addsimps [powhr_minus]) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    91
qed "powhr_minus_divide";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    92
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    93
Goal "[| a < b; 1 < x |] ==> x powhr a < x powhr b";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    94
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    95
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    96
by (res_inst_tac [("z","b")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    97
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_one_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    98
    hypreal_less]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
    99
by (ultra_tac (claset(),simpset() addsimps [powr_less_mono]) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   100
qed "powhr_less_mono";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   101
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   102
Goal "[| x powhr a < x powhr b; 1 < x |] ==> a < b";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   103
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   104
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   105
by (res_inst_tac [("z","b")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   106
by (auto_tac (claset(),simpset() addsimps [powhr,hypreal_one_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   107
    hypreal_less]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   108
by (ultra_tac (claset() addDs [powr_less_cancel],simpset()) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   109
qed "powhr_less_cancel";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   110
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   111
Goal "1 < x ==> (x powhr a < x powhr b) = (a < b)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   112
by (blast_tac (claset() addIs [powhr_less_cancel,powhr_less_mono]) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   113
qed "powhr_less_cancel_iff";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   114
Addsimps [powhr_less_cancel_iff];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   115
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   116
Goal "1 < x ==> (x powhr a <= x powhr b) = (a <= b)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   117
by (auto_tac (claset(),simpset() addsimps [hypreal_le_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   118
qed "powhr_le_cancel_iff";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   119
Addsimps [powhr_le_cancel_iff];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   120
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   121
Goalw [hlog_def]
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   122
     "hlog (Abs_hypreal(hyprel `` {X})) (Abs_hypreal(hyprel `` {Y})) = \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   123
\     Abs_hypreal(hyprel `` {%n. log (X n) (Y n)})";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   124
by (res_inst_tac [("f","Abs_hypreal")] arg_cong 1);
14299
0b5c0b0a3eba converted Hyperreal/HyperDef to Isar script
paulson
parents: 13958
diff changeset
   125
by Auto_tac;
0b5c0b0a3eba converted Hyperreal/HyperDef to Isar script
paulson
parents: 13958
diff changeset
   126
by (Ultra_tac 1);
13958
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   127
qed "hlog";
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 "( *f* ln) x = hlog (( *f* exp) 1) x";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   130
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   131
by (auto_tac (claset(),simpset() addsimps [starfun,hlog,log_ln,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   132
    hypreal_one_num]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   133
qed "hlog_starfun_ln";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   134
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   135
Goal "[| 0 < a; a ~= 1; 0 < x |] ==> a powhr (hlog a x) = x";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   136
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   137
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   138
by (auto_tac (claset(),simpset() addsimps [hlog,powhr,hypreal_zero_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   139
    hypreal_less,hypreal_one_num]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   140
by (Ultra_tac 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   141
qed "powhr_hlog_cancel";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   142
Addsimps [powhr_hlog_cancel];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   143
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   144
Goal "[| 0 < a; a ~= 1 |] ==> hlog a (a powhr y) = y";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   145
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   146
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   147
by (auto_tac (claset(),simpset() addsimps [hlog,powhr,hypreal_zero_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   148
    hypreal_less,hypreal_one_num]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   149
by (ultra_tac (claset() addIs [log_powr_cancel],simpset()) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   150
qed "hlog_powhr_cancel";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   151
Addsimps [hlog_powhr_cancel];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   152
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   153
Goal "[| 0 < a; a ~= 1; 0 < x; 0 < y  |] \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   154
\     ==> hlog a (x * y) = hlog a x + hlog a y";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   155
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   156
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   157
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   158
by (auto_tac (claset(),simpset() addsimps [hlog,powhr,hypreal_zero_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   159
    hypreal_one_num,hypreal_less,hypreal_add,hypreal_mult]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   160
by (ultra_tac (claset(),simpset() addsimps [log_mult]) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   161
qed "hlog_mult";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   162
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   163
Goal "[| 0 < a; a ~= 1 |] ==> hlog a x = ( *f* ln) x / ( *f* ln) a";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   164
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   165
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   166
by (auto_tac (claset(),simpset() addsimps [hlog,starfun,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   167
    hypreal_zero_num,hypreal_one_num,hypreal_divide,log_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   168
qed "hlog_as_starfun";
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 "[| 0 < a; a ~= 1; 0 < b; b ~= 1; 0 < x |] \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   171
\     ==> hlog a x = (( *f* ln) b/( *f*ln) a) * hlog b x";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   172
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   173
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   174
by (res_inst_tac [("z","b")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   175
by (auto_tac (claset(),simpset() addsimps [hlog,starfun,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   176
    hypreal_zero_num,hypreal_one_num,hypreal_less,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   177
    hypreal_divide,hypreal_mult]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   178
by (ultra_tac (claset() addDs [log_eq_div_ln_mult_log],simpset()) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   179
qed "hlog_eq_div_starfun_ln_mult_hlog";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   180
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   181
Goal "x powhr a = ( *f* exp) (a * ( *f* ln) x)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   182
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   183
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   184
by (auto_tac (claset(),simpset() addsimps [powhr,starfun,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   185
    hypreal_mult,powr_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   186
qed "powhr_as_starfun";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   187
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   188
Goal "[| x : HInfinite; 0 < x; a : HFinite - Infinitesimal; \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   189
\        0 < a |] ==> x powhr a : HInfinite";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   190
by (auto_tac (claset() addSIs [starfun_ln_ge_zero,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   191
    starfun_ln_HInfinite,HInfinite_HFinite_not_Infinitesimal_mult2,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   192
    starfun_exp_HInfinite],simpset() addsimps [order_less_imp_le,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   193
    HInfinite_gt_zero_gt_one,powhr_as_starfun,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   194
    hypreal_0_le_mult_iff]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   195
qed "HInfinite_powhr";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   196
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   197
Goal "[| x : HFinite - Infinitesimal; a : HInfinite; 0 < a |] \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   198
\     ==> hlog a (abs x) : Infinitesimal";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   199
by (ftac HInfinite_gt_zero_gt_one 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   200
by (auto_tac (claset() addSIs [starfun_ln_HFinite_not_Infinitesimal,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   201
    HInfinite_inverse_Infinitesimal,Infinitesimal_HFinite_mult2],
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   202
    simpset() addsimps [starfun_ln_HInfinite,not_Infinitesimal_not_zero,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   203
    hlog_as_starfun,hypreal_not_refl2 RS not_sym,hypreal_divide_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   204
qed "hlog_hrabs_HInfinite_Infinitesimal";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   205
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   206
Goal "[| a : HInfinite; 0 < a |] ==> hlog a x = ( *f* ln) x / ( *f* ln) a";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   207
by (rtac hlog_as_starfun 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   208
by Auto_tac;
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   209
qed "hlog_HInfinite_as_starfun";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   210
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   211
Goal "hlog a 1 = 0";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   212
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   213
by (auto_tac (claset(),simpset() addsimps [hypreal_one_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   214
    hypreal_zero_num,hlog]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   215
qed "hlog_one";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   216
Addsimps [hlog_one];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   217
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   218
Goal "[| 0 < a; a ~= 1 |] ==> hlog a a = 1";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   219
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   220
by (auto_tac (claset(),simpset() addsimps [hypreal_one_num,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   221
    hypreal_zero_num,hlog,hypreal_less]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   222
by (ultra_tac (claset() addIs [log_eq_one],simpset()) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   223
qed "hlog_eq_one";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   224
Addsimps [hlog_eq_one];
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 "[| 0 < a; a ~= 1; 0 < x |] ==> hlog a (inverse x) = - hlog a x";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   227
by (res_inst_tac [("x1","hlog a x")] (hypreal_add_left_cancel RS iffD1) 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   228
by (auto_tac (claset(),simpset() addsimps [hypreal_not_refl2 RS not_sym,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   229
    hlog_mult RS sym,hypreal_inverse_gt_0]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   230
qed "hlog_inverse";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   231
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   232
Goal "[| 0 < a; a ~= 1; 0 < x; 0 < y|] \
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   233
\     ==> hlog a (x/y) = hlog a x - hlog a y";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   234
by (auto_tac (claset(),simpset() addsimps [hypreal_inverse_gt_0,hlog_mult,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   235
    hlog_inverse,hypreal_diff_def,hypreal_divide_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   236
qed "hlog_divide";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   237
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   238
Goal "[| 1 < a; 0 < x; 0 < y |] ==> (hlog a x < hlog a y) = (x < y)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   239
by (res_inst_tac [("z","a")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   240
by (res_inst_tac [("z","x")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   241
by (res_inst_tac [("z","y")] eq_Abs_hypreal 1);
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   242
by (auto_tac (claset(),simpset() addsimps [hlog,hypreal_less,
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   243
    hypreal_zero_num,hypreal_one_num]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   244
by (ALLGOALS(Ultra_tac));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   245
qed "hlog_less_cancel_iff";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   246
Addsimps [hlog_less_cancel_iff];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   247
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   248
Goal "[| 1 < a; 0 < x; 0 < y |] ==> (hlog a x <= hlog a y) = (x <= y)";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   249
by (auto_tac (claset(),simpset() addsimps [hypreal_le_def]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   250
qed "hlog_le_cancel_iff";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   251
Addsimps [hlog_le_cancel_iff];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   252
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   253
(* should be in NSA.ML *)
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   254
goalw HLog.thy [epsilon_def] "0 <= epsilon";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   255
by (auto_tac (claset(),simpset() addsimps [hypreal_zero_num,hypreal_le]));
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   256
qed "epsilon_ge_zero";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   257
Addsimps [epsilon_ge_zero];
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   258
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   259
goal HLog.thy "epsilon : {x. 0 <= x & x : HFinite}";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   260
by Auto_tac;
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   261
qed "hpfinite_witness";
c1c67582c9b5 New material on integration, etc. Moving Hyperreal/ex
paulson
parents:
diff changeset
   262