[STATEMENT]
lemma Mul_Count:
  "\<turnstile> Mul_Count n
  \<lbrace>\<acute>Mul_Proper n \<and> Roots\<subseteq>Blacks \<acute>M
    \<and> \<acute>obc\<subseteq>Blacks \<acute>Ma \<and> Blacks \<acute>Ma\<subseteq>Blacks \<acute>M \<and> \<acute>bc\<subseteq>Blacks \<acute>M
    \<and> length \<acute>Ma=length \<acute>M \<and> Blacks \<acute>Ma\<subseteq>\<acute>bc
    \<and> (\<acute>Safe \<or> \<acute>obc\<subset>Blacks \<acute>Ma \<or> \<acute>l<\<acute>q \<and> (\<acute>q\<le>\<acute>Queue \<or> \<acute>obc\<subset>Blacks \<acute>M))
    \<and> \<acute>q<n+1\<rbrace>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> Mul_Count n
 \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1\<rbrace>
[PROOF STEP]
apply (unfold Mul_Count_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<turnstile> \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>bc = {}\<rbrace> \<acute>ind := 0;; \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>bc = {} \<and> \<acute>ind = 0\<rbrace>
WHILE \<acute>ind < length \<acute>M INV \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind \<le> length \<acute>M\<rbrace>
DO \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace>
IF \<acute>M ! \<acute>ind = Black THEN \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<acute>bc := insert \<acute>ind \<acute>bc FI;; \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv (\<acute>ind + 1) \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<acute>ind := \<acute>ind + 1
OD
 \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1\<rbrace>
[PROOF STEP]
apply annhoare
[PROOF STATE]
proof (prove)
goal (8 subgoals):
 1. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>bc = {}\<rbrace> \<subseteq> \<lbrace>\<acute>(ind_update (\<lambda>_. 0)) \<in> pre (\<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>bc = {} \<and> \<acute>ind = 0\<rbrace>
WHILE \<acute>ind < length \<acute>M INV \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind \<le> length \<acute>M\<rbrace>
DO \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace>
IF \<acute>M ! \<acute>ind = Black THEN \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<acute>bc := insert \<acute>ind \<acute>bc FI;; \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv (\<acute>ind + 1) \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<acute>ind := \<acute>ind + 1
OD)\<rbrace>
 2. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>bc = {} \<and> \<acute>ind = 0\<rbrace> \<subseteq> \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> pre (\<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace>
IF \<acute>M ! \<acute>ind = Black THEN \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<acute>bc := insert \<acute>ind \<acute>bc FI;; \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv (\<acute>ind + 1) \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<acute>ind := \<acute>ind + 1)
 4. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> pre (\<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<acute>bc := insert \<acute>ind \<acute>bc)
 5. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>\<acute>(bc_update (\<lambda>_. insert \<acute>ind \<acute>bc)) \<in> pre (\<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv (\<acute>ind + 1) \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<acute>ind := \<acute>ind + 1)\<rbrace>
 6. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> pre (\<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv (\<acute>ind + 1) \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<acute>ind := \<acute>ind + 1)
 7. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv (\<acute>ind + 1) \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>\<acute>(ind_update (\<lambda>_. \<acute>ind + 1)) \<in> \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind \<le> length \<acute>M\<rbrace>\<rbrace>
 8. \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<acute>Mul_CountInv \<acute>ind \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1 \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>\<acute>Mul_Proper n \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (\<acute>Safe \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> \<acute>Queue \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < n + 1\<rbrace>
[PROOF STEP]
apply(simp_all add:Mul_CountInv_def mul_collector_defs Mul_Auxk_def Graph6 Graph7 Graph8 Graph12 mul_collector_defs Queue_def)
\<comment> \<open>7 subgoals left\<close>
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>bc = {} \<and> \<acute>ind = 0\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace>
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>ind \<in> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> insert \<acute>ind \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 5. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 6. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 7. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>ind \<in> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> insert \<acute>ind \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 5. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 6. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace>
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>ind \<in> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> insert \<acute>ind \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 5. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
\<comment> \<open>4 subgoals left\<close>
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M \<and> \<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>ind \<in> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> insert \<acute>ind \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x) \<and> Roots \<subseteq> Blacks (M x) \<and> obc x \<subseteq> Blacks (Ma x) \<and> Blacks (Ma x) \<subseteq> Blacks (M x) \<and> ind x \<in> Blacks (M x) \<and> bc x \<subseteq> Blacks (M x) \<and> length (Ma x) = length (M x) \<and> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> insert (ind x) (bc x) \<and> (Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))) \<and> q x < Suc (length (Muts x)) \<and> ind x < length (M x)
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply(conjI_tac)
[PROOF STATE]
proof (prove)
goal (14 subgoals):
 1. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 2. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> Roots \<subseteq> Blacks (M x)
 3. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> obc x \<subseteq> Blacks (Ma x)
 4. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> Blacks (Ma x) \<subseteq> Blacks (M x)
 5. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> ind x \<in> Blacks (M x)
 6. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> bc x \<subseteq> Blacks (M x)
 7. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> length (Ma x) = length (M x)
 8. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> insert (ind x) (bc x)
 9. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))
 10. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> q x < Suc (length (Muts x))
A total of 14 subgoals...
[PROOF STEP]
apply(disjE_tac)
[PROOF STATE]
proof (prove)
goal (16 subgoals):
 1. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; Reach (E x) \<subseteq> Blacks (M x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 2. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; obc x \<subset> Blacks (Ma x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 3. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 4. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> Roots \<subseteq> Blacks (M x)
 5. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> obc x \<subseteq> Blacks (Ma x)
 6. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> Blacks (Ma x) \<subseteq> Blacks (M x)
 7. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> ind x \<in> Blacks (M x)
 8. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> bc x \<subseteq> Blacks (M x)
 9. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> length (Ma x) = length (M x)
 10. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> insert (ind x) (bc x)
A total of 16 subgoals...
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> ind x \<in> Blacks (M x)
 2. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> insert (ind x) (bc x)
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 5. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply(simp add:Blacks_def)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> insert (ind x) (bc x)
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; xa \<notin> bc x; xa < Suc (ind x); Ma x ! xa = Black\<rbrakk> \<Longrightarrow> xa = ind x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply(erule less_SucE)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x xa. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); ind x < length (M x); M x ! ind x = Black; xa \<notin> bc x; xa < Suc (ind x); Ma x ! xa = Black; q x < length (Muts x)\<rbrakk> \<Longrightarrow> xa = ind x
 2. \<And>x xa. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); ind x < length (M x); M x ! ind x = Black; xa \<notin> bc x; xa < Suc (ind x); Ma x ! xa = Black; q x = length (Muts x)\<rbrakk> \<Longrightarrow> xa = ind x
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 5. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>x xa. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; xa \<notin> bc x; Ma x ! xa = Black; xa < ind x\<rbrakk> \<Longrightarrow> xa = ind x
 2. \<And>x xa. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; xa \<notin> bc x; Ma x ! xa = Black; xa = ind x\<rbrakk> \<Longrightarrow> xa = ind x
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 5. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<lbrakk>Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); M x ! ind x = Black; xa \<notin> bc x; Ma x ! xa = Black; xa = ind x\<rbrakk> \<Longrightarrow> xa = ind x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
\<comment> \<open>3 subgoals left\<close>
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>M ! \<acute>ind = Black\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace>
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x) \<and> Roots \<subseteq> Blacks (M x) \<and> obc x \<subseteq> Blacks (Ma x) \<and> Blacks (Ma x) \<subseteq> Blacks (M x) \<and> bc x \<subseteq> Blacks (M x) \<and> length (Ma x) = length (M x) \<and> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x \<and> (Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))) \<and> q x < Suc (length (Muts x)) \<and> ind x < length (M x)
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply(conjI_tac)
[PROOF STATE]
proof (prove)
goal (12 subgoals):
 1. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 2. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> Roots \<subseteq> Blacks (M x)
 3. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> obc x \<subseteq> Blacks (Ma x)
 4. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> Blacks (Ma x) \<subseteq> Blacks (M x)
 5. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> bc x \<subseteq> Blacks (M x)
 6. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> length (Ma x) = length (M x)
 7. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x
 8. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))
 9. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> q x < Suc (length (Muts x))
 10. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> ind x < length (M x)
A total of 12 subgoals...
[PROOF STEP]
apply(disjE_tac)
[PROOF STATE]
proof (prove)
goal (14 subgoals):
 1. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; q x < Suc (length (Muts x)); ind x < length (M x); Reach (E x) \<subseteq> Blacks (M x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 2. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; q x < Suc (length (Muts x)); ind x < length (M x); obc x \<subset> Blacks (Ma x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 3. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; q x < Suc (length (Muts x)); ind x < length (M x); l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x)
 4. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> Roots \<subseteq> Blacks (M x)
 5. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> obc x \<subseteq> Blacks (Ma x)
 6. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> Blacks (Ma x) \<subseteq> Blacks (M x)
 7. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> bc x \<subseteq> Blacks (M x)
 8. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> length (Ma x) = length (M x)
 9. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x
 10. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))
A total of 14 subgoals...
[PROOF STEP]
apply simp_all
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x)\<rbrakk> \<Longrightarrow> \<lbrace>\<acute>(<) (Suc (ind x)) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); xa < Suc (ind x); Ma x ! xa = Black\<rbrakk> \<Longrightarrow> xa \<in> bc x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply(erule less_SucE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); ind x < length (M x); xa < Suc (ind x); Ma x ! xa = Black; q x < length (Muts x)\<rbrakk> \<Longrightarrow> xa \<in> bc x
 2. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); ind x < length (M x); xa < Suc (ind x); Ma x ! xa = Black; q x = length (Muts x)\<rbrakk> \<Longrightarrow> xa \<in> bc x
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); Ma x ! xa = Black; xa < ind x\<rbrakk> \<Longrightarrow> xa \<in> bc x
 2. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); Ma x ! xa = Black; xa = ind x\<rbrakk> \<Longrightarrow> xa \<in> bc x
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 4. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); Ma x ! xa = Black; xa = ind x\<rbrakk> \<Longrightarrow> xa \<in> bc x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x xa. \<lbrakk>M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); Ma x ! ind x = Black; xa = ind x\<rbrakk> \<Longrightarrow> ind x \<in> bc x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply(rotate_tac -1)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>x xa. \<lbrakk>xa = ind x; M x ! ind x \<noteq> Black; Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x); Ma x ! ind x = Black\<rbrakk> \<Longrightarrow> ind x \<in> bc x
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 3. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply (force simp add:Blacks_def)
\<comment> \<open>2 subgoals left\<close>
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) (Suc \<acute>ind) \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> Suc \<acute>ind \<le> length \<acute>M\<rbrace>
 2. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply force
\<comment> \<open>1 subgoal left\<close>
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> \<lbrace>\<acute>(<) \<acute>ind \<and> \<acute>((!) \<acute>Ma) = Black\<rbrace> \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n \<and> \<acute>ind \<le> length \<acute>M\<rbrace> \<inter> - \<lbrace>\<acute>ind < length \<acute>M\<rbrace> \<subseteq> \<lbrace>Proper_Roots \<acute>M \<and> Proper_Edges (\<acute>M, \<acute>E) \<and> Blacks M_init = Roots \<and> length M_init = length \<acute>M \<and> n = length \<acute>Muts \<and> Roots \<subseteq> Blacks \<acute>M \<and> \<acute>obc \<subseteq> Blacks \<acute>Ma \<and> Blacks \<acute>Ma \<subseteq> Blacks \<acute>M \<and> \<acute>bc \<subseteq> Blacks \<acute>M \<and> length \<acute>Ma = length \<acute>M \<and> Blacks \<acute>Ma \<subseteq> \<acute>bc \<and> (Reach \<acute>E \<subseteq> Blacks \<acute>M \<or> \<acute>obc \<subset> Blacks \<acute>Ma \<or> \<acute>l < \<acute>q \<and> (\<acute>q \<le> length (filter (\<lambda>i. \<not> Z i \<and> \<acute>M ! T i \<noteq> Black) \<acute>Muts) \<or> \<acute>obc \<subset> Blacks \<acute>M)) \<and> \<acute>q < Suc n\<rbrace>
[PROOF STEP]
apply clarify
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<not> ind x < length (M x); Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x \<le> length (M x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x) \<and> Roots \<subseteq> Blacks (M x) \<and> obc x \<subseteq> Blacks (Ma x) \<and> Blacks (Ma x) \<subseteq> Blacks (M x) \<and> bc x \<subseteq> Blacks (M x) \<and> length (Ma x) = length (M x) \<and> Blacks (Ma x) \<subseteq> bc x \<and> (Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))) \<and> q x < Suc (length (Muts x))
[PROOF STEP]
apply(drule_tac x = "ind x" in le_imp_less_or_eq)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. \<lbrakk>\<not> ind x < length (M x); Proper_Roots (M x); Proper_Edges (M x, E x); Blacks M_init = Roots; length M_init = length (M x); n = length (Muts x); Roots \<subseteq> Blacks (M x); obc x \<subseteq> Blacks (Ma x); Blacks (Ma x) \<subseteq> Blacks (M x); bc x \<subseteq> Blacks (M x); length (Ma x) = length (M x); \<lbrace>\<acute>(<) (ind x) \<and> \<acute>((!) (Ma x)) = Black\<rbrace> \<subseteq> bc x; Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x)); q x < Suc (length (Muts x)); ind x < length (M x) \<or> ind x = length (M x)\<rbrakk> \<Longrightarrow> length (Muts x) = length (Muts x) \<and> Roots \<subseteq> Blacks (M x) \<and> obc x \<subseteq> Blacks (Ma x) \<and> Blacks (Ma x) \<subseteq> Blacks (M x) \<and> bc x \<subseteq> Blacks (M x) \<and> length (Ma x) = length (M x) \<and> Blacks (Ma x) \<subseteq> bc x \<and> (Reach (E x) \<subseteq> Blacks (M x) \<or> obc x \<subset> Blacks (Ma x) \<or> l x < q x \<and> (q x \<le> length (filter (\<lambda>i. \<not> Z i \<and> M x ! T i \<noteq> Black) (Muts x)) \<or> obc x \<subset> Blacks (M x))) \<and> q x < Suc (length (Muts x))
[PROOF STEP]
apply (simp_all add:Blacks_def)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done