332 |
332 |
333 (* ------------------------------------------------------------------------ *) |
333 (* ------------------------------------------------------------------------ *) |
334 (* continuous versions of lemmas for 'a ++ 'b *) |
334 (* continuous versions of lemmas for 'a ++ 'b *) |
335 (* ------------------------------------------------------------------------ *) |
335 (* ------------------------------------------------------------------------ *) |
336 |
336 |
337 val prems = goalw Ssum3.thy [sinl_def] "sinl`UU =UU"; |
337 Goalw [sinl_def] "sinl`UU =UU"; |
338 by (simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1); |
338 by (simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1); |
339 by (rtac (inst_ssum_pcpo RS sym) 1); |
339 by (rtac (inst_ssum_pcpo RS sym) 1); |
340 qed "strict_sinl"; |
340 qed "strict_sinl"; |
341 |
341 |
342 val prems = goalw Ssum3.thy [sinr_def] "sinr`UU=UU"; |
342 Goalw [sinr_def] "sinr`UU=UU"; |
343 by (simp_tac (Ssum0_ss addsimps [cont_Isinr]) 1); |
343 by (simp_tac (Ssum0_ss addsimps [cont_Isinr]) 1); |
344 by (rtac (inst_ssum_pcpo RS sym) 1); |
344 by (rtac (inst_ssum_pcpo RS sym) 1); |
345 qed "strict_sinr"; |
345 qed "strict_sinr"; |
346 |
346 |
347 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
347 Goalw [sinl_def,sinr_def] |
348 "sinl`a=sinr`b ==> a=UU & b=UU"; |
348 "sinl`a=sinr`b ==> a=UU & b=UU"; |
349 by (cut_facts_tac prems 1); |
|
350 by (rtac noteq_IsinlIsinr 1); |
349 by (rtac noteq_IsinlIsinr 1); |
351 by (etac box_equals 1); |
350 by (etac box_equals 1); |
352 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
351 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
353 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
352 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
354 qed "noteq_sinlsinr"; |
353 qed "noteq_sinlsinr"; |
355 |
354 |
356 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
355 Goalw [sinl_def,sinr_def] |
357 "sinl`a1=sinl`a2==> a1=a2"; |
356 "sinl`a1=sinl`a2==> a1=a2"; |
358 by (cut_facts_tac prems 1); |
|
359 by (rtac inject_Isinl 1); |
357 by (rtac inject_Isinl 1); |
360 by (etac box_equals 1); |
358 by (etac box_equals 1); |
361 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
359 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
362 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
360 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
363 qed "inject_sinl"; |
361 qed "inject_sinl"; |
364 |
362 |
365 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
363 Goalw [sinl_def,sinr_def] |
366 "sinr`a1=sinr`a2==> a1=a2"; |
364 "sinr`a1=sinr`a2==> a1=a2"; |
367 by (cut_facts_tac prems 1); |
|
368 by (rtac inject_Isinr 1); |
365 by (rtac inject_Isinr 1); |
369 by (etac box_equals 1); |
366 by (etac box_equals 1); |
370 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
367 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
371 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
368 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
372 qed "inject_sinr"; |
369 qed "inject_sinr"; |
384 by (rtac inject_sinr 1); |
381 by (rtac inject_sinr 1); |
385 by (stac strict_sinr 1); |
382 by (stac strict_sinr 1); |
386 by (etac notnotD 1); |
383 by (etac notnotD 1); |
387 qed "defined_sinr"; |
384 qed "defined_sinr"; |
388 |
385 |
389 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
386 Goalw [sinl_def,sinr_def] |
390 "z=UU | (? a. z=sinl`a & a~=UU) | (? b. z=sinr`b & b~=UU)"; |
387 "z=UU | (? a. z=sinl`a & a~=UU) | (? b. z=sinr`b & b~=UU)"; |
391 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
388 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
392 by (stac inst_ssum_pcpo 1); |
389 by (stac inst_ssum_pcpo 1); |
393 by (rtac Exh_Ssum 1); |
390 by (rtac Exh_Ssum 1); |
394 qed "Exh_Ssum1"; |
391 qed "Exh_Ssum1"; |
420 qed "ssumE2"; |
417 qed "ssumE2"; |
421 |
418 |
422 val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, |
419 val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, |
423 cont_Iwhen3,cont2cont_CF1L]) 1)); |
420 cont_Iwhen3,cont2cont_CF1L]) 1)); |
424 |
421 |
425 val _ = goalw Ssum3.thy [sscase_def,sinl_def,sinr_def] |
422 Goalw [sscase_def,sinl_def,sinr_def] |
426 "sscase`f`g`UU = UU"; |
423 "sscase`f`g`UU = UU"; |
427 by (stac inst_ssum_pcpo 1); |
424 by (stac inst_ssum_pcpo 1); |
428 by (stac beta_cfun 1); |
425 by (stac beta_cfun 1); |
429 by tac; |
426 by tac; |
430 by (stac beta_cfun 1); |
427 by (stac beta_cfun 1); |
436 |
433 |
437 |
434 |
438 val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, |
435 val tac = (REPEAT (resolve_tac (cont_lemmas1 @ [cont_Iwhen1,cont_Iwhen2, |
439 cont_Iwhen3,cont_Isinl,cont_Isinr,cont2cont_CF1L]) 1)); |
436 cont_Iwhen3,cont_Isinl,cont_Isinr,cont2cont_CF1L]) 1)); |
440 |
437 |
441 val prems = goalw Ssum3.thy [sscase_def,sinl_def,sinr_def] |
438 Goalw [sscase_def,sinl_def,sinr_def] |
442 "x~=UU==> sscase`f`g`(sinl`x) = f`x"; |
439 "x~=UU==> sscase`f`g`(sinl`x) = f`x"; |
443 by (cut_facts_tac prems 1); |
|
444 by (stac beta_cfun 1); |
440 by (stac beta_cfun 1); |
445 by tac; |
441 by tac; |
446 by (stac beta_cfun 1); |
442 by (stac beta_cfun 1); |
447 by tac; |
443 by tac; |
448 by (stac beta_cfun 1); |
444 by (stac beta_cfun 1); |
450 by (stac beta_cfun 1); |
446 by (stac beta_cfun 1); |
451 by tac; |
447 by tac; |
452 by (asm_simp_tac Ssum0_ss 1); |
448 by (asm_simp_tac Ssum0_ss 1); |
453 qed "sscase2"; |
449 qed "sscase2"; |
454 |
450 |
455 val prems = goalw Ssum3.thy [sscase_def,sinl_def,sinr_def] |
451 Goalw [sscase_def,sinl_def,sinr_def] |
456 "x~=UU==> sscase`f`g`(sinr`x) = g`x"; |
452 "x~=UU==> sscase`f`g`(sinr`x) = g`x"; |
457 by (cut_facts_tac prems 1); |
|
458 by (stac beta_cfun 1); |
453 by (stac beta_cfun 1); |
459 by tac; |
454 by tac; |
460 by (stac beta_cfun 1); |
455 by (stac beta_cfun 1); |
461 by tac; |
456 by tac; |
462 by (stac beta_cfun 1); |
457 by (stac beta_cfun 1); |
465 by tac; |
460 by tac; |
466 by (asm_simp_tac Ssum0_ss 1); |
461 by (asm_simp_tac Ssum0_ss 1); |
467 qed "sscase3"; |
462 qed "sscase3"; |
468 |
463 |
469 |
464 |
470 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
465 Goalw [sinl_def,sinr_def] |
471 "(sinl`x << sinl`y) = (x << y)"; |
466 "(sinl`x << sinl`y) = (x << y)"; |
472 by (stac beta_cfun 1); |
467 by (stac beta_cfun 1); |
473 by tac; |
468 by tac; |
474 by (stac beta_cfun 1); |
469 by (stac beta_cfun 1); |
475 by tac; |
470 by tac; |
476 by (rtac less_ssum3a 1); |
471 by (rtac less_ssum3a 1); |
477 qed "less_ssum4a"; |
472 qed "less_ssum4a"; |
478 |
473 |
479 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
474 Goalw [sinl_def,sinr_def] |
480 "(sinr`x << sinr`y) = (x << y)"; |
475 "(sinr`x << sinr`y) = (x << y)"; |
481 by (stac beta_cfun 1); |
476 by (stac beta_cfun 1); |
482 by tac; |
477 by tac; |
483 by (stac beta_cfun 1); |
478 by (stac beta_cfun 1); |
484 by tac; |
479 by tac; |
485 by (rtac less_ssum3b 1); |
480 by (rtac less_ssum3b 1); |
486 qed "less_ssum4b"; |
481 qed "less_ssum4b"; |
487 |
482 |
488 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
483 Goalw [sinl_def,sinr_def] |
489 "(sinl`x << sinr`y) = (x = UU)"; |
484 "(sinl`x << sinr`y) = (x = UU)"; |
490 by (stac beta_cfun 1); |
485 by (stac beta_cfun 1); |
491 by tac; |
486 by tac; |
492 by (stac beta_cfun 1); |
487 by (stac beta_cfun 1); |
493 by tac; |
488 by tac; |
494 by (rtac less_ssum3c 1); |
489 by (rtac less_ssum3c 1); |
495 qed "less_ssum4c"; |
490 qed "less_ssum4c"; |
496 |
491 |
497 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
492 Goalw [sinl_def,sinr_def] |
498 "(sinr`x << sinl`y) = (x = UU)"; |
493 "(sinr`x << sinl`y) = (x = UU)"; |
499 by (stac beta_cfun 1); |
494 by (stac beta_cfun 1); |
500 by tac; |
495 by tac; |
501 by (stac beta_cfun 1); |
496 by (stac beta_cfun 1); |
502 by tac; |
497 by tac; |
503 by (rtac less_ssum3d 1); |
498 by (rtac less_ssum3d 1); |
504 qed "less_ssum4d"; |
499 qed "less_ssum4d"; |
505 |
500 |
506 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
501 Goalw [sinl_def,sinr_def] |
507 "chain(Y) ==> (!i.? x.(Y i)=sinl`x)|(!i.? y.(Y i)=sinr`y)"; |
502 "chain(Y) ==> (!i.? x.(Y i)=sinl`x)|(!i.? y.(Y i)=sinr`y)"; |
508 by (cut_facts_tac prems 1); |
|
509 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
503 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl]) 1); |
510 by (etac ssum_lemma4 1); |
504 by (etac ssum_lemma4 1); |
511 qed "ssum_chainE"; |
505 qed "ssum_chainE"; |
512 |
506 |
513 |
507 |
514 val prems = goalw Ssum3.thy [sinl_def,sinr_def,sscase_def] |
508 Goalw [sinl_def,sinr_def,sscase_def] |
515 "[| chain(Y); !i.? x. Y(i) = sinl`x |] ==>\ |
509 "[| chain(Y); !i.? x. Y(i) = sinl`x |] ==>\ |
516 \ lub(range(Y)) = sinl`(lub(range(%i. sscase`(LAM x. x)`(LAM y. UU)`(Y i))))"; |
510 \ lub(range(Y)) = sinl`(lub(range(%i. sscase`(LAM x. x)`(LAM y. UU)`(Y i))))"; |
517 by (cut_facts_tac prems 1); |
|
518 by (stac beta_cfun 1); |
511 by (stac beta_cfun 1); |
519 by tac; |
512 by tac; |
520 by (stac beta_cfun 1); |
513 by (stac beta_cfun 1); |
521 by tac; |
514 by tac; |
522 by (stac beta_cfun 1); |
515 by (stac beta_cfun 1); |
532 by (etac box_equals 1); |
525 by (etac box_equals 1); |
533 by (rtac refl 1); |
526 by (rtac refl 1); |
534 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1); |
527 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinl]) 1); |
535 qed "thelub_ssum2a"; |
528 qed "thelub_ssum2a"; |
536 |
529 |
537 val prems = goalw Ssum3.thy [sinl_def,sinr_def,sscase_def] |
530 Goalw [sinl_def,sinr_def,sscase_def] |
538 "[| chain(Y); !i.? x. Y(i) = sinr`x |] ==>\ |
531 "[| chain(Y); !i.? x. Y(i) = sinr`x |] ==>\ |
539 \ lub(range(Y)) = sinr`(lub(range(%i. sscase`(LAM y. UU)`(LAM x. x)`(Y i))))"; |
532 \ lub(range(Y)) = sinr`(lub(range(%i. sscase`(LAM y. UU)`(LAM x. x)`(Y i))))"; |
540 by (cut_facts_tac prems 1); |
|
541 by (stac beta_cfun 1); |
533 by (stac beta_cfun 1); |
542 by tac; |
534 by tac; |
543 by (stac beta_cfun 1); |
535 by (stac beta_cfun 1); |
544 by tac; |
536 by tac; |
545 by (stac beta_cfun 1); |
537 by (stac beta_cfun 1); |
555 by (etac box_equals 1); |
547 by (etac box_equals 1); |
556 by (rtac refl 1); |
548 by (rtac refl 1); |
557 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
549 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
558 qed "thelub_ssum2b"; |
550 qed "thelub_ssum2b"; |
559 |
551 |
560 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
552 Goalw [sinl_def,sinr_def] |
561 "[| chain(Y); lub(range(Y)) = sinl`x|] ==> !i.? x. Y(i)=sinl`x"; |
553 "[| chain(Y); lub(range(Y)) = sinl`x|] ==> !i.? x. Y(i)=sinl`x"; |
562 by (cut_facts_tac prems 1); |
|
563 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
554 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
564 by (etac ssum_lemma9 1); |
555 by (etac ssum_lemma9 1); |
565 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
556 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
566 qed "thelub_ssum2a_rev"; |
557 qed "thelub_ssum2a_rev"; |
567 |
558 |
568 val prems = goalw Ssum3.thy [sinl_def,sinr_def] |
559 Goalw [sinl_def,sinr_def] |
569 "[| chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x. Y(i)=sinr`x"; |
560 "[| chain(Y); lub(range(Y)) = sinr`x|] ==> !i.? x. Y(i)=sinr`x"; |
570 by (cut_facts_tac prems 1); |
|
571 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
561 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
572 by (etac ssum_lemma10 1); |
562 by (etac ssum_lemma10 1); |
573 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
563 by (asm_simp_tac (Ssum0_ss addsimps [cont_Isinr,cont_Isinl,cont_Iwhen1,cont_Iwhen2, cont_Iwhen3]) 1); |
574 qed "thelub_ssum2b_rev"; |
564 qed "thelub_ssum2b_rev"; |
575 |
565 |