src/HOL/MicroJava/DFA/LBVComplete.thy
changeset 62390 842917225d56
parent 61994 133a8a888ae8
child 63258 576fb8068ba6
equal deleted inserted replaced
62380:29800666e526 62390:842917225d56
    86     with merge obtain
    86     with merge obtain
    87       app: "\<forall>(pc',s')\<in>set ss1. pc' \<noteq> pc+1 \<longrightarrow> s' <=_r c!pc'" 
    87       app: "\<forall>(pc',s')\<in>set ss1. pc' \<noteq> pc+1 \<longrightarrow> s' <=_r c!pc'" 
    88            (is "?app ss1") and
    88            (is "?app ss1") and
    89       sum: "(map snd [(p',t') \<leftarrow> ss1 . p' = pc+1] ++_f x) = ?s1" 
    89       sum: "(map snd [(p',t') \<leftarrow> ss1 . p' = pc+1] ++_f x) = ?s1" 
    90            (is "?map ss1 ++_f x = _" is "?sum ss1 = _")
    90            (is "?map ss1 ++_f x = _" is "?sum ss1 = _")
    91       by (simp split: split_if_asm)
    91       by (simp split: if_split_asm)
    92     from app less 
    92     from app less 
    93     have "?app ss2" by (blast dest: trans_r lesub_step_typeD)
    93     have "?app ss2" by (blast dest: trans_r lesub_step_typeD)
    94     moreover {
    94     moreover {
    95       from ss1 have map1: "set (?map ss1) \<subseteq> A" by auto
    95       from ss1 have map1: "set (?map ss1) \<subseteq> A" by auto
    96       with x have "?sum ss1 \<in> A" by (auto intro!: plusplus_closed semilat)
    96       with x have "?sum ss1 \<in> A" by (auto intro!: plusplus_closed semilat)
   157 next
   157 next
   158   case False
   158   case False
   159   have "?s1' = \<top> \<Longrightarrow> ?thesis" by simp
   159   have "?s1' = \<top> \<Longrightarrow> ?thesis" by simp
   160   moreover {
   160   moreover {
   161     assume "?s1' \<noteq> \<top>" 
   161     assume "?s1' \<noteq> \<top>" 
   162     with False have c: "s1 <=_r c!pc" by (simp add: wtc split: split_if_asm)
   162     with False have c: "s1 <=_r c!pc" by (simp add: wtc split: if_split_asm)
   163     with less have "s2 <=_r c!pc" ..
   163     with less have "s2 <=_r c!pc" ..
   164     with False c have ?thesis by (simp add: wtc)
   164     with False c have ?thesis by (simp add: wtc)
   165   }
   165   }
   166   ultimately show ?thesis by (cases "?s1' = \<top>") auto
   166   ultimately show ?thesis by (cases "?s1' = \<top>") auto
   167 qed
   167 qed
   308 next
   308 next
   309   case False
   309   case False
   310   from suc_pc have pc: "pc < length \<phi>" by simp
   310   from suc_pc have pc: "pc < length \<phi>" by simp
   311   with stable have "?wtc \<noteq> \<top>" by (rule stable_wtc)
   311   with stable have "?wtc \<noteq> \<top>" by (rule stable_wtc)
   312   with False have "?wtc = wti c pc (c!pc)" 
   312   with False have "?wtc = wti c pc (c!pc)" 
   313     by (unfold wtc) (simp split: split_if_asm)
   313     by (unfold wtc) (simp split: if_split_asm)
   314   also from pc False have "c!pc = \<phi>!pc" .. 
   314   also from pc False have "c!pc = \<phi>!pc" .. 
   315   finally have "?wtc = wti c pc (\<phi>!pc)" .
   315   finally have "?wtc = wti c pc (\<phi>!pc)" .
   316   also from stable suc_pc have "wti c pc (\<phi>!pc) <=_r \<phi>!Suc pc" by (rule wti_less)
   316   also from stable suc_pc have "wti c pc (\<phi>!pc) <=_r \<phi>!Suc pc" by (rule wti_less)
   317   finally show ?thesis .
   317   finally show ?thesis .
   318 qed
   318 qed