diff -r 8f026b608378 -r e861aff29655 CpsG.thy --- a/CpsG.thy Wed Mar 12 10:08:20 2014 +0000 +++ b/CpsG.thy Tue May 06 14:36:40 2014 +0100 @@ -255,8 +255,8 @@ "children s th \ {th'. \ cs. (Th th', Cs cs) \ depend s \ (Cs cs, Th th) \ depend s}" unfolding child_def children_def by simp -lemma children_dependents: "children s th \ dependents (wq s) th" - by (unfold children_def child_def cs_dependents_def, auto simp:eq_depend) +lemma children_dependants: "children s th \ dependants (wq s) th" + by (unfold children_def child_def cs_dependants_def, auto simp:eq_depend) lemma child_unique: assumes vt: "vt s" @@ -446,20 +446,20 @@ show "\a b c. \(a, b) \ depend s; (a, c) \ depend s\ \ b = c" by auto qed -lemma dependents_child_unique: +lemma dependants_child_unique: fixes s th th1 th2 th3 assumes vt: "vt s" and ch1: "(Th th1, Th th) \ child s" and ch2: "(Th th2, Th th) \ child s" - and dp1: "th3 \ dependents s th1" - and dp2: "th3 \ dependents s th2" + and dp1: "th3 \ dependants s th1" + and dp2: "th3 \ dependants s th2" shows "th1 = th2" proof - { assume neq: "th1 \ th2" from dp1 have dp1: "(Th th3, Th th1) \ (depend s)^+" - by (simp add:s_dependents_def eq_depend) + by (simp add:s_dependants_def eq_depend) from dp2 have dp2: "(Th th3, Th th2) \ (depend s)^+" - by (simp add:s_dependents_def eq_depend) + by (simp add:s_dependants_def eq_depend) from unique_depend_p[OF vt dp1 dp2] and neq have "(Th th1, Th th2) \ (depend s)\<^sup>+ \ (Th th2, Th th1) \ (depend s)\<^sup>+" by auto hence False @@ -479,90 +479,90 @@ shows "cp s th = Max ({preced th s} \ (cp s ` children s th))" proof(unfold cp_eq_cpreced_f cpreced_def) let ?f = "(\th. preced th s)" - show "Max ((\th. preced th s) ` ({th} \ dependents (wq s) th)) = - Max ({preced th s} \ (\th. Max ((\th. preced th s) ` ({th} \ dependents (wq s) th))) ` children s th)" + show "Max ((\th. preced th s) ` ({th} \ dependants (wq s) th)) = + Max ({preced th s} \ (\th. Max ((\th. preced th s) ` ({th} \ dependants (wq s) th))) ` children s th)" proof(cases " children s th = {}") case False - have "(\th. Max ((\th. preced th s) ` ({th} \ dependents (wq s) th))) ` children s th = - {Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) | th' . th' \ children s th}" + have "(\th. Max ((\th. preced th s) ` ({th} \ dependants (wq s) th))) ` children s th = + {Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) | th' . th' \ children s th}" (is "?L = ?R") by auto also have "\ = - Max ` {((\th. preced th s) ` ({th'} \ dependents (wq s) th')) | th' . th' \ children s th}" + Max ` {((\th. preced th s) ` ({th'} \ dependants (wq s) th')) | th' . th' \ children s th}" (is "_ = Max ` ?C") by auto finally have "Max ?L = Max (Max ` ?C)" by auto also have "\ = Max (\ ?C)" proof(rule Max_Union[symmetric]) - from children_dependents[of s th] finite_threads[OF vt] and dependents_threads[OF vt, of th] - show "finite {(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th}" + from children_dependants[of s th] finite_threads[OF vt] and dependants_threads[OF vt, of th] + show "finite {(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th}" by (auto simp:finite_subset) next from False - show "{(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th} \ {}" + show "{(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th} \ {}" by simp next - show "\A. A \ {(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th} \ + show "\A. A \ {(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th} \ finite A \ A \ {}" apply (auto simp:finite_subset) proof - fix th' - from finite_threads[OF vt] and dependents_threads[OF vt, of th'] - show "finite ((\th. preced th s) ` dependents (wq s) th')" by (auto simp:finite_subset) + from finite_threads[OF vt] and dependants_threads[OF vt, of th'] + show "finite ((\th. preced th s) ` dependants (wq s) th')" by (auto simp:finite_subset) qed qed - also have "\ = Max ((\th. preced th s) ` dependents (wq s) th)" + also have "\ = Max ((\th. preced th s) ` dependants (wq s) th)" (is "Max ?A = Max ?B") proof - have "?A = ?B" proof - show "\{(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th} - \ (\th. preced th s) ` dependents (wq s) th" + show "\{(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th} + \ (\th. preced th s) ` dependants (wq s) th" proof fix x - assume "x \ \{(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th}" + assume "x \ \{(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th}" then obtain th' where th'_in: "th' \ children s th" - and x_in: "x \ ?f ` ({th'} \ dependents (wq s) th')" by auto - hence "x = ?f th' \ x \ (?f ` dependents (wq s) th')" by auto - thus "x \ ?f ` dependents (wq s) th" + and x_in: "x \ ?f ` ({th'} \ dependants (wq s) th')" by auto + hence "x = ?f th' \ x \ (?f ` dependants (wq s) th')" by auto + thus "x \ ?f ` dependants (wq s) th" proof assume "x = preced th' s" - with th'_in and children_dependents - show "x \ (\th. preced th s) ` dependents (wq s) th" by auto + with th'_in and children_dependants + show "x \ (\th. preced th s) ` dependants (wq s) th" by auto next - assume "x \ (\th. preced th s) ` dependents (wq s) th'" + assume "x \ (\th. preced th s) ` dependants (wq s) th'" moreover note th'_in - ultimately show " x \ (\th. preced th s) ` dependents (wq s) th" - by (unfold cs_dependents_def children_def child_def, auto simp:eq_depend) + ultimately show " x \ (\th. preced th s) ` dependants (wq s) th" + by (unfold cs_dependants_def children_def child_def, auto simp:eq_depend) qed qed next - show "?f ` dependents (wq s) th - \ \{?f ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th}" + show "?f ` dependants (wq s) th + \ \{?f ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th}" proof fix x - assume x_in: "x \ (\th. preced th s) ` dependents (wq s) th" + assume x_in: "x \ (\th. preced th s) ` dependants (wq s) th" then obtain th' where eq_x: "x = ?f th'" and dp: "(Th th', Th th) \ (depend s)^+" - by (auto simp:cs_dependents_def eq_depend) + by (auto simp:cs_dependants_def eq_depend) from depend_children[OF dp] have "th' \ children s th \ (\th3. th3 \ children s th \ (Th th', Th th3) \ (depend s)\<^sup>+)" . - thus "x \ \{(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th}" + thus "x \ \{(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th}" proof assume "th' \ children s th" with eq_x - show "x \ \{(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th}" + show "x \ \{(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th}" by auto next assume "\th3. th3 \ children s th \ (Th th', Th th3) \ (depend s)\<^sup>+" then obtain th3 where th3_in: "th3 \ children s th" and dp3: "(Th th', Th th3) \ (depend s)\<^sup>+" by auto - show "x \ \{(\th. preced th s) ` ({th'} \ dependents (wq s) th') |th'. th' \ children s th}" + show "x \ \{(\th. preced th s) ` ({th'} \ dependants (wq s) th') |th'. th' \ children s th}" proof - from dp3 - have "th' \ dependents (wq s) th3" - by (auto simp:cs_dependents_def eq_depend) + have "th' \ dependants (wq s) th3" + by (auto simp:cs_dependants_def eq_depend) with eq_x th3_in show ?thesis by auto qed qed @@ -570,34 +570,34 @@ qed thus ?thesis by simp qed - finally have "Max ((\th. preced th s) ` dependents (wq s) th) = Max (?L)" + finally have "Max ((\th. preced th s) ` dependants (wq s) th) = Max (?L)" (is "?X = ?Y") by auto - moreover have "Max ((\th. preced th s) ` ({th} \ dependents (wq s) th)) = + moreover have "Max ((\th. preced th s) ` ({th} \ dependants (wq s) th)) = max (?f th) ?X" proof - - have "Max ((\th. preced th s) ` ({th} \ dependents (wq s) th)) = - Max ({?f th} \ ?f ` (dependents (wq s) th))" by simp - also have "\ = max (Max {?f th}) (Max (?f ` (dependents (wq s) th)))" + have "Max ((\th. preced th s) ` ({th} \ dependants (wq s) th)) = + Max ({?f th} \ ?f ` (dependants (wq s) th))" by simp + also have "\ = max (Max {?f th}) (Max (?f ` (dependants (wq s) th)))" proof(rule Max_Un, auto) - from finite_threads[OF vt] and dependents_threads[OF vt, of th] - show "finite ((\th. preced th s) ` dependents (wq s) th)" by (auto simp:finite_subset) + from finite_threads[OF vt] and dependants_threads[OF vt, of th] + show "finite ((\th. preced th s) ` dependants (wq s) th)" by (auto simp:finite_subset) next - assume "dependents (wq s) th = {}" - with False and children_dependents show False by auto + assume "dependants (wq s) th = {}" + with False and children_dependants show False by auto qed also have "\ = max (?f th) ?X" by simp finally show ?thesis . qed moreover have "Max ({preced th s} \ - (\th. Max ((\th. preced th s) ` ({th} \ dependents (wq s) th))) ` children s th) = + (\th. Max ((\th. preced th s) ` ({th} \ dependants (wq s) th))) ` children s th) = max (?f th) ?Y" proof - have "Max ({preced th s} \ - (\th. Max ((\th. preced th s) ` ({th} \ dependents (wq s) th))) ` children s th) = + (\th. Max ((\th. preced th s) ` ({th} \ dependants (wq s) th))) ` children s th) = max (Max {preced th s}) ?Y" proof(rule Max_Un, auto) - from finite_threads[OF vt] dependents_threads[OF vt, of th] children_dependents [of s th] - show "finite ((\th. Max (insert (preced th s) ((\th. preced th s) ` dependents (wq s) th))) ` + from finite_threads[OF vt] dependants_threads[OF vt, of th] children_dependants [of s th] + show "finite ((\th. Max (insert (preced th s) ((\th. preced th s) ` dependants (wq s) th))) ` children s th)" by (auto simp:finite_subset) next @@ -609,11 +609,11 @@ ultimately show ?thesis by auto next case True - moreover have "dependents (wq s) th = {}" + moreover have "dependants (wq s) th = {}" proof - { fix th' - assume "th' \ dependents (wq s) th" - hence " (Th th', Th th) \ (depend s)\<^sup>+" by (simp add:cs_dependents_def eq_depend) + assume "th' \ dependants (wq s) th" + hence " (Th th', Th th) \ (depend s)\<^sup>+" by (simp add:cs_dependants_def eq_depend) from depend_children[OF this] and True have "False" by auto } thus ?thesis by auto @@ -648,46 +648,46 @@ lemma eq_cp_pre: fixes th' assumes neq_th: "th' \ th" - and nd: "th \ dependents s th'" + and nd: "th \ dependants s th'" shows "cp s th' = cp s' th'" apply (unfold cp_eq_cpreced cpreced_def) proof - - have eq_dp: "\ th. dependents (wq s) th = dependents (wq s') th" - by (unfold cs_dependents_def, auto simp:eq_dep eq_depend) + have eq_dp: "\ th. dependants (wq s) th = dependants (wq s') th" + by (unfold cs_dependants_def, auto simp:eq_dep eq_depend) moreover { fix th1 - assume "th1 \ {th'} \ dependents (wq s') th'" - hence "th1 = th' \ th1 \ dependents (wq s') th'" by auto + assume "th1 \ {th'} \ dependants (wq s') th'" + hence "th1 = th' \ th1 \ dependants (wq s') th'" by auto hence "preced th1 s = preced th1 s'" proof assume "th1 = th'" with eq_preced[OF neq_th] show "preced th1 s = preced th1 s'" by simp next - assume "th1 \ dependents (wq s') th'" + assume "th1 \ dependants (wq s') th'" with nd and eq_dp have "th1 \ th" - by (auto simp:eq_depend cs_dependents_def s_dependents_def eq_dep) + by (auto simp:eq_depend cs_dependants_def s_dependants_def eq_dep) from eq_preced[OF this] show "preced th1 s = preced th1 s'" by simp qed - } ultimately have "((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" + } ultimately have "((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by (auto simp:image_def) - thus "Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - Max ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" by simp + thus "Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + Max ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by simp qed -lemma no_dependents: +lemma no_dependants: assumes "th' \ th" - shows "th \ dependents s th'" + shows "th \ dependants s th'" proof - assume h: "th \ dependents s th'" + assume h: "th \ dependants s th'" from step_back_step [OF vt_s[unfolded s_def]] have "step s' (Set th prio)" . hence "th \ runing s'" by (cases, simp) hence rd_th: "th \ readys s'" by (simp add:readys_def runing_def) from h have "(Th th, Th th') \ (depend s')\<^sup>+" - by (unfold s_dependents_def, unfold eq_depend, unfold eq_dep, auto) + by (unfold s_dependants_def, unfold eq_depend, unfold eq_dep, auto) from tranclD[OF this] obtain z where "(Th th, z) \ depend s'" by auto with rd_th show "False" @@ -701,19 +701,19 @@ assumes neq_th: "th' \ th" shows "cp s th' = cp s' th'" proof(rule eq_cp_pre [OF neq_th]) - from no_dependents[OF neq_th] - show "th \ dependents s th'" . + from no_dependants[OF neq_th] + show "th \ dependants s th'" . qed lemma eq_up: fixes th' th'' - assumes dp1: "th \ dependents s th'" - and dp2: "th' \ dependents s th''" + assumes dp1: "th \ dependants s th'" + and dp2: "th' \ dependants s th''" and eq_cps: "cp s th' = cp s' th'" shows "cp s th'' = cp s' th''" proof - from dp2 - have "(Th th', Th th'') \ (depend (wq s))\<^sup>+" by (simp add:s_dependents_def) + have "(Th th', Th th'') \ (depend (wq s))\<^sup>+" by (simp add:s_dependants_def) from depend_child[OF vt_s this[unfolded eq_depend]] have ch_th': "(Th th', Th th'') \ (child s)\<^sup>+" . moreover { fix n th'' @@ -726,7 +726,7 @@ and ch': "(Th th', y) \ (child s)\<^sup>+" from y_ch obtain thy where eq_y: "y = Th thy" by (auto simp:child_def) with ih have eq_cpy:"cp s thy = cp s' thy" by blast - from dp1 have "(Th th, Th th') \ (depend s)^+" by (auto simp:s_dependents_def eq_depend) + from dp1 have "(Th th, Th th') \ (depend s)^+" by (auto simp:s_dependants_def eq_depend) moreover from child_depend_p[OF ch'] and eq_y have "(Th th', Th thy) \ (depend s)^+" by simp ultimately have dp_thy: "(Th th, Th thy) \ (depend s)^+" by auto @@ -761,11 +761,11 @@ from children_no_dep[OF vt_s _ _ this] and th1_in y_ch eq_y show False by (auto simp:children_def) qed - have "th \ dependents s th1" + have "th \ dependants s th1" proof - assume h:"th \ dependents s th1" - from eq_y dp_thy have "th \ dependents s thy" by (auto simp:s_dependents_def eq_depend) - from dependents_child_unique[OF vt_s _ _ h this] + assume h:"th \ dependants s th1" + from eq_y dp_thy have "th \ dependants s thy" by (auto simp:s_dependants_def eq_depend) + from dependants_child_unique[OF vt_s _ _ h this] th1_in y_ch eq_y have "th1 = thy" by (auto simp:children_def child_def) with False show False by auto qed @@ -793,7 +793,7 @@ assume "th'' = th" with dp1 dp' have "(Th th, Th th) \ (depend s)^+" - by (auto simp:child_def s_dependents_def eq_depend) + by (auto simp:child_def s_dependants_def eq_depend) with wf_trancl[OF wf_depend[OF vt_s]] show False by auto qed @@ -811,17 +811,17 @@ proof assume eq_th1: "th1 = th" with dp1 have "(Th th1, Th th') \ (depend s)^+" - by (auto simp:s_dependents_def eq_depend) + by (auto simp:s_dependants_def eq_depend) from children_no_dep[OF vt_s _ _ this] th1_in dp' show False by (auto simp:children_def) qed thus ?thesis proof(rule eq_cp_pre) - show "th \ dependents s th1" + show "th \ dependants s th1" proof - assume "th \ dependents s th1" - from dependents_child_unique[OF vt_s _ _ this dp1] + assume "th \ dependants s th1" + from dependants_child_unique[OF vt_s _ _ this dp1] th1_in dp' have "th1 = th'" by (auto simp:children_def) with False show False by auto @@ -843,12 +843,12 @@ lemma eq_up_self: fixes th' th'' - assumes dp: "th \ dependents s th''" + assumes dp: "th \ dependants s th''" and eq_cps: "cp s th = cp s' th" shows "cp s th'' = cp s' th''" proof - from dp - have "(Th th, Th th'') \ (depend (wq s))\<^sup>+" by (simp add:s_dependents_def) + have "(Th th, Th th'') \ (depend (wq s))\<^sup>+" by (simp add:s_dependants_def) from depend_child[OF vt_s this[unfolded eq_depend]] have ch_th': "(Th th, Th th'') \ (child s)\<^sup>+" . moreover { fix n th'' @@ -894,11 +894,11 @@ from children_no_dep[OF vt_s _ _ this] and th1_in y_ch eq_y show False by (auto simp:children_def) qed - have "th \ dependents s th1" + have "th \ dependants s th1" proof - assume h:"th \ dependents s th1" - from eq_y dp_thy have "th \ dependents s thy" by (auto simp:s_dependents_def eq_depend) - from dependents_child_unique[OF vt_s _ _ h this] + assume h:"th \ dependants s th1" + from eq_y dp_thy have "th \ dependants s thy" by (auto simp:s_dependants_def eq_depend) + from dependants_child_unique[OF vt_s _ _ h this] th1_in y_ch eq_y have "th1 = thy" by (auto simp:children_def child_def) with False show False by auto qed @@ -926,7 +926,7 @@ assume "th'' = th" with dp dp' have "(Th th, Th th) \ (depend s)^+" - by (auto simp:child_def s_dependents_def eq_depend) + by (auto simp:child_def s_dependants_def eq_depend) with wf_trancl[OF wf_depend[OF vt_s]] show False by auto qed @@ -943,10 +943,10 @@ assume neq_th1: "th1 \ th" thus ?thesis proof(rule eq_cp_pre) - show "th \ dependents s th1" + show "th \ dependants s th1" proof - assume "th \ dependents s th1" - hence "(Th th, Th th1) \ (depend s)^+" by (auto simp:s_dependents_def eq_depend) + assume "th \ dependants s th1" + hence "(Th th, Th th1) \ (depend s)^+" by (auto simp:s_dependants_def eq_depend) from children_no_dep[OF vt_s _ _ this] and th1_in dp' show False by (auto simp:children_def) @@ -1046,16 +1046,16 @@ and nt show ?thesis by (auto intro:next_th_unique) qed -lemma dependents_kept: +lemma dependants_kept: fixes th'' assumes neq1: "th'' \ th" and neq2: "th'' \ th'" - shows "dependents (wq s) th'' = dependents (wq s') th''" + shows "dependants (wq s) th'' = dependants (wq s') th''" proof(auto) fix x - assume "x \ dependents (wq s) th''" + assume "x \ dependants (wq s) th''" hence dp: "(Th x, Th th'') \ (depend s)^+" - by (auto simp:cs_dependents_def eq_depend) + by (auto simp:cs_dependants_def eq_depend) { fix n have "(n, Th th'') \ (depend s)^+ \ (n, Th th'') \ (depend s')^+" proof(induct rule:converse_trancl_induct) @@ -1120,13 +1120,13 @@ qed } from this[OF dp] - show "x \ dependents (wq s') th''" - by (auto simp:cs_dependents_def eq_depend) + show "x \ dependants (wq s') th''" + by (auto simp:cs_dependants_def eq_depend) next fix x - assume "x \ dependents (wq s') th''" + assume "x \ dependants (wq s') th''" hence dp: "(Th x, Th th'') \ (depend s')^+" - by (auto simp:cs_dependents_def eq_depend) + by (auto simp:cs_dependants_def eq_depend) { fix n have "(n, Th th'') \ (depend s')^+ \ (n, Th th'') \ (depend s)^+" proof(induct rule:converse_trancl_induct) @@ -1209,8 +1209,8 @@ qed } from this[OF dp] - show "x \ dependents (wq s) th''" - by (auto simp:cs_dependents_def eq_depend) + show "x \ dependants (wq s) th''" + by (auto simp:cs_dependants_def eq_depend) qed lemma cp_kept: @@ -1219,18 +1219,18 @@ and neq2: "th'' \ th'" shows "cp s th'' = cp s' th''" proof - - from dependents_kept[OF neq1 neq2] - have "dependents (wq s) th'' = dependents (wq s') th''" . + from dependants_kept[OF neq1 neq2] + have "dependants (wq s) th'' = dependants (wq s') th''" . moreover { fix th1 - assume "th1 \ dependents (wq s) th''" + assume "th1 \ dependants (wq s) th''" have "preced th1 s = preced th1 s'" by (unfold s_def, auto simp:preced_def) } moreover have "preced th'' s = preced th'' s'" by (unfold s_def, auto simp:preced_def) - ultimately have "((\th. preced th s) ` ({th''} \ dependents (wq s) th'')) = - ((\th. preced th s') ` ({th''} \ dependents (wq s') th''))" + ultimately have "((\th. preced th s) ` ({th''} \ dependants (wq s) th'')) = + ((\th. preced th s') ` ({th''} \ dependants (wq s') th''))" by (auto simp:image_def) thus ?thesis by (unfold cp_eq_cpreced cpreced_def, simp) @@ -1352,8 +1352,8 @@ shows "cp s th' = cp s' th'" apply (unfold cp_eq_cpreced cpreced_def) proof - - have eq_dp: "\ th. dependents (wq s) th = dependents (wq s') th" - apply (unfold cs_dependents_def, unfold eq_depend) + have eq_dp: "\ th. dependants (wq s) th = dependants (wq s') th" + apply (unfold cs_dependants_def, unfold eq_depend) proof - from eq_child have "\th. {th'. (Th th', Th th) \ (child s)\<^sup>+} = {th'. (Th th', Th th) \ (child s')\<^sup>+}" @@ -1364,21 +1364,21 @@ qed moreover { fix th1 - assume "th1 \ {th'} \ dependents (wq s') th'" - hence "th1 = th' \ th1 \ dependents (wq s') th'" by auto + assume "th1 \ {th'} \ dependants (wq s') th'" + hence "th1 = th' \ th1 \ dependants (wq s') th'" by auto hence "preced th1 s = preced th1 s'" proof assume "th1 = th'" show "preced th1 s = preced th1 s'" by (simp add:s_def preced_def) next - assume "th1 \ dependents (wq s') th'" + assume "th1 \ dependants (wq s') th'" show "preced th1 s = preced th1 s'" by (simp add:s_def preced_def) qed - } ultimately have "((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" + } ultimately have "((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by (auto simp:image_def) - thus "Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - Max ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" by simp + thus "Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + Max ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by simp qed end @@ -1496,8 +1496,8 @@ shows "cp s th' = cp s' th'" apply (unfold cp_eq_cpreced cpreced_def) proof - - have eq_dp: "\ th. dependents (wq s) th = dependents (wq s') th" - apply (unfold cs_dependents_def, unfold eq_depend) + have eq_dp: "\ th. dependants (wq s) th = dependants (wq s') th" + apply (unfold cs_dependants_def, unfold eq_depend) proof - from eq_child have "\th. {th'. (Th th', Th th) \ (child s)\<^sup>+} = {th'. (Th th', Th th) \ (child s')\<^sup>+}" @@ -1508,21 +1508,21 @@ qed moreover { fix th1 - assume "th1 \ {th'} \ dependents (wq s') th'" - hence "th1 = th' \ th1 \ dependents (wq s') th'" by auto + assume "th1 \ {th'} \ dependants (wq s') th'" + hence "th1 = th' \ th1 \ dependants (wq s') th'" by auto hence "preced th1 s = preced th1 s'" proof assume "th1 = th'" show "preced th1 s = preced th1 s'" by (simp add:s_def preced_def) next - assume "th1 \ dependents (wq s') th'" + assume "th1 \ dependants (wq s') th'" show "preced th1 s = preced th1 s'" by (simp add:s_def preced_def) qed - } ultimately have "((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" + } ultimately have "((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by (auto simp:image_def) - thus "Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - Max ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" by simp + thus "Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + Max ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by simp qed end @@ -1597,7 +1597,7 @@ lemma eq_cp: fixes th' - assumes nd: "th \ dependents s th'" + assumes nd: "th \ dependants s th'" shows "cp s th' = cp s' th'" apply (unfold cp_eq_cpreced cpreced_def) proof - @@ -1607,13 +1607,13 @@ with child_depend_eq[OF vt_s] have "(Th th, Th th') \ (depend s)\<^sup>+" by simp with nd show False - by (simp add:s_dependents_def eq_depend) + by (simp add:s_dependants_def eq_depend) qed - have eq_dp: "dependents (wq s) th' = dependents (wq s') th'" + have eq_dp: "dependants (wq s) th' = dependants (wq s') th'" proof(auto) - fix x assume " x \ dependents (wq s) th'" - thus "x \ dependents (wq s') th'" - apply (auto simp:cs_dependents_def eq_depend) + fix x assume " x \ dependants (wq s) th'" + thus "x \ dependants (wq s') th'" + apply (auto simp:cs_dependants_def eq_depend) proof - assume "(Th x, Th th') \ (depend s)\<^sup>+" with child_depend_eq[OF vt_s] have "(Th x, Th th') \ (child s)\<^sup>+" by simp @@ -1622,9 +1622,9 @@ show "(Th x, Th th') \ (depend s')\<^sup>+" by simp qed next - fix x assume "x \ dependents (wq s') th'" - thus "x \ dependents (wq s) th'" - apply (auto simp:cs_dependents_def eq_depend) + fix x assume "x \ dependants (wq s') th'" + thus "x \ dependants (wq s) th'" + apply (auto simp:cs_dependants_def eq_depend) proof - assume "(Th x, Th th') \ (depend s')\<^sup>+" with child_depend_eq[OF step_back_vt[OF vt_s[unfolded s_def]]] @@ -1636,22 +1636,22 @@ qed moreover { fix th1 have "preced th1 s = preced th1 s'" by (simp add:s_def preced_def) - } ultimately have "((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" + } ultimately have "((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by (auto simp:image_def) - thus "Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - Max ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" by simp + thus "Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + Max ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by simp qed lemma eq_up: fixes th' th'' - assumes dp1: "th \ dependents s th'" - and dp2: "th' \ dependents s th''" + assumes dp1: "th \ dependants s th'" + and dp2: "th' \ dependants s th''" and eq_cps: "cp s th' = cp s' th'" shows "cp s th'' = cp s' th''" proof - from dp2 - have "(Th th', Th th'') \ (depend (wq s))\<^sup>+" by (simp add:s_dependents_def) + have "(Th th', Th th'') \ (depend (wq s))\<^sup>+" by (simp add:s_dependants_def) from depend_child[OF vt_s this[unfolded eq_depend]] have ch_th': "(Th th', Th th'') \ (child s)\<^sup>+" . moreover { @@ -1665,7 +1665,7 @@ and ch': "(Th th', y) \ (child s)\<^sup>+" from y_ch obtain thy where eq_y: "y = Th thy" by (auto simp:child_def) with ih have eq_cpy:"cp s thy = cp s' thy" by blast - from dp1 have "(Th th, Th th') \ (depend s)^+" by (auto simp:s_dependents_def eq_depend) + from dp1 have "(Th th, Th th') \ (depend s)^+" by (auto simp:s_dependants_def eq_depend) moreover from child_depend_p[OF ch'] and eq_y have "(Th th', Th thy) \ (depend s)^+" by simp ultimately have dp_thy: "(Th th, Th thy) \ (depend s)^+" by auto @@ -1690,11 +1690,11 @@ from children_no_dep[OF vt_s _ _ this] and th1_in y_ch eq_y show False by (auto simp:children_def) qed - have "th \ dependents s th1" + have "th \ dependants s th1" proof - assume h:"th \ dependents s th1" - from eq_y dp_thy have "th \ dependents s thy" by (auto simp:s_dependents_def eq_depend) - from dependents_child_unique[OF vt_s _ _ h this] + assume h:"th \ dependants s th1" + from eq_y dp_thy have "th \ dependants s thy" by (auto simp:s_dependants_def eq_depend) + from dependants_child_unique[OF vt_s _ _ h this] th1_in y_ch eq_y have "th1 = thy" by (auto simp:children_def child_def) with False show False by auto qed @@ -1711,7 +1711,7 @@ assume "(Cs cs, Th th'') \ depend s'" with depend_s have cs_th': "(Cs cs, Th th'') \ depend s" by auto from dp1 have "(Th th, Th th') \ (depend s)^+" - by (auto simp:s_dependents_def eq_depend) + by (auto simp:s_dependants_def eq_depend) from converse_tranclE[OF this] obtain cs1 where h1: "(Th th, Cs cs1) \ depend s" and h2: "(Cs cs1 , Th th') \ (depend s)\<^sup>+" @@ -1772,17 +1772,17 @@ proof assume eq_th1: "th1 = th" with dp1 have "(Th th1, Th th') \ (depend s)^+" - by (auto simp:s_dependents_def eq_depend) + by (auto simp:s_dependants_def eq_depend) from children_no_dep[OF vt_s _ _ this] th1_in dp' show False by (auto simp:children_def) qed show ?thesis proof(rule eq_cp) - show "th \ dependents s th1" + show "th \ dependants s th1" proof - assume "th \ dependents s th1" - from dependents_child_unique[OF vt_s _ _ this dp1] + assume "th \ dependants s th1" + from dependants_child_unique[OF vt_s _ _ this dp1] th1_in dp' have "th1 = th'" by (auto simp:children_def) with False show False by auto @@ -1799,7 +1799,7 @@ assume "(Cs cs, Th th'') \ depend s'" with depend_s have cs_th': "(Cs cs, Th th'') \ depend s" by auto from dp1 have "(Th th, Th th') \ (depend s)^+" - by (auto simp:s_dependents_def eq_depend) + by (auto simp:s_dependants_def eq_depend) from converse_tranclE[OF this] obtain cs1 where h1: "(Th th, Cs cs1) \ depend s" and h2: "(Cs cs1 , Th th') \ (depend s)\<^sup>+" @@ -1863,10 +1863,10 @@ shows "cp s th' = cp s' th'" apply (unfold cp_eq_cpreced cpreced_def) proof - - have nd: "th \ dependents s th'" + have nd: "th \ dependants s th'" proof - assume "th \ dependents s th'" - hence "(Th th, Th th') \ (depend s)^+" by (simp add:s_dependents_def eq_depend) + assume "th \ dependants s th'" + hence "(Th th, Th th') \ (depend s)^+" by (simp add:s_dependants_def eq_depend) with eq_dep have "(Th th, Th th') \ (depend s')^+" by simp from converse_tranclE[OF this] obtain y where "(Th th, y) \ depend s'" by auto @@ -1879,31 +1879,31 @@ with in_th show ?thesis by simp qed qed - have eq_dp: "\ th. dependents (wq s) th = dependents (wq s') th" - by (unfold cs_dependents_def, auto simp:eq_dep eq_depend) + have eq_dp: "\ th. dependants (wq s) th = dependants (wq s') th" + by (unfold cs_dependants_def, auto simp:eq_dep eq_depend) moreover { fix th1 - assume "th1 \ {th'} \ dependents (wq s') th'" - hence "th1 = th' \ th1 \ dependents (wq s') th'" by auto + assume "th1 \ {th'} \ dependants (wq s') th'" + hence "th1 = th' \ th1 \ dependants (wq s') th'" by auto hence "preced th1 s = preced th1 s'" proof assume "th1 = th'" with neq_th show "preced th1 s = preced th1 s'" by (auto simp:s_def preced_def) next - assume "th1 \ dependents (wq s') th'" + assume "th1 \ dependants (wq s') th'" with nd and eq_dp have "th1 \ th" - by (auto simp:eq_depend cs_dependents_def s_dependents_def eq_dep) + by (auto simp:eq_depend cs_dependants_def s_dependants_def eq_dep) thus "preced th1 s = preced th1 s'" by (auto simp:s_def preced_def) qed - } ultimately have "((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" + } ultimately have "((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by (auto simp:image_def) - thus "Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - Max ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" by simp + thus "Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + Max ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by simp qed -lemma nil_dependents: "dependents s th = {}" +lemma nil_dependants: "dependants s th = {}" proof - from step_back_step[OF vt_s[unfolded s_def]] show ?thesis @@ -1911,11 +1911,11 @@ assume "th \ threads s'" from not_thread_holdents[OF step_back_vt[OF vt_s[unfolded s_def]] this] have hdn: " holdents s' th = {}" . - have "dependents s' th = {}" + have "dependants s' th = {}" proof - - { assume "dependents s' th \ {}" + { assume "dependants s' th \ {}" then obtain th' where dp: "(Th th', Th th) \ (depend s')^+" - by (auto simp:s_dependents_def eq_depend) + by (auto simp:s_dependants_def eq_depend) from tranclE[OF this] obtain cs' where "(Cs cs', Th th) \ depend s'" by (auto simp:s_depend_def) with hdn @@ -1923,13 +1923,13 @@ } thus ?thesis by auto qed thus ?thesis - by (unfold s_def s_dependents_def eq_depend depend_create_unchanged, simp) + by (unfold s_def s_dependants_def eq_depend depend_create_unchanged, simp) qed qed lemma eq_cp_th: "cp s th = preced th s" apply (unfold cp_eq_cpreced cpreced_def) - by (insert nil_dependents, unfold s_dependents_def cs_dependents_def, auto) + by (insert nil_dependants, unfold s_dependants_def cs_dependants_def, auto) end @@ -1951,10 +1951,10 @@ shows "cp s th' = cp s' th'" apply (unfold cp_eq_cpreced cpreced_def) proof - - have nd: "th \ dependents s th'" + have nd: "th \ dependants s th'" proof - assume "th \ dependents s th'" - hence "(Th th, Th th') \ (depend s)^+" by (simp add:s_dependents_def eq_depend) + assume "th \ dependants s th'" + hence "(Th th, Th th') \ (depend s)^+" by (simp add:s_dependants_def eq_depend) with eq_dep have "(Th th, Th th') \ (depend s')^+" by simp from converse_tranclE[OF this] obtain cs' where bk: "(Th th, Cs cs') \ depend s'" @@ -1968,28 +1968,28 @@ by (auto simp:cs_waiting_def wq_def) qed qed - have eq_dp: "\ th. dependents (wq s) th = dependents (wq s') th" - by (unfold cs_dependents_def, auto simp:eq_dep eq_depend) + have eq_dp: "\ th. dependants (wq s) th = dependants (wq s') th" + by (unfold cs_dependants_def, auto simp:eq_dep eq_depend) moreover { fix th1 - assume "th1 \ {th'} \ dependents (wq s') th'" - hence "th1 = th' \ th1 \ dependents (wq s') th'" by auto + assume "th1 \ {th'} \ dependants (wq s') th'" + hence "th1 = th' \ th1 \ dependants (wq s') th'" by auto hence "preced th1 s = preced th1 s'" proof assume "th1 = th'" with neq_th show "preced th1 s = preced th1 s'" by (auto simp:s_def preced_def) next - assume "th1 \ dependents (wq s') th'" + assume "th1 \ dependants (wq s') th'" with nd and eq_dp have "th1 \ th" - by (auto simp:eq_depend cs_dependents_def s_dependents_def eq_dep) + by (auto simp:eq_depend cs_dependants_def s_dependants_def eq_dep) thus "preced th1 s = preced th1 s'" by (auto simp:s_def preced_def) qed - } ultimately have "((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" + } ultimately have "((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by (auto simp:image_def) - thus "Max ((\th. preced th s) ` ({th'} \ dependents (wq s) th')) = - Max ((\th. preced th s') ` ({th'} \ dependents (wq s') th'))" by simp + thus "Max ((\th. preced th s) ` ({th'} \ dependants (wq s) th')) = + Max ((\th. preced th s') ` ({th'} \ dependants (wq s') th'))" by simp qed end