src/HOL/Hyperreal/HyperPow.ML
changeset 11377 0f16ad464c62
parent 10919 144ede948e58
child 11468 02cd5d5bc497
equal deleted inserted replaced
11376:bf98ad1c22c6 11377:0f16ad464c62
   147 by (cut_inst_tac [("n","n")] two_hrealpow_ge_one 1);
   147 by (cut_inst_tac [("n","n")] two_hrealpow_ge_one 1);
   148 by (arith_tac 1);
   148 by (arith_tac 1);
   149 qed "two_hrealpow_gt";
   149 qed "two_hrealpow_gt";
   150 Addsimps [two_hrealpow_gt,two_hrealpow_ge_one];
   150 Addsimps [two_hrealpow_gt,two_hrealpow_ge_one];
   151 
   151 
   152 Goal "#-1 ^ (2*n) = (#1::hypreal)";
   152 Goal "#-1 ^ (#2*n) = (#1::hypreal)";
   153 by (induct_tac "n" 1);
   153 by (induct_tac "n" 1);
   154 by (Auto_tac);
   154 by (Auto_tac);
   155 qed "hrealpow_minus_one";
   155 qed "hrealpow_minus_one";
   156 
   156 
       
   157 Goal "n+n = (#2*n::nat)";
       
   158 by Auto_tac; 
       
   159 qed "double_lemma";
       
   160 
       
   161 (*ugh: need to get rid fo the n+n*)
   157 Goal "#-1 ^ (n + n) = (#1::hypreal)";
   162 Goal "#-1 ^ (n + n) = (#1::hypreal)";
   158 by (induct_tac "n" 1);
   163 by (auto_tac (claset(), 
   159 by (Auto_tac);
   164               simpset() addsimps [double_lemma, hrealpow_minus_one]));
   160 qed "hrealpow_minus_one2";
   165 qed "hrealpow_minus_one2";
   161 Addsimps [hrealpow_minus_one2];
   166 Addsimps [hrealpow_minus_one2];
   162 
   167 
   163 Goal "(-(x::hypreal)) ^ 2 = x ^ 2";
   168 Goal "(-(x::hypreal)) ^ 2 = x ^ 2";
   164 by (Auto_tac);
   169 by (Auto_tac);
   396 by (subgoal_tac "(-(1hr)) pow ((1hn + 1hn)*n) = 1hr" 1);
   401 by (subgoal_tac "(-(1hr)) pow ((1hn + 1hn)*n) = 1hr" 1);
   397 by (Asm_full_simp_tac 1); 
   402 by (Asm_full_simp_tac 1); 
   398 by (simp_tac (HOL_ss addsimps [hypreal_one_def]) 1);
   403 by (simp_tac (HOL_ss addsimps [hypreal_one_def]) 1);
   399 by (res_inst_tac [("z","n")] eq_Abs_hypnat 1);
   404 by (res_inst_tac [("z","n")] eq_Abs_hypnat 1);
   400 by (auto_tac (claset(),
   405 by (auto_tac (claset(),
   401               simpset() addsimps [hyperpow, hypnat_add,hypreal_minus]));
   406               simpset() addsimps [double_lemma, hyperpow, hypnat_add,
       
   407                                   hypreal_minus]));
   402 qed "hyperpow_minus_one2";
   408 qed "hyperpow_minus_one2";
   403 Addsimps [hyperpow_minus_one2];
   409 Addsimps [hyperpow_minus_one2];
   404 
   410 
   405 Goalw [hypnat_one_def]
   411 Goalw [hypnat_one_def]
   406      "(#0::hypreal) < r & r < #1 --> r pow (n + 1hn) < r pow n";
   412      "(#0::hypreal) < r & r < #1 --> r pow (n + 1hn) < r pow n";