[STATEMENT]
lemma ramsey: "
  \<forall>(s::nat) (r::nat) (YY::'a set) (f::'a set \<Rightarrow> nat).
  infinite YY
  \<and> (\<forall>X. X \<subseteq> YY \<and> finite X \<and> card X = r \<longrightarrow> f X < s)
  \<longrightarrow> (\<exists>Y' t'.
  Y' \<subseteq> YY
  \<and> infinite Y'
  \<and> t' < s
  \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = r \<longrightarrow> f X = t'))"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>s r YY f. infinite YY \<and> (\<forall>X. X \<subseteq> YY \<and> finite X \<and> card X = r \<longrightarrow> f X < s) \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = r \<longrightarrow> f X = t'))
[PROOF STEP]
apply(simp add: part_def[symmetric] del: ex_simps)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<forall>s r YY f. infinite YY \<and> part r s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = r \<longrightarrow> f X = t'))
[PROOF STEP]
apply(rule, rule, rule_tac nat.induct)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r. \<forall>YY f. infinite YY \<and> part 0 s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = 0 \<longrightarrow> f X = t'))
 2. \<And>s r nat. \<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')) \<Longrightarrow> \<forall>YY f. infinite YY \<and> part (Suc nat) s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t'))
[PROOF STEP]
apply(intro allI impI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r YY f. infinite YY \<and> part 0 s YY f \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = 0 \<longrightarrow> f X = t')
 2. \<And>s r nat. \<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')) \<Longrightarrow> \<forall>YY f. infinite YY \<and> part (Suc nat) s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t'))
[PROOF STEP]
apply(rule_tac x="YY" in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r YY f. infinite YY \<and> part 0 s YY f \<Longrightarrow> \<exists>t'. YY \<subseteq> YY \<and> infinite YY \<and> t' < s \<and> (\<forall>X. X \<subseteq> YY \<and> finite X \<and> card X = 0 \<longrightarrow> f X = t')
 2. \<And>s r nat. \<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')) \<Longrightarrow> \<forall>YY f. infinite YY \<and> part (Suc nat) s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t'))
[PROOF STEP]
apply(rule_tac x="f {}" in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r YY f. infinite YY \<and> part 0 s YY f \<Longrightarrow> YY \<subseteq> YY \<and> infinite YY \<and> f {} < s \<and> (\<forall>X. X \<subseteq> YY \<and> finite X \<and> card X = 0 \<longrightarrow> f X = f {})
 2. \<And>s r nat. \<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')) \<Longrightarrow> \<forall>YY f. infinite YY \<and> part (Suc nat) s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t'))
[PROOF STEP]
apply(force simp: part_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat. \<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')) \<Longrightarrow> \<forall>YY f. infinite YY \<and> part (Suc nat) s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t'))
[PROOF STEP]
apply(intro allI impI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY \<and> part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
(* now get the infinite g *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(subgoal_tac "
    \<exists>g.
    (\<forall>m::nat. let (y,Y,t) = (g m) in
    y \<in> YY \<and> y \<notin> Y
    \<and> Y \<subseteq> YY \<and> infinite Y
    \<and> t < s
    \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t))
    \<and> (\<forall>m m'.
    let (y,Y,t) = (g m) in
    let (y',Y',t') =(g (m+m'+1)) in
    y' : Y
    \<and> Y' \<subseteq> Y
    )
    ")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(cut_tac

     P = "\<lambda>gn.
     let (y,Y,t) = (gn) in
     y \<in> YY \<and> y \<notin> Y
     \<and> Y \<subseteq> YY \<and> infinite Y
     \<and> t < s
     \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
     "

     and R = "\<lambda>gn gn'.
     let (y,Y,t) = (gn) in
     let (y',Y',t') =(gn') in
     y' : Y
     \<and> Y' \<subseteq> Y
     "

     in dc)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; (\<forall>x y z. (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y) \<and> (let (y, Y, t) = y; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y) \<longrightarrow> (let (y, Y, t) = x; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y)) \<and> (\<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))) \<longrightarrow> (\<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y))\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(erule impE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> (\<forall>x y z. (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y) \<and> (let (y, Y, t) = y; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y) \<longrightarrow> (let (y, Y, t) = x; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y)) \<and> (\<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)))
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
(* 3 *)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> (\<forall>x y z. (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y) \<and> (let (y, Y, t) = y; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y) \<longrightarrow> (let (y, Y, t) = x; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y)) \<and> (\<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)))
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(intro conjI)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x y z. (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y) \<and> (let (y, Y, t) = y; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y) \<longrightarrow> (let (y, Y, t) = x; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(intro allI impI, elim conjE)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s r nat YY f x y z. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y; let (y, Y, t) = y; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> let (y, Y, t) = x; (y', Y', t') = z in y' \<in> Y \<and> Y' \<subseteq> Y
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp add: Let_def split_beta)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f x y z. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; fst y \<in> fst (snd x) \<and> fst (snd y) \<subseteq> fst (snd x); fst z \<in> fst (snd y) \<and> fst (snd z) \<subseteq> fst (snd y)\<rbrakk> \<Longrightarrow> fst z \<in> fst (snd x) \<and> fst (snd z) \<subseteq> fst (snd x)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(blast)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(subgoal_tac "\<exists>yy. yy \<in> YY")
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>yy. yy \<in> YY\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>yy. yy \<in> YY
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<exists>yy. yy \<in> YY
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>yy. yy \<in> YY\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule infinite_mem)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> infinite YY
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>yy. yy \<in> YY\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>yy. yy \<in> YY\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yy. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; yy \<in> YY\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(drule_tac x="YY - {yy}" in spec)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; \<forall>f. infinite (YY - {yy}) \<and> part nat s (YY - {yy}) f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY - {yy} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t'))\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(drule_tac x="f \<circ> insert yy" in spec)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; infinite (YY - {yy}) \<and> part nat s (YY - {yy}) (f \<circ> insert yy) \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY - {yy} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t'))\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(erule impE)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY\<rbrakk> \<Longrightarrow> infinite (YY - {yy}) \<and> part nat s (YY - {yy}) (f \<circ> insert yy)
 2. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; \<exists>Y' t'. Y' \<subseteq> YY - {yy} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t')\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY\<rbrakk> \<Longrightarrow> part nat s (YY - {yy}) (\<lambda>X. f (insert yy X))
 2. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; \<exists>Y' t'. Y' \<subseteq> YY - {yy} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t')\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule part)
[PROOF STATE]
proof (prove)
goal (7 subgoals):
 1. \<And>s nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY\<rbrakk> \<Longrightarrow> infinite YY
 2. \<And>s nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY\<rbrakk> \<Longrightarrow> part (Suc nat) s YY f
 3. \<And>s nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY\<rbrakk> \<Longrightarrow> yy \<in> YY
 4. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; \<exists>Y' t'. Y' \<subseteq> YY - {yy} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t')\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 6. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 7. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption+)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yy. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; \<exists>Y' t'. Y' \<subseteq> YY - {yy} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t')\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yy Y' t'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; Y' \<subseteq> YY - {yy}; infinite Y'; t' < s; \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t'\<rbrakk> \<Longrightarrow> \<exists>x0. let (y, Y, t) = x0 in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule_tac x="(yy,Y',t')" in exI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yy Y' t'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; Y' \<subseteq> YY - {yy}; infinite Y'; t' < s; \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yy) X = t'\<rbrakk> \<Longrightarrow> let (y, Y, t) = (yy, Y', t') in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f yy Y' t'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yy \<in> YY; Y' \<subseteq> YY - {yy}; infinite Y'; t' < s; \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f (insert yy X) = t'\<rbrakk> \<Longrightarrow> yy \<notin> Y' \<and> Y' \<subseteq> YY
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(blast)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f\<rbrakk> \<Longrightarrow> \<forall>x. (let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<longrightarrow> (\<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y))
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(intro allI impI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(case_tac x)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f x a b c. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = x in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); x = (a, b, c)\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = x; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rename_tac yx b Yx tx)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx)\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(subgoal_tac "\<exists>yx'. yx' \<in> Yx")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); \<exists>yx'. yx' \<in> Yx\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx)\<rbrakk> \<Longrightarrow> \<exists>yx'. yx' \<in> Yx
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx)\<rbrakk> \<Longrightarrow> \<exists>yx'. yx' \<in> Yx
 2. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); \<exists>yx'. yx' \<in> Yx\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule infinite_mem)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx)\<rbrakk> \<Longrightarrow> infinite Yx
 2. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); \<exists>yx'. yx' \<in> Yx\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); \<exists>yx'. yx' \<in> Yx\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(drule_tac x="Yx - {yx'}" in spec)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<forall>f. infinite (Yx - {yx'}) \<and> part nat s (Yx - {yx'}) f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t'))\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(drule_tac x="f \<circ> insert yx'" in spec)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; infinite (Yx - {yx'}) \<and> part nat s (Yx - {yx'}) (f \<circ> insert yx') \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t'))\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(erule impE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx\<rbrakk> \<Longrightarrow> infinite (Yx - {yx'}) \<and> part nat s (Yx - {yx'}) (f \<circ> insert yx')
 2. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; b \<in> YY \<and> b \<notin> Yx \<and> Yx \<subseteq> YY \<and> infinite Yx \<and> tx < s \<and> (\<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx); yx = (b, Yx, tx); yx' \<in> Yx\<rbrakk> \<Longrightarrow> part nat s (Yx - {yx'}) (\<lambda>X. f (insert yx' X))
 2. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> part nat s (Yx - {yx'}) (\<lambda>X. f (insert yx' X))
 2. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule part)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> infinite Yx
 2. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> part (Suc nat) s Yx f
 3. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> yx' \<in> Yx
 4. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 6. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption+)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> part (Suc nat) s Yx f
 2. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> yx' \<in> Yx
 3. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule part_subset)
[PROOF STATE]
proof (prove)
goal (6 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> part (Suc nat) s (?YY132 s nat YY f yx b Yx tx yx') f
 2. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> Yx \<subseteq> ?YY132 s nat YY f yx b Yx tx yx'
 3. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> yx' \<in> Yx
 4. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 6. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> Yx \<subseteq> YY
 2. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> yx' \<in> Yx
 3. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 5. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; yx = (b, Yx, tx); yx' \<in> Yx; b \<in> YY; b \<notin> Yx; Yx \<subseteq> YY; infinite Yx; tx < s; \<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx\<rbrakk> \<Longrightarrow> yx' \<in> Yx
 2. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 4. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; \<exists>Y' t'. Y' \<subseteq> Yx - {yx'} \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t')\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx' Y' t'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; Y' \<subseteq> Yx - {yx'}; infinite Y'; t' < s; \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t'\<rbrakk> \<Longrightarrow> \<exists>y. (let (y, Y, t) = y in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (ya, Y, t) = yx; (y', Y', t') = y in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule_tac x="(yx',Y',t')" in exI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f yx b Yx tx yx' Y' t'. \<lbrakk>infinite YY; part (Suc nat) s YY f; let (y, Y, t) = yx in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); yx = (b, Yx, tx); yx' \<in> Yx; Y' \<subseteq> Yx - {yx'}; infinite Y'; t' < s; \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert yx') X = t'\<rbrakk> \<Longrightarrow> (let (y, Y, t) = (yx', Y', t') in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (let (y, Y, t) = yx; (y', Y', t') = (yx', Y', t') in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f yx b Yx tx yx' Y' t'. \<lbrakk>infinite YY; part (Suc nat) s YY f; b \<in> YY \<and> b \<notin> Yx \<and> Yx \<subseteq> YY \<and> infinite Yx \<and> tx < s \<and> (\<forall>X. X \<subseteq> Yx \<and> finite X \<and> card X = nat \<longrightarrow> f (insert b X) = tx); yx = (b, Yx, tx); yx' \<in> Yx; Y' \<subseteq> Yx - {yx'}; infinite Y'; t' < s; \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f (insert yx' X) = t'\<rbrakk> \<Longrightarrow> yx' \<in> YY \<and> yx' \<notin> Y' \<and> Y' \<subseteq> YY \<and> Y' \<subseteq> Yx
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 3. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(blast)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>fa. (\<forall>n. let (y, Y, t) = fa n in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>n m. let (y, Y, t) = fa n; (y', Y', t') = fa (n + m + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)
 2. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<exists>g. (\<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t)) \<and> (\<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(subgoal_tac "\<exists>s'. s' < s \<and> infinite {n. (\<lambda>n. let (y,Y,t) = g n in t) n = s'}")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(subgoal_tac "\<exists>s' \<in> ((\<lambda>n. let (Y, y, t) = g n in t) ` UNIV). infinite {n : UNIV. (let (Y, y, t) = g n in t) = s'}")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule infinite_dom_finite_rng)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> infinite UNIV
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> finite (range (\<lambda>n. let (Y, y, t) = g n in t))
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 4. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> finite (range (\<lambda>n. let (Y, y, t) = g n in t))
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp (no_asm) add: finite_nat_iff_bounded)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> \<exists>k. range (\<lambda>x. case g x of (Y, y, t) \<Rightarrow> t) \<subseteq> {..<k}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule_tac x=s in exI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y\<rbrakk> \<Longrightarrow> range (\<lambda>x. case g x of (Y, y, t) \<Rightarrow> t) \<subseteq> {..<s}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; x \<in> range (\<lambda>x. case g x of (Y, y, t) \<Rightarrow> t)\<rbrakk> \<Longrightarrow> x \<in> {..<s}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp add: image_iff)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); \<exists>xa. x = (case g xa of (Y, y, t) \<Rightarrow> t)\<rbrakk> \<Longrightarrow> x < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g x xa. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); x = (case g xa of (Y, y, t) \<Rightarrow> t)\<rbrakk> \<Longrightarrow> x < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(drule_tac x=xa in spec)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g x xa. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); x = (case g xa of (Y, y, t) \<Rightarrow> t); case g xa of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> x < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(force simp add: Let_def split_beta)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'\<in>range (\<lambda>n. let (Y, y, t) = g n in t). infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim bexE conjE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' \<in> range (\<lambda>n. let (Y, y, t) = g n in t); infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule_tac x=s' in exI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' \<in> range (\<lambda>n. let (Y, y, t) = g n in t); infinite {n \<in> UNIV. (let (Y, y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> s' < s \<and> infinite {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' \<in> range (\<lambda>x. case g x of (Y, y, t) \<Rightarrow> t); infinite {n. (case g n of (Y, y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> s' < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(simp add: image_iff)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); \<exists>x. s' = (case g x of (Y, y, t) \<Rightarrow> t); infinite {n. (case g n of (Y, y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> s' < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); infinite {n. (case g n of (Y, y, t) \<Rightarrow> t) = s'}; s' = (case g x of (Y, y, t) \<Rightarrow> t)\<rbrakk> \<Longrightarrow> s' < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(drule_tac x=x in spec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); infinite {n. (case g n of (Y, y, t) \<Rightarrow> t) = s'}; s' = (case g x of (Y, y, t) \<Rightarrow> t); case g x of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> s' < s
 2. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(force simp: Let_def split_beta)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; \<exists>s'<s. infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule_tac x="(\<lambda>n. let (y,Y,t) = g n in y) ` {n. (\<lambda>n. let (y,Y,t) = g n in t) n = s'}" in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> \<exists>t'. (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> t' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = t')
[PROOF STEP]
apply(rule_tac x=s' in exI)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
(* lift this because it is needed in later subgoals *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(subgoal_tac "inj (\<lambda>n. let (y, Y, t) = g n in y)")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> inj (\<lambda>n. let (y, Y, t) = g n in y)
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}\<rbrakk> \<Longrightarrow> inj (\<lambda>n. let (y, Y, t) = g n in y)
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(simp add: inj_on_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y) \<longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
(* minor optimisation *)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y) \<longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(subgoal_tac "\<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y\<rbrakk> \<Longrightarrow> \<forall>x y. (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y) \<longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(intro allI impI)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(subgoal_tac "x < y | x = y | y < x")
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y \<or> x = y \<or> y < x\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> x < y \<or> x = y \<or> y < x
 3. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 4. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> x < y \<or> x = y \<or> y < x
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y \<or> x = y \<or> y < x\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 4. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(arith)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y \<or> x = y \<or> y < x\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(elim disjE)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x=x in spec)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y; case g x of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y; \<forall>m'. case g x of (y, Y, t) \<Rightarrow> case g (Suc (x + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y; \<forall>y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x=y in spec)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y; \<forall>y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; case g y of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y; \<forall>y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; \<forall>m'. case g y of (ya, Y, t) \<Rightarrow> case g (Suc (y + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x < y; x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 4. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 5. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(force simp: Let_def)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); x = y\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 3. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 4. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x=y in spec)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x; case g y of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x; \<forall>m'. case g y of (ya, Y, t) \<Rightarrow> case g (Suc (y + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x; \<forall>ya. y < ya \<and> (let (y, Y, t) = g y in y) = (let (y, Y, t) = g ya in y) \<longrightarrow> y = ya\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x=x in spec)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x; \<forall>ya. y < ya \<and> (let (y, Y, t) = g y in y) = (let (y, Y, t) = g ya in y) \<longrightarrow> y = ya; case g x of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x; \<forall>ya. y < ya \<and> (let (y, Y, t) = g y in y) = (let (y, Y, t) = g ya in y) \<longrightarrow> y = ya; \<forall>m'. case g x of (y, Y, t) \<Rightarrow> case g (Suc (x + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; (case g x of (y, Y, t) \<Rightarrow> y) = (case g y of (y, Y, t) \<Rightarrow> y); y < x; y < x \<and> (let (y, Y, t) = g y in y) = (let (y, Y, t) = g x in y) \<longrightarrow> y = x\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(force simp: Let_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}\<rbrakk> \<Longrightarrow> \<forall>x y. x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y) \<longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(intro allI impI)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x=x in spec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y); case g x of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x=x in spec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y); case g x of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m'. case g x of (y, Y, t) \<Rightarrow> case g (Suc (x + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(drule_tac x="y-(Suc x)" in spec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' x y. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; x < y \<and> (let (y, Y, t) = g x in y) = (let (y, Y, t) = g y in y); case g x of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); case g x of (ya, Y, t) \<Rightarrow> case g (Suc (x + (y - Suc x))) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x = y
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(force simp: Let_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY \<and> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}) \<and> s' < s \<and> (\<forall>X. X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s')
[PROOF STEP]
apply(intro allI conjI)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'})
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> s' < s
 4. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(drule_tac x=xa in spec)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y); \<forall>f. infinite xa \<and> part nat s xa f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> xa \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t'))\<rbrakk> \<Longrightarrow> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<subseteq> YY
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'})
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> s' < s
 4. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(force simp add: Let_def split_beta)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> infinite ((\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'})
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> s' < s
 3. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(rule infinite_inj_infinite_image)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> infinite {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> inj_on (\<lambda>n. let (y, Y, t) = g n in y) {n. (let (y, Y, t) = g n in t) = s'}
 3. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> s' < s
 4. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(assumption)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> inj_on (\<lambda>n. let (y, Y, t) = g n in y) {n. (let (y, Y, t) = g n in t) = s'}
 2. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> s' < s
 3. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(simp add: inj_on_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s r nat YY f g s'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> s' < s
 2. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
(* difficult goal- need that the other members of X all occur in Ya *)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y)\<rbrakk> \<Longrightarrow> X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'} \<and> finite X \<and> card X = Suc nat \<longrightarrow> f X = s'
[PROOF STEP]
apply(intro allI impI, elim exE conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s r nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y' t'. Y' \<subseteq> YY \<and> infinite Y' \<and> t' < s \<and> (\<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. let (y, Y, t) = g m in y \<in> YY \<and> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> (f \<circ> insert y) X = t); \<forall>m m'. let (y, Y, t) = g m; (y', Y', t') = g (m + m' + 1) in y' \<in> Y \<and> Y' \<subseteq> Y; s' < s; infinite {n. (let (y, Y, t) = g n in t) = s'}; inj (\<lambda>n. let (y, Y, t) = g n in y); X \<subseteq> (\<lambda>n. let (y, Y, t) = g n in y) ` {n. (let (y, Y, t) = g n in t) = s'}; finite X; card X = Suc nat\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(simp add: subset_image_iff)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); \<exists>AA\<subseteq>{n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}. X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; finite X; card X = Suc nat\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(subgoal_tac "\<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; \<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')\<rbrakk> \<Longrightarrow> f X = s'
 2. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> \<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> \<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')
 2. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; \<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(rule not_empty_least)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> AA \<noteq> {}
 2. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; \<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; \<exists>a. a \<in> AA \<and> (\<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a')\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(case_tac "g a" rule: prod.exhaust)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a x1 x2. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (x1, x2)\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(rename_tac b)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a x1 b. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (x1, b)\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(case_tac b rule: prod.exhaust)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a x1 b x1a x2. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (x1, b); b = (x1a, x2)\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(rename_tac ya b Ya ta)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta)\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(subgoal_tac "ya : X")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X\<rbrakk> \<Longrightarrow> f X = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta)\<rbrakk> \<Longrightarrow> ya \<in> X
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta)\<rbrakk> \<Longrightarrow> ya \<in> X
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(force intro!: rev_image_eqI simp: Let_def)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(drule_tac s=X in sym)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = s'
[PROOF STEP]
apply(subgoal_tac "f X = (f \<circ> insert ya) (X - {ya})")
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = (f \<circ> insert ya) (X - {ya})\<rbrakk> \<Longrightarrow> f X = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X)\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(drule_tac x=a in spec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); case g a of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t))\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp add: Let_def)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY \<and> ya \<notin> Ya \<and> Ya \<subseteq> YY \<and> infinite Ya \<and> ta < s \<and> (\<forall>X. X \<subseteq> Ya \<and> finite X \<and> card X = nat \<longrightarrow> f (insert ya X) = ta)\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(elim exE conjE)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; \<forall>X. X \<subseteq> Ya \<and> finite X \<and> card X = nat \<longrightarrow> f (insert ya X) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(drule_tac x="X-{ya}" in spec)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; \<forall>X. X \<subseteq> Ya \<and> finite X \<and> card X = nat \<longrightarrow> f (insert ya X) = ta; \<forall>f. infinite (X - {ya}) \<and> part nat s (X - {ya}) f \<longrightarrow> (\<exists>Y'\<subseteq>X - {ya}. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t'))\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X - {ya} \<subseteq> Ya \<and> finite (X - {ya}) \<and> card (X - {ya}) = nat \<longrightarrow> f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(erule impE)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s\<rbrakk> \<Longrightarrow> X - {ya} \<subseteq> Ya \<and> finite (X - {ya}) \<and> card (X - {ya}) = nat
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s\<rbrakk> \<Longrightarrow> X - {ya} \<subseteq> Ya
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(rule)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> x \<in> Ya
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(rule)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' X AA a ya b Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(drule_tac t=X in sym)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' X AA a ya b Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA \<and> x \<noteq> ya; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp add: image_iff)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); \<exists>x\<in>AA. ya = (case g x of (y, Y, t) \<Rightarrow> y); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; (\<exists>xa\<in>AA. x = (case g xa of (y, Y, t) \<Rightarrow> y)) \<and> x \<noteq> ya; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(elim bexE exE conjE)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa xb. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; xb \<in> AA; x = (case g xb of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(rename_tac a')
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(subgoal_tac "a' \<noteq> a")
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y); a' \<noteq> a\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> a' \<noteq> a
 3. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 5. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
prefer 2
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y)\<rbrakk> \<Longrightarrow> a' \<noteq> a
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y); a' \<noteq> a\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 3. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 5. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y); a' \<noteq> a\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(drule_tac x=a in spec)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y); a' \<noteq> a; \<forall>m'. case g a of (y, Y, t) \<Rightarrow> case g (Suc (a + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(drule_tac x="a'-Suc a" in spec)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y); a' \<noteq> a; \<forall>m'. case g a of (y, Y, t) \<Rightarrow> case g (Suc (a + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); a' - Suc a \<in> AA \<longrightarrow> a \<le> a' - Suc a\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
back
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA); card ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); f ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) = f (insert ya ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA)); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA; xa \<in> AA; ya = (case g xa of (y, Y, t) \<Rightarrow> y); x \<noteq> ya; a' \<in> AA; x = (case g a' of (y, Y, t) \<Rightarrow> y); a' \<noteq> a; case g a of (y, Y, t) \<Rightarrow> case g (Suc (a + (a' - Suc a))) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y)\<rbrakk> \<Longrightarrow> x \<in> ?A615 s nat YY f g s' ((\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA) AA a ya (Ya, ta) Ya ta x
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp add: Let_def split_beta)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a'. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); fst (g a') \<noteq> fst (g xa); a' \<in> AA; x = fst (g a'); a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya\<rbrakk> \<Longrightarrow> fst (g a') \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta (fst (g a'))
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(case_tac "g a'" rule: prod.exhaust)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); fst (g a') \<noteq> fst (g xa); a' \<in> AA; x = fst (g a'); a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2)\<rbrakk> \<Longrightarrow> fst (g a') \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta (fst (g a'))
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(case_tac ba rule: prod.exhaust)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); fst (g a') \<noteq> fst (g xa); a' \<in> AA; x = fst (g a'); a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a)\<rbrakk> \<Longrightarrow> fst (g a') \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta (fst (g a'))
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(rename_tac ya' ba Ya' ta')
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); fst (g a') \<noteq> fst (g xa); a' \<in> AA; x = fst (g a'); a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a)\<rbrakk> \<Longrightarrow> fst (g a') \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta (fst (g a'))
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp add: Let_def split_beta)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); x1 \<noteq> fst (g xa); a' \<in> AA; x = x1; a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a)\<rbrakk> \<Longrightarrow> x1 \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta x1
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(drule_tac x=a' in spec)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); x1 \<noteq> fst (g xa); a' \<in> AA; x = x1; a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a); a' \<in> AA \<longrightarrow> a \<le> a'\<rbrakk> \<Longrightarrow> x1 \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta x1
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(erule impE)
[PROOF STATE]
proof (prove)
goal (5 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); x1 \<noteq> fst (g xa); a' \<in> AA; x = x1; a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a)\<rbrakk> \<Longrightarrow> a' \<in> AA
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); x1 \<noteq> fst (g xa); a' \<in> AA; x = x1; a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a); a \<le> a'\<rbrakk> \<Longrightarrow> x1 \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta x1
 3. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 5. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal (4 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x xa a' x1 x2 x1a x2a. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; s' < s; infinite {n. snd (snd (g n)) = s'}; inj (\<lambda>n. fst (g n)); finite ((\<lambda>x. fst (g x)) ` AA); card ((\<lambda>x. fst (g x)) ` AA) = Suc nat; AA \<subseteq> {n. snd (snd (g n)) = s'}; a \<in> AA; g a = (fst (g xa), Ya, ta); b = (Ya, ta); f ((\<lambda>x. fst (g x)) ` AA) = f (insert (fst (g xa)) ((\<lambda>x. fst (g x)) ` AA)); fst (g xa) \<in> YY; fst (g xa) \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; X = (\<lambda>x. fst (g x)) ` AA; xa \<in> AA; ya = fst (g xa); x1 \<noteq> fst (g xa); a' \<in> AA; x = x1; a' \<noteq> a; fst (g (Suc (a + (a' - Suc a)))) \<in> Ya \<and> fst (snd (g (Suc (a + (a' - Suc a))))) \<subseteq> Ya; g a' = (x1, x2); ba = (x1a, x2a); a \<le> a'\<rbrakk> \<Longrightarrow> x1 \<in> ?A615 s nat YY f g s' ((\<lambda>x. fst (g x)) ` AA) AA a (fst (g xa)) (Ya, ta) Ya ta x1
 2. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> ?A615 s nat YY f g s' X AA a ya b Ya ta x \<subseteq> Ya
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 4. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta x. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; x \<in> X - {ya}\<rbrakk> \<Longrightarrow> Ya \<subseteq> Ya
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(force simp add: card_Diff_singleton_if)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(subgoal_tac "ta = s'")
[PROOF STATE]
proof (prove)
goal (3 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta; ta = s'\<rbrakk> \<Longrightarrow> f (insert ya X) = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> ta = s'
 3. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (2 subgoals):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X; f X = f (insert ya X); ya \<in> YY; ya \<notin> Ya; Ya \<subseteq> YY; infinite Ya; ta < s; f (insert ya (X - {ya})) = ta\<rbrakk> \<Longrightarrow> ta = s'
 2. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, b); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = (f \<circ> insert ya) (X - {ya})
[PROOF STEP]
apply(simp)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> f X = f (insert ya X)
[PROOF STEP]
apply(rule_tac f=f in arg_cong)
[PROOF STATE]
proof (prove)
goal (1 subgoal):
 1. \<And>s nat YY f g s' X AA a ya b Ya ta. \<lbrakk>\<forall>YY f. infinite YY \<and> part nat s YY f \<longrightarrow> (\<exists>Y'\<subseteq>YY. infinite Y' \<and> (\<exists>t'<s. \<forall>X. X \<subseteq> Y' \<and> finite X \<and> card X = nat \<longrightarrow> f X = t')); infinite YY; part (Suc nat) s YY f; \<forall>m. case g m of (y, ab) \<Rightarrow> y \<in> YY \<and> (case ab of (Y, t) \<Rightarrow> y \<notin> Y \<and> Y \<subseteq> YY \<and> infinite Y \<and> t < s \<and> (\<forall>X. X \<subseteq> Y \<and> finite X \<and> card X = nat \<longrightarrow> f (insert y X) = t)); \<forall>m m'. case g m of (y, Y, t) \<Rightarrow> case g (Suc (m + m')) of (y', ab) \<Rightarrow> y' \<in> Y \<and> (case ab of (Y', t') \<Rightarrow> Y' \<subseteq> Y); s' < s; infinite {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; inj (\<lambda>n. case g n of (y, Y, t) \<Rightarrow> y); finite X; card X = Suc nat; AA \<subseteq> {n. (case g n of (y, Y, t) \<Rightarrow> t) = s'}; a \<in> AA; \<forall>a'. a' \<in> AA \<longrightarrow> a \<le> a'; g a = (ya, Ya, ta); b = (Ya, ta); ya \<in> X; (\<lambda>x. case g x of (y, Y, t) \<Rightarrow> y) ` AA = X\<rbrakk> \<Longrightarrow> X = insert ya X
[PROOF STEP]
apply(force)
[PROOF STATE]
proof (prove)
goal:
No subgoals!
[PROOF STEP]
done