240 done |
240 done |
241 declare starfunC_mult [symmetric, simp] |
241 declare starfunC_mult [symmetric, simp] |
242 |
242 |
243 lemma starfunRC_mult: |
243 lemma starfunRC_mult: |
244 "( *fRc* f) z * ( *fRc* g) z = ( *fRc* (%x. f x * g x)) z" |
244 "( *fRc* f) z * ( *fRc* g) z = ( *fRc* (%x. f x * g x)) z" |
245 apply (rule eq_Abs_hypreal [of z]) |
245 apply (cases z) |
246 apply (simp add: starfunRC hcomplex_mult) |
246 apply (simp add: starfunRC hcomplex_mult) |
247 done |
247 done |
248 declare starfunRC_mult [symmetric, simp] |
248 declare starfunRC_mult [symmetric, simp] |
249 |
249 |
250 lemma starfunCR_mult: |
250 lemma starfunCR_mult: |
261 apply (simp add: starfunC hcomplex_add) |
261 apply (simp add: starfunC hcomplex_add) |
262 done |
262 done |
263 declare starfunC_add [symmetric, simp] |
263 declare starfunC_add [symmetric, simp] |
264 |
264 |
265 lemma starfunRC_add: "( *fRc* f) z + ( *fRc* g) z = ( *fRc* (%x. f x + g x)) z" |
265 lemma starfunRC_add: "( *fRc* f) z + ( *fRc* g) z = ( *fRc* (%x. f x + g x)) z" |
266 apply (rule eq_Abs_hypreal [of z]) |
266 apply (cases z) |
267 apply (simp add: starfunRC hcomplex_add) |
267 apply (simp add: starfunRC hcomplex_add) |
268 done |
268 done |
269 declare starfunRC_add [symmetric, simp] |
269 declare starfunRC_add [symmetric, simp] |
270 |
270 |
271 lemma starfunCR_add: "( *fcR* f) z + ( *fcR* g) z = ( *fcR* (%x. f x + g x)) z" |
271 lemma starfunCR_add: "( *fcR* f) z + ( *fcR* g) z = ( *fcR* (%x. f x + g x)) z" |
279 apply (rule_tac z = x in eq_Abs_hcomplex) |
279 apply (rule_tac z = x in eq_Abs_hcomplex) |
280 apply (simp add: starfunC hcomplex_minus) |
280 apply (simp add: starfunC hcomplex_minus) |
281 done |
281 done |
282 |
282 |
283 lemma starfunRC_minus [simp]: "( *fRc* (%x. - f x)) x = - ( *fRc* f) x" |
283 lemma starfunRC_minus [simp]: "( *fRc* (%x. - f x)) x = - ( *fRc* f) x" |
284 apply (rule eq_Abs_hypreal [of x]) |
284 apply (cases x) |
285 apply (simp add: starfunRC hcomplex_minus) |
285 apply (simp add: starfunRC hcomplex_minus) |
286 done |
286 done |
287 |
287 |
288 lemma starfunCR_minus [simp]: "( *fcR* (%x. - f x)) x = - ( *fcR* f) x" |
288 lemma starfunCR_minus [simp]: "( *fcR* (%x. - f x)) x = - ( *fcR* f) x" |
289 apply (rule_tac z = x in eq_Abs_hcomplex) |
289 apply (rule_tac z = x in eq_Abs_hcomplex) |
336 |
336 |
337 lemma starfun_starfunCR_o: "( *f* f) o ( *fcR* g) = ( *fcR* (f o g))" |
337 lemma starfun_starfunCR_o: "( *f* f) o ( *fcR* g) = ( *fcR* (f o g))" |
338 by (simp add: o_def starfun_starfunCR_o2) |
338 by (simp add: o_def starfun_starfunCR_o2) |
339 |
339 |
340 lemma starfunC_const_fun [simp]: "( *fc* (%x. k)) z = hcomplex_of_complex k" |
340 lemma starfunC_const_fun [simp]: "( *fc* (%x. k)) z = hcomplex_of_complex k" |
341 apply (rule eq_Abs_hcomplex [of z]) |
341 apply (cases z) |
342 apply (simp add: starfunC hcomplex_of_complex_def) |
342 apply (simp add: starfunC hcomplex_of_complex_def) |
343 done |
343 done |
344 |
344 |
345 lemma starfunRC_const_fun [simp]: "( *fRc* (%x. k)) z = hcomplex_of_complex k" |
345 lemma starfunRC_const_fun [simp]: "( *fRc* (%x. k)) z = hcomplex_of_complex k" |
346 apply (rule eq_Abs_hypreal [of z]) |
346 apply (cases z) |
347 apply (simp add: starfunRC hcomplex_of_complex_def) |
347 apply (simp add: starfunRC hcomplex_of_complex_def) |
348 done |
348 done |
349 |
349 |
350 lemma starfunCR_const_fun [simp]: "( *fcR* (%x. k)) z = hypreal_of_real k" |
350 lemma starfunCR_const_fun [simp]: "( *fcR* (%x. k)) z = hypreal_of_real k" |
351 apply (rule eq_Abs_hcomplex [of z]) |
351 apply (cases z) |
352 apply (simp add: starfunCR hypreal_of_real_def) |
352 apply (simp add: starfunCR hypreal_of_real_def) |
353 done |
353 done |
354 |
354 |
355 lemma starfunC_inverse: "inverse (( *fc* f) x) = ( *fc* (%x. inverse (f x))) x" |
355 lemma starfunC_inverse: "inverse (( *fc* f) x) = ( *fc* (%x. inverse (f x))) x" |
356 apply (rule eq_Abs_hcomplex [of x]) |
356 apply (cases x) |
357 apply (simp add: starfunC hcomplex_inverse) |
357 apply (simp add: starfunC hcomplex_inverse) |
358 done |
358 done |
359 declare starfunC_inverse [symmetric, simp] |
359 declare starfunC_inverse [symmetric, simp] |
360 |
360 |
361 lemma starfunRC_inverse: |
361 lemma starfunRC_inverse: |
362 "inverse (( *fRc* f) x) = ( *fRc* (%x. inverse (f x))) x" |
362 "inverse (( *fRc* f) x) = ( *fRc* (%x. inverse (f x))) x" |
363 apply (rule eq_Abs_hypreal [of x]) |
363 apply (cases x) |
364 apply (simp add: starfunRC hcomplex_inverse) |
364 apply (simp add: starfunRC hcomplex_inverse) |
365 done |
365 done |
366 declare starfunRC_inverse [symmetric, simp] |
366 declare starfunRC_inverse [symmetric, simp] |
367 |
367 |
368 lemma starfunCR_inverse: |
368 lemma starfunCR_inverse: |
369 "inverse (( *fcR* f) x) = ( *fcR* (%x. inverse (f x))) x" |
369 "inverse (( *fcR* f) x) = ( *fcR* (%x. inverse (f x))) x" |
370 apply (rule eq_Abs_hcomplex [of x]) |
370 apply (cases x) |
371 apply (simp add: starfunCR hypreal_inverse) |
371 apply (simp add: starfunCR hypreal_inverse) |
372 done |
372 done |
373 declare starfunCR_inverse [symmetric, simp] |
373 declare starfunCR_inverse [symmetric, simp] |
374 |
374 |
375 lemma starfunC_eq [simp]: |
375 lemma starfunC_eq [simp]: |
399 (* |
399 (* |
400 Goal "( *fcNat* (%n. z ^ n)) N = (hcomplex_of_complex z) hcpow N" |
400 Goal "( *fcNat* (%n. z ^ n)) N = (hcomplex_of_complex z) hcpow N" |
401 *) |
401 *) |
402 |
402 |
403 lemma starfunC_hcpow: "( *fc* (%z. z ^ n)) Z = Z hcpow hypnat_of_nat n" |
403 lemma starfunC_hcpow: "( *fc* (%z. z ^ n)) Z = Z hcpow hypnat_of_nat n" |
404 apply (rule eq_Abs_hcomplex [of Z]) |
404 apply (cases Z) |
405 apply (simp add: hcpow starfunC hypnat_of_nat_eq) |
405 apply (simp add: hcpow starfunC hypnat_of_nat_eq) |
406 done |
406 done |
407 |
407 |
408 lemma starfunC_lambda_cancel: |
408 lemma starfunC_lambda_cancel: |
409 "( *fc* (%h. f (x + h))) y = ( *fc* f) (hcomplex_of_complex x + y)" |
409 "( *fc* (%h. f (x + h))) y = ( *fc* f) (hcomplex_of_complex x + y)" |
410 apply (rule eq_Abs_hcomplex [of y]) |
410 apply (cases y) |
411 apply (simp add: starfunC hcomplex_of_complex_def hcomplex_add) |
411 apply (simp add: starfunC hcomplex_of_complex_def hcomplex_add) |
412 done |
412 done |
413 |
413 |
414 lemma starfunCR_lambda_cancel: |
414 lemma starfunCR_lambda_cancel: |
415 "( *fcR* (%h. f (x + h))) y = ( *fcR* f) (hcomplex_of_complex x + y)" |
415 "( *fcR* (%h. f (x + h))) y = ( *fcR* f) (hcomplex_of_complex x + y)" |
416 apply (rule eq_Abs_hcomplex [of y]) |
416 apply (cases y) |
417 apply (simp add: starfunCR hcomplex_of_complex_def hcomplex_add) |
417 apply (simp add: starfunCR hcomplex_of_complex_def hcomplex_add) |
418 done |
418 done |
419 |
419 |
420 lemma starfunRC_lambda_cancel: |
420 lemma starfunRC_lambda_cancel: |
421 "( *fRc* (%h. f (x + h))) y = ( *fRc* f) (hypreal_of_real x + y)" |
421 "( *fRc* (%h. f (x + h))) y = ( *fRc* f) (hypreal_of_real x + y)" |
422 apply (rule eq_Abs_hypreal [of y]) |
422 apply (cases y) |
423 apply (simp add: starfunRC hypreal_of_real_def hypreal_add) |
423 apply (simp add: starfunRC hypreal_of_real_def hypreal_add) |
424 done |
424 done |
425 |
425 |
426 lemma starfunC_lambda_cancel2: |
426 lemma starfunC_lambda_cancel2: |
427 "( *fc* (%h. f(g(x + h)))) y = ( *fc* (f o g)) (hcomplex_of_complex x + y)" |
427 "( *fc* (%h. f(g(x + h)))) y = ( *fc* (f o g)) (hcomplex_of_complex x + y)" |
428 apply (rule eq_Abs_hcomplex [of y]) |
428 apply (cases y) |
429 apply (simp add: starfunC hcomplex_of_complex_def hcomplex_add) |
429 apply (simp add: starfunC hcomplex_of_complex_def hcomplex_add) |
430 done |
430 done |
431 |
431 |
432 lemma starfunCR_lambda_cancel2: |
432 lemma starfunCR_lambda_cancel2: |
433 "( *fcR* (%h. f(g(x + h)))) y = ( *fcR* (f o g)) (hcomplex_of_complex x + y)" |
433 "( *fcR* (%h. f(g(x + h)))) y = ( *fcR* (f o g)) (hcomplex_of_complex x + y)" |
434 apply (rule eq_Abs_hcomplex [of y]) |
434 apply (cases y) |
435 apply (simp add: starfunCR hcomplex_of_complex_def hcomplex_add) |
435 apply (simp add: starfunCR hcomplex_of_complex_def hcomplex_add) |
436 done |
436 done |
437 |
437 |
438 lemma starfunRC_lambda_cancel2: |
438 lemma starfunRC_lambda_cancel2: |
439 "( *fRc* (%h. f(g(x + h)))) y = ( *fRc* (f o g)) (hypreal_of_real x + y)" |
439 "( *fRc* (%h. f(g(x + h)))) y = ( *fRc* (f o g)) (hypreal_of_real x + y)" |
440 apply (rule eq_Abs_hypreal [of y]) |
440 apply (cases y) |
441 apply (simp add: starfunRC hypreal_of_real_def hypreal_add) |
441 apply (simp add: starfunRC hypreal_of_real_def hypreal_add) |
442 done |
442 done |
443 |
443 |
444 lemma starfunC_mult_CFinite_capprox: |
444 lemma starfunC_mult_CFinite_capprox: |
445 "[| ( *fc* f) y @c= l; ( *fc* g) y @c= m; l: CFinite; m: CFinite |] |
445 "[| ( *fc* f) y @c= l; ( *fc* g) y @c= m; l: CFinite; m: CFinite |] |
482 apply (rule_tac z = x in eq_Abs_hcomplex) |
482 apply (rule_tac z = x in eq_Abs_hcomplex) |
483 apply (simp add: starfunCR hcmod) |
483 apply (simp add: starfunCR hcmod) |
484 done |
484 done |
485 |
485 |
486 lemma starfunC_inverse_inverse: "( *fc* inverse) x = inverse(x)" |
486 lemma starfunC_inverse_inverse: "( *fc* inverse) x = inverse(x)" |
487 apply (rule eq_Abs_hcomplex [of x]) |
487 apply (cases x) |
488 apply (simp add: starfunC hcomplex_inverse) |
488 apply (simp add: starfunC hcomplex_inverse) |
489 done |
489 done |
490 |
490 |
491 lemma starfunC_divide: "( *fc* f) y / ( *fc* g) y = ( *fc* (%x. f x / g x)) y" |
491 lemma starfunC_divide: "( *fc* f) y / ( *fc* g) y = ( *fc* (%x. f x / g x)) y" |
492 by (simp add: divide_inverse) |
492 by (simp add: divide_inverse) |
519 |
519 |
520 (** multiplication: ( *fn) x ( *gn) = *(fn x gn) **) |
520 (** multiplication: ( *fn) x ( *gn) = *(fn x gn) **) |
521 |
521 |
522 lemma starfunC_n_mult: |
522 lemma starfunC_n_mult: |
523 "( *fcn* f) z * ( *fcn* g) z = ( *fcn* (% i x. f i x * g i x)) z" |
523 "( *fcn* f) z * ( *fcn* g) z = ( *fcn* (% i x. f i x * g i x)) z" |
524 apply (rule eq_Abs_hcomplex [of z]) |
524 apply (cases z) |
525 apply (simp add: starfunC_n hcomplex_mult) |
525 apply (simp add: starfunC_n hcomplex_mult) |
526 done |
526 done |
527 |
527 |
528 (** addition: ( *fn) + ( *gn) = *(fn + gn) **) |
528 (** addition: ( *fn) + ( *gn) = *(fn + gn) **) |
529 |
529 |
530 lemma starfunC_n_add: |
530 lemma starfunC_n_add: |
531 "( *fcn* f) z + ( *fcn* g) z = ( *fcn* (%i x. f i x + g i x)) z" |
531 "( *fcn* f) z + ( *fcn* g) z = ( *fcn* (%i x. f i x + g i x)) z" |
532 apply (rule eq_Abs_hcomplex [of z]) |
532 apply (cases z) |
533 apply (simp add: starfunC_n hcomplex_add) |
533 apply (simp add: starfunC_n hcomplex_add) |
534 done |
534 done |
535 |
535 |
536 (** uminus **) |
536 (** uminus **) |
537 |
537 |
538 lemma starfunC_n_minus: "- ( *fcn* g) z = ( *fcn* (%i x. - g i x)) z" |
538 lemma starfunC_n_minus: "- ( *fcn* g) z = ( *fcn* (%i x. - g i x)) z" |
539 apply (rule eq_Abs_hcomplex [of z]) |
539 apply (cases z) |
540 apply (simp add: starfunC_n hcomplex_minus) |
540 apply (simp add: starfunC_n hcomplex_minus) |
541 done |
541 done |
542 |
542 |
543 (** subtraction: ( *fn) - ( *gn) = *(fn - gn) **) |
543 (** subtraction: ( *fn) - ( *gn) = *(fn - gn) **) |
544 |
544 |
548 |
548 |
549 (** composition: ( *fn) o ( *gn) = *(fn o gn) **) |
549 (** composition: ( *fn) o ( *gn) = *(fn o gn) **) |
550 |
550 |
551 lemma starfunC_n_const_fun [simp]: |
551 lemma starfunC_n_const_fun [simp]: |
552 "( *fcn* (%i x. k)) z = hcomplex_of_complex k" |
552 "( *fcn* (%i x. k)) z = hcomplex_of_complex k" |
553 apply (rule eq_Abs_hcomplex [of z]) |
553 apply (cases z) |
554 apply (simp add: starfunC_n hcomplex_of_complex_def) |
554 apply (simp add: starfunC_n hcomplex_of_complex_def) |
555 done |
555 done |
556 |
556 |
557 lemma starfunC_n_eq [simp]: |
557 lemma starfunC_n_eq [simp]: |
558 "( *fcn* f) (hcomplex_of_complex n) = Abs_hcomplex(hcomplexrel `` {%i. f i n})" |
558 "( *fcn* f) (hcomplex_of_complex n) = Abs_hcomplex(hcomplexrel `` {%i. f i n})" |
580 done |
580 done |
581 |
581 |
582 lemma starfunC_eq_Re_Im_iff: |
582 lemma starfunC_eq_Re_Im_iff: |
583 "(( *fc* f) x = z) = ((( *fcR* (%x. Re(f x))) x = hRe (z)) & |
583 "(( *fc* f) x = z) = ((( *fcR* (%x. Re(f x))) x = hRe (z)) & |
584 (( *fcR* (%x. Im(f x))) x = hIm (z)))" |
584 (( *fcR* (%x. Im(f x))) x = hIm (z)))" |
585 apply (rule eq_Abs_hcomplex [of x]) |
585 apply (cases x, cases z) |
586 apply (rule eq_Abs_hcomplex [of z]) |
|
587 apply (auto simp add: starfunCR starfunC hIm hRe complex_Re_Im_cancel_iff, ultra+) |
586 apply (auto simp add: starfunCR starfunC hIm hRe complex_Re_Im_cancel_iff, ultra+) |
588 done |
587 done |
589 |
588 |
590 lemma starfunC_approx_Re_Im_iff: |
589 lemma starfunC_approx_Re_Im_iff: |
591 "(( *fc* f) x @c= z) = ((( *fcR* (%x. Re(f x))) x @= hRe (z)) & |
590 "(( *fc* f) x @c= z) = ((( *fcR* (%x. Re(f x))) x @= hRe (z)) & |
592 (( *fcR* (%x. Im(f x))) x @= hIm (z)))" |
591 (( *fcR* (%x. Im(f x))) x @= hIm (z)))" |
593 apply (rule eq_Abs_hcomplex [of x]) |
592 apply (cases x, cases z) |
594 apply (rule eq_Abs_hcomplex [of z]) |
|
595 apply (simp add: starfunCR starfunC hIm hRe capprox_approx_iff) |
593 apply (simp add: starfunCR starfunC hIm hRe capprox_approx_iff) |
596 done |
594 done |
597 |
595 |
598 lemma starfunC_Idfun_capprox: |
596 lemma starfunC_Idfun_capprox: |
599 "x @c= hcomplex_of_complex a ==> ( *fc* (%x. x)) x @c= hcomplex_of_complex a" |
597 "x @c= hcomplex_of_complex a ==> ( *fc* (%x. x)) x @c= hcomplex_of_complex a" |
600 apply (rule eq_Abs_hcomplex [of x]) |
598 apply (cases x) |
601 apply (simp add: starfunC) |
599 apply (simp add: starfunC) |
602 done |
600 done |
603 |
601 |
604 lemma starfunC_Id [simp]: "( *fc* (%x. x)) x = x" |
602 lemma starfunC_Id [simp]: "( *fc* (%x. x)) x = x" |
605 apply (rule eq_Abs_hcomplex [of x]) |
603 apply (cases x) |
606 apply (simp add: starfunC) |
604 apply (simp add: starfunC) |
607 done |
605 done |
608 |
606 |
609 ML |
607 ML |
610 {* |
608 {* |