reserve X,X1,X2,Y,Y1,Y2 for set, p,x,x1,x2,y,y1,y2,z,z1,z2 for object;
reserve f,g,g1,g2,h for Function,
  R,S for Relation;
reserve e,u for object,
  A for Subset of X;

theorem
  for B being non empty functional set, f being Function
   st f = union B
  holds dom f = union the set of all  dom g where g is Element of B
      & rng f = union the set of all  rng g where g is Element of B
proof
  let B be non empty functional set, f be Function such that
A1: f = union B;
  set X = the set of all  dom g where g is Element of B;
  now
    let x be object;
    hereby
      assume x in dom f;
      then [x,f.x] in f by Th1;
      then consider g being set such that
A2:   [x,f.x] in g and
A3:   g in B by A1,TARSKI:def 4;
      reconsider g as Function by A3;
      take Z = dom g;
      thus x in Z & Z in X by A2,A3,Th1;
    end;
    given Z being set such that
A4: x in Z and
A5: Z in X;
    consider g being Element of B such that
A6: Z = dom g by A5;
    [x,g.x] in g by A4,A6,Th1;
    then [x,g.x] in f by A1,TARSKI:def 4;
    hence x in dom f by Th1;
  end;
  hence dom f = union X by TARSKI:def 4;
  set X = the set of all  rng g where g is Element of B;
  now
    let y be object;
    hereby
      assume y in rng f;
      then consider x being object such that
A7:   x in dom f & y = f.x by Def3;
      [x,y] in f by A7,Th1;
      then consider g being set such that
A8:   [x,y] in g and
A9:   g in B by A1,TARSKI:def 4;
      reconsider g as Function by A9;
      take Z = rng g;
      x in dom g & y = g.x by A8,Th1;
      hence y in Z & Z in X by A9,Def3;
    end;
    given Z being set such that
A10: y in Z and
A11: Z in X;
    consider g being Element of B such that
A12: Z = rng g by A11;
    consider x being object such that
A13: x in dom g & y = g.x by A10,A12,Def3;
    [x,y] in g by A13,Th1;
    then [x,y] in f by A1,TARSKI:def 4;
    hence y in rng f by XTUPLE_0:def 13;
  end;
  hence thesis by TARSKI:def 4;
end;
