1048 Goal "NSDERIV f x :> D \ |
1048 Goal "NSDERIV f x :> D \ |
1049 \ ==> NSDERIV (%x. c * f x) x :> c*D"; |
1049 \ ==> NSDERIV (%x. c * f x) x :> c*D"; |
1050 by (asm_full_simp_tac |
1050 by (asm_full_simp_tac |
1051 (simpset() addsimps [real_times_divide1_eq RS sym, NSDERIV_NSLIM_iff, |
1051 (simpset() addsimps [real_times_divide1_eq RS sym, NSDERIV_NSLIM_iff, |
1052 real_minus_mult_eq2, real_add_mult_distrib2 RS sym] |
1052 real_minus_mult_eq2, real_add_mult_distrib2 RS sym] |
1053 delsimps [real_times_divide1_eq, real_minus_mult_eq2 RS sym]) 1); |
1053 delsimps [real_times_divide1_eq, real_mult_minus_eq2]) 1); |
1054 by (etac (NSLIM_const RS NSLIM_mult) 1); |
1054 by (etac (NSLIM_const RS NSLIM_mult) 1); |
1055 qed "NSDERIV_cmult"; |
1055 qed "NSDERIV_cmult"; |
1056 |
1056 |
1057 (* let's do the standard proof though theorem *) |
1057 (* let's do the standard proof though theorem *) |
1058 (* LIM_mult2 follows from a NS proof *) |
1058 (* LIM_mult2 follows from a NS proof *) |
1061 "DERIV f x :> D \ |
1061 "DERIV f x :> D \ |
1062 \ ==> DERIV (%x. c * f x) x :> c*D"; |
1062 \ ==> DERIV (%x. c * f x) x :> c*D"; |
1063 by (asm_full_simp_tac |
1063 by (asm_full_simp_tac |
1064 (simpset() addsimps [real_times_divide1_eq RS sym, NSDERIV_NSLIM_iff, |
1064 (simpset() addsimps [real_times_divide1_eq RS sym, NSDERIV_NSLIM_iff, |
1065 real_minus_mult_eq2, real_add_mult_distrib2 RS sym] |
1065 real_minus_mult_eq2, real_add_mult_distrib2 RS sym] |
1066 delsimps [real_times_divide1_eq, real_minus_mult_eq2 RS sym]) 1); |
1066 delsimps [real_times_divide1_eq, real_mult_minus_eq2]) 1); |
1067 by (etac (LIM_const RS LIM_mult2) 1); |
1067 by (etac (LIM_const RS LIM_mult2) 1); |
1068 qed "DERIV_cmult"; |
1068 qed "DERIV_cmult"; |
1069 |
1069 |
1070 (*-------------------------------- |
1070 (*-------------------------------- |
1071 Negation of function |
1071 Negation of function |
1072 -------------------------------*) |
1072 -------------------------------*) |
1073 Goal "NSDERIV f x :> D ==> NSDERIV (%x. -(f x)) x :> -D"; |
1073 Goal "NSDERIV f x :> D ==> NSDERIV (%x. -(f x)) x :> -D"; |
1074 by (asm_full_simp_tac (simpset() addsimps [NSDERIV_NSLIM_iff]) 1); |
1074 by (asm_full_simp_tac (simpset() addsimps [NSDERIV_NSLIM_iff]) 1); |
1075 by (res_inst_tac [("t","f x")] (real_minus_minus RS subst) 1); |
1075 by (res_inst_tac [("t","f x")] (real_minus_minus RS subst) 1); |
1076 by (asm_simp_tac (simpset() addsimps [real_minus_add_distrib RS sym, |
1076 by (asm_simp_tac (simpset() addsimps [real_minus_add_distrib RS sym, |
1077 real_minus_mult_eq1 RS sym] |
1077 real_mult_minus_eq1] |
1078 delsimps [real_minus_add_distrib, real_minus_minus]) 1); |
1078 delsimps [real_minus_add_distrib, real_minus_minus]) 1); |
1079 by (etac NSLIM_minus 1); |
1079 by (etac NSLIM_minus 1); |
1080 qed "NSDERIV_minus"; |
1080 qed "NSDERIV_minus"; |
1081 |
1081 |
1082 Goal "DERIV f x :> D \ |
1082 Goal "DERIV f x :> D \ |
1352 -------------------------------------------------------------*) |
1352 -------------------------------------------------------------*) |
1353 Goal "[| DERIV f x :> d; f(x) \\<noteq> 0 |] \ |
1353 Goal "[| DERIV f x :> d; f(x) \\<noteq> 0 |] \ |
1354 \ ==> DERIV (%x. inverse(f x)) x :> (- (d * inverse(f(x) ^ Suc (Suc 0))))"; |
1354 \ ==> DERIV (%x. inverse(f x)) x :> (- (d * inverse(f(x) ^ Suc (Suc 0))))"; |
1355 by (rtac (real_mult_commute RS subst) 1); |
1355 by (rtac (real_mult_commute RS subst) 1); |
1356 by (asm_simp_tac (simpset() addsimps [real_minus_mult_eq1, |
1356 by (asm_simp_tac (simpset() addsimps [real_minus_mult_eq1, |
1357 realpow_inverse] delsimps [realpow_Suc, |
1357 realpow_inverse] delsimps [realpow_Suc, real_mult_minus_eq1]) 1); |
1358 real_minus_mult_eq1 RS sym]) 1); |
|
1359 by (fold_goals_tac [o_def]); |
1358 by (fold_goals_tac [o_def]); |
1360 by (blast_tac (claset() addSIs [DERIV_chain,DERIV_inverse]) 1); |
1359 by (blast_tac (claset() addSIs [DERIV_chain,DERIV_inverse]) 1); |
1361 qed "DERIV_inverse_fun"; |
1360 qed "DERIV_inverse_fun"; |
1362 |
1361 |
1363 Goal "[| NSDERIV f x :> d; f(x) \\<noteq> 0 |] \ |
1362 Goal "[| NSDERIV f x :> d; f(x) \\<noteq> 0 |] \ |
1375 by (dtac DERIV_mult 2); |
1374 by (dtac DERIV_mult 2); |
1376 by (REPEAT(assume_tac 1)); |
1375 by (REPEAT(assume_tac 1)); |
1377 by (asm_full_simp_tac |
1376 by (asm_full_simp_tac |
1378 (simpset() addsimps [real_divide_def, real_add_mult_distrib2, |
1377 (simpset() addsimps [real_divide_def, real_add_mult_distrib2, |
1379 realpow_inverse,real_minus_mult_eq1] @ real_mult_ac |
1378 realpow_inverse,real_minus_mult_eq1] @ real_mult_ac |
1380 delsimps [realpow_Suc, real_minus_mult_eq1 RS sym, |
1379 delsimps [realpow_Suc, real_mult_minus_eq1, real_mult_minus_eq2]) 1); |
1381 real_minus_mult_eq2 RS sym]) 1); |
|
1382 qed "DERIV_quotient"; |
1380 qed "DERIV_quotient"; |
1383 |
1381 |
1384 Goal "[| NSDERIV f x :> d; DERIV g x :> e; g(x) \\<noteq> 0 |] \ |
1382 Goal "[| NSDERIV f x :> d; DERIV g x :> e; g(x) \\<noteq> 0 |] \ |
1385 \ ==> NSDERIV (%y. f(y) / (g y)) x :> (d*g(x) \ |
1383 \ ==> NSDERIV (%y. f(y) / (g y)) x :> (d*g(x) \ |
1386 \ + -(e*f(x))) / (g(x) ^ Suc (Suc 0))"; |
1384 \ + -(e*f(x))) / (g(x) ^ Suc (Suc 0))"; |
2133 by Auto_tac; |
2131 by Auto_tac; |
2134 by (ALLGOALS(dres_inst_tac [("f","f")] MVT)); |
2132 by (ALLGOALS(dres_inst_tac [("f","f")] MVT)); |
2135 by (auto_tac (claset() addDs [DERIV_isCont,DERIV_unique],simpset() addsimps |
2133 by (auto_tac (claset() addDs [DERIV_isCont,DERIV_unique],simpset() addsimps |
2136 [differentiable_def])); |
2134 [differentiable_def])); |
2137 by (auto_tac (claset() addDs [DERIV_unique], |
2135 by (auto_tac (claset() addDs [DERIV_unique], |
2138 simpset() addsimps [real_add_mult_distrib, real_diff_def, |
2136 simpset() addsimps [real_add_mult_distrib, real_diff_def])); |
2139 real_minus_mult_eq1 RS sym])); |
|
2140 qed "DERIV_const_ratio_const"; |
2137 qed "DERIV_const_ratio_const"; |
2141 |
2138 |
2142 Goal "[|a \\<noteq> b; \\<forall>x. DERIV f x :> k |] ==> (f(b) - f(a))/(b - a) = k"; |
2139 Goal "[|a \\<noteq> b; \\<forall>x. DERIV f x :> k |] ==> (f(b) - f(a))/(b - a) = k"; |
2143 by (res_inst_tac [("c1","b - a")] (real_mult_right_cancel RS iffD1) 1); |
2140 by (res_inst_tac [("c1","b - a")] (real_mult_right_cancel RS iffD1) 1); |
2144 by (auto_tac (claset() addSDs [DERIV_const_ratio_const], |
2141 by (auto_tac (claset() addSDs [DERIV_const_ratio_const], |