diff -r b4bcd1edbb6d -r 633b1fc8631b CpsG.thy~ --- a/CpsG.thy~ Wed Jan 06 16:34:26 2016 +0000 +++ b/CpsG.thy~ Thu Jan 07 08:33:13 2016 +0800 @@ -401,6 +401,29 @@ using assms by (metis Field_def UnE dm_RAG_threads range_in vt) +lemma subtree_tRAG_thread: + assumes "th \ threads s" + shows "subtree (tRAG s) (Th th) \ Th ` threads s" (is "?L \ ?R") +proof - + have "?L = {Th th' |th'. Th th' \ subtree (RAG s) (Th th)}" + by (unfold tRAG_subtree_eq, simp) + also have "... \ ?R" + proof + fix x + assume "x \ {Th th' |th'. Th th' \ subtree (RAG s) (Th th)}" + then obtain th' where h: "x = Th th'" "Th th' \ subtree (RAG s) (Th th)" by auto + from this(2) + show "x \ ?R" + proof(cases rule:subtreeE) + case 1 + thus ?thesis by (simp add: assms h(1)) + next + case 2 + thus ?thesis by (metis ancestors_Field dm_RAG_threads h(1) image_eqI) + qed + qed + finally show ?thesis . +qed lemma readys_root: assumes "th \ readys s"