reserve k, l, m, n, i, j for Nat,
  K, N for non empty Subset of NAT,
  Ke, Ne, Me for Subset of NAT,
  X,Y for set;
reserve f for Function of Segm n,Segm k;
reserve x,y for set;

theorem Th54:
  for F be Function,y holds rng (F|(dom F\F"{y}))=rng F\{y} & for
  x st x<>y holds (F|(dom F\F"{y}))"{x}=F"{x}
proof
  let F be Function,y;
  set D=dom F\F"{y};
A1: rng(F|D) c= rng F\{y}
  proof
    let Fx be object;
    assume Fx in rng (F|D);
    then consider x being object such that
A2: x in dom (F|D) and
A3: Fx=(F|D).x by FUNCT_1:def 3;
A4: x in dom F /\ D by A2,RELAT_1:61;
    then x in (dom F/\dom F)\F"{y} by XBOOLE_1:49;
    then not x in F"{y} by XBOOLE_0:def 5;
    then not F.x in {y} by A4,FUNCT_1:def 7;
    then
A5: not Fx in {y} by A2,A3,FUNCT_1:47;
    F.x in rng F by A4,FUNCT_1:def 3;
    then Fx in rng F by A2,A3,FUNCT_1:47;
    hence thesis by A5,XBOOLE_0:def 5;
  end;
  rng F\{y} c=rng (F|D)
  proof
    let Fx be object such that
A6: Fx in rng F\{y};
    consider x being object such that
A7: x in dom F and
A8: F.x=Fx by A6,FUNCT_1:def 3;
    not Fx in {y} by A6,XBOOLE_0:def 5;
    then not x in F"{y} by A8,FUNCT_1:def 7;
    then x in D by A7,XBOOLE_0:def 5;
    then x in dom F /\D by XBOOLE_0:def 4;
    then
A9: x in dom (F|D) by RELAT_1:61;
    then (F|D).x in rng (F|D) by FUNCT_1:def 3;
    hence thesis by A8,A9,FUNCT_1:47;
  end;
  hence rng (F|D)=rng F\{y} by A1;
  let x such that
A10: x<>y;
  now
    let z be object such that
A11: z in F"{x};
    F.z in {x} by A11,FUNCT_1:def 7;
    then F.z <> y by A10,TARSKI:def 1;
    then not F.z in {y} by TARSKI:def 1;
    then
A12: not z in F"{y} by FUNCT_1:def 7;
    z in dom F by A11,FUNCT_1:def 7;
    hence z in dom F\F"{y} by A12,XBOOLE_0:def 5;
  end;
  then F"{x} c= D;
  hence thesis by FUNCT_2:98;
end;
