[STATEMENT]
lemma J_rel_coind_ind:
  "\<lbrakk>\<forall>x y. R2 x y \<longrightarrow> (f x y \<in> F1in (Collect (case_prod R1)) (Collect (case_prod R2)) (Collect (case_prod R3)) \<and>
                               F1map fst fst fst (f x y) = dtor1 x \<and>
                               F1map snd snd snd (f x y) = dtor1 y);
   \<forall>x y. R3 x y \<longrightarrow> (g x y \<in> F2in (Collect (case_prod R1)) (Collect (case_prod R2)) (Collect (case_prod R3)) \<and>
                               F2map fst fst fst (g x y) = dtor2 x \<and>
                               F2map snd snd snd (g x y) = dtor2 y)\<rbrakk> \<Longrightarrow>
  (\<forall>a\<in>JF1set z1. \<forall>x y. R2 x y \<and> z1 = unfold1 (case_prod f) (case_prod g) (x, y) \<longrightarrow> R1 (fst a) (snd a)) \<and>
  (\<forall>a\<in>JF2set z2. \<forall>x y. R3 x y \<and> z2 = unfold2 (case_prod f) (case_prod g) (x, y) \<longrightarrow> R1 (fst a) (snd a))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y\<rbrakk> \<Longrightarrow> (\<forall>a\<in>JF1set z1. \<forall>x y. R2 x y \<and> z1 = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)) \<and> (\<forall>a\<in>JF2set z2. \<forall>x y. R3 x y \<and> z2 = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a))
[PROOF STEP]
apply (tactic \<open>rtac @{context} (rule_by_tactic @{context} (ALLGOALS (TRY o etac @{context} asm_rl))
  @{thm JFset_induct[of
  "\<lambda>a z1. \<forall>x y. R2 x y \<and> z1 = unfold1 (case_prod f) (case_prod g) (x, y) \<longrightarrow> R1 (fst a) (snd a)"
  "\<lambda>a z2. \<forall>x y. R3 x y \<and> z2 = unfold2 (case_prod f) (case_prod g) (x, y) \<longrightarrow> R1 (fst a) (snd a)"
  z1 z2]}) 1\<close>)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; aa \<in> F1set1 (dtor1 a)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule allI impI)+
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; aa \<in> F1set1 (dtor1 a); R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; aa \<in> F1set1 (dtor1 a); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule spec2)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>\<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; aa \<in> F1set1 (dtor1 a); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R2 (?x8 a aa x y) (?y8 a aa x y) \<longrightarrow> f (?x8 a aa x y) (?y8 a aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x8 a aa x y) (?y8 a aa x y)) = dtor1 (?x8 a aa x y) \<and> F1map snd snd snd (f (?x8 a aa x y) (?y8 a aa x y)) = dtor1 (?y8 a aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule thin_rl)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>aa \<in> F1set1 (dtor1 a); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R2 (?x8 a aa x y) (?y8 a aa x y) \<longrightarrow> f (?x8 a aa x y) (?y8 a aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x8 a aa x y) (?y8 a aa x y)) = dtor1 (?x8 a aa x y) \<and> F1map snd snd snd (f (?x8 a aa x y) (?y8 a aa x y)) = dtor1 (?y8 a aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule mp)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<And>a aa x y. \<lbrakk>aa \<in> F1set1 (dtor1 a); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R2 (?x8 a aa x y) (?y8 a aa x y)
 2. \<And>a aa x y. \<lbrakk>aa \<in> F1set1 (dtor1 a); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); f (?x8 a aa x y) (?y8 a aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x8 a aa x y) (?y8 a aa x y)) = dtor1 (?x8 a aa x y) \<and> F1map snd snd snd (f (?x8 a aa x y) (?y8 a aa x y)) = dtor1 (?y8 a aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 6. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 7. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>aa \<in> F1set1 (dtor1 a); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule CollectE conjE Collect_case_prodD[OF subsetD] rev_subsetD)+
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> F1set1 (dtor1 a) \<subseteq> F1set1 (f x y)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply hypsubst
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> F1set1 (dtor1 (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y))) \<subseteq> F1set1 (f x y)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
unfolding unfold1 F1.set_map(1) prod.case image_id id_apply
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>a aa x y. \<lbrakk>R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> F1set1 (f x y) \<subseteq> F1set1 (f x y)
 2. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule subset_refl)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule allI impI)+
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b); R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule thin_rl)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>\<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a \<in> F2set1 (dtor2 b); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule spec2)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>a \<in> F2set1 (dtor2 b); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R3 (?x42 b a x y) (?y42 b a x y) \<longrightarrow> g (?x42 b a x y) (?y42 b a x y) \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g (?x42 b a x y) (?y42 b a x y)) = dtor2 (?x42 b a x y) \<and> F2map snd snd snd (g (?x42 b a x y) (?y42 b a x y)) = dtor2 (?y42 b a x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule mp)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>b a x y. \<lbrakk>a \<in> F2set1 (dtor2 b); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R3 (?x42 b a x y) (?y42 b a x y)
 2. \<And>b a x y. \<lbrakk>a \<in> F2set1 (dtor2 b); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); g (?x42 b a x y) (?y42 b a x y) \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g (?x42 b a x y) (?y42 b a x y)) = dtor2 (?x42 b a x y) \<and> F2map snd snd snd (g (?x42 b a x y) (?y42 b a x y)) = dtor2 (?y42 b a x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 3. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 5. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 6. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>a \<in> F2set1 (dtor2 b); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule CollectE conjE Collect_case_prodD[OF subsetD] rev_subsetD)+
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> F2set1 (dtor2 b) \<subseteq> F2set1 (g x y)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply hypsubst
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> F2set1 (dtor2 (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y))) \<subseteq> F2set1 (g x y)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
unfolding unfold2 F2.set_map(1) prod.case image_id id_apply
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>b a x y. \<lbrakk>R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> F2set1 (g x y) \<subseteq> F2set1 (g x y)
 2. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule subset_refl)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
(**)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule impI allI)+
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule spec2)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>\<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R2 (?x72 a a' aa x y) (?y72 a a' aa x y) \<longrightarrow> f (?x72 a a' aa x y) (?y72 a a' aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x72 a a' aa x y) (?y72 a a' aa x y)) = dtor1 (?x72 a a' aa x y) \<and> F1map snd snd snd (f (?x72 a a' aa x y) (?y72 a a' aa x y)) = dtor1 (?y72 a a' aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule thin_rl)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R2 (?x72 a a' aa x y) (?y72 a a' aa x y) \<longrightarrow> f (?x72 a a' aa x y) (?y72 a a' aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x72 a a' aa x y) (?y72 a a' aa x y)) = dtor1 (?x72 a a' aa x y) \<and> F1map snd snd snd (f (?x72 a a' aa x y) (?y72 a a' aa x y)) = dtor1 (?y72 a a' aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule mp)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R2 (?x72 a a' aa x y) (?y72 a a' aa x y)
 2. \<And>a a' aa x y. \<lbrakk>a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); f (?x72 a a' aa x y) (?y72 a a' aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x72 a a' aa x y) (?y72 a a' aa x y)) = dtor1 (?x72 a a' aa x y) \<and> F1map snd snd snd (f (?x72 a a' aa x y) (?y72 a a' aa x y)) = dtor1 (?y72 a a' aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule CollectE conjE)+
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>a' \<in> F1set2 (dtor1 a); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>a' \<in> F1set2 (dtor1 (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y))); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
unfolding unfold1 F1.set_map(2) prod.case image_id id_apply
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y. \<lbrakk>a' \<in> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) ` F1set2 (f x y); aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule imageE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); \<forall>x y. R2 x y \<and> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule allE mp)+
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> R2 (?x93 a a' aa x y xa) (?y95 a a' aa x y xa) \<and> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x93 a a' aa x y xa, ?y95 a a' aa x y xa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> R2 (?x93 a a' aa x y xa) (?y95 a a' aa x y xa)
 2. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x93 a a' aa x y xa, ?y95 a a' aa x y xa)
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule Collect_case_prodD[OF subsetD])
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> ?x102 a a' aa x y xa \<in> F1set2 (f x y)
 2. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst (?x102 a a' aa x y xa), snd (?x102 a a' aa x y xa))
 3. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 4. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 5. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a a' aa x y xa. \<lbrakk>aa \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set2 (f x y)\<rbrakk> \<Longrightarrow> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst xa, snd xa)
 2. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule arg_cong[OF surjective_pairing])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
(**)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)\<rbrakk> \<Longrightarrow> \<forall>x y. R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule impI allI)+
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y \<and> a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule spec2)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>\<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R2 (?x115 a b' aa x y) (?y115 a b' aa x y) \<longrightarrow> f (?x115 a b' aa x y) (?y115 a b' aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x115 a b' aa x y) (?y115 a b' aa x y)) = dtor1 (?x115 a b' aa x y) \<and> F1map snd snd snd (f (?x115 a b' aa x y) (?y115 a b' aa x y)) = dtor1 (?y115 a b' aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule thin_rl)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R2 (?x115 a b' aa x y) (?y115 a b' aa x y) \<longrightarrow> f (?x115 a b' aa x y) (?y115 a b' aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x115 a b' aa x y) (?y115 a b' aa x y)) = dtor1 (?x115 a b' aa x y) \<and> F1map snd snd snd (f (?x115 a b' aa x y) (?y115 a b' aa x y)) = dtor1 (?y115 a b' aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule mp)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R2 (?x115 a b' aa x y) (?y115 a b' aa x y)
 2. \<And>a b' aa x y. \<lbrakk>b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); f (?x115 a b' aa x y) (?y115 a b' aa x y) \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f (?x115 a b' aa x y) (?y115 a b' aa x y)) = dtor1 (?x115 a b' aa x y) \<and> F1map snd snd snd (f (?x115 a b' aa x y) (?y115 a b' aa x y)) = dtor1 (?y115 a b' aa x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule CollectE conjE)+
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>b' \<in> F1set3 (dtor1 a); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; a = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>b' \<in> F1set3 (dtor1 (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y))); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
unfolding unfold1 F1.set_map(3) prod.case image_id id_apply
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y. \<lbrakk>b' \<in> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) ` F1set3 (f x y); aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule imageE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); \<forall>x y. R3 x y \<and> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst aa) (snd aa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> R1 (fst aa) (snd aa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule allE mp)+
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> R3 (?x136 a b' aa x y xa) (?y138 a b' aa x y xa) \<and> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x136 a b' aa x y xa, ?y138 a b' aa x y xa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> R3 (?x136 a b' aa x y xa) (?y138 a b' aa x y xa)
 2. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x136 a b' aa x y xa, ?y138 a b' aa x y xa)
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule Collect_case_prodD[OF subsetD])
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> ?x145 a b' aa x y xa \<in> F1set3 (f x y)
 2. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst (?x145 a b' aa x y xa), snd (?x145 a b' aa x y xa))
 3. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 4. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>a b' aa x y xa. \<lbrakk>aa \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R2 x y; F1map fst fst fst (f x y) = dtor1 x; F1map snd snd snd (f x y) = dtor1 y; F1set1 (f x y) \<subseteq> {(x, y). R1 x y}; F1set2 (f x y) \<subseteq> {(x, y). R2 x y}; F1set3 (f x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F1set3 (f x y)\<rbrakk> \<Longrightarrow> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst xa, snd xa)
 2. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule arg_cong[OF surjective_pairing])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
(**)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule impI allI)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule thin_rl)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>\<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule spec2)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R3 (?x160 b a' a x y) (?y160 b a' a x y) \<longrightarrow> g (?x160 b a' a x y) (?y160 b a' a x y) \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g (?x160 b a' a x y) (?y160 b a' a x y)) = dtor2 (?x160 b a' a x y) \<and> F2map snd snd snd (g (?x160 b a' a x y) (?y160 b a' a x y)) = dtor2 (?y160 b a' a x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule mp)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>b a' a x y. \<lbrakk>a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R3 (?x160 b a' a x y) (?y160 b a' a x y)
 2. \<And>b a' a x y. \<lbrakk>a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); g (?x160 b a' a x y) (?y160 b a' a x y) \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g (?x160 b a' a x y) (?y160 b a' a x y)) = dtor2 (?x160 b a' a x y) \<and> F2map snd snd snd (g (?x160 b a' a x y) (?y160 b a' a x y)) = dtor2 (?y160 b a' a x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule CollectE conjE)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>a' \<in> F2set2 (dtor2 b); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>a' \<in> F2set2 (dtor2 (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y))); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
unfolding unfold2 F2.set_map(2) prod.case image_id id_apply
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y. \<lbrakk>a' \<in> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) ` F2set2 (g x y); a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule imageE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set a'; \<forall>x y. R2 x y \<and> a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; a' = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); \<forall>x y. R2 x y \<and> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule allE mp)+
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> R2 (?x179 b a' a x y xa) (?y181 b a' a x y xa) \<and> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x179 b a' a x y xa, ?y181 b a' a x y xa)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> R2 (?x179 b a' a x y xa) (?y181 b a' a x y xa)
 2. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x179 b a' a x y xa, ?y181 b a' a x y xa)
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule Collect_case_prodD[OF subsetD])
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> ?x188 b a' a x y xa \<in> F2set2 (g x y)
 2. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst (?x188 b a' a x y xa), snd (?x188 b a' a x y xa))
 3. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b a' a x y xa. \<lbrakk>a \<in> JF1set (unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set2 (g x y)\<rbrakk> \<Longrightarrow> unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold1 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst xa, snd xa)
 2. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule arg_cong[OF surjective_pairing])
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
(**)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)\<rbrakk> \<Longrightarrow> \<forall>x y. R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (rule impI allI)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y \<and> b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>\<forall>x y. R2 x y \<longrightarrow> f x y \<in> F1in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F1map fst fst fst (f x y) = dtor1 x \<and> F1map snd snd snd (f x y) = dtor1 y; \<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule thin_rl)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>\<forall>x y. R3 x y \<longrightarrow> g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y; b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule spec2)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); R3 (?x203 b b' a x y) (?y203 b b' a x y) \<longrightarrow> g (?x203 b b' a x y) (?y203 b b' a x y) \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g (?x203 b b' a x y) (?y203 b b' a x y)) = dtor2 (?x203 b b' a x y) \<and> F2map snd snd snd (g (?x203 b b' a x y) (?y203 b b' a x y)) = dtor2 (?y203 b b' a x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (drule mp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b b' a x y. \<lbrakk>b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y)\<rbrakk> \<Longrightarrow> R3 (?x203 b b' a x y) (?y203 b b' a x y)
 2. \<And>b b' a x y. \<lbrakk>b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); g (?x203 b b' a x y) (?y203 b b' a x y) \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g (?x203 b b' a x y) (?y203 b b' a x y)) = dtor2 (?x203 b b' a x y) \<and> F2map snd snd snd (g (?x203 b b' a x y) (?y203 b b' a x y)) = dtor2 (?y203 b b' a x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); g x y \<in> F2in {(x, y). R1 x y} {(x, y). R2 x y} {(x, y). R3 x y} \<and> F2map fst fst fst (g x y) = dtor2 x \<and> F2map snd snd snd (g x y) = dtor2 y\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule CollectE conjE)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>b' \<in> F2set3 (dtor2 b); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; b = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y); F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>b' \<in> F2set3 (dtor2 (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y))); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
unfolding unfold2 F2.set_map(3) prod.case image_id id_apply
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y. \<lbrakk>b' \<in> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) ` F2set3 (g x y); a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule imageE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set b'; \<forall>x y. R3 x y \<and> b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; b' = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (tactic \<open>hyp_subst_tac @{context} 1\<close>)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); \<forall>x y. R3 x y \<and> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (x, y) \<longrightarrow> R1 (fst a) (snd a); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> R1 (fst a) (snd a)
[PROOF STEP]
apply (erule allE mp)+
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> R3 (?x222 b b' a x y xa) (?y224 b b' a x y xa) \<and> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x222 b b' a x y xa, ?y224 b b' a x y xa)
[PROOF STEP]
apply (rule conjI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> R3 (?x222 b b' a x y xa) (?y224 b b' a x y xa)
 2. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (?x222 b b' a x y xa, ?y224 b b' a x y xa)
[PROOF STEP]
apply (erule Collect_case_prodD[OF subsetD])
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> ?x231 b b' a x y xa \<in> F2set3 (g x y)
 2. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst (?x231 b b' a x y xa), snd (?x231 b b' a x y xa))
[PROOF STEP]
apply assumption
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>b b' a x y xa. \<lbrakk>a \<in> JF2set (unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa); R3 x y; F2map fst fst fst (g x y) = dtor2 x; F2map snd snd snd (g x y) = dtor2 y; F2set1 (g x y) \<subseteq> {(x, y). R1 x y}; F2set2 (g x y) \<subseteq> {(x, y). R2 x y}; F2set3 (g x y) \<subseteq> {(x, y). R3 x y}; xa \<in> F2set3 (g x y)\<rbrakk> \<Longrightarrow> unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) xa = unfold2 (\<lambda>(x, y). f x y) (\<lambda>(x, y). g x y) (fst xa, snd xa)
[PROOF STEP]
apply (rule arg_cong[OF surjective_pairing])
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done