290 Goal "[| X ----> a; a ~= #0 |] ==> (%n. inverse(X n)) ----> inverse(a)"; |
290 Goal "[| X ----> a; a ~= #0 |] ==> (%n. inverse(X n)) ----> inverse(a)"; |
291 by (asm_full_simp_tac (simpset() addsimps [NSLIMSEQ_inverse, |
291 by (asm_full_simp_tac (simpset() addsimps [NSLIMSEQ_inverse, |
292 LIMSEQ_NSLIMSEQ_iff]) 1); |
292 LIMSEQ_NSLIMSEQ_iff]) 1); |
293 qed "LIMSEQ_inverse"; |
293 qed "LIMSEQ_inverse"; |
294 |
294 |
295 (* trivially proved *) |
295 Goal "[| X ----NS> a; Y ----NS> b; b ~= #0 |] \ |
296 Goal "[| X ----NS> a; Y ----NS> b; b ~= #0 |] \ |
296 \ ==> (%n. X n / Y n) ----NS> a/b"; |
297 \ ==> (%n. (X n) * inverse(Y n)) ----NS> a*inverse(b)"; |
297 by (asm_full_simp_tac (simpset() addsimps [NSLIMSEQ_mult, NSLIMSEQ_inverse, |
298 by (blast_tac (claset() addDs [NSLIMSEQ_inverse,NSLIMSEQ_mult]) 1); |
298 real_divide_def]) 1); |
299 qed "NSLIMSEQ_mult_inverse"; |
299 qed "NSLIMSEQ_mult_inverse"; |
300 |
300 |
301 (* let's give a standard proof of theorem *) |
301 Goal "[| X ----> a; Y ----> b; b ~= #0 |] ==> (%n. X n / Y n) ----> a/b"; |
302 Goal "[| X ----> a; Y ----> b; b ~= #0 |] \ |
302 by (asm_full_simp_tac (simpset() addsimps [LIMSEQ_mult, LIMSEQ_inverse, |
303 \ ==> (%n. (X n) * inverse(Y n)) ----> a*inverse(b)"; |
303 real_divide_def]) 1); |
304 by (blast_tac (claset() addDs [LIMSEQ_inverse,LIMSEQ_mult]) 1); |
304 qed "LIMSEQ_divide"; |
305 qed "LIMSEQ_mult_inverse"; |
|
306 |
305 |
307 (*----------------------------------------------- |
306 (*----------------------------------------------- |
308 Uniqueness of limit |
307 Uniqueness of limit |
309 ----------------------------------------------*) |
308 ----------------------------------------------*) |
310 Goalw [NSLIMSEQ_def] |
309 Goalw [NSLIMSEQ_def] |
1294 (* We now use NS criterion to bring proof of theorem through *) |
1293 (* We now use NS criterion to bring proof of theorem through *) |
1295 |
1294 |
1296 Goalw [NSLIMSEQ_def] |
1295 Goalw [NSLIMSEQ_def] |
1297 "[| #0 <= x; x < #1 |] ==> (%n. x ^ n) ----NS> #0"; |
1296 "[| #0 <= x; x < #1 |] ==> (%n. x ^ n) ----NS> #0"; |
1298 by (auto_tac (claset() addSDs [convergent_realpow], |
1297 by (auto_tac (claset() addSDs [convergent_realpow], |
1299 simpset() addsimps [convergent_NSconvergent_iff])); |
1298 simpset() addsimps [convergent_NSconvergent_iff])); |
1300 by (forward_tac [NSconvergentD] 1); |
1299 by (forward_tac [NSconvergentD] 1); |
1301 by (auto_tac (claset(),simpset() addsimps [NSLIMSEQ_def, |
1300 by (auto_tac (claset(), |
1302 NSCauchy_NSconvergent_iff RS sym,NSCauchy_def, |
1301 simpset() addsimps [NSLIMSEQ_def, NSCauchy_NSconvergent_iff RS sym, |
1303 starfunNat_pow])); |
1302 NSCauchy_def, starfunNat_pow])); |
1304 by (forward_tac [HNatInfinite_add_one] 1); |
1303 by (forward_tac [HNatInfinite_add_one] 1); |
1305 by (dtac bspec 1 THEN assume_tac 1); |
1304 by (dtac bspec 1 THEN assume_tac 1); |
1306 by (dtac bspec 1 THEN assume_tac 1); |
1305 by (dtac bspec 1 THEN assume_tac 1); |
1307 by (dres_inst_tac [("x","N + 1hn")] bspec 1 THEN assume_tac 1); |
1306 by (dres_inst_tac [("x","N + 1hn")] bspec 1 THEN assume_tac 1); |
1308 by (asm_full_simp_tac (simpset() addsimps [hyperpow_add]) 1); |
1307 by (asm_full_simp_tac (simpset() addsimps [hyperpow_add]) 1); |
1309 by (dtac inf_close_mult_subst_SReal 1 THEN assume_tac 1); |
1308 by (dtac inf_close_mult_subst_SReal 1 THEN assume_tac 1); |
1310 by (dtac inf_close_trans3 1 THEN assume_tac 1); |
1309 by (dtac inf_close_trans3 1 THEN assume_tac 1); |
1311 by (auto_tac (claset() addSDs [rename_numerals |
1310 by (auto_tac (claset(), |
1312 (real_not_refl2 RS real_mult_eq_self_zero2)], |
1311 simpset() addsimps [hypreal_of_real_mult RS sym])); |
1313 simpset() addsimps [hypreal_of_real_mult RS sym])); |
|
1314 qed "NSLIMSEQ_realpow_zero"; |
1312 qed "NSLIMSEQ_realpow_zero"; |
1315 |
1313 |
1316 (*--------------- standard version ---------------*) |
1314 (*--------------- standard version ---------------*) |
1317 Goal "[| #0 <= x; x < #1 |] ==> (%n. x ^ n) ----> #0"; |
1315 Goal "[| #0 <= x; x < #1 |] ==> (%n. x ^ n) ----> #0"; |
1318 by (asm_full_simp_tac (simpset() addsimps [NSLIMSEQ_realpow_zero, |
1316 by (asm_simp_tac (simpset() addsimps [NSLIMSEQ_realpow_zero, |
1319 LIMSEQ_NSLIMSEQ_iff]) 1); |
1317 LIMSEQ_NSLIMSEQ_iff]) 1); |
1320 qed "LIMSEQ_realpow_zero"; |
1318 qed "LIMSEQ_realpow_zero"; |
|
1319 |
|
1320 Goal "#1 < x ==> (%n. a / (x ^ n)) ----> #0"; |
|
1321 by (cut_inst_tac [("a","a"),("x1","inverse x")] |
|
1322 ([LIMSEQ_const, LIMSEQ_realpow_zero] MRS LIMSEQ_mult) 1); |
|
1323 by (auto_tac (claset(), |
|
1324 simpset() addsimps [real_divide_def, realpow_inverse])); |
|
1325 by (asm_simp_tac (simpset() addsimps [real_inverse_eq_divide, |
|
1326 pos_real_divide_less_eq]) 1); |
|
1327 qed "LIMSEQ_divide_realpow_zero"; |
1321 |
1328 |
1322 (*---------------------------------------------------------------- |
1329 (*---------------------------------------------------------------- |
1323 Limit of c^n for |c| < 1 |
1330 Limit of c^n for |c| < 1 |
1324 ---------------------------------------------------------------*) |
1331 ---------------------------------------------------------------*) |
1325 Goal "abs(c) < #1 ==> (%n. abs(c) ^ n) ----> #0"; |
1332 Goal "abs(c) < #1 ==> (%n. abs(c) ^ n) ----> #0"; |
1332 qed "NSLIMSEQ_rabs_realpow_zero"; |
1339 qed "NSLIMSEQ_rabs_realpow_zero"; |
1333 |
1340 |
1334 Goal "abs(c) < #1 ==> (%n. c ^ n) ----> #0"; |
1341 Goal "abs(c) < #1 ==> (%n. c ^ n) ----> #0"; |
1335 by (rtac (LIMSEQ_rabs_zero RS iffD1) 1); |
1342 by (rtac (LIMSEQ_rabs_zero RS iffD1) 1); |
1336 by (auto_tac (claset() addIs [LIMSEQ_rabs_realpow_zero], |
1343 by (auto_tac (claset() addIs [LIMSEQ_rabs_realpow_zero], |
1337 simpset() addsimps [realpow_abs RS sym])); |
1344 simpset() addsimps [realpow_abs RS sym])); |
1338 qed "LIMSEQ_rabs_realpow_zero2"; |
1345 qed "LIMSEQ_rabs_realpow_zero2"; |
1339 |
1346 |
1340 Goal "abs(c) < #1 ==> (%n. c ^ n) ----NS> #0"; |
1347 Goal "abs(c) < #1 ==> (%n. c ^ n) ----NS> #0"; |
1341 by (asm_full_simp_tac (simpset() addsimps [LIMSEQ_rabs_realpow_zero2, |
1348 by (asm_full_simp_tac (simpset() addsimps [LIMSEQ_rabs_realpow_zero2, |
1342 LIMSEQ_NSLIMSEQ_iff RS sym]) 1); |
1349 LIMSEQ_NSLIMSEQ_iff RS sym]) 1); |