reserve r for Real;
reserve a, b for Real;
reserve T for non empty TopSpace;
reserve A for non empty SubSpace of T;
reserve P,Q for Subset of T,
  p for Point of T;
reserve M for non empty MetrSpace,
  p for Point of M;
reserve A for non empty SubSpace of M;
reserve F,G for Subset-Family of M;

theorem
  for f being Function of R^1,R^1 st ex a,b being Real
 st for x being Real holds f.x = a*x + b holds f is continuous
proof
  let f be Function of R^1,R^1;
  given a,b being Real such that
A1: for x being Real holds f.x = a*x + b;
  for W being Point of R^1, G being a_neighborhood of f.W ex H being
  a_neighborhood of W st f.:H c= G
  proof
    let W be Point of R^1, G be a_neighborhood of f.W;
    reconsider Y = f.W as Point of RealSpace;
A2: f.W in Int G by CONNSP_2:def 1;
    then consider Q being Subset of R^1 such that
A3: Q is open and
A4: Q c= G and
A5: f.W in Q by TOPS_1:22;
    consider r being Real such that
A6: r>0 and
A7: Ball(Y,r) c= Q by A3,A5,Th15;
    now
      per cases;
      suppose
A8:     a = 0;
        set H = [#](R^1);
        W in H;
        then W in Int H by TOPS_1:23;
        then reconsider H as a_neighborhood of W by CONNSP_2:def 1;
        for y being object holds y in {b} iff
ex x being object st x in dom f &
        x in H & y = f.x
        proof
          let y be object;
          thus y in {b} implies
          ex x being object st x in dom f & x in H & y = f.x
          proof
            assume
A9:         y in {b};
            take 0;
            dom f = the carrier of R^1 by FUNCT_2:def 1;
             then In(0,REAL) in dom f & In(0,REAL) in H;
            hence 0 in dom f & 0 in H;
            thus f.0 = 0 * 0 + b by A1,A8
              .= y by A9,TARSKI:def 1;
          end;
          given x being object such that
A10:      x in dom f and
          x in H and
A11:      y = f.x;
          reconsider x as Real by A10;
          y = 0 * x + b by A1,A8,A11
            .= b;
          hence thesis by TARSKI:def 1;
        end;
        then
A12:    f.:H = {b} by FUNCT_1:def 6;
        reconsider W9 = W as Real;
A13:    Int G c= G by TOPS_1:16;
        f.W = 0 * W9 + b by A1,A8
          .= b;
        then f.:H c= G by A2,A12,A13,ZFMISC_1:31;
        hence thesis;
      end;
      suppose
A14:    a <> 0;
        reconsider W9 = W as Point of RealSpace;
        set d = r/(2* |.a.|);
        reconsider H = Ball(W9,d) as Subset of R^1;
        H is open by Th14;
        then
A15:    Int H = H by TOPS_1:23;
        |.a.| > 0 by A14,COMPLEX1:47;
        then 2*|.a.| > 0 by XREAL_1:129;
        then W in Int H by A6,A15,TBSP_1:11,XREAL_1:139;
        then reconsider H as a_neighborhood of W by CONNSP_2:def 1;
A16:    f.:H c= Ball(Y,r)
        proof
          reconsider W99 = W9 as Real;
          let y be object;
          reconsider Y9 = Y as Real;
          assume y in f.:H;
          then consider x being object such that
A17:      x in dom f and
A18:      x in H and
A19:      y = f.x by FUNCT_1:def 6;
          reconsider x9=x as Point of RealSpace by A18;
          reconsider y9=y as Element of REAL by A17,A19,FUNCT_2:5;
          reconsider x99 = x9 as Real;
          reconsider yy=y9 as Point of RealSpace;
A20:      |.a.| > 0 by A14,COMPLEX1:47;
          dist(W9,x9) < d by A18,METRIC_1:11;
          then |.W99 - x99.| < d by Th11;
          then |.a.|*|.W99 - x99.| < |.a.|*d by A20,XREAL_1:68;
          then |.a*(W99 - x99).| < |.a.|*d by COMPLEX1:65;
          then |.(a*W99+b) - (a*x99+b).| < |.a.|*d;
          then |.Y9 - (a*x99+b).| < |.a.|*d by A1;
          then
A21:      |.Y9 - y9.| < |.a.|*d by A1,A19;
          |.a.| <> 0 by A14,ABSVALUE:2;
          then
A22:      |.a.|*d = r/2 by XCMPLX_1:92;
          r/2+r/2 = r & r/2>=0 by A6,XREAL_1:136;
          then |.Y9-y9.| < r by A21,A22,Lm2;
          then dist(Y,yy) < r by Th11;
          hence thesis by METRIC_1:11;
        end;
        Ball(Y,r) c= G by A4,A7;
        hence thesis by A16,XBOOLE_1:1;
      end;
    end;
    hence thesis;
  end;
  hence thesis by BORSUK_1:def 1;
end;
