equal
deleted
inserted
replaced
328 (* ------------------------------------------------------------------------ *) |
328 (* ------------------------------------------------------------------------ *) |
329 |
329 |
330 qed_goalw "fix_eq" thy [fix_def] "fix`F = F`(fix`F)" |
330 qed_goalw "fix_eq" thy [fix_def] "fix`F = F`(fix`F)" |
331 (fn prems => |
331 (fn prems => |
332 [ |
332 [ |
333 (asm_simp_tac (!simpset addsimps [cont_Ifix]) 1), |
333 (asm_simp_tac (simpset() addsimps [cont_Ifix]) 1), |
334 (rtac Ifix_eq 1) |
334 (rtac Ifix_eq 1) |
335 ]); |
335 ]); |
336 |
336 |
337 qed_goalw "fix_least" thy [fix_def] "F`x = x ==> fix`F << x" |
337 qed_goalw "fix_least" thy [fix_def] "F`x = x ==> fix`F << x" |
338 (fn prems => |
338 (fn prems => |
339 [ |
339 [ |
340 (cut_facts_tac prems 1), |
340 (cut_facts_tac prems 1), |
341 (asm_simp_tac (!simpset addsimps [cont_Ifix]) 1), |
341 (asm_simp_tac (simpset() addsimps [cont_Ifix]) 1), |
342 (etac Ifix_least 1) |
342 (etac Ifix_least 1) |
343 ]); |
343 ]); |
344 |
344 |
345 |
345 |
346 qed_goal "fix_eqI" thy |
346 qed_goal "fix_eqI" thy |
437 qed_goalw "fix_def2" thy [fix_def] |
437 qed_goalw "fix_def2" thy [fix_def] |
438 "fix`F = lub(range(%i. iterate i F UU))" |
438 "fix`F = lub(range(%i. iterate i F UU))" |
439 (fn prems => |
439 (fn prems => |
440 [ |
440 [ |
441 (fold_goals_tac [Ifix_def]), |
441 (fold_goals_tac [Ifix_def]), |
442 (asm_simp_tac (!simpset addsimps [cont_Ifix]) 1) |
442 (asm_simp_tac (simpset() addsimps [cont_Ifix]) 1) |
443 ]); |
443 ]); |
444 |
444 |
445 |
445 |
446 (* ------------------------------------------------------------------------ *) |
446 (* ------------------------------------------------------------------------ *) |
447 (* Lemmas about admissibility and fixed point induction *) |
447 (* Lemmas about admissibility and fixed point induction *) |
561 qed_goalw "adm_chfindom" thy [adm_def] "adm (%(u::'a::cpo->'b::chfin). P(u`s))" |
561 qed_goalw "adm_chfindom" thy [adm_def] "adm (%(u::'a::cpo->'b::chfin). P(u`s))" |
562 (fn _ => [ |
562 (fn _ => [ |
563 strip_tac 1, |
563 strip_tac 1, |
564 dtac chfin_fappR 1, |
564 dtac chfin_fappR 1, |
565 eres_inst_tac [("x","s")] allE 1, |
565 eres_inst_tac [("x","s")] allE 1, |
566 fast_tac (HOL_cs addss (!simpset addsimps [chfin])) 1]); |
566 fast_tac (HOL_cs addss (simpset() addsimps [chfin])) 1]); |
567 |
567 |
568 (* adm_flat not needed any more, since it is a special case of adm_chfindom *) |
568 (* adm_flat not needed any more, since it is a special case of adm_chfindom *) |
569 |
569 |
570 (* ------------------------------------------------------------------------ *) |
570 (* ------------------------------------------------------------------------ *) |
571 (* improved admisibility introduction *) |
571 (* improved admisibility introduction *) |
668 (atac 1) |
668 (atac 1) |
669 ]); |
669 ]); |
670 |
670 |
671 qed_goal "adm_eq" thy |
671 qed_goal "adm_eq" thy |
672 "!!u. [|cont u ; cont v|]==> adm(%x. u x = v x)" |
672 "!!u. [|cont u ; cont v|]==> adm(%x. u x = v x)" |
673 (fn prems => [asm_simp_tac (!simpset addsimps [po_eq_conv]) 1]); |
673 (fn prems => [asm_simp_tac (simpset() addsimps [po_eq_conv]) 1]); |
674 |
674 |
675 |
675 |
676 |
676 |
677 (* ------------------------------------------------------------------------ *) |
677 (* ------------------------------------------------------------------------ *) |
678 (* admissibility for disjunction is hard to prove. It takes 10 Lemmas *) |
678 (* admissibility for disjunction is hard to prove. It takes 10 Lemmas *) |
689 ]); |
689 ]); |
690 |
690 |
691 val adm_disj_lemma2 = prove_goal thy |
691 val adm_disj_lemma2 = prove_goal thy |
692 "!!Q. [| adm(Q); ? X. is_chain(X) & (!n. Q(X(n))) &\ |
692 "!!Q. [| adm(Q); ? X. is_chain(X) & (!n. Q(X(n))) &\ |
693 \ lub(range(Y))=lub(range(X))|] ==> Q(lub(range(Y)))" |
693 \ lub(range(Y))=lub(range(X))|] ==> Q(lub(range(Y)))" |
694 (fn _ => [fast_tac (!claset addEs [admD] addss !simpset) 1]); |
694 (fn _ => [fast_tac (claset() addEs [admD] addss simpset()) 1]); |
695 |
695 |
696 val adm_disj_lemma3 = prove_goalw thy [is_chain] |
696 val adm_disj_lemma3 = prove_goalw thy [is_chain] |
697 "!!Q. is_chain(Y) ==> is_chain(%m. if m < Suc i then Y(Suc i) else Y m)" |
697 "!!Q. is_chain(Y) ==> is_chain(%m. if m < Suc i then Y(Suc i) else Y m)" |
698 (fn _ => |
698 (fn _ => |
699 [ |
699 [ |
700 asm_simp_tac (!simpset setloop (split_tac[expand_if])) 1, |
700 asm_simp_tac (simpset() setloop (split_tac[expand_if])) 1, |
701 safe_tac HOL_cs, |
701 safe_tac HOL_cs, |
702 subgoal_tac "ia = i" 1, |
702 subgoal_tac "ia = i" 1, |
703 Asm_simp_tac 1, |
703 Asm_simp_tac 1, |
704 trans_tac 1 |
704 trans_tac 1 |
705 ]); |
705 ]); |
706 |
706 |
707 val adm_disj_lemma4 = prove_goal Nat.thy |
707 val adm_disj_lemma4 = prove_goal Nat.thy |
708 "!!Q. !j. i < j --> Q(Y(j)) ==> !n. Q( if n < Suc i then Y(Suc i) else Y n)" |
708 "!!Q. !j. i < j --> Q(Y(j)) ==> !n. Q( if n < Suc i then Y(Suc i) else Y n)" |
709 (fn _ => |
709 (fn _ => |
710 [ |
710 [ |
711 asm_simp_tac (!simpset setloop (split_tac[expand_if])) 1, |
711 asm_simp_tac (simpset() setloop (split_tac[expand_if])) 1, |
712 strip_tac 1, |
712 strip_tac 1, |
713 etac allE 1, |
713 etac allE 1, |
714 etac mp 1, |
714 etac mp 1, |
715 trans_tac 1 |
715 trans_tac 1 |
716 ]); |
716 ]); |
720 \ lub(range(Y)) = lub(range(%m. if m< Suc(i) then Y(Suc(i)) else Y m))" |
720 \ lub(range(Y)) = lub(range(%m. if m< Suc(i) then Y(Suc(i)) else Y m))" |
721 (fn prems => |
721 (fn prems => |
722 [ |
722 [ |
723 safe_tac (HOL_cs addSIs [lub_equal2,adm_disj_lemma3]), |
723 safe_tac (HOL_cs addSIs [lub_equal2,adm_disj_lemma3]), |
724 atac 2, |
724 atac 2, |
725 asm_simp_tac (!simpset setloop (split_tac[expand_if])) 1, |
725 asm_simp_tac (simpset() setloop (split_tac[expand_if])) 1, |
726 res_inst_tac [("x","i")] exI 1, |
726 res_inst_tac [("x","i")] exI 1, |
727 strip_tac 1, |
727 strip_tac 1, |
728 trans_tac 1 |
728 trans_tac 1 |
729 ]); |
729 ]); |
730 |
730 |