reserve X,Y,Z for set,
        x,y,z for object,
        A,B,C for Ordinal;
reserve U for Grothendieck;

theorem Th2:
  for f be Function st dom f in U & rng f c= U holds rng f in U
proof
  let f be Function such that
A1: dom f in U & rng f c= U;
  set A=dom f;
A2: U is epsilon-transitive power-closed FamUnion-closed;
  deffunc S(set)={f.$1};
  consider s be Function such that
A3:dom s = A & for X st X in A holds s.X=S(X) from FUNCT_1:sch 5;
  rng s c= U
  proof
    let y; assume y in rng s;
    then consider x such that
A4: x in dom s & s.x=y by FUNCT_1:def 3;
    reconsider x as set by TARSKI:1;
    f.x in rng f by A4,A3,FUNCT_1:def 3;
    then bool (f.x) in U by A1,A2;
    then
A5: bool bool (f.x) c= U by A2;
    S(x) c= bool (f.x) by ZFMISC_1:68;
    then S(x) in bool bool (f.x);
    then y in bool bool (f.x) by A4,A3;
    hence thesis by A5;
  end;
  then
A6: union rng s in U by A3,A1,A2;
A7: Union s c= rng f
  proof
    let y;
    assume y in Union s;
    then consider x such that
A8: x in dom s & y in s.x by CARD_5:2;
    reconsider x as set by TARSKI:1;
    s.x = S(x) by A8,A3;
    then y = f.x by A8,TARSKI:def 1;
    hence thesis by A8, A3,FUNCT_1:def 3;
  end;
  rng f c= Union s
  proof
    let fx be object;
    assume fx in rng f;
    then consider x such that
A9:   x in dom f & f.x=fx by FUNCT_1:def 3;
    reconsider x as set by A9;
    fx in S(x) = s.x by A9,A3,TARSKI:def 1;
    hence thesis by A9,A3,CARD_5:2;
  end;
  then rng f=Union s by A7;
  hence thesis by CARD_3:def 4,A6;
end;
