src/HOL/Complex/NSCA.ML
changeset 14353 79f9fbef9106
parent 14335 9c0b5e081037
child 14365 3d4df8c166ae
equal deleted inserted replaced
14352:a8b1a44d8264 14353:79f9fbef9106
   821 \        Abs_hypreal(hyprel `` {%n. Im(Y n)}) \
   821 \        Abs_hypreal(hyprel `` {%n. Im(Y n)}) \
   822 \     |] ==> Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})";
   822 \     |] ==> Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})";
   823 by (dtac (approx_minus_iff RS iffD1) 1);
   823 by (dtac (approx_minus_iff RS iffD1) 1);
   824 by (dtac (approx_minus_iff RS iffD1) 1);
   824 by (dtac (approx_minus_iff RS iffD1) 1);
   825 by (rtac (capprox_minus_iff RS iffD2) 1);
   825 by (rtac (capprox_minus_iff RS iffD2) 1);
   826 by (auto_tac (claset(),simpset() addsimps [mem_cinfmal_iff RS sym,
   826 by (auto_tac (claset(),
   827     mem_infmal_iff RS sym,hypreal_minus,hypreal_add,hcomplex_minus,
   827      simpset() addsimps [mem_cinfmal_iff RS sym,
   828     hcomplex_add,CInfinitesimal_hcmod_iff,hcmod,Infinitesimal_FreeUltrafilterNat_iff]));
   828 	    mem_infmal_iff RS sym,hypreal_minus,hypreal_add,hcomplex_minus,
       
   829 	    hcomplex_add,CInfinitesimal_hcmod_iff,hcmod,
       
   830 	    Infinitesimal_FreeUltrafilterNat_iff]));
   829 by (rtac bexI 1 THEN rtac lemma_hyprel_refl 2);
   831 by (rtac bexI 1 THEN rtac lemma_hyprel_refl 2);
   830 by Auto_tac;
   832 by Auto_tac;
   831 by (dres_inst_tac [("x","u/2")] spec 1);
   833 by (dres_inst_tac [("x","u/2")] spec 1);
   832 by (dres_inst_tac [("x","u/2")] spec 1);
   834 by (dres_inst_tac [("x","u/2")] spec 1);
   833 by (Step_tac 1);
   835 by Safe_tac;
   834 by (TRYALL(Force_tac));
   836 by (TRYALL(Force_tac));
   835 by (ultra_tac (claset(),HOL_ss) 1);
   837 by (ultra_tac (claset(),HOL_ss) 1);
   836 by (dtac sym 1 THEN dtac sym 1);
   838 by (dtac sym 1 THEN dtac sym 1); 
   837 by (res_inst_tac [("z","X x")] eq_Abs_complex 1);
   839 by (res_inst_tac [("z","X x")] eq_Abs_complex 1);
   838 by (res_inst_tac [("z","Y x")] eq_Abs_complex 1);
   840 by (res_inst_tac [("z","Y x")] eq_Abs_complex 1);
   839 by (auto_tac (claset(),HOL_ss addsimps [complex_minus,complex_add,
   841 by (auto_tac (claset(),
       
   842     HOL_ss addsimps [complex_minus,complex_add,
   840     complex_mod, snd_conv, fst_conv,numeral_2_eq_2]));
   843     complex_mod, snd_conv, fst_conv,numeral_2_eq_2]));
   841 by (rtac (realpow_two_abs RS subst) 1);
   844 by (subgoal_tac "sqrt (abs(xa + - xb) ^ 2 + abs(y + - ya) ^ 2) < u" 1);
   842 by (res_inst_tac [("x1","xa + - xb")] (realpow_two_abs RS subst) 1);
   845 by (rtac lemma_sqrt_hcomplex_capprox 2);
   843 by (simp_tac (simpset() addsimps [numeral_2_eq_2 RS sym]) 1);
   846 by Auto_tac;
   844 by (rtac lemma_sqrt_hcomplex_capprox 1);
   847 by (asm_full_simp_tac (simpset() addsimps [power2_eq_square]) 1); 
   845 by Auto_tac;
       
   846 qed "hcomplex_capproxI";
   848 qed "hcomplex_capproxI";
   847 
   849 
   848 Goal "(Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})) =\
   850 Goal "(Abs_hcomplex(hcomplexrel ``{%n. X n}) @c= Abs_hcomplex(hcomplexrel``{%n. Y n})) =\
   849 \      (Abs_hypreal(hyprel `` {%n. Re(X n)}) @= Abs_hypreal(hyprel `` {%n. Re(Y n)}) & \
   851 \      (Abs_hypreal(hyprel `` {%n. Re(X n)}) @= Abs_hypreal(hyprel `` {%n. Re(Y n)}) & \
   850 \       Abs_hypreal(hyprel `` {%n. Im(X n)}) @= Abs_hypreal(hyprel `` {%n. Im(Y n)}))";
   852 \       Abs_hypreal(hyprel `` {%n. Im(X n)}) @= Abs_hypreal(hyprel `` {%n. Im(Y n)}))";
   900 by (Ultra_tac 1);
   902 by (Ultra_tac 1);
   901 by (dtac sym 1 THEN res_inst_tac [("z","X x")] eq_Abs_complex 1);
   903 by (dtac sym 1 THEN res_inst_tac [("z","X x")] eq_Abs_complex 1);
   902 by (auto_tac (claset(),simpset() addsimps [complex_mod,numeral_2_eq_2] delsimps [realpow_Suc]));
   904 by (auto_tac (claset(),simpset() addsimps [complex_mod,numeral_2_eq_2] delsimps [realpow_Suc]));
   903 by (subgoal_tac "0 < u" 1 THEN arith_tac 2);
   905 by (subgoal_tac "0 < u" 1 THEN arith_tac 2);
   904 by (subgoal_tac "0 < v" 1 THEN arith_tac 2);
   906 by (subgoal_tac "0 < v" 1 THEN arith_tac 2);
   905 by (rtac (realpow_two_abs RS subst) 1);
   907 by (subgoal_tac "sqrt (abs(Y x) ^ 2 + abs(Z x) ^ 2) < 2*u + 2*v" 1);
   906 by (res_inst_tac [("x1","Y x")] (realpow_two_abs RS subst) 1);
   908 by (rtac lemma_sqrt_hcomplex_capprox 2);
   907 by (simp_tac (simpset() addsimps [numeral_2_eq_2 RS sym]) 1);
   909 by Auto_tac;
   908 by (rtac lemma_sqrt_hcomplex_capprox 1);
   910 by (asm_full_simp_tac (simpset() addsimps [power2_eq_square]) 1); 
   909 by Auto_tac;
       
   910 qed "HFinite_Re_Im_CFinite";
   911 qed "HFinite_Re_Im_CFinite";
   911 
   912 
   912 Goal "(Abs_hcomplex(hcomplexrel ``{%n. X n}) : CFinite) = \
   913 Goal "(Abs_hcomplex(hcomplexrel ``{%n. X n}) : CFinite) = \
   913 \     (Abs_hypreal(hyprel `` {%n. Re(X n)}) : HFinite & \
   914 \     (Abs_hypreal(hyprel `` {%n. Re(X n)}) : HFinite & \
   914 \      Abs_hypreal(hyprel `` {%n. Im(X n)}) : HFinite)";
   915 \      Abs_hypreal(hyprel `` {%n. Im(X n)}) : HFinite)";