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 :: COMPTS_1:1
  Z is finite-yielding & Z c= rngs F implies ex Y st Y c= doms F & Y is
  finite-yielding & F.:.:Y = Z
proof
  assume that
A1: Z is finite-yielding and
A2: Z c= rngs F;
  defpred P[object,object] means
 ex A being set, f be Function st A = $2 &  f = F.$1 & A c= (doms F).$1 &
  A is finite & f.:A = Z.$1;
A3: for i being object st i in I ex j be object st P[i,j]
  proof
    let i be object;
    reconsider f = F.i as Function;
    assume
A4: i in I;
    then rng f = (rngs F).i by Th13;
    then
A5: Z.i c= rng f by A2,A4;
    Z.i is finite by A1;
    then consider y be set such that
A6: y c= dom f & y is finite & f.:y = Z.i by A5,ORDERS_1:85;
    take y, y, f;
    thus y = y;
    thus f = F.i;
    thus thesis by A4,A6,Th14;
  end;
  consider Y be ManySortedSet of I such that
A7: for i being object st i in I holds P[i,Y.i] from PBOOLE:sch 3(A3);
  take Y;
  thus Y c= doms F
  proof
    let i be object;
    assume i in I;
     then P[i,Y.i] by A7;
    hence thesis;
  end;
  thus Y is finite-yielding
  proof
    let i be object;
    assume i in I;
     then P[i,Y.i] by A7;
    hence thesis;
  end;
  now
    let i be object;
    assume
A8: i in I;
     then P[i,Y.i] by A7;
    hence (F.:.:Y).i = Z.i by A8,PBOOLE:def 20;
  end;
  hence thesis;
end;
