reserve x,y for set;

theorem Th16:
  for I1,I2 being set for A1,B1 being ManySortedSet of I1 for A2,
  B2 being ManySortedSet of I2 for A,B being ManySortedSet of I1 /\ I2 st A =
Intersect(A1, A2) & B = Intersect(B1, B2) for F being ManySortedFunction of A1,
B1 for G being ManySortedFunction of A2,B2 st for x being set st x in dom F & x
in dom G holds F.x tolerates G.x holds Intersect(F, G) is ManySortedFunction of
  A, B
proof
  let I1,I2 be set;
  let A1,B1 be ManySortedSet of I1;
  let A2,B2 be ManySortedSet of I2;
  let A,B be ManySortedSet of I1 /\ I2 such that
A1: A = Intersect(A1, A2) & B = Intersect(B1, B2);
  let F be ManySortedFunction of A1,B1;
  let G be ManySortedFunction of A2,B2 such that
A2: for x being set st x in dom F & x in dom G holds F.x tolerates G.x;
A3: dom B1 = I1 & dom B2 = I2 by PARTFUN1:def 2;
  reconsider H = Intersect(F, G) as ManySortedSet of I1 /\ I2 by Th14;
A4: dom F = I1 & dom G = I2 by PARTFUN1:def 2;
A5: dom A1 = I1 & dom A2 = I2 by PARTFUN1:def 2;
  H is ManySortedFunction of A, B
  proof
    let i be object;
    assume
A6: i in I1 /\ I2;
    then
A7: H.i = (F.i)/\(G.i) by A4,Def2;
A8: i in I2 by A6,XBOOLE_0:def 4;
    then
A9: G.i is Function of A2.i, B2.i by PBOOLE:def 15;
A10: A.i = (A1.i)/\(A2.i) & B.i = (B1.i)/\(B2.i) by A1,A5,A3,A6,Def2;
A11: i in I1 by A6,XBOOLE_0:def 4;
    then F.i is Function of A1.i, B1.i by PBOOLE:def 15;
    hence thesis by A2,A4,A11,A8,A10,A7,A9,FUNCT_2:120;
  end;
  hence thesis;
end;
