src/HOL/Real/RealPow.ML
author wenzelm
Sat, 03 Nov 2001 18:42:38 +0100
changeset 12038 343a9888e875
parent 12018 ec054019c910
child 12196 a3be6b3a9c0b
permissions -rw-r--r--
proper use of bind_thm(s);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
     1
(*  Title       : RealPow.ML
7219
4e3f386c2e37 inserted Id: lines
paulson
parents: 7077
diff changeset
     2
    ID          : $Id$
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
     3
    Author      : Jacques D. Fleuriot  
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
     4
    Copyright   : 1998  University of Cambridge
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
     5
    Description : Natural Powers of reals theory
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
     6
*)
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
     7
10690
cd80241125b0 tidying and adding new proofs
paulson
parents: 10677
diff changeset
     8
bind_thm ("realpow_Suc", thm "realpow_Suc");
cd80241125b0 tidying and adding new proofs
paulson
parents: 10677
diff changeset
     9
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    10
Goal "(0::real) ^ (Suc n) = 0";
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
    11
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    12
qed "realpow_zero";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    13
Addsimps [realpow_zero];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    14
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    15
Goal "r ~= (0::real) --> r ^ n ~= 0";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    16
by (induct_tac "n" 1);
9043
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
    17
by Auto_tac; 
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    18
qed_spec_mp "realpow_not_zero";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    19
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    20
Goal "r ^ n = (0::real) ==> r = 0";
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
    21
by (rtac ccontr 1);
9043
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
    22
by (auto_tac (claset() addDs [realpow_not_zero], simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    23
qed "realpow_zero_zero";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    24
10648
a8c647cfa31f first stage in tidying up Real and Hyperreal.
paulson
parents: 10606
diff changeset
    25
Goal "inverse ((r::real) ^ n) = (inverse r) ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    26
by (induct_tac "n" 1);
10648
a8c647cfa31f first stage in tidying up Real and Hyperreal.
paulson
parents: 10606
diff changeset
    27
by (auto_tac (claset(), simpset() addsimps [real_inverse_distrib]));
a8c647cfa31f first stage in tidying up Real and Hyperreal.
paulson
parents: 10606
diff changeset
    28
qed "realpow_inverse";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    29
8838
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
    30
Goal "abs (r::real) ^ n = abs (r ^ n)";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    31
by (induct_tac "n" 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
    32
by (auto_tac (claset(), simpset() addsimps [abs_mult]));
8838
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
    33
qed "realpow_abs";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    34
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    35
Goal "(r::real) ^ (n + m) = (r ^ n) * (r ^ m)";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    36
by (induct_tac "n" 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    37
by (auto_tac (claset(),simpset() addsimps real_mult_ac));
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    38
qed "realpow_add";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    39
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    40
Goal "(r::real) ^ 1 = r";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    41
by (Simp_tac 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    42
qed "realpow_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    43
Addsimps [realpow_one];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    44
11701
3d51fbf81c17 sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents: 10919
diff changeset
    45
Goal "(r::real)^ (Suc (Suc 0)) = r * r";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    46
by (Simp_tac 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    47
qed "realpow_two";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    48
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    49
Goal "(0::real) < r --> 0 < r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    50
by (induct_tac "n" 1);
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    51
by (auto_tac (claset() addIs [real_mult_order],
9070
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
    52
	      simpset() addsimps [real_zero_less_one]));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    53
qed_spec_mp "realpow_gt_zero";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    54
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    55
Goal "(0::real) <= r --> 0 <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    56
by (induct_tac "n" 1);
10784
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
    57
by (auto_tac (claset(), simpset() addsimps [real_0_le_mult_iff]));
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
    58
qed_spec_mp "realpow_ge_zero";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    59
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    60
Goal "(0::real) <= x & x <= y --> x ^ n <= y ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    61
by (induct_tac "n" 1);
10784
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
    62
by (auto_tac (claset() addSIs [real_mult_le_mono], simpset()));
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
    63
by (asm_simp_tac (simpset() addsimps [realpow_ge_zero]) 1);
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
    64
qed_spec_mp "realpow_le";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    65
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    66
Goal "(0::real) < x & x < y & 0 < n --> x ^ n < y ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    67
by (induct_tac "n" 1);
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    68
by (auto_tac (claset() addIs [real_mult_less_mono, gr0I] 
9070
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
    69
                       addDs [realpow_gt_zero],
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
    70
    simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    71
qed_spec_mp "realpow_less";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    72
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    73
Goal "1 ^ n = (1::real)";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    74
by (induct_tac "n" 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
    75
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    76
qed "realpow_eq_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    77
Addsimps [realpow_eq_one];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    78
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    79
Goal "abs((-1) ^ n) = (1::real)";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    80
by (induct_tac "n" 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
    81
by (auto_tac (claset(), simpset() addsimps [abs_mult]));
8838
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
    82
qed "abs_realpow_minus_one";
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
    83
Addsimps [abs_realpow_minus_one];
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    84
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    85
Goal "((r::real) * s) ^ n = (r ^ n) * (s ^ n)";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    86
by (induct_tac "n" 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    87
by (auto_tac (claset(),simpset() addsimps real_mult_ac));
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    88
qed "realpow_mult";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    89
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    90
Goal "(0::real) <= r^ Suc (Suc 0)";
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    91
by (simp_tac (simpset() addsimps [real_le_square]) 1);
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    92
qed "realpow_two_le";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    93
Addsimps [realpow_two_le];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
    94
11701
3d51fbf81c17 sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents: 10919
diff changeset
    95
Goal "abs((x::real)^Suc (Suc 0)) = x^Suc (Suc 0)";
9070
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
    96
by (simp_tac (simpset() addsimps [abs_eqI1, 
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
    97
				  real_le_square]) 1);
8838
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
    98
qed "abs_realpow_two";
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
    99
Addsimps [abs_realpow_two];
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   100
11701
3d51fbf81c17 sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents: 10919
diff changeset
   101
Goal "abs(x::real)^Suc (Suc 0) = x^Suc (Suc 0)";
10690
cd80241125b0 tidying and adding new proofs
paulson
parents: 10677
diff changeset
   102
by (simp_tac (simpset() addsimps [realpow_abs,abs_eqI1]
cd80241125b0 tidying and adding new proofs
paulson
parents: 10677
diff changeset
   103
                        delsimps [realpow_Suc]) 1);
8838
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
   104
qed "realpow_two_abs";
4eaa99f0d223 replaced rabs by overloaded abs;
wenzelm
parents: 8442
diff changeset
   105
Addsimps [realpow_two_abs];
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   106
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   107
Goal "(1::real) < r ==> 1 < r^ (Suc (Suc 0))";
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   108
by Auto_tac;
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   109
by (cut_facts_tac [real_zero_less_one] 1);
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   110
by (forw_inst_tac [("x","0")] order_less_trans 1);
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   111
by (assume_tac 1);
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   112
by (dres_inst_tac [("z","r"),("x","1")] 
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   113
    (real_mult_less_mono1) 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   114
by (auto_tac (claset() addIs [order_less_trans], simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   115
qed "realpow_two_gt_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   116
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   117
Goal "(1::real) < r --> 1 <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   118
by (induct_tac "n" 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   119
by Auto_tac;  
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   120
by (subgoal_tac "1*1 <= r * r^n" 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   121
by (rtac real_mult_le_mono 2); 
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   122
by Auto_tac;  
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   123
qed_spec_mp "realpow_ge_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   124
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   125
Goal "(1::real) <= r ==> 1 <= r ^ n";
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   126
by (dtac order_le_imp_less_or_eq 1); 
7588
26384af93359 Tidying to exploit the new arith_tac. RealBin no longer imports RealPow or
paulson
parents: 7292
diff changeset
   127
by (auto_tac (claset() addDs [realpow_ge_one], simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   128
qed "realpow_ge_one2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   129
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   130
Goal "(1::real) <= 2 ^ n";
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   131
by (res_inst_tac [("y","1 ^ n")] order_trans 1);
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   132
by (rtac realpow_le 2);
10778
2c6605049646 more tidying, especially to remove real_of_posnat
paulson
parents: 10752
diff changeset
   133
by (auto_tac (claset() addIs [order_less_imp_le], simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   134
qed "two_realpow_ge_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   135
11704
3c50a2cd6f00 * sane numerals (stage 2): plain "num" syntax (removed "#");
wenzelm
parents: 11701
diff changeset
   136
Goal "real (n::nat) < 2 ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   137
by (induct_tac "n" 1);
10778
2c6605049646 more tidying, especially to remove real_of_posnat
paulson
parents: 10752
diff changeset
   138
by (auto_tac (claset(), simpset() addsimps [real_of_nat_Suc]));
9070
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
   139
by (stac real_mult_2 1);
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
   140
by (rtac real_add_less_le_mono 1);
10778
2c6605049646 more tidying, especially to remove real_of_posnat
paulson
parents: 10752
diff changeset
   141
by (auto_tac (claset(), simpset() addsimps [two_realpow_ge_one]));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   142
qed "two_realpow_gt";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   143
Addsimps [two_realpow_gt,two_realpow_ge_one];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   144
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   145
Goal "(-1) ^ (2*n) = (1::real)";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   146
by (induct_tac "n" 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   147
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   148
qed "realpow_minus_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   149
Addsimps [realpow_minus_one];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   150
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   151
Goal "(-1) ^ Suc (2*n) = -(1::real)";
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   152
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   153
qed "realpow_minus_one_odd";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   154
Addsimps [realpow_minus_one_odd];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   155
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   156
Goal "(-1) ^ Suc (Suc (2*n)) = (1::real)";
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   157
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   158
qed "realpow_minus_one_even";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   159
Addsimps [realpow_minus_one_even];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   160
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   161
Goal "(0::real) < r & r < (1::real) --> r ^ Suc n < r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   162
by (induct_tac "n" 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   163
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   164
qed_spec_mp "realpow_Suc_less";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   165
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   166
Goal "0 <= r & r < (1::real) --> r ^ Suc n <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   167
by (induct_tac "n" 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   168
by (auto_tac (claset() addIs [order_less_imp_le] 
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   169
                       addSDs [order_le_imp_less_or_eq],
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   170
              simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   171
qed_spec_mp "realpow_Suc_le";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   172
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   173
Goal "(0::real) <= 0 ^ n";
8442
96023903c2df case_tac now subsumes both boolean and datatype cases;
wenzelm
parents: 8423
diff changeset
   174
by (case_tac "n" 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   175
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   176
qed "realpow_zero_le";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   177
Addsimps [realpow_zero_le];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   178
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   179
Goal "0 < r & r < (1::real) --> r ^ Suc n <= r ^ n";
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   180
by (blast_tac (claset() addSIs [order_less_imp_le,
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   181
    realpow_Suc_less]) 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   182
qed_spec_mp "realpow_Suc_le2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   183
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   184
Goal "[| 0 <= r; r < (1::real) |] ==> r ^ Suc n <= r ^ n";
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   185
by (etac (order_le_imp_less_or_eq RS disjE) 1);
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   186
by (rtac realpow_Suc_le2 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   187
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   188
qed "realpow_Suc_le3";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   189
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   190
Goal "0 <= r & r < (1::real) & n < N --> r ^ N <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   191
by (induct_tac "N" 1);
10784
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
   192
by (ALLGOALS Asm_simp_tac); 
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
   193
by (Clarify_tac 1);
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   194
by (subgoal_tac "r * r ^ na <= 1 * r ^ n" 1); 
10784
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
   195
by (Asm_full_simp_tac 1); 
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
   196
by (rtac real_mult_le_mono 1); 
27e4d90b35b5 more removal of obsolete rules
paulson
parents: 10778
diff changeset
   197
by (auto_tac (claset(), simpset() addsimps [realpow_ge_zero, less_Suc_eq]));  
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   198
qed_spec_mp "realpow_less_le";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   199
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   200
Goal "[| 0 <= r; r < (1::real); n <= N |] ==> r ^ N <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   201
by (dres_inst_tac [("n","N")] le_imp_less_or_eq 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   202
by (auto_tac (claset() addIs [realpow_less_le],
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   203
    simpset()));
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   204
qed "realpow_le_le";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   205
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   206
Goal "[| 0 < r; r < (1::real) |] ==> r ^ Suc n <= r";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   207
by (dres_inst_tac [("n","1"),("N","Suc n")] 
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   208
    (order_less_imp_le RS realpow_le_le) 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   209
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   210
qed "realpow_Suc_le_self";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   211
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   212
Goal "[| 0 < r; r < (1::real) |] ==> r ^ Suc n < 1";
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   213
by (blast_tac (claset() addIs [realpow_Suc_le_self, order_le_less_trans]) 1);
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   214
qed "realpow_Suc_less_one";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   215
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   216
Goal "(1::real) <= r --> r ^ n <= r ^ Suc n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   217
by (induct_tac "n" 1);
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   218
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   219
qed_spec_mp "realpow_le_Suc";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   220
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   221
Goal "(1::real) < r --> r ^ n < r ^ Suc n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   222
by (induct_tac "n" 1);
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   223
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   224
qed_spec_mp "realpow_less_Suc";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   225
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   226
Goal "(1::real) < r --> r ^ n <= r ^ Suc n";
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   227
by (blast_tac (claset() addSIs [order_less_imp_le, realpow_less_Suc]) 1);
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   228
qed_spec_mp "realpow_le_Suc2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   229
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   230
Goal "(1::real) < r & n < N --> r ^ n <= r ^ N";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   231
by (induct_tac "N" 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   232
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   233
by (ALLGOALS(forw_inst_tac [("n","na")] realpow_ge_one));
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   234
by (ALLGOALS(dtac (real_mult_self_le)));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   235
by (assume_tac 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   236
by (assume_tac 2);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   237
by (auto_tac (claset() addIs [order_trans],
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   238
              simpset() addsimps [less_Suc_eq]));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   239
qed_spec_mp "realpow_gt_ge";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   240
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   241
Goal "(1::real) <= r & n < N --> r ^ n <= r ^ N";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   242
by (induct_tac "N" 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   243
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   244
by (ALLGOALS(forw_inst_tac [("n","na")] realpow_ge_one2));
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   245
by (ALLGOALS(dtac (real_mult_self_le2)));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   246
by (assume_tac 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   247
by (assume_tac 2);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   248
by (auto_tac (claset() addIs [order_trans],
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   249
              simpset() addsimps [less_Suc_eq]));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   250
qed_spec_mp "realpow_gt_ge2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   251
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   252
Goal "[| (1::real) < r; n <= N |] ==> r ^ n <= r ^ N";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   253
by (dres_inst_tac [("n","N")] le_imp_less_or_eq 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   254
by (auto_tac (claset() addIs [realpow_gt_ge], simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   255
qed "realpow_ge_ge";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   256
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   257
Goal "[| (1::real) <= r; n <= N |] ==> r ^ n <= r ^ N";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   258
by (dres_inst_tac [("n","N")] le_imp_less_or_eq 1);
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   259
by (auto_tac (claset() addIs [realpow_gt_ge2], simpset()));
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   260
qed "realpow_ge_ge2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   261
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   262
Goal "(1::real) < r ==> r <= r ^ Suc n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   263
by (dres_inst_tac [("n","1"),("N","Suc n")] 
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   264
    realpow_ge_ge 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   265
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   266
qed_spec_mp "realpow_Suc_ge_self";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   267
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   268
Goal "(1::real) <= r ==> r <= r ^ Suc n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   269
by (dres_inst_tac [("n","1"),("N","Suc n")] 
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   270
    realpow_ge_ge2 1);
10677
36625483213f further round of tidying
paulson
parents: 10648
diff changeset
   271
by Auto_tac;
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   272
qed_spec_mp "realpow_Suc_ge_self2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   273
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   274
Goal "[| (1::real) < r; 0 < n |] ==> r <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   275
by (dtac (less_not_refl2 RS  not0_implies_Suc) 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   276
by (auto_tac (claset() addSIs 
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   277
    [realpow_Suc_ge_self],simpset()));
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   278
qed "realpow_ge_self";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   279
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   280
Goal "[| (1::real) <= r; 0 < n |] ==> r <= r ^ n";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   281
by (dtac (less_not_refl2 RS  not0_implies_Suc) 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   282
by (auto_tac (claset() addSIs [realpow_Suc_ge_self2],simpset()));
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   283
qed "realpow_ge_self2";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   284
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   285
Goal "0 < n --> (x::real) ^ (n - 1) * x = x ^ n";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   286
by (induct_tac "n" 1);
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   287
by (auto_tac (claset(),simpset() 
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   288
    addsimps [real_mult_commute]));
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   289
qed_spec_mp "realpow_minus_mult";
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   290
Addsimps [realpow_minus_mult];
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   291
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   292
Goal "r ~= 0 ==> r * inverse r ^Suc (Suc 0) = inverse (r::real)";
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   293
by (asm_simp_tac (simpset() addsimps [realpow_two,
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   294
                  real_mult_assoc RS sym]) 1);
10606
e3229a37d53f converted rinv to inverse;
bauerg
parents: 10043
diff changeset
   295
qed "realpow_two_mult_inverse";
e3229a37d53f converted rinv to inverse;
bauerg
parents: 10043
diff changeset
   296
Addsimps [realpow_two_mult_inverse];
7077
60b098bb8b8a heavily revised by Jacques: coercions have alphabetic names;
paulson
parents:
diff changeset
   297
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   298
(* 05/00 *)
11701
3d51fbf81c17 sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents: 10919
diff changeset
   299
Goal "(-x)^Suc (Suc 0) = (x::real)^Suc (Suc 0)";
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   300
by (Simp_tac 1);
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   301
qed "realpow_two_minus";
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   302
Addsimps [realpow_two_minus];
7588
26384af93359 Tidying to exploit the new arith_tac. RealBin no longer imports RealPow or
paulson
parents: 7292
diff changeset
   303
11701
3d51fbf81c17 sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents: 10919
diff changeset
   304
Goalw [real_diff_def] "(x::real)^Suc (Suc 0) - y^Suc (Suc 0) = (x - y) * (x + y)";
10712
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   305
by (simp_tac (simpset() addsimps 
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   306
              [real_add_mult_distrib2, real_add_mult_distrib, 
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   307
               real_minus_mult_eq2 RS sym] @ real_mult_ac) 1);
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   308
qed "realpow_two_diff";
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   309
11701
3d51fbf81c17 sane numerals (stage 1): added generic 1, removed 1' and 2 on nat,
wenzelm
parents: 10919
diff changeset
   310
Goalw [real_diff_def] "((x::real)^Suc (Suc 0) = y^Suc (Suc 0)) = (x = y | x = -y)";
10712
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   311
by (cut_inst_tac [("x","x"),("y","y")] realpow_two_diff 1);
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   312
by (auto_tac (claset(), simpset() delsimps [realpow_Suc]));
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   313
qed "realpow_two_disj";
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   314
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   315
(* used in Transc *)
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   316
Goal  "[|(x::real) ~= 0; m <= n |] ==> x ^ (n - m) = x ^ n * inverse (x ^ m)";
9043
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
   317
by (auto_tac (claset(),
10712
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   318
       simpset() addsimps [le_eq_less_or_eq, less_iff_Suc_add, realpow_add,
351ba950d4d9 further tidying
paulson
parents: 10699
diff changeset
   319
                           realpow_not_zero] @ real_mult_ac));
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   320
qed "realpow_diff";
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   321
10919
144ede948e58 renamings: real_of_nat, real_of_int -> (overloaded) real
paulson
parents: 10784
diff changeset
   322
Goal "real (m::nat) ^ n = real (m ^ n)";
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   323
by (induct_tac "n" 1);
9043
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
   324
by (auto_tac (claset(),
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
   325
              simpset() addsimps [real_of_nat_one, real_of_nat_mult]));
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   326
qed "realpow_real_of_nat";
7588
26384af93359 Tidying to exploit the new arith_tac. RealBin no longer imports RealPow or
paulson
parents: 7292
diff changeset
   327
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   328
Goal "0 < real (Suc (Suc 0) ^ n)";
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   329
by (induct_tac "n" 1);
9070
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
   330
by (auto_tac (claset(),
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   331
          simpset() addsimps [real_of_nat_mult, real_0_less_mult_iff]));
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   332
qed "realpow_real_of_nat_two_pos";
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   333
Addsimps [realpow_real_of_nat_two_pos];
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   334
9043
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
   335
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   336
Goal "(0::real) <= x --> 0 <= y --> x ^ Suc n <= y ^ Suc n --> x <= y";
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   337
by (induct_tac "n" 1);
9043
ca761fe227d8 First round of changes, towards installation of simprocs
paulson
parents: 9013
diff changeset
   338
by Auto_tac;
10752
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   339
by (asm_full_simp_tac (simpset() addsimps [linorder_not_less RS sym]) 1); 
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   340
by (swap_res_tac [real_mult_less_mono'] 1);
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   341
by Auto_tac;
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   342
by (auto_tac (claset(), simpset() addsimps [real_0_le_mult_iff]));
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   343
by (auto_tac (claset(), simpset() addsimps [linorder_not_less RS sym]));    
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   344
by (dres_inst_tac [("n","n")] realpow_gt_zero 1);   
c4f1bf2acf4c tidying, and separation of HOL-Hyperreal from HOL-Real
paulson
parents: 10715
diff changeset
   345
by Auto_tac;  
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   346
qed_spec_mp "realpow_increasing";
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   347
  
12018
ec054019c910 Numerals and simprocs for types real and hypreal. The abstract
paulson
parents: 11704
diff changeset
   348
Goal "[| (0::real) <= x; 0 <= y; x ^ Suc n = y ^ Suc n |] ==> x = y";
9070
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
   349
by (blast_tac (claset() addIs [realpow_increasing, order_antisym, 
99d93349914b full_rename_numerals -> rename_numerals; tidied
paulson
parents: 9043
diff changeset
   350
			       order_eq_refl, sym]) 1);
9013
9dd0274f76af Updated files to remove 0r and 1r from theorems in descendant theories
fleuriot
parents: 8838
diff changeset
   351
qed_spec_mp "realpow_Suc_cancel_eq";