[STATEMENT]
lemma push_forward_measure_computation:
 "qbs_prob ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>l. (((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l, ((obs \<circ> (\<lambda>(s, b) r. s * r + b)) \<circ> real_real.g) l)) (distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f)"
 "monadP_qbs_Pf (\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>f. (f, obs f)) prior = qbs_prob_space ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0, (\<lambda>l. (((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l, ((obs \<circ> (\<lambda>(s, b) r. s * r + b)) \<circ> real_real.g) l)), distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. qbs_prob ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>l. (((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l, (obs \<circ> (\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l)) (distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f) &&& monadP_qbs_Pf (\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>f. (f, obs f)) prior = qbs_prob_space ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0, \<lambda>l. (((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l, (obs \<circ> (\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l), distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f)
[PROOF STEP]
using qbs_prob.monadP_qbs_Pf_computation[OF prior_computation id_obs_morphism]
[PROOF STATE]
proof (prove)
using this:
qbs_prob ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) ((\<lambda>f. (f, obs f)) \<circ> ((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g)) (distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f)
monadP_qbs_Pf (\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>f. (f, obs f)) prior = qbs_prob_space ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0, (\<lambda>f. (f, obs f)) \<circ> ((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g), distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f)

goal (1 subgoal):
 1. qbs_prob ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>l. (((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l, (obs \<circ> (\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l)) (distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f) &&& monadP_qbs_Pf (\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0) (\<lambda>f. (f, obs f)) prior = qbs_prob_space ((\<real>\<^sub>Q \<Rightarrow>\<^sub>Q \<real>\<^sub>Q) \<Otimes>\<^sub>Q \<real>\<^sub>Q\<^sub>\<ge>\<^sub>0, \<lambda>l. (((\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l, (obs \<circ> (\<lambda>(s, b) r. s * r + b) \<circ> real_real.g) l), distr (\<nu> \<Otimes>\<^sub>M \<nu>) real_borel real_real.f)
[PROOF STEP]
by(auto simp: comp_def)


[STATEMENT]
lemma InvariantsClAfterExplainUIP:
assumes
  "applyExplainUIP_dom state"
  "InvariantUniq (getM state)"
  "InvariantCFalse (getConflictFlag state) (getM state) (getC state)"
  "InvariantCEntailed (getConflictFlag state) F0 (getC state)"
  "InvariantClCharacterization (getCl state) (getC state) (getM state)"
  "InvariantCnCharacterization (getCn state) (getC state) (getM state)"
  "InvariantClCurrentLevel (getCl state) (getM state)"
  "InvariantUniqC (getC state)"
  "InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state))"
  "InvariantEquivalentZL (getF state) (getM state) F0"
  "getConflictFlag state"
  "currentLevel (getM state) > 0"
shows
  "let state' = applyExplainUIP state in
      InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and>
      InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and>
      InvariantClCharacterization (getCl state') (getC state') (getM state') \<and>
      InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and>
      InvariantClCurrentLevel (getCl state') (getM state') \<and>
      InvariantUniqC (getC state')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. let state' = applyExplainUIP state in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP_dom state
InvariantUniq (getM state)
InvariantCFalse (getConflictFlag state) (getM state) (getC state)
InvariantCEntailed (getConflictFlag state) F0 (getC state)
InvariantClCharacterization (getCl state) (getC state) (getM state)
InvariantCnCharacterization (getCn state) (getC state) (getM state)
InvariantClCurrentLevel (getCl state) (getM state)
InvariantUniqC (getC state)
InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state))
InvariantEquivalentZL (getF state) (getM state) F0
getConflictFlag state
0 < currentLevel (getM state)

goal (1 subgoal):
 1. let state' = applyExplainUIP state in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
proof(induct state rule: applyExplainUIP_dom.induct)
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>state. \<lbrakk>getCn state \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state) state); \<lbrakk>getCn state \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state) state)); InvariantCFalse (getConflictFlag (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)); InvariantCEntailed (getConflictFlag (applyExplain (getCl state) state)) F0 (getC (applyExplain (getCl state) state)); InvariantClCharacterization (getCl (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantCnCharacterization (getCn (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantClCurrentLevel (getCl (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantUniqC (getC (applyExplain (getCl state) state)); InvariantGetReasonIsReason (getReason (applyExplain (getCl state) state)) (getF (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) (set (getQ (applyExplain (getCl state) state))); InvariantEquivalentZL (getF (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) F0; getConflictFlag (applyExplain (getCl state) state); 0 < currentLevel (getM (applyExplain (getCl state) state))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state) state) in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state'); InvariantUniq (getM state); InvariantCFalse (getConflictFlag state) (getM state) (getC state); InvariantCEntailed (getConflictFlag state) F0 (getC state); InvariantClCharacterization (getCl state) (getC state) (getM state); InvariantCnCharacterization (getCn state) (getC state) (getM state); InvariantClCurrentLevel (getCl state) (getM state); InvariantUniqC (getC state); InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state)); InvariantEquivalentZL (getF state) (getM state) F0; getConflictFlag state; 0 < currentLevel (getM state)\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP state in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
case (step state')
[PROOF STATE]
proof (state)
this:
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state') state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. \<And>state. \<lbrakk>getCn state \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state) state); \<lbrakk>getCn state \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state) state)); InvariantCFalse (getConflictFlag (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)); InvariantCEntailed (getConflictFlag (applyExplain (getCl state) state)) F0 (getC (applyExplain (getCl state) state)); InvariantClCharacterization (getCl (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantCnCharacterization (getCn (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantClCurrentLevel (getCl (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantUniqC (getC (applyExplain (getCl state) state)); InvariantGetReasonIsReason (getReason (applyExplain (getCl state) state)) (getF (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) (set (getQ (applyExplain (getCl state) state))); InvariantEquivalentZL (getF (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) F0; getConflictFlag (applyExplain (getCl state) state); 0 < currentLevel (getM (applyExplain (getCl state) state))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state) state) in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state'); InvariantUniq (getM state); InvariantCFalse (getConflictFlag state) (getM state) (getC state); InvariantCEntailed (getConflictFlag state) F0 (getC state); InvariantClCharacterization (getCl state) (getC state) (getM state); InvariantCnCharacterization (getCn state) (getC state) (getM state); InvariantClCurrentLevel (getCl state) (getM state); InvariantUniqC (getC state); InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state)); InvariantEquivalentZL (getF state) (getM state) F0; getConflictFlag state; 0 < currentLevel (getM state)\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP state in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
note ih = this
[PROOF STATE]
proof (state)
this:
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state') state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. \<And>state. \<lbrakk>getCn state \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state) state); \<lbrakk>getCn state \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state) state)); InvariantCFalse (getConflictFlag (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)); InvariantCEntailed (getConflictFlag (applyExplain (getCl state) state)) F0 (getC (applyExplain (getCl state) state)); InvariantClCharacterization (getCl (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantCnCharacterization (getCn (applyExplain (getCl state) state)) (getC (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantClCurrentLevel (getCl (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)); InvariantUniqC (getC (applyExplain (getCl state) state)); InvariantGetReasonIsReason (getReason (applyExplain (getCl state) state)) (getF (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) (set (getQ (applyExplain (getCl state) state))); InvariantEquivalentZL (getF (applyExplain (getCl state) state)) (getM (applyExplain (getCl state) state)) F0; getConflictFlag (applyExplain (getCl state) state); 0 < currentLevel (getM (applyExplain (getCl state) state))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state) state) in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state'); InvariantUniq (getM state); InvariantCFalse (getConflictFlag state) (getM state) (getC state); InvariantCEntailed (getConflictFlag state) F0 (getC state); InvariantClCharacterization (getCl state) (getC state) (getM state); InvariantCnCharacterization (getCn state) (getC state) (getM state); InvariantClCurrentLevel (getCl state) (getM state); InvariantUniqC (getC state); InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state)); InvariantEquivalentZL (getF state) (getM state) F0; getConflictFlag state; 0 < currentLevel (getM state)\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP state in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
proof (cases "getCn state' = 1")
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. getCn state' = 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
 2. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
case True
[PROOF STATE]
proof (state)
this:
getCn state' = 1

goal (2 subgoals):
 1. getCn state' = 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
 2. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
with applyExplainUIP.simps[of "state'"]
[PROOF STATE]
proof (chain)
picking this:
applyExplainUIP state' = (if getCn state' = 1 then state' else applyExplainUIP (applyExplain (getCl state') state'))
getCn state' = 1
[PROOF STEP]
have "applyExplainUIP state' = state'"
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = (if getCn state' = 1 then state' else applyExplainUIP (applyExplain (getCl state') state'))
getCn state' = 1

goal (1 subgoal):
 1. applyExplainUIP state' = state'
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
applyExplainUIP state' = state'

goal (2 subgoals):
 1. getCn state' = 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
 2. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
thus ?thesis
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = state'

goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = state'
applyExplainUIP_dom state
InvariantUniq (getM state)
InvariantCFalse (getConflictFlag state) (getM state) (getC state)
InvariantCEntailed (getConflictFlag state) F0 (getC state)
InvariantClCharacterization (getCl state) (getC state) (getM state)
InvariantCnCharacterization (getCn state) (getC state) (getM state)
InvariantClCurrentLevel (getCl state) (getM state)
InvariantUniqC (getC state)
InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state))
InvariantEquivalentZL (getF state) (getM state) F0
getConflictFlag state
0 < currentLevel (getM state)

goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
using ih
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = state'
applyExplainUIP_dom state
InvariantUniq (getM state)
InvariantCFalse (getConflictFlag state) (getM state) (getC state)
InvariantCEntailed (getConflictFlag state) F0 (getC state)
InvariantClCharacterization (getCl state) (getC state) (getM state)
InvariantCnCharacterization (getCn state) (getC state) (getM state)
InvariantClCurrentLevel (getCl state) (getM state)
InvariantUniqC (getC state)
InvariantGetReasonIsReason (getReason state) (getF state) (getM state) (set (getQ state))
InvariantEquivalentZL (getF state) (getM state) F0
getConflictFlag state
0 < currentLevel (getM state)
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state') state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
by (auto simp only: Let_def)
[PROOF STATE]
proof (state)
this:
let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
case False
[PROOF STATE]
proof (state)
this:
getCn state' \<noteq> 1

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
let ?state'' = "applyExplain (getCl state') state'"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
let ?state' = "applyExplainUIP ?state''"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
from applyExplainUIP.simps[of "state'"] False
[PROOF STATE]
proof (chain)
picking this:
applyExplainUIP state' = (if getCn state' = 1 then state' else applyExplainUIP (applyExplain (getCl state') state'))
getCn state' \<noteq> 1
[PROOF STEP]
have "applyExplainUIP state' = ?state'"
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = (if getCn state' = 1 then state' else applyExplainUIP (applyExplain (getCl state') state'))
getCn state' \<noteq> 1

goal (1 subgoal):
 1. applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')
[PROOF STEP]
by (simp add: Let_def)
[PROOF STATE]
proof (state)
this:
applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
have "InvariantUniq (getM ?state'')"
      "InvariantGetReasonIsReason (getReason ?state'') (getF ?state'') (getM ?state'') (set (getQ ?state''))"
      "InvariantEquivalentZL (getF ?state'') (getM ?state'') F0"
      "getConflictFlag ?state''"
      "currentLevel (getM ?state'') > 0"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (InvariantUniq (getM (applyExplain (getCl state') state')) &&& InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))) &&& InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0 &&& getConflictFlag (applyExplain (getCl state') state') &&& 0 < currentLevel (getM (applyExplain (getCl state') state'))
[PROOF STEP]
using ih
[PROOF STATE]
proof (prove)
using this:
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state') state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. (InvariantUniq (getM (applyExplain (getCl state') state')) &&& InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))) &&& InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0 &&& getConflictFlag (applyExplain (getCl state') state') &&& 0 < currentLevel (getM (applyExplain (getCl state') state'))
[PROOF STEP]
unfolding applyExplain_def
[PROOF STATE]
proof (prove)
using this:
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantCFalse (getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantCEntailed (getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) F0 (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantClCharacterization (getCl (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantCnCharacterization (getCn (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantClCurrentLevel (getCl (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantUniqC (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')); InvariantGetReasonIsReason (getReason (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (set (getQ (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state'))); InvariantEquivalentZL (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) F0; getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state'); 0 < currentLevel (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. (InvariantUniq (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) &&& InvariantGetReasonIsReason (getReason (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (set (getQ (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')))) &&& InvariantEquivalentZL (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state')) F0 &&& getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state') &&& 0 < currentLevel (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')) in setConflictAnalysisClause res state'))
[PROOF STEP]
unfolding setConflictAnalysisClause_def
[PROOF STATE]
proof (prove)
using this:
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantCFalse (getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantCEntailed (getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) F0 (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantClCharacterization (getCl (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantCnCharacterization (getCn (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantClCurrentLevel (getCl (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantUniqC (getC (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))); InvariantGetReasonIsReason (getReason (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (set (getQ (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state')))); InvariantEquivalentZL (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) F0; getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state')); 0 < currentLevel (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state')))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state')) in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. (InvariantUniq (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) &&& InvariantGetReasonIsReason (getReason (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (set (getQ (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))))) &&& InvariantEquivalentZL (getF (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state'))) F0 &&& getConflictFlag (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state')) &&& 0 < currentLevel (getM (case getReason state' (getCl state') of None \<Rightarrow> state' | Some reason \<Rightarrow> let res = resolve (getC state') (getF state' ! reason) (opposite (getCl state')); oppM0 = oppositeLiteralList (elements (prefixToLevel 0 (getM state'))); state' = state'\<lparr>getC := remdups (list_diff res oppM0)\<rparr> in countCurrentLevelLiterals (findLastAssertedLiteral state')))
[PROOF STEP]
by (auto split: option.split simp add: findLastAssertedLiteral_def countCurrentLevelLiterals_def Let_def)
[PROOF STATE]
proof (state)
this:
InvariantUniq (getM (applyExplain (getCl state') state'))
InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))
InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0
getConflictFlag (applyExplain (getCl state') state')
0 < currentLevel (getM (applyExplain (getCl state') state'))

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
moreover
[PROOF STATE]
proof (state)
this:
InvariantUniq (getM (applyExplain (getCl state') state'))
InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))
InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0
getConflictFlag (applyExplain (getCl state') state')
0 < currentLevel (getM (applyExplain (getCl state') state'))

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
have "InvariantCFalse (getConflictFlag ?state'') (getM ?state'') (getC ?state'')"
      "InvariantCEntailed (getConflictFlag ?state'') F0 (getC ?state'')"
      "InvariantClCharacterization (getCl ?state'') (getC ?state'') (getM ?state'')"
      "InvariantCnCharacterization (getCn ?state'') (getC ?state'') (getM ?state'')"
      "InvariantClCurrentLevel (getCl ?state'') (getM ?state'')"
      "InvariantUniqC (getC ?state'')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) &&& InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')) &&& InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))) &&& InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantUniqC (getC (applyExplain (getCl state') state'))
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
getCn state' \<noteq> 1

goal (1 subgoal):
 1. (InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) &&& InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')) &&& InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))) &&& InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantUniqC (getC (applyExplain (getCl state') state'))
[PROOF STEP]
using ih
[PROOF STATE]
proof (prove)
using this:
getCn state' \<noteq> 1
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state') state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')

goal (1 subgoal):
 1. (InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) &&& InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')) &&& InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))) &&& InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantUniqC (getC (applyExplain (getCl state') state'))
[PROOF STEP]
using InvariantsClAfterApplyExplain[of "state'" "F0"]
[PROOF STATE]
proof (prove)
using this:
getCn state' \<noteq> 1
getCn state' \<noteq> 1 \<Longrightarrow> applyExplainUIP_dom (applyExplain (getCl state') state')
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
InvariantUniq (getM state')
InvariantCFalse (getConflictFlag state') (getM state') (getC state')
InvariantCEntailed (getConflictFlag state') F0 (getC state')
InvariantClCharacterization (getCl state') (getC state') (getM state')
InvariantCnCharacterization (getCn state') (getC state') (getM state')
InvariantClCurrentLevel (getCl state') (getM state')
InvariantUniqC (getC state')
InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state'))
InvariantEquivalentZL (getF state') (getM state') F0
getConflictFlag state'
0 < currentLevel (getM state')
\<lbrakk>InvariantUniq (getM state'); InvariantCFalse (getConflictFlag state') (getM state') (getC state'); InvariantClCharacterization (getCl state') (getC state') (getM state'); InvariantClCurrentLevel (getCl state') (getM state'); InvariantCEntailed (getConflictFlag state') F0 (getC state'); InvariantCnCharacterization (getCn state') (getC state') (getM state'); InvariantEquivalentZL (getF state') (getM state') F0; InvariantGetReasonIsReason (getReason state') (getF state') (getM state') (set (getQ state')); getCn state' \<noteq> 1; getConflictFlag state'; 0 < currentLevel (getM state')\<rbrakk> \<Longrightarrow> let state' = applyExplain (getCl state') state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantUniqC (getC state')

goal (1 subgoal):
 1. (InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) &&& InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')) &&& InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))) &&& InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) &&& InvariantUniqC (getC (applyExplain (getCl state') state'))
[PROOF STEP]
by (auto simp add: Let_def)
[PROOF STATE]
proof (state)
this:
InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state'))
InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state'))
InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantUniqC (getC (applyExplain (getCl state') state'))

goal (1 subgoal):
 1. getCn state' \<noteq> 1 \<Longrightarrow> let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
ultimately
[PROOF STATE]
proof (chain)
picking this:
applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')
InvariantUniq (getM (applyExplain (getCl state') state'))
InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))
InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0
getConflictFlag (applyExplain (getCl state') state')
0 < currentLevel (getM (applyExplain (getCl state') state'))
InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state'))
InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state'))
InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantUniqC (getC (applyExplain (getCl state') state'))
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')
InvariantUniq (getM (applyExplain (getCl state') state'))
InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))
InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0
getConflictFlag (applyExplain (getCl state') state')
0 < currentLevel (getM (applyExplain (getCl state') state'))
InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state'))
InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state'))
InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantUniqC (getC (applyExplain (getCl state') state'))

goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
using False
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')
InvariantUniq (getM (applyExplain (getCl state') state'))
InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))
InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0
getConflictFlag (applyExplain (getCl state') state')
0 < currentLevel (getM (applyExplain (getCl state') state'))
InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state'))
InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state'))
InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantUniqC (getC (applyExplain (getCl state') state'))
getCn state' \<noteq> 1

goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
using ih(2)
[PROOF STATE]
proof (prove)
using this:
applyExplainUIP state' = applyExplainUIP (applyExplain (getCl state') state')
InvariantUniq (getM (applyExplain (getCl state') state'))
InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state')))
InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0
getConflictFlag (applyExplain (getCl state') state')
0 < currentLevel (getM (applyExplain (getCl state') state'))
InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state'))
InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state'))
InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state'))
InvariantUniqC (getC (applyExplain (getCl state') state'))
getCn state' \<noteq> 1
\<lbrakk>getCn state' \<noteq> 1; InvariantUniq (getM (applyExplain (getCl state') state')); InvariantCFalse (getConflictFlag (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')); InvariantCEntailed (getConflictFlag (applyExplain (getCl state') state')) F0 (getC (applyExplain (getCl state') state')); InvariantClCharacterization (getCl (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantCnCharacterization (getCn (applyExplain (getCl state') state')) (getC (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantClCurrentLevel (getCl (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')); InvariantUniqC (getC (applyExplain (getCl state') state')); InvariantGetReasonIsReason (getReason (applyExplain (getCl state') state')) (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) (set (getQ (applyExplain (getCl state') state'))); InvariantEquivalentZL (getF (applyExplain (getCl state') state')) (getM (applyExplain (getCl state') state')) F0; getConflictFlag (applyExplain (getCl state') state'); 0 < currentLevel (getM (applyExplain (getCl state') state'))\<rbrakk> \<Longrightarrow> let state' = applyExplainUIP (applyExplain (getCl state') state') in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')

goal (1 subgoal):
 1. let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
let state' = applyExplainUIP state' in InvariantCFalse (getConflictFlag state') (getM state') (getC state') \<and> InvariantCEntailed (getConflictFlag state') F0 (getC state') \<and> InvariantClCharacterization (getCl state') (getC state') (getM state') \<and> InvariantCnCharacterization (getCn state') (getC state') (getM state') \<and> InvariantClCurrentLevel (getCl state') (getM state') \<and> InvariantUniqC (getC state')

goal:
No subgoals!
[PROOF STEP]
qed


[STATEMENT]
lemma "(\<lambda>f. f x) = (\<lambda>f. True)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>f. f x) = (\<lambda>f. True)
[PROOF STEP]
refute [expect = genuine]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<lambda>f. f x) = (\<lambda>f. True)
[PROOF STEP]
oops


[STATEMENT]
lemma "f x \<equiv> g x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<equiv> g x
[PROOF STEP]
nitpick [expect = genuine]
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. f x \<equiv> g x
[PROOF STEP]
oops


[STATEMENT]
lemma new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t [simp]:
  assumes "new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t h = (new_shadow_root_ptr, h')"
  assumes "ptr \<noteq> cast new_shadow_root_ptr"
  shows "get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t ptr h = get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t ptr h'"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. get ptr h = get ptr h'
[PROOF STEP]
using assms
[PROOF STATE]
proof (prove)
using this:
new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t h = (new_shadow_root_ptr, h')
ptr \<noteq> cast new_shadow_root_ptr

goal (1 subgoal):
 1. get ptr h = get ptr h'
[PROOF STEP]
apply(simp add: new\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_def Let_def put\<^sub>S\<^sub>h\<^sub>a\<^sub>d\<^sub>o\<^sub>w\<^sub>R\<^sub>o\<^sub>o\<^sub>t_def put\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>shadow_root_ptr.Ref (Suc (fMax (shadow_root_ptr.the_ref |`| shadow_root_ptrs h))) = new_shadow_root_ptr \<and> put (cast (cast (shadow_root_ptr.Ref (Suc (fMax (shadow_root_ptr.the_ref |`| shadow_root_ptrs h)))))) (cast (cast (create_shadow_root_obj Open []))) h = h'; ptr \<noteq> cast new_shadow_root_ptr\<rbrakk> \<Longrightarrow> get ptr h = get ptr h'
[PROOF STEP]
by(auto simp add: get\<^sub>D\<^sub>o\<^sub>c\<^sub>u\<^sub>m\<^sub>e\<^sub>n\<^sub>t_def)