reserve I, G, H for set, i, x for object,
  A, B, M for ManySortedSet of I,
  sf, sg, sh for Subset-Family of I,
  v, w for Subset of I,
  F for ManySortedFunction of I;
reserve X, Y, Z for ManySortedSet of I;

theorem :: CQC_THE1:13
  X is finite-yielding & X c= [|Y,Z|] implies ex A, B st A is
  finite-yielding & A c= Y & B is finite-yielding & B c= Z & X c= [|A,B|]
proof
  assume that
A1: X is finite-yielding and
A2: X c= [|Y,Z|];
  defpred Q[object,object] means
 ex D,b be set st D = $2 &  D is finite & D c= Y.$1 & b is
  finite & b c= Z.$1 & X.$1 c= [:D,b:];
A3: for i being object st i in I ex j be object st Q[i,j]
  proof
    let i be object;
    assume
A4: i in I;
    then X.i c= [|Y,Z|].i by A2;
    then
A5: X.i c= [:Y.i,Z.i:] by A4,PBOOLE:def 16;
    X.i is finite by A1;
    then consider A,B being set such that
A6:   A is finite & A c= Y.i & B is finite & B c= Z.i &
      X.i c= [:A,B:] by A5,FINSET_1:13;
    thus thesis by A6;
  end;
  consider A be ManySortedSet of I such that
A7: for i being object st i in I holds Q[i,A.i] from PBOOLE:sch 3(A3);
  defpred P[object,object] means
  ex D being set st D = $2 &
   A.$1 is finite & A.$1 c= Y.$1 & D is finite & D
  c= Z.$1 & X.$1 c= [:A.$1,D:];
A8: for i being object st i in I ex j be object st P[i,j]
    proof let i be object;
     assume i in I;
      then Q[i,A.i] by A7;
     hence thesis;
    end;
  consider B be ManySortedSet of I such that
A9: for i being object st i in I holds P[i,B.i] from PBOOLE:sch 3(A8);
  take A, B;
  thus A is finite-yielding
  proof
    let i be object;
    assume i in I;
     then P[i,B.i] by A9;
    hence thesis;
  end;
  thus A c= Y
  proof
    let i be object;
    assume i in I;
     then P[i,B.i] by A9;
    hence thesis;
  end;
  thus B is finite-yielding
  proof
    let i be object;
    assume i in I;
     then P[i,B.i] by A9;
    hence thesis;
  end;
  thus B c= Z
  proof
    let i be object;
    assume i in I;
     then P[i,B.i] by A9;
    hence thesis;
  end;
  thus X c= [|A,B|]
  proof
    let i be object;
    assume
A10: i in I;
     then P[i,B.i] by A9;
    then X.i c= [:A.i,B.i:];
    hence thesis by A10,PBOOLE:def 16;
  end;
end;
