 reserve x,y for Element of [.0,1.];

theorem
  0 < x < 1 & 0 < y < 1 implies
    ( #R x + AffineMap (-x, x-1)) | ].0,1.[ is increasing
  proof
      assume ZZ: 0 < x < 1 & 0 < y < 1;
      set f1 = #R x;
      set f2 = AffineMap (-x, x-1);
      reconsider Y = ].0,1.[ as open Subset of REAL;
      set f = f1 + f2;
      set A = right_open_halfline 0;
G0:   A c= dom f1 by TAYLOR_1:def 4;
      dom f1 = ].0,+infty.[ by TAYLOR_1:def 4; then
G1:   dom (f1 | A) = A by RELAT_1:62;
K2:   f2 is_differentiable_on A by FDIFF_1:26,LemmaAffine;
TR:   (f1 | A) | A = f1 | A by RELAT_1:72;
      f1 | A is_differentiable_on A
      proof
        for z being Real st z in A holds
          (f1 | A) | A is_differentiable_in z
        proof
          let z be Real;
          assume
W0:       z in A; then
          z > 0 by XXREAL_1:235; then
          consider N being Neighbourhood of z such that ::: lemma!
R1:       N c= dom f1 & ex L being LinearFunc, R being RestFunc st
          for x being Real st x in N holds f1.x - f1.z = L.(x-z) + R.(x-z)
            by FDIFF_1:def 4,TAYLOR_1:21;
          consider L being LinearFunc, R being RestFunc such that
R2:       for x being Real st x in N holds
             f1.x - f1.z = L.(x-z) + R.(x-z) by R1;
          set V = A;
          consider V1 being Neighbourhood of z such that
Wa:       V1 c= V by RCOMP_1:18,W0;
          consider N1 being Neighbourhood of z such that
FX:       N1 c= N & N1 c= V1 by RCOMP_1:17;
R4:       N1 c= dom (f1 | V) by FX,Wa,G1;
          for x being Real st x in N1 holds
            (f1 | V).x - (f1 | V).z = L.(x-z) + R.(x-z)
          proof
            let x be Real;
            assume
F1:         x in N1; then
            f1.x = (f1 | V).x & f1.z = (f1 | V).z by FUNCT_1:49,Wa,FX,W0;
            hence thesis by F1,R2,FX;
          end;
          hence thesis by TR,FDIFF_1:def 4,R4;
        end;
        hence thesis by G1,FDIFF_1:def 6;
      end; then
G2:   f1 is_differentiable_on A by INTEGRA7:5; then
g2:   f1 is_differentiable_on Y by FDIFF_1:26,XXREAL_1:247;
k2:   f2 is_differentiable_on Y by FDIFF_1:26,LemmaAffine;
      dom f2 = REAL by FUNCT_2:def 1; then
      A c= dom f1 /\ dom f2 by G0,XBOOLE_1:19; then
      A c= dom (f1 + f2) by VALUED_1:def 1; then
      f is_differentiable_on A by K2,FDIFF_1:18,G2; then
ga:   f is_differentiable_on Y by FDIFF_1:26,XXREAL_1:247;
az:   dom f = dom f1 /\ dom f2 by VALUED_1:def 1
           .= right_open_halfline 0 /\ dom f2 by TAYLOR_1:def 4
           .= right_open_halfline 0 /\ REAL by FUNCT_2:def 1
           .= right_open_halfline 0 by XBOOLE_1:28;
      for y being Real st y in Y holds 0 < diff(f,y)
      proof
        let y be Real;
        assume
Sa:     y in Y; then
Sb:     0 < y < 1 by XXREAL_1:4;
        f1 is_differentiable_in y & f2 is_differentiable_in y
          by k2,g2,Sa,FDIFF_1:9; then
H1:     diff (f,y) = diff(f1,y) + diff(f2,y) by FDIFF_1:13;
        f1 is_differentiable_in y & diff(f1,y) = x
            * (y #R (x-1)) by TAYLOR_1:21,Sb; then
        diff (f1,y) = x * y to_power (x - 1) by POWER:def 2,Sb; then
H3:     diff (f,y) = x * y to_power (x - 1) - x by H1,LemmaAffine
                  .= x * (y to_power (x - 1) - 1);
        x - 1 < 1 - 1 by ZZ,XREAL_1:9; then
        y to_power (x - 1) > y to_power 0 by POWER:40,Sb; then
        y to_power (x - 1) > 1 by POWER:24; then
        y to_power (x - 1) - 1 > 1 - 1 by XREAL_1:9;
        hence thesis by XREAL_1:129,H3,ZZ;
      end;
      hence thesis by ROLLE:9,ga,az,XXREAL_1:247;
  end;
