[STATEMENT]
lemma step_sound:"step_ok R i S \<Longrightarrow> i \<ge> 0 \<Longrightarrow> i < length (fst R) \<Longrightarrow> sound R \<Longrightarrow> sound (step_result R (i,S))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>step_ok R i S; 0 \<le> i; i < length (fst R); sound R\<rbrakk> \<Longrightarrow> sound (step_result R (i, S))
[PROOF STEP]
proof(induction rule: step_ok.induct)
[PROOF STATE]
proof (state)
goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_Axiom SG i a C)
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [get_axiom a])
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume is_axiom:"SG ! i = ([], [get_axiom a])"
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [get_axiom a])

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume i0:"0 \<le> i"
[PROOF STATE]
proof (state)
this:
0 \<le> i

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < length (fst (SG, C))
[PROOF STEP]
have iL:"i < length (SG)"
[PROOF STATE]
proof (prove)
using this:
i < length (fst (SG, C))

goal (1 subgoal):
 1. i < length SG
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length SG

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "seq_valid ([], [get_axiom a])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. seq_valid ([], [get_axiom a])
[PROOF STEP]
apply(rule fml_seq_valid)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (get_axiom a)
[PROOF STEP]
by(rule axiom_valid)
[PROOF STATE]
proof (state)
this:
seq_valid ([], [get_axiom a])

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid ([], [get_axiom a])
[PROOF STEP]
have seq_valid:"seq_valid (SG ! i)"
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [get_axiom a])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
using is_axiom
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [get_axiom a])
SG ! i = ([], [get_axiom a])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
by auto
  \<comment> \<open>\<open>i0 iL\<close>\<close>
[PROOF STATE]
proof (state)
this:
seq_valid (SG ! i)

goal (10 subgoals):
 1. \<And>SG i a C. \<lbrakk>SG ! i = ([], [get_axiom a]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Axiom a))
 2. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 3. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 4. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 5. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 6. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 7. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 8. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 9. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 10. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid (SG ! i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, Axiom a))
[PROOF STEP]
using closeI_valid_sound[OF sound seq_valid]
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)
sound (closeI SG i, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, Axiom a))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, Axiom a))

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_AxSubst SG i a \<sigma> C)
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst (get_axiom a) \<sigma>])
Fadmit \<sigma> (get_axiom a)
ssafe \<sigma>
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume is_axiom:"SG ! i = ([], [Fsubst (get_axiom a) \<sigma>])"
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst (get_axiom a) \<sigma>])

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume ssafe:"ssafe \<sigma>"
[PROOF STATE]
proof (state)
this:
ssafe \<sigma>

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume i0:"0 \<le> i"
[PROOF STATE]
proof (state)
this:
0 \<le> i

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume Fadmit:"Fadmit \<sigma> (get_axiom a)"
[PROOF STATE]
proof (state)
this:
Fadmit \<sigma> (get_axiom a)

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < length (fst (SG, C))
[PROOF STEP]
have iL:"i < length (SG)"
[PROOF STATE]
proof (prove)
using this:
i < length (fst (SG, C))

goal (1 subgoal):
 1. i < length SG
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length SG

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have valid_axiom:"valid (get_axiom a)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (get_axiom a)
[PROOF STEP]
by(rule axiom_valid)
[PROOF STATE]
proof (state)
this:
valid (get_axiom a)

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have subst_valid:"valid (Fsubst (get_axiom a) \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst (get_axiom a) \<sigma>)
[PROOF STEP]
apply(rule subst_fml_valid)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. Fadmit \<sigma> (get_axiom a)
 2. fsafe (get_axiom a)
 3. ssafe \<sigma>
 4. valid (get_axiom a)
[PROOF STEP]
apply(rule Fadmit)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. fsafe (get_axiom a)
 2. ssafe \<sigma>
 3. valid (get_axiom a)
[PROOF STEP]
apply(rule axiom_safe)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ssafe \<sigma>
 2. valid (get_axiom a)
[PROOF STEP]
apply(rule ssafe)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (get_axiom a)
[PROOF STEP]
by(rule valid_axiom)
[PROOF STATE]
proof (state)
this:
valid (Fsubst (get_axiom a) \<sigma>)

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "seq_valid ([], [(Fsubst (get_axiom a) \<sigma>)])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. seq_valid ([], [Fsubst (get_axiom a) \<sigma>])
[PROOF STEP]
apply(rule fml_seq_valid)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst (get_axiom a) \<sigma>)
[PROOF STEP]
by(rule subst_valid)
[PROOF STATE]
proof (state)
this:
seq_valid ([], [Fsubst (get_axiom a) \<sigma>])

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid ([], [Fsubst (get_axiom a) \<sigma>])
[PROOF STEP]
have seq_valid:"seq_valid (SG ! i)"
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst (get_axiom a) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
using is_axiom
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst (get_axiom a) \<sigma>])
SG ! i = ([], [Fsubst (get_axiom a) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
by auto
  \<comment> \<open>\<open>i0 iL\<close>\<close>
[PROOF STATE]
proof (state)
this:
seq_valid (SG ! i)

goal (9 subgoals):
 1. \<And>SG i a \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (get_axiom a) \<sigma>]); Fadmit \<sigma> (get_axiom a); ssafe \<sigma>; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, AxSubst a \<sigma>))
 2. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 3. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 4. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 5. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 6. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 7. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 8. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 9. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid (SG ! i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, AxSubst a \<sigma>))
[PROOF STEP]
using closeI_valid_sound[OF sound seq_valid]
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)
sound (closeI SG i, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, AxSubst a \<sigma>))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, AxSubst a \<sigma>))

goal (8 subgoals):
 1. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 2. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 3. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 4. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 5. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 6. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 7. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 8. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (8 subgoals):
 1. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 2. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 3. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 4. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 5. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 6. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 7. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 8. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_Lrule R i j L)
[PROOF STATE]
proof (state)
this:
lrule_ok R i j L L_
L < length (fst (R ! j))
0 \<le> j
j < length (fst (R, i))
sound (R, i)

goal (8 subgoals):
 1. \<And>SG C i j L. \<lbrakk>lrule_ok SG C i j L; j < length (fst (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Lrule L j))
 2. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 3. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 4. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 5. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 6. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 7. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 8. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
lrule_ok R i j L L_
L < length (fst (R ! j))
0 \<le> j
j < length (fst (R, i))
sound (R, i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
lrule_ok R i j L L_
L < length (fst (R ! j))
0 \<le> j
j < length (fst (R, i))
sound (R, i)

goal (1 subgoal):
 1. sound (step_result (R, i) (j, Lrule L_ L))
[PROOF STEP]
using lrule_sound
[PROOF STATE]
proof (prove)
using this:
lrule_ok R i j L L_
L < length (fst (R ! j))
0 \<le> j
j < length (fst (R, i))
sound (R, i)
\<lbrakk>lrule_ok ?SG ?C ?i ?j ?L; ?i < length ?SG; ?j < length (fst (?SG ! ?i)); sound (?SG, ?C)\<rbrakk> \<Longrightarrow> sound (close (?SG @ Lrule_result ?L ?j (?SG ! ?i)) (?SG ! ?i), ?C)

goal (1 subgoal):
 1. sound (step_result (R, i) (j, Lrule L_ L))
[PROOF STEP]
using step_result.simps(2) surj_pair
[PROOF STATE]
proof (prove)
using this:
lrule_ok R i j L L_
L < length (fst (R ! j))
0 \<le> j
j < length (fst (R, i))
sound (R, i)
\<lbrakk>lrule_ok ?SG ?C ?i ?j ?L; ?i < length ?SG; ?j < length (fst (?SG ! ?i)); sound (?SG, ?C)\<rbrakk> \<Longrightarrow> sound (close (?SG @ Lrule_result ?L ?j (?SG ! ?i)) (?SG ! ?i), ?C)
step_result (?SG, ?C) (?i, AxSubst ?a ?\<sigma>) = (closeI ?SG ?i, ?C)
\<exists>x y. ?p = (x, y)

goal (1 subgoal):
 1. sound (step_result (R, i) (j, Lrule L_ L))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (R, i) (j, Lrule L_ L))

goal (7 subgoals):
 1. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 2. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 3. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 4. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 5. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 6. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 7. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (7 subgoals):
 1. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 2. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 3. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 4. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 5. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 6. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 7. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_Rrule R i SG j L)
[PROOF STATE]
proof (state)
this:
rrule_ok R i SG j L
j < length (snd (R ! SG))
0 \<le> SG
SG < length (fst (R, i))
sound (R, i)

goal (7 subgoals):
 1. \<And>SG C i j L. \<lbrakk>rrule_ok SG C i j L; j < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Rrule L j))
 2. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 3. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 4. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 5. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 6. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 7. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
rrule_ok R i SG j L
j < length (snd (R ! SG))
0 \<le> SG
SG < length (fst (R, i))
sound (R, i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
rrule_ok R i SG j L
j < length (snd (R ! SG))
0 \<le> SG
SG < length (fst (R, i))
sound (R, i)

goal (1 subgoal):
 1. sound (step_result (R, i) (SG, Rrule L j))
[PROOF STEP]
using rrule_sound
[PROOF STATE]
proof (prove)
using this:
rrule_ok R i SG j L
j < length (snd (R ! SG))
0 \<le> SG
SG < length (fst (R, i))
sound (R, i)
\<lbrakk>rrule_ok ?SG ?C ?i ?j ?L; ?i < length ?SG; ?j < length (snd (?SG ! ?i)); sound (?SG, ?C)\<rbrakk> \<Longrightarrow> sound (close (?SG @ Rrule_result ?L ?j (?SG ! ?i)) (?SG ! ?i), ?C)

goal (1 subgoal):
 1. sound (step_result (R, i) (SG, Rrule L j))
[PROOF STEP]
using step_result.simps(2) surj_pair
[PROOF STATE]
proof (prove)
using this:
rrule_ok R i SG j L
j < length (snd (R ! SG))
0 \<le> SG
SG < length (fst (R, i))
sound (R, i)
\<lbrakk>rrule_ok ?SG ?C ?i ?j ?L; ?i < length ?SG; ?j < length (snd (?SG ! ?i)); sound (?SG, ?C)\<rbrakk> \<Longrightarrow> sound (close (?SG @ Rrule_result ?L ?j (?SG ! ?i)) (?SG ! ?i), ?C)
step_result (?SG, ?C) (?i, AxSubst ?a ?\<sigma>) = (closeI ?SG ?i, ?C)
\<exists>x y. ?p = (x, y)

goal (1 subgoal):
 1. sound (step_result (R, i) (SG, Rrule L j))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (R, i) (SG, Rrule L j))

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_Cut \<phi> i SG C)
[PROOF STATE]
proof (state)
this:
fsafe \<phi>
i < length SG
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume safe:"fsafe \<phi>"
[PROOF STATE]
proof (state)
this:
fsafe \<phi>

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < length (fst (SG, C))
[PROOF STEP]
have iL:"i < length SG"
[PROOF STATE]
proof (prove)
using this:
i < length (fst (SG, C))

goal (1 subgoal):
 1. i < length SG
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length SG

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
obtain \<Gamma> and \<Delta> where SG_dec:"(\<Gamma>,\<Delta>) = (SG ! i)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<Gamma> \<Delta>. (\<Gamma>, \<Delta>) = SG ! i \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by (metis seq2fml.cases)
[PROOF STATE]
proof (state)
this:
(\<Gamma>, \<Delta>) = SG ! i

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # [y\<leftarrow>SG . y \<noteq> SG ! i], C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C)
[PROOF STEP]
apply(rule soundI_memv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
fix I::"('sf,'sc,'sz) interp" and \<nu>::"'sz state"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
assume good:"is_interp I"
[PROOF STATE]
proof (state)
this:
is_interp I

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
assume sgs:"(\<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # [y\<leftarrow>SG . y \<noteq> SG ! i]) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>')"
[PROOF STATE]
proof (state)
this:
List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) ?\<phi>'7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>'7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sg1:"\<And>\<nu>. \<nu> \<in> seq_sem I (\<phi> # \<Gamma>, \<Delta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I (\<phi> # \<Gamma>, \<Delta>)
[PROOF STEP]
using sgs
[PROOF STATE]
proof (prove)
using this:
List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) ?\<phi>'7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>'7

goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I (\<phi> # \<Gamma>, \<Delta>)
[PROOF STEP]
by (meson member_rec(1))
[PROOF STATE]
proof (state)
this:
?\<nu>7 \<in> seq_sem I (\<phi> # \<Gamma>, \<Delta>)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sg2:"\<And>\<nu>. \<nu> \<in> seq_sem I (\<Gamma>, \<phi> # \<Delta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I (\<Gamma>, \<phi> # \<Delta>)
[PROOF STEP]
using sgs
[PROOF STATE]
proof (prove)
using this:
List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) ?\<phi>'7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>'7

goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I (\<Gamma>, \<phi> # \<Delta>)
[PROOF STEP]
by (meson member_rec(1))
[PROOF STATE]
proof (state)
this:
?\<nu>7 \<in> seq_sem I (\<Gamma>, \<phi> # \<Delta>)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sgs:"\<And>\<phi> \<nu>. (List.member (close SG (nth SG i)) \<phi>) \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member (close SG (SG ! i)) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
using sgs
[PROOF STATE]
proof (prove)
using this:
List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) ?\<phi>'7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>'7

goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member (close SG (SG ! i)) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
by (simp add: member_rec(1))
[PROOF STATE]
proof (state)
this:
List.member (close SG (SG ! i)) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
List.member (close SG (SG ! i)) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7
[PROOF STEP]
have sgs:"\<And>\<phi> \<nu>. (List.member (close SG (\<Gamma>,\<Delta>)) \<phi>) \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>"
[PROOF STATE]
proof (prove)
using this:
List.member (close SG (SG ! i)) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member (close SG (\<Gamma>, \<Delta>)) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
using SG_dec
[PROOF STATE]
proof (prove)
using this:
List.member (close SG (SG ! i)) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7
(\<Gamma>, \<Delta>) = SG ! i

goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member (close SG (\<Gamma>, \<Delta>)) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
List.member (close SG (\<Gamma>, \<Delta>)) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sgNew:"\<And>\<nu>. \<nu> \<in> seq_sem I (\<Gamma>, \<Delta>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I (\<Gamma>, \<Delta>)
[PROOF STEP]
using sg1 sg2
[PROOF STATE]
proof (prove)
using this:
?\<nu>7 \<in> seq_sem I (\<phi> # \<Gamma>, \<Delta>)
?\<nu>7 \<in> seq_sem I (\<Gamma>, \<phi> # \<Delta>)

goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I (\<Gamma>, \<Delta>)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?\<nu>7 \<in> seq_sem I (\<Gamma>, \<Delta>)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have same_mem:"\<And>x. List.member SG x \<Longrightarrow> List.member ((\<Gamma>,\<Delta>) # close SG (\<Gamma>,\<Delta>)) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. List.member SG x \<Longrightarrow> List.member ((\<Gamma>, \<Delta>) # close SG (\<Gamma>, \<Delta>)) x
[PROOF STEP]
subgoal for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. List.member SG s \<Longrightarrow> List.member ((\<Gamma>, \<Delta>) # close SG (\<Gamma>, \<Delta>)) s
[PROOF STEP]
by(induction SG, auto simp add: member_rec)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
List.member SG ?x7 \<Longrightarrow> List.member ((\<Gamma>, \<Delta>) # close SG (\<Gamma>, \<Delta>)) ?x7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have SGS:"(\<And>\<phi>' \<nu>. List.member SG \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>')"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<phi>' \<nu>. List.member SG \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'
[PROOF STEP]
using sgNew sgs same_mem member_rec(1) seq_MP
[PROOF STATE]
proof (prove)
using this:
?\<nu>7 \<in> seq_sem I (\<Gamma>, \<Delta>)
List.member (close SG (\<Gamma>, \<Delta>)) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7
List.member SG ?x7 \<Longrightarrow> List.member ((\<Gamma>, \<Delta>) # close SG (\<Gamma>, \<Delta>)) ?x7
List.member (?x # ?xs) ?y = (?x = ?y \<or> List.member ?xs ?y)
\<lbrakk>?\<nu> \<in> seq_sem ?I (?\<Gamma>, ?\<Delta>); ?\<nu> \<in> fml_sem ?I (foldr (&&) ?\<Gamma> TT)\<rbrakk> \<Longrightarrow> ?\<nu> \<in> fml_sem ?I (foldr (||) ?\<Delta> FF)

goal (1 subgoal):
 1. \<And>\<phi>' \<nu>. List.member SG \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'
[PROOF STEP]
by metis
[PROOF STATE]
proof (state)
this:
List.member SG ?\<phi>'7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>'7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi>' \<nu>. List.member ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG) \<phi>' \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>'\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
show "\<nu> \<in> seq_sem I C"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nu> \<in> seq_sem I C
[PROOF STEP]
using sound
[PROOF STATE]
proof (prove)
using this:
sound (SG, C)

goal (1 subgoal):
 1. \<nu> \<in> seq_sem I C
[PROOF STEP]
apply simp
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (SG, C) \<Longrightarrow> \<nu> \<in> fml_sem I (seq2fml C)
[PROOF STEP]
apply(drule soundD_memv)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. is_interp ?I1
 2. \<And>\<phi> \<nu>. List.member SG \<phi> \<Longrightarrow> \<nu> \<in> seq_sem ?I1 \<phi>
 3. ?\<nu>1 \<in> seq_sem ?I1 C \<Longrightarrow> \<nu> \<in> fml_sem I (seq2fml C)
[PROOF STEP]
apply(rule good)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>\<phi> \<nu>. List.member SG \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
 2. ?\<nu>1 \<in> seq_sem I C \<Longrightarrow> \<nu> \<in> fml_sem I (seq2fml C)
[PROOF STEP]
using SGS
[PROOF STATE]
proof (prove)
using this:
List.member SG ?\<phi>'7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>'7

goal (2 subgoals):
 1. \<And>\<phi> \<nu>. List.member SG \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
 2. ?\<nu>1 \<in> seq_sem I C \<Longrightarrow> \<nu> \<in> fml_sem I (seq2fml C)
[PROOF STEP]
apply blast
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ?\<nu>1 \<in> seq_sem I C \<Longrightarrow> \<nu> \<in> fml_sem I (seq2fml C)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
\<nu> \<in> seq_sem I C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C)

goal (6 subgoals):
 1. \<And>\<phi> i SG C. \<lbrakk>fsafe \<phi>; i < length SG; 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
 2. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 3. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 4. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 5. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 6. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, Cut \<phi>))
[PROOF STEP]
using SG_dec case_prod_conv
[PROOF STATE]
proof (prove)
using this:
sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C)
(\<Gamma>, \<Delta>) = SG ! i
(case (?a, ?b) of (c, d) \<Rightarrow> ?f c d) = ?f ?a ?b

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, Cut \<phi>))
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<lbrakk>sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C); (\<Gamma>, \<Delta>) = SG ! i; \<And>f a b. (case (a, b) of (c, d) \<Rightarrow> f c d) = f a b\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
[PROOF STEP]
have "(\<And>f. ((case nth SG i of (x, xa) \<Rightarrow> ((f x xa)::('sf, 'sc, 'sz) rule)) = (f \<Gamma> \<Delta>)))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>f. (case SG ! i of (x, xa) \<Rightarrow> f x xa) = f \<Gamma> \<Delta>
[PROOF STEP]
by (metis (no_types) SG_dec case_prod_conv)
[PROOF STATE]
proof (state)
this:
(case SG ! i of (x, xa) \<Rightarrow> ?f7 x xa) = ?f7 \<Gamma> \<Delta>

goal (1 subgoal):
 1. \<lbrakk>sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # filter (\<lambda>y. y \<noteq> SG ! i) SG, C); (\<Gamma>, \<Delta>) = SG ! i; \<And>f a b. (case (a, b) of (c, d) \<Rightarrow> f c d) = f a b\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, Cut \<phi>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
(case SG ! i of (x, xa) \<Rightarrow> ?f7 x xa) = ?f7 \<Gamma> \<Delta>
[PROOF STEP]
show ?thesis
[PROOF STATE]
proof (prove)
using this:
(case SG ! i of (x, xa) \<Rightarrow> ?f7 x xa) = ?f7 \<Gamma> \<Delta>

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, Cut \<phi>))
[PROOF STEP]
by (simp add: \<open>sound ((\<phi> # \<Gamma>, \<Delta>) # (\<Gamma>, \<phi> # \<Delta>) # [y\<leftarrow>SG . y \<noteq> SG ! i], C)\<close>)
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, Cut \<phi>))

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, Cut \<phi>))

goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_G SG i C a p)
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [[[a]]p])
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume eq:"SG ! i = ([], [([[a]]p)])"
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [[[a]]p])

goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume iL:"i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "sound (([], [p]) # (close SG ([], [([[ a ]] p)])), C)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (([], [p]) # close SG ([], [[[a]]p]), C)
[PROOF STEP]
apply(rule soundI_memv)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
fix I::"('sf,'sc,'sz) interp" and  \<nu>::"'sz state"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
assume "is_interp I"
[PROOF STATE]
proof (state)
this:
is_interp I

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
assume sgs:"(\<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [([[a]]p)])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>)"
[PROOF STATE]
proof (state)
this:
List.member (([], [p]) # close SG ([], [[[a]]p])) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sg0:"(\<And>\<nu>. \<nu> \<in> seq_sem I ([], [p]))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I ([], [p])
[PROOF STEP]
using sgs
[PROOF STATE]
proof (prove)
using this:
List.member (([], [p]) # close SG ([], [[[a]]p])) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I ([], [p])
[PROOF STEP]
by (meson member_rec(1))
[PROOF STATE]
proof (state)
this:
?\<nu>7 \<in> seq_sem I ([], [p])

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
?\<nu>7 \<in> seq_sem I ([], [p])
[PROOF STEP]
have sg0':"(\<And>\<nu>. \<nu> \<in> seq_sem I ([], [([[a]]p)]))"
[PROOF STATE]
proof (prove)
using this:
?\<nu>7 \<in> seq_sem I ([], [p])

goal (1 subgoal):
 1. \<And>\<nu>. \<nu> \<in> seq_sem I ([], [[[a]]p])
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
?\<nu>7 \<in> seq_sem I ([], [[[a]]p])

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sgTail:"(\<And>\<phi> \<nu>. List.member (close SG ([], [([[a]]p)])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member (close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
using sgs
[PROOF STATE]
proof (prove)
using this:
List.member (([], [p]) # close SG ([], [[[a]]p])) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member (close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
by (simp add: member_rec(1))
[PROOF STATE]
proof (state)
this:
List.member (close SG ([], [[[a]]p])) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have same_mem:"\<And>x. List.member SG x \<Longrightarrow> List.member (([], [([[a]]p)]) # close SG ([], [([[a]]p)])) x"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>x. List.member SG x \<Longrightarrow> List.member (([], [[[a]]p]) # close SG ([], [[[a]]p])) x
[PROOF STEP]
subgoal for s
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. List.member SG s \<Longrightarrow> List.member (([], [[[a]]p]) # close SG ([], [[[a]]p])) s
[PROOF STEP]
by(induction SG, auto simp add: member_rec)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done
[PROOF STATE]
proof (state)
this:
List.member SG ?x7 \<Longrightarrow> List.member (([], [[[a]]p]) # close SG ([], [[[a]]p])) ?x7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
have sgsC:"(\<And>\<phi> \<nu>. List.member SG \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>\<phi> \<nu>. List.member SG \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>
[PROOF STEP]
apply auto
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>a b aa ba. \<lbrakk>List.member SG (a, b); (aa, ba) \<in> fml_sem I (foldr (&&) a TT)\<rbrakk> \<Longrightarrow> (aa, ba) \<in> fml_sem I (foldr (||) b FF)
[PROOF STEP]
using sgTail sg0' same_mem member_rec
[PROOF STATE]
proof (prove)
using this:
List.member (close SG ([], [[[a]]p])) ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7
?\<nu>7 \<in> seq_sem I ([], [[[a]]p])
List.member SG ?x7 \<Longrightarrow> List.member (([], [[[a]]p]) # close SG ([], [[[a]]p])) ?x7
List.member (?x # ?xs) ?y = (?x = ?y \<or> List.member ?xs ?y)
List.member [] ?y = False

goal (1 subgoal):
 1. \<And>a b aa ba. \<lbrakk>List.member SG (a, b); (aa, ba) \<in> fml_sem I (foldr (&&) a TT)\<rbrakk> \<Longrightarrow> (aa, ba) \<in> fml_sem I (foldr (||) b FF)
[PROOF STEP]
by (metis seq_MP)
[PROOF STATE]
proof (state)
this:
List.member SG ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<And>\<phi> \<nu>. List.member (([], [p]) # close SG ([], [[[a]]p])) \<phi> \<Longrightarrow> \<nu> \<in> seq_sem I \<phi>\<rbrakk> \<Longrightarrow> \<nu> \<in> seq_sem I C
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
List.member SG ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7
[PROOF STEP]
show "\<nu> \<in> seq_sem I C"
[PROOF STATE]
proof (prove)
using this:
List.member SG ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7

goal (1 subgoal):
 1. \<nu> \<in> seq_sem I C
[PROOF STEP]
using sound
[PROOF STATE]
proof (prove)
using this:
List.member SG ?\<phi>7 \<Longrightarrow> ?\<nu>7 \<in> seq_sem I ?\<phi>7
sound (SG, C)

goal (1 subgoal):
 1. \<nu> \<in> seq_sem I C
[PROOF STEP]
by (metis UNIV_eq_I \<open>is_interp I\<close> iso_tuple_UNIV_I soundD_mem)
[PROOF STATE]
proof (state)
this:
\<nu> \<in> seq_sem I C

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
sound (([], [p]) # close SG ([], [[[a]]p]), C)

goal (5 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i C a p. \<lbrakk>SG ! i = ([], [[[a]]p]); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, G))
 3. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 4. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 5. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
sound (([], [p]) # close SG ([], [[[a]]p]), C)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
sound (([], [p]) # close SG ([], [[[a]]p]), C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, G))
[PROOF STEP]
by(auto simp add: eq Box_def)
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, G))

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_CloseId SG i j k C)
[PROOF STATE]
proof (state)
this:
fst (SG ! i) ! j = snd (SG ! i) ! k
j < length (fst (SG ! i))
k < length (snd (SG ! i))
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume match:"fst (SG ! i) ! j = snd (SG ! i) ! k"
[PROOF STATE]
proof (state)
this:
fst (SG ! i) ! j = snd (SG ! i) ! k

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume jL:"j < length (fst (SG ! i))"
[PROOF STATE]
proof (state)
this:
j < length (fst (SG ! i))

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume kL:"k < length (snd (SG ! i))"
[PROOF STATE]
proof (state)
this:
k < length (snd (SG ! i))

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume iL:"i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
i < length (fst (SG, C))
[PROOF STEP]
have iL:"i < length (SG)"
[PROOF STATE]
proof (prove)
using this:
i < length (fst (SG, C))

goal (1 subgoal):
 1. i < length SG
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
i < length SG

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
obtain \<Gamma> \<Delta> where SG_dec:"(\<Gamma>, \<Delta>) = SG ! i"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. (\<And>\<Gamma> \<Delta>. (\<Gamma>, \<Delta>) = SG ! i \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
using prod.collapse
[PROOF STATE]
proof (prove)
using this:
(fst ?prod, snd ?prod) = ?prod

goal (1 subgoal):
 1. (\<And>\<Gamma> \<Delta>. (\<Gamma>, \<Delta>) = SG ! i \<Longrightarrow> thesis) \<Longrightarrow> thesis
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
(\<Gamma>, \<Delta>) = SG ! i

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have j\<Gamma>:"j < length \<Gamma>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. j < length \<Gamma>
[PROOF STEP]
using SG_dec jL
[PROOF STATE]
proof (prove)
using this:
(\<Gamma>, \<Delta>) = SG ! i
j < length (fst (SG ! i))

goal (1 subgoal):
 1. j < length \<Gamma>
[PROOF STEP]
by (metis fst_conv)
[PROOF STATE]
proof (state)
this:
j < length \<Gamma>

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have k\<Delta>:"k < length \<Delta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. k < length \<Delta>
[PROOF STEP]
using SG_dec kL
[PROOF STATE]
proof (prove)
using this:
(\<Gamma>, \<Delta>) = SG ! i
k < length (snd (SG ! i))

goal (1 subgoal):
 1. k < length \<Delta>
[PROOF STEP]
by (metis snd_conv)
[PROOF STATE]
proof (state)
this:
k < length \<Delta>

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "\<And>I \<nu>. is_interp I \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT) \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
proof -
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
fix I::"('sf,'sc,'sz)interp" and \<nu>::"'sz state"
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
assume good:"is_interp I"
[PROOF STATE]
proof (state)
this:
is_interp I

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
assume \<Gamma>_sem:"\<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)"
[PROOF STATE]
proof (state)
this:
\<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
have mem:"List.member \<Gamma> (\<Gamma> ! j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. List.member \<Gamma> (\<Gamma> ! j)
[PROOF STEP]
using j\<Gamma> nth_member
[PROOF STATE]
proof (prove)
using this:
j < length \<Gamma>
?n < length ?L \<Longrightarrow> List.member ?L (?L ! ?n)

goal (1 subgoal):
 1. List.member \<Gamma> (\<Gamma> ! j)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
List.member \<Gamma> (\<Gamma> ! j)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
have mem2:"List.member \<Delta> (\<Delta> ! k)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. List.member \<Delta> (\<Delta> ! k)
[PROOF STEP]
using k\<Delta> nth_member
[PROOF STATE]
proof (prove)
using this:
k < length \<Delta>
?n < length ?L \<Longrightarrow> List.member ?L (?L ! ?n)

goal (1 subgoal):
 1. List.member \<Delta> (\<Delta> ! k)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
List.member \<Delta> (\<Delta> ! k)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
have "\<nu> \<in> fml_sem I (\<Gamma> ! j)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (\<Gamma> ! j)
[PROOF STEP]
using \<Gamma>_sem mem
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)
List.member \<Gamma> (\<Gamma> ! j)

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (\<Gamma> ! j)
[PROOF STEP]
using and_foldl_sem
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)
List.member \<Gamma> (\<Gamma> ! j)
\<lbrakk>?\<nu> \<in> fml_sem ?I (foldr (&&) ?\<Gamma> TT); List.member ?\<Gamma> ?\<phi>\<rbrakk> \<Longrightarrow> ?\<nu> \<in> fml_sem ?I ?\<phi>

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (\<Gamma> ! j)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<nu> \<in> fml_sem I (\<Gamma> ! j)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> \<in> fml_sem I (\<Gamma> ! j)
[PROOF STEP]
have "\<nu> \<in> fml_sem I (\<Delta> ! k)"
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (\<Gamma> ! j)

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (\<Delta> ! k)
[PROOF STEP]
using match SG_dec
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (\<Gamma> ! j)
fst (SG ! i) ! j = snd (SG ! i) ! k
(\<Gamma>, \<Delta>) = SG ! i

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (\<Delta> ! k)
[PROOF STEP]
by (metis fst_conv snd_conv)
[PROOF STATE]
proof (state)
this:
\<nu> \<in> fml_sem I (\<Delta> ! k)

goal (1 subgoal):
 1. \<And>I \<nu>. \<lbrakk>is_interp I; \<nu> \<in> fml_sem I (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<nu> \<in> fml_sem I (\<Delta> ! k)
[PROOF STEP]
show "\<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)"
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (\<Delta> ! k)

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
using mem2
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (\<Delta> ! k)
List.member \<Delta> (\<Delta> ! k)

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
using or_foldl_sem
[PROOF STATE]
proof (prove)
using this:
\<nu> \<in> fml_sem I (\<Delta> ! k)
List.member \<Delta> (\<Delta> ! k)
\<lbrakk>List.member ?\<Gamma> ?\<phi>; ?\<nu> \<in> fml_sem ?I ?\<phi>\<rbrakk> \<Longrightarrow> ?\<nu> \<in> fml_sem ?I (foldr (||) ?\<Gamma> FF)

goal (1 subgoal):
 1. \<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)
[PROOF STEP]
by blast
[PROOF STATE]
proof (state)
this:
\<nu> \<in> fml_sem I (foldr (||) \<Delta> FF)

goal:
No subgoals!
[PROOF STEP]
qed
[PROOF STATE]
proof (state)
this:
\<lbrakk>is_interp ?I7; ?\<nu>7 \<in> fml_sem ?I7 (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> ?\<nu>7 \<in> fml_sem ?I7 (foldr (||) \<Delta> FF)

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
\<lbrakk>is_interp ?I7; ?\<nu>7 \<in> fml_sem ?I7 (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> ?\<nu>7 \<in> fml_sem ?I7 (foldr (||) \<Delta> FF)
[PROOF STEP]
have seq_valid:"seq_valid (SG ! i)"
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>is_interp ?I7; ?\<nu>7 \<in> fml_sem ?I7 (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> ?\<nu>7 \<in> fml_sem ?I7 (foldr (||) \<Delta> FF)

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
unfolding seq_valid_def
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>is_interp ?I7; ?\<nu>7 \<in> fml_sem ?I7 (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> ?\<nu>7 \<in> fml_sem ?I7 (foldr (||) \<Delta> FF)

goal (1 subgoal):
 1. \<forall>I. is_interp I \<longrightarrow> seq_sem I (SG ! i) = UNIV
[PROOF STEP]
using SG_dec
[PROOF STATE]
proof (prove)
using this:
\<lbrakk>is_interp ?I7; ?\<nu>7 \<in> fml_sem ?I7 (foldr (&&) \<Gamma> TT)\<rbrakk> \<Longrightarrow> ?\<nu>7 \<in> fml_sem ?I7 (foldr (||) \<Delta> FF)
(\<Gamma>, \<Delta>) = SG ! i

goal (1 subgoal):
 1. \<forall>I. is_interp I \<longrightarrow> seq_sem I (SG ! i) = UNIV
[PROOF STEP]
by (metis UNIV_eq_I seq_semI')
[PROOF STATE]
proof (state)
this:
seq_valid (SG ! i)

goal (4 subgoals):
 1. \<And>SG i j k C. \<lbrakk>fst (SG ! i) ! j = snd (SG ! i) ! k; j < length (fst (SG ! i)); k < length (snd (SG ! i)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CloseId j k))
 2. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 3. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 4. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid (SG ! i)
[PROOF STEP]
show "sound (step_result (SG, C) (i, CloseId j k))"
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, CloseId j k))
[PROOF STEP]
using closeI_valid_sound[OF sound seq_valid]
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)
sound (closeI SG i, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, CloseId j k))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, CloseId j k))

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_DEAxiom_schema SG i ODE \<sigma> C )
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])
ssafe \<sigma>
osafe ODE
{Inl vid1, Inr vid1} \<inter> BVO ODE = {}
Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume isNth:"nth SG i =
  ([], [Fsubst (([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]]P pid1) \<leftrightarrow>
                ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])"
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume FA:"Fadmit \<sigma>
   (([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]]P pid1) \<leftrightarrow>
    ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))"
[PROOF STATE]
proof (state)
this:
Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume disj:"{Inl vid1, Inr vid1} \<inter> BVO ODE = {}"
[PROOF STATE]
proof (state)
this:
{Inl vid1, Inr vid1} \<inter> BVO ODE = {}

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have schem_valid:"valid (([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]] (P pid1)) \<leftrightarrow>
    ([[EvolveODE ((OProd (OSing vid1 (f1 fid1 vid1))ODE)) (p1 vid2 vid1)]]
    [[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
using DE_sys_valid[OF disj]
[PROOF STATE]
proof (prove)
using this:
valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))

goal (1 subgoal):
 1. valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume ssafe:"ssafe \<sigma>"
[PROOF STATE]
proof (state)
this:
ssafe \<sigma>

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume osafe:"osafe ODE"
[PROOF STATE]
proof (state)
this:
osafe ODE

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have subst_valid:"valid (Fsubst (([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]]P pid1) \<leftrightarrow>
                ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>)
[PROOF STEP]
apply(rule subst_fml_valid)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
 2. fsafe ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
 3. ssafe \<sigma>
 4. valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
apply(rule FA)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. fsafe ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
 2. ssafe \<sigma>
 3. valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fsafe ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
using disj
[PROOF STATE]
proof (prove)
using this:
{Inl vid1, Inr vid1} \<inter> BVO ODE = {}

goal (1 subgoal):
 1. fsafe ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
by(auto simp add: f1_def Box_def p1_def P_def Equiv_def Or_def expand_singleton osafe, induction ODE, auto)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ssafe \<sigma>
 2. valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ssafe \<sigma>
[PROOF STEP]
by (rule ssafe)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1))
[PROOF STEP]
by (rule schem_valid)
[PROOF STATE]
proof (state)
this:
valid (Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>)

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "0 \<le> i"
[PROOF STATE]
proof (state)
this:
0 \<le> i

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "seq_valid ([], [(Fsubst (([[EvolveODE (OProd  (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]]P pid1) \<leftrightarrow>
                ([[EvolveODE (OProd  (OSing vid1 (f1 fid1 vid1))ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>)])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. seq_valid ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])
[PROOF STEP]
apply(rule fml_seq_valid)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>)
[PROOF STEP]
by(rule subst_valid)
[PROOF STATE]
proof (state)
this:
seq_valid ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])
[PROOF STEP]
have seq_valid:"seq_valid (SG ! i)"
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
using isNth
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])
SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
by auto
  \<comment> \<open>\<open>i0 iL\<close>\<close>
[PROOF STATE]
proof (state)
this:
seq_valid (SG ! i)

goal (3 subgoals):
 1. \<And>SG i ODE \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)) \<sigma>]); ssafe \<sigma>; osafe ODE; {Inl vid1, Inr vid1} \<inter> BVO ODE = {}; Fadmit \<sigma> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]]P pid1 \<leftrightarrow> ([[EvolveODE (OProd (OSing vid1 (f1 fid1 vid1)) ODE) (p1 vid2 vid1)]][[DiffAssign vid1 (f1 fid1 vid1)]]P pid1)); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
 2. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 3. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid (SG ! i)
[PROOF STEP]
show ?case
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
[PROOF STEP]
using closeI_valid_sound[OF sound seq_valid]
[PROOF STATE]
proof (prove)
using this:
seq_valid (SG ! i)
sound (closeI SG i, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, DEAxiomSchema ODE \<sigma>))

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_CE SG i \<phi> \<psi> \<sigma> C)
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])
valid (\<phi> \<leftrightarrow> \<psi>)
fsafe \<phi>
fsafe \<psi>
ssafe \<sigma>
Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume isNth:"SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])"
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume valid:"valid (\<phi> \<leftrightarrow> \<psi>)"
[PROOF STATE]
proof (state)
this:
valid (\<phi> \<leftrightarrow> \<psi>)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume FA:"Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)"
[PROOF STATE]
proof (state)
this:
Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "0 \<le> i"
[PROOF STATE]
proof (state)
this:
0 \<le> i

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume fsafe1:"fsafe \<phi>"
[PROOF STATE]
proof (state)
this:
fsafe \<phi>

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume fsafe2:"fsafe \<psi>"
[PROOF STATE]
proof (state)
this:
fsafe \<psi>

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume ssafe:"ssafe \<sigma>"
[PROOF STATE]
proof (state)
this:
ssafe \<sigma>

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have schem_valid:"valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
using valid
[PROOF STATE]
proof (prove)
using this:
valid (\<phi> \<leftrightarrow> \<psi>)

goal (1 subgoal):
 1. valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
unfolding valid_def
[PROOF STATE]
proof (prove)
using this:
\<forall>I \<nu>. is_interp I \<longrightarrow> \<nu> \<in> fml_sem I (\<phi> \<leftrightarrow> \<psi>)

goal (1 subgoal):
 1. \<forall>I \<nu>. is_interp I \<longrightarrow> \<nu> \<in> fml_sem I (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
by (metis CE_holds_def CE_sound fml_sem.simps(7) iff_sem surj_pair valid_def)+
[PROOF STATE]
proof (state)
this:
valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have subst_valid:"valid (Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>)
[PROOF STEP]
apply(rule subst_fml_valid)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
 2. fsafe (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
 3. ssafe \<sigma>
 4. valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
apply(rule FA)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. fsafe (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
 2. ssafe \<sigma>
 3. valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. fsafe (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
by(auto simp add: f1_def Box_def p1_def P_def Equiv_def Or_def expand_singleton fsafe1 fsafe2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. ssafe \<sigma>
 2. valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
subgoal
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. ssafe \<sigma>
[PROOF STEP]
by (rule ssafe)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>)
[PROOF STEP]
by (rule schem_valid)
[PROOF STATE]
proof (state)
this:
valid (Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "seq_valid ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. seq_valid ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])
[PROOF STEP]
apply(rule fml_seq_valid)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>)
[PROOF STEP]
by(rule subst_valid)
[PROOF STATE]
proof (state)
this:
seq_valid ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])
[PROOF STEP]
have seq_valid:"seq_valid (SG ! i)"
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
using isNth
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])
SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
seq_valid (SG ! i)

goal (2 subgoals):
 1. \<And>SG i \<phi> \<psi> \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>) \<sigma>]); valid (\<phi> \<leftrightarrow> \<psi>); fsafe \<phi>; fsafe \<psi>; ssafe \<sigma>; Fadmit \<sigma> (InContext pid1 \<phi> \<leftrightarrow> InContext pid1 \<psi>); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
 2. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
show "sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
[PROOF STEP]
using closeI_valid_sound[OF sound seq_valid]
[PROOF STATE]
proof (prove)
using this:
sound (closeI SG i, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, CE \<phi> \<psi> \<sigma>))

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
next
[PROOF STATE]
proof (state)
goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
case (Step_CQ SG i p \<theta> \<theta>' \<sigma> C)
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])
valid (Equals \<theta> \<theta>')
dsafe \<theta>
dsafe \<theta>'
ssafe \<sigma>
Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
0 \<le> i
i < length (fst (SG, C))
sound (SG, C)

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume isNth:"nth SG  i = ([], [Fsubst (Equiv (Prop p (singleton \<theta>)) (Prop p (singleton \<theta>'))) \<sigma>])"
[PROOF STATE]
proof (state)
this:
SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume valid:"valid (Equals \<theta> \<theta>')"
[PROOF STATE]
proof (state)
this:
valid (Equals \<theta> \<theta>')

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume FA:"Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))"
[PROOF STATE]
proof (state)
this:
Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "0 \<le> i"
[PROOF STATE]
proof (state)
this:
0 \<le> i

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume "i < length (fst (SG, C))"
[PROOF STATE]
proof (state)
this:
i < length (fst (SG, C))

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume sound:"sound (SG, C)"
[PROOF STATE]
proof (state)
this:
sound (SG, C)

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume dsafe1:"dsafe \<theta>"
[PROOF STATE]
proof (state)
this:
dsafe \<theta>

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume dsafe2:"dsafe \<theta>'"
[PROOF STATE]
proof (state)
this:
dsafe \<theta>'

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
assume ssafe:"ssafe \<sigma>"
[PROOF STATE]
proof (state)
this:
ssafe \<sigma>

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have schem_valid:"valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
[PROOF STEP]
using valid
[PROOF STATE]
proof (prove)
using this:
valid (Equals \<theta> \<theta>')

goal (1 subgoal):
 1. valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
[PROOF STEP]
unfolding valid_def
[PROOF STATE]
proof (prove)
using this:
\<forall>I \<nu>. is_interp I \<longrightarrow> \<nu> \<in> fml_sem I (Equals \<theta> \<theta>')

goal (1 subgoal):
 1. \<forall>I \<nu>. is_interp I \<longrightarrow> \<nu> \<in> fml_sem I ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
[PROOF STEP]
by (metis CQ_holds_def CQ_sound fml_sem.simps(7) iff_sem surj_pair valid_def)+
[PROOF STATE]
proof (state)
this:
valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have subst_valid:"valid (Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>)
[PROOF STEP]
apply(rule subst_fml_valid)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
 2. fsafe ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
 3. ssafe \<sigma>
 4. valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
[PROOF STEP]
apply(rule FA)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. fsafe ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
 2. ssafe \<sigma>
 3. valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
[PROOF STEP]
using schem_valid ssafe
[PROOF STATE]
proof (prove)
using this:
valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
ssafe \<sigma>

goal (3 subgoals):
 1. fsafe ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
 2. ssafe \<sigma>
 3. valid ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>'))
[PROOF STEP]
by (auto simp add: f1_def Box_def p1_def P_def Equiv_def Or_def expand_singleton dsafe1 dsafe2 expand_singleton)
[PROOF STATE]
proof (state)
this:
valid (Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>)

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
have "seq_valid ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. seq_valid ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])
[PROOF STEP]
apply(rule fml_seq_valid)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. valid (Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>)
[PROOF STEP]
by(rule subst_valid)
[PROOF STATE]
proof (state)
this:
seq_valid ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
then
[PROOF STATE]
proof (chain)
picking this:
seq_valid ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])
[PROOF STEP]
have seq_valid:"seq_valid (SG ! i)"
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
using isNth
[PROOF STATE]
proof (prove)
using this:
seq_valid ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])
SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>])

goal (1 subgoal):
 1. seq_valid (SG ! i)
[PROOF STEP]
by auto
[PROOF STATE]
proof (state)
this:
seq_valid (SG ! i)

goal (1 subgoal):
 1. \<And>SG i p \<theta> \<theta>' \<sigma> C. \<lbrakk>SG ! i = ([], [Fsubst ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')) \<sigma>]); valid (Equals \<theta> \<theta>'); dsafe \<theta>; dsafe \<theta>'; ssafe \<sigma>; Fadmit \<sigma> ($\<phi> p (singleton \<theta>) \<leftrightarrow> $\<phi> p (singleton \<theta>')); 0 \<le> i; i < length (fst (SG, C)); sound (SG, C)\<rbrakk> \<Longrightarrow> sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
show "sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
using closeI_valid_sound[OF sound seq_valid]
[PROOF STATE]
proof (prove)
using this:
sound (closeI SG i, C)

goal (1 subgoal):
 1. sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))
[PROOF STEP]
by simp
[PROOF STATE]
proof (state)
this:
sound (step_result (SG, C) (i, CQ \<theta> \<theta>' \<sigma>))

goal:
No subgoals!
[PROOF STEP]
qed