reserve T,T1,T2,S for non empty TopSpace;
reserve p,q for Point of TOP-REAL 2;

theorem Th24:
  for X being non empty TopSpace, f1 being Function of X,R^1,a
  being Real st f1 is continuous holds ex g being Function of X,R^1 st (
  for p being Point of X,r1 being Real st f1.p=r1 holds g.p=r1+a) & g is
  continuous
proof
  let X being non empty TopSpace,f1 be Function of X,R^1,a being Real;
  defpred P[set,set] means (for r1 being Real st f1.$1=r1 holds $2=r1+a);
A1: for x being Element of X ex y being Element of REAL st P[x,y]
  proof
    reconsider r2=a as Element of REAL by XREAL_0:def 1;
    let x be Element of X;
    reconsider r1=f1.x as Element of REAL by TOPMETR:17;
    set r3 =r1+r2;
    for r1 being Real st f1.x=r1 holds r3=r1+r2;
    hence
    ex y being Element of REAL st for r1 being Real st f1.x=r1 holds y=r1 +a;
  end;
  ex f being Function of the carrier of X,REAL st for x being Element of X
  holds P[x,f.x] from FUNCT_2:sch 3(A1);
  then consider f being Function of the carrier of X,REAL such that
A2: for x being Element of X holds for r1 being Real st f1.x=r1 holds f.
  x=r1+a;
  reconsider g0=f as Function of X,R^1 by TOPMETR:17;
  assume
A3: f1 is continuous;
  for p being Point of X,V being Subset of R^1 st g0.p in V & V is open
  holds ex W being Subset of X st p in W & W is open & g0.:W c= V
  proof
    let p be Point of X,V be Subset of R^1;
    reconsider r=g0.p as Real;
    reconsider r1=f1.p as Real;
    assume g0.p in V & V is open;
    then consider r0 being Real such that
A4: r0>0 and
A5: ].r-r0,r+r0.[ c= V by FRECHET:8;
    set r4=r0;
    reconsider G1=].r1-r4,r1+r4.[ as Subset of R^1 by TOPMETR:17;
A6: r1<r1+r4 by A4,XREAL_1:29;
    then r1-r4<r1 by XREAL_1:19;
    then
A7: f1.p in G1 by A6,XXREAL_1:4;
    G1 is open by JORDAN6:35;
    then consider W1 being Subset of X such that
A8: p in W1 & W1 is open and
A9: f1.:W1 c= G1 by A3,A7,Th10;
    set W=W1;
    g0.:W c= ].r-r0,r+r0.[
    proof
      let x be object;
      assume x in g0.:W;
      then consider z being object such that
A10:  z in dom g0 and
A11:  z in W and
A12:  g0.z=x by FUNCT_1:def 6;
      reconsider pz=z as Point of X by A10;
      reconsider aa1=f1.pz as Real;
      pz in the carrier of X;
      then pz in dom f1 by FUNCT_2:def 1;
      then
A13:  f1.pz in f1.:W1 by A11,FUNCT_1:def 6;
      then r1-r4<aa1 by A9,XXREAL_1:4;
      then
A14:  (r1-r4)+a<aa1+a by XREAL_1:8;
A15:  (r1-r4)+a =r1+a-r4 .=r-r0 by A2;
      aa1<r1+r4 by A9,A13,XXREAL_1:4;
      then
A16:  (r1+r4)+a>aa1+a by XREAL_1:8;
      x=aa1+a by A2,A12;
      hence thesis by A16,A14,A15,XXREAL_1:4;
    end;
    hence thesis by A5,A8,XBOOLE_1:1;
  end;
  then
A17: g0 is continuous by Th10;
  for p being Point of X,r1 being Real st f1.p=r1 holds g0.p=r1+a
  by A2;
  hence thesis by A17;
end;
