
theorem Th12:
  for f,g being Function holds rng(f+*g)=f.:(dom f\dom g) \/ rng g
proof
  let f,g be Function;
  thus rng(f+*g)c=f.:(dom f\dom g) \/ rng g
  proof
    let y be object;
    assume y in rng(f+*g);
    then consider x being object such that
A1: x in dom(f+*g) and
A2: (f+*g).x = y by FUNCT_1:def 3;
    per cases;
    suppose
A3:   x in dom g;
      then y = g.x by A2,FUNCT_4:13;
      then y in rng g by A3,FUNCT_1:def 3;
      hence thesis by XBOOLE_0:def 3;
    end;
    suppose
A4:   not x in dom g;
      x in dom f \/ dom g by A1,FUNCT_4:def 1;
      then x in dom f by A4,XBOOLE_0:def 3;
      then
A5:   x in dom f \ dom g by A4,XBOOLE_0:def 5;
      y = f.x by A2,A4,FUNCT_4:11;
      then y in f.:(dom f \ dom g) by A5,FUNCT_1:def 6;
      hence thesis by XBOOLE_0:def 3;
    end;
  end;
  let y be object;
  assume
A6: y in f.:(dom f\dom g) \/ rng g;
  per cases by A6,XBOOLE_0:def 3;
  suppose
    y in f.:(dom f\dom g);
    then consider x being object such that
A7: x in dom f and
A8: x in dom f \ dom g and
A9: f.x = y by FUNCT_1:def 6;
    not x in dom g by A8,XBOOLE_0:def 5;
    then
A10: (f+*g).x = f.x by FUNCT_4:11;
    x in dom f \/ dom g by A7,XBOOLE_0:def 3;
    then x in dom(f+*g) by FUNCT_4:def 1;
    hence thesis by A9,A10,FUNCT_1:def 3;
  end;
  suppose
A11: y in rng g;
    rng g c= rng(f +* g) by FUNCT_4:18;
    hence thesis by A11;
  end;
end;
