theory Monad_Commute

lemma commute_rewrite:
  assumes rewrite: "\<And>s. Q s \<Longrightarrow> f s = t s"
  assumes hold: "\<lbrace>P\<rbrace> g \<lbrace>\<lambda>x. Q\<rbrace>"
  shows  "monad_commute R t g \<Longrightarrow> monad_commute (P and Q and R) f g" apply (clarsimp simp: monad_commute_def bind_def split_def return_def) apply (drule_tac x = s in spec) apply (clarsimp simp: rewrite[symmetric]) apply (intro conjI) apply (rule set_eqI) apply (rule iffI) apply clarsimp apply (rule bexI[rotated],assumption) apply (subst rewrite) apply (rule use_valid[OF _ hold]) apply simp+ apply (erule bexI[rotated],simp) apply clarsimp apply (rule bexI[rotated],assumption) apply (subst rewrite[symmetric]) apply (rule use_valid[OF _ hold]) apply simp+ apply (erule bexI[rotated],simp) apply (intro iffI) apply clarsimp apply (rule bexI[rotated],assumption) apply simp apply (subst rewrite) apply (erule(1) use_valid[OF _ hold]) apply simp apply (clarsimp) apply (drule bspec,assumption) apply clarsimp apply (metis rewrite use_valid[OF _ hold]) done

(* Proof state trace *)
proof (prove)
goal (1 subgoal):
 1. monad_commute R t g \<Longrightarrow> monad_commute (P and Q and R) f g proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>\<forall>s. R s \<longrightarrow> (\<Union>x\<in>fst (t s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}) \<and> ((\<exists>x\<in>fst (t s). snd (g (snd x))) \<or> snd (t s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); P s; Q s; R s\<rbrakk> \<Longrightarrow> (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)}) \<and> ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>P s; Q s; R s; R s \<longrightarrow> (\<Union>x\<in>fst (t s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}) \<and> ((\<exists>x\<in>fst (t s). snd (g (snd x))) \<or> snd (t s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)}) \<and> ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)}) \<and> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> (x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})) = (x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)}))
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (3 subgoals):
 1. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})
 2. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 3. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (3 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (g s). \<exists>xa\<in>fst (f (snd x)). ab = fst xa \<and> aa = fst x \<and> bc = snd xa
 2. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 3. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (3 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f (snd (aa, bb))). ab = fst x \<and> aa = fst (aa, bb) \<and> bc = snd x
 2. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 3. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (4 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> Q (snd (aa, bb))
 2. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (t (snd (aa, bb))). ab = fst x \<and> aa = fst (aa, bb) \<and> bc = snd x
 3. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 4. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (5 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> (?r57 s aa bb ab bc, snd (aa, bb)) \<in> fst (g (?s57 s aa bb ab bc))
 2. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> P (?s57 s aa bb ab bc)
 3. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (t (snd (aa, bb))). ab = fst x \<and> aa = fst (aa, bb) \<and> bc = snd x
 4. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 5. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (3 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (t bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (t bb). ab = fst x \<and> bc = snd x
 2. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 3. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s x. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (f (snd x)). {((fst xa, fst x), snd xa)})\<rbrakk> \<Longrightarrow> x \<in> (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)})
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (g s). \<exists>xa\<in>fst (t (snd x)). ab = fst xa \<and> aa = fst x \<and> bc = snd xa
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (t (snd (aa, bb))). ab = fst x \<and> aa = fst (aa, bb) \<and> bc = snd x
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (3 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> Q (snd (aa, bb))
 2. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f (snd (aa, bb))). ab = fst x \<and> aa = fst (aa, bb) \<and> bc = snd x
 3. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (4 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> (?r80 s aa bb ab bc, snd (aa, bb)) \<in> fst (g (?s80 s aa bb ab bc))
 2. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> P (?s80 s aa bb ab bc)
 3. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f (snd (aa, bb))). ab = fst x \<and> aa = fst (aa, bb) \<and> bc = snd x
 4. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s aa bb ab bc. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (aa, bb) \<in> fst (g s); (ab, bc) \<in> fst (f bb)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f bb). ab = fst x \<and> bc = snd x
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s))\<rbrakk> \<Longrightarrow> ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)) = ((\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)) proof (prove)
goal (2 subgoals):
 1. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (2 subgoals):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); (\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s); \<not> snd (g s); (a, b) \<in> fst (g s); snd (t b)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (g s). snd (f (snd x))
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (2 subgoals):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); (\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s); \<not> snd (g s); (a, b) \<in> fst (g s); snd (t b)\<rbrakk> \<Longrightarrow> snd (f (snd (a, b)))
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (2 subgoals):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); (\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s); \<not> snd (g s); (a, b) \<in> fst (g s); snd (t b)\<rbrakk> \<Longrightarrow> snd (f b)
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (3 subgoals):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); (\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s); \<not> snd (g s); (a, b) \<in> fst (g s); snd (t b)\<rbrakk> \<Longrightarrow> Q b
 2. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); (\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s); \<not> snd (g s); (a, b) \<in> fst (g s); snd (t b)\<rbrakk> \<Longrightarrow> snd (t b)
 3. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (2 subgoals):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); (\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s); \<not> snd (g s); (a, b) \<in> fst (g s); snd (t b)\<rbrakk> \<Longrightarrow> snd (t b)
 2. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (1 subgoal):
 1. \<And>s. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); ((\<exists>x\<in>fst (f s). snd (g (snd x))) \<or> snd (f s)) = ((\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s)); (\<exists>x\<in>fst (g s). snd (f (snd x))) \<or> snd (g s)\<rbrakk> \<Longrightarrow> (\<exists>x\<in>fst (g s). snd (t (snd x))) \<or> snd (g s) proof (prove)
goal (1 subgoal):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); \<not> snd (g s); (a, b) \<in> fst (g s); snd (f b); \<forall>x\<in>fst (g s). \<not> snd (t (snd x)); \<not> snd (f s)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f s). snd (g (snd x)) proof (prove)
goal (1 subgoal):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); \<not> snd (g s); (a, b) \<in> fst (g s); snd (f b); \<not> snd (f s); \<not> snd (t (snd (a, b)))\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f s). snd (g (snd x)) proof (prove)
goal (1 subgoal):
 1. \<And>s a b. \<lbrakk>P s; Q s; R s; (\<Union>x\<in>fst (f s). \<Union>xa\<in>fst (g (snd x)). {((fst x, fst xa), snd xa)}) = (\<Union>x\<in>fst (g s). \<Union>xa\<in>fst (t (snd x)). {((fst xa, fst x), snd xa)}); \<not> snd (g s); (a, b) \<in> fst (g s); snd (f b); \<not> snd (f s); \<not> snd (t b)\<rbrakk> \<Longrightarrow> \<exists>x\<in>fst (f s). snd (g (snd x)) proof (prove)
goal:
No subgoals!