text‹Reach: the set of reachable nodes is the set of Roots together with the
reachable from some Root by a path represented by a list of
nodes (at least two since we traverse at least one edge), where two
nodes correspond to an edge in E.›
lemma Graph3: "[ T∈Reach E; R<length E ]==> Reach(E[R:=(fst(E!R),T)]) ⊆ Reach E" apply (unfold Reach_def) apply clarify apply simp apply(case_tac "∃i<length path - 1. (fst(E!R),T)=(path!(Suc i),path!i)")
― ‹the changed edge is part of the path› apply(erule exE) apply(drule_tac P = "λi. i<length path - 1 ∧ (fst(E!R),T)=(path!Suc i,path!i)"in Ex_first_occurrence) apply clarify apply(erule disjE)
― ‹T is NOT a root› apply clarify apply(rule_tac x = "(take m path)@patha"in exI) apply(subgoal_tac "¬(length path≤m)") prefer2apply arith apply(simp) apply(rule conjI) apply(subgoal_tac "¬(m + length patha - 1 < m)") prefer2apply arith apply(simp add: nth_append) apply(rule conjI) apply(case_tac "m") apply force apply(case_tac "path") apply force apply force apply clarify apply(case_tac "Suc i≤m") apply(erule_tac x = "i"in allE) apply simp apply clarify apply(rule_tac x = "j"in exI) apply(case_tac "Suc i<m") apply(simp add: nth_append) apply(case_tac "R=j") apply(simp add: nth_list_update) apply(case_tac "i=m") apply force apply(erule_tac x = "i"in allE) apply force apply(force simp add: nth_list_update) apply(simp add: nth_append) apply(subgoal_tac "i=m - 1") prefer2apply arith apply(case_tac "R=j") apply(erule_tac x = "m - 1"in allE) apply(simp add: nth_list_update) apply(force simp add: nth_list_update) apply(simp add: nth_append) apply(rotate_tac -4) apply(erule_tac x = "i - m"in allE) apply(subgoal_tac "Suc (i - m)=(Suc i - m)" ) prefer2apply arith apply simp
― ‹T is a root› apply(case_tac "m=0") apply force apply(rule_tac x = "take (Suc m) path"in exI) apply(subgoal_tac "¬(length path≤Suc m)" ) prefer2apply arith apply clarsimp apply(erule_tac x = "i"in allE) apply simp apply clarify apply(case_tac "R=j") apply(force simp add: nth_list_update) apply(force simp add: nth_list_update)
― ‹the changed edge is not part of the path› apply(rule_tac x = "path"in exI) apply simp apply clarify apply(erule_tac x = "i"in allE) apply clarify apply(case_tac "R=j") apply(erule_tac x = "i"in allE) apply simp apply(force simp add: nth_list_update) done
subsubsection‹Graph 4›
lemma Graph4: "[T ∈ Reach E; Roots⊆Blacks M; I≤length E; T<length M; R<length E; ∀i<I. ¬BtoW(E!i,M); R<I; M!fst(E!R)=Black; M!T≠Black]==> (∃r. I≤r ∧ r<length E ∧ BtoW(E[R:=(fst(E!R),T)]!r,M))" apply (unfold Reach_def) apply simp apply(erule disjE) prefer2apply force apply clarify
― ‹there exist a black node in the path to T› apply(case_tac "∃m<length path. M!(path!m)=Black") apply(erule exE) apply(drule_tac P = "λm. m<length path ∧ M!(path!m)=Black"in Ex_first_occurrence) apply clarify apply(case_tac "ma") apply force apply simp apply(case_tac "length path") apply force apply simp apply(erule_tac P = "λi. i < nata ⟶ P i"and x = "nat"for P in allE) apply simp apply clarify apply(erule_tac P = "λi. i < Suc nat ⟶ P i"and x = "nat"for P in allE) apply simp apply(case_tac "j<I") apply(erule_tac x = "j"in allE) apply force apply(rule_tac x = "j"in exI) apply(force simp add: nth_list_update) apply simp apply(rotate_tac -1) apply(erule_tac x = "length path - 1"in allE) apply(case_tac "length path") apply force apply force done
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.