
theorem Th10:
for f be PartFunc of REAL,REAL, I be Interval, x be Real st
 f|I is_left_differentiable_in x holds
  f is_left_differentiable_in x & Ldiff(f|I,x) = Ldiff(f,x)
proof
    let f be PartFunc of REAL,REAL, I be Interval, x be Real;
    assume
A1:  f|I is_left_differentiable_in x; then
    consider r be Real such that
A2:  r > 0 & [.x-r,x.] c= dom(f|I) by FDIFF_3:def 4;

A3: dom(f|I) c= dom f by RELAT_1:60; then
A4: [.x-r,x.] c= dom f by A2;

    for h be 0-convergent non-zero Real_Sequence,
     c be constant Real_Sequence st rng c = {x} & rng(h+c) c= dom f &
     (for n be Nat holds h.n < 0) holds
      h"(#)(f/*(h+c)-f/*c) is convergent &
      lim(h"(#)(f/*(h+c)-f/*c)) = Ldiff(f|I,x)
    proof
     let h be 0-convergent non-zero Real_Sequence,
     c be constant Real_Sequence;
     assume that
A5:   rng c = {x} and
A6:   rng(h+c) c= dom f and
A7:   for n be Nat holds h.n < 0;

     consider N be Nat such that
A8:   rng(h^\N + c) c= ].x-r,x.[ &
      (for m be Nat holds (h^\N + c).m = (h+c).(N+m)) &
      for m be Nat st N <= m holds ( |. h.m .| < r & x-r < (h+c).m < x )
        by A2,A5,A7,Lm8;
     set h1 = h^\N;

     ].x-r,x.[ c= [.x-r,x.] by XXREAL_1:37; then
A9:  rng(h1+c) c= dom(f|I) by A2,A8; then
A10:  (f|I)/*(h1+c) = (f|I)*(h1+c) by FUNCT_2:def 11;

A11:  f/*(h+c) = f*(h+c) by A6,FUNCT_2:def 11;

A12:  for n be Nat holds h1.n < 0
     proof
      let n be Nat;
      h1.n = h.(N+n) by NAT_1:def 3;
      hence h1.n < 0 by A7;
     end; then
A13: h1"(#)((f|I)/*(h1+c) - (f|I)/*c) is convergent by A1,A5,A9,FDIFF_3:def 4;

     x-r < x by A2,XREAL_1:44; then
     [.x-r,x.] = rng c \/ [.x-r,x.[ by A5,XXREAL_1:129; then
A14: rng c c= [.x-r,x.] by XBOOLE_1:7; then
A15: rng c c= dom(f|I) by A2;

A16:  rng c c= dom f by A2,A3,A14; then
A17:  f/*c = f*c by FUNCT_2:def 11;

     consider g be Real such that
A18:   for p be Real st 0 < p ex M be Nat st for l be Nat st M <= l holds
       |. (h1"(#)((f|I)/*(h1+c) - (f|I)/*c)).l - g .| < p
         by A13,SEQ_2:def 6;

     lim(h1"(#)((f|I)/*(h1+c) - (f|I)/*c)) = g by A13,A18,SEQ_2:def 7; then
A19:  Ldiff(f|I,x) = g by A1,A5,A9,A12,FDIFF_3:def 5;

A20:  now let p be Real;
      assume 0 < p; then
      consider M be Nat such that
A21:    for l be Nat st M <= l holds
        |. (h1"(#)((f|I)/*(h1+c) - (f|I)/*c)).l - g .| < p by A18;

      take K = N+M;
      hereby let l be Nat;
       assume K <= l; then
       reconsider i = l-(N+M) as Element of NAT by NAT_1:21;
       reconsider i1 = i+M as Element of NAT by ORDINAL1:def 12;

A22:   dom(h1+c) = NAT & dom c = NAT & dom(h+c) = NAT by FUNCT_2:def 1; then
       i1 in dom(h1+c) & i1 in dom c; then
       i1 in dom((f|I)*(h1+c)) & i1 in dom((f|I)*c) by A9,A15,RELAT_1:27; then
       i1 in dom((f|I)*(h1+c)) /\ dom((f|I)*c) by XBOOLE_0:def 4; then
A23:   i1 in dom( (f|I)*(h1+c) - (f|I)*c) by VALUED_1:12;

A24:   (h1+c).i1 in rng(h1+c) & c.i1 in rng c by A22,FUNCT_1:3;

A25:   l in dom(h+c) & l in dom c by A22,ORDINAL1:def 12; then
A26:   c.i1 = c.l by A22,FUNCT_1:def 10;

A27:   (h1").i1 = ((h")^\N).i1 by SEQM_3:18 .= (h").(N+i1) by NAT_1:def 3;

A28:   f.((h+c).l) = (f*(h+c)).l & f.(c.l) = (f*c).l
         by A22,ORDINAL1:def 12,FUNCT_1:13;

       l in dom(f*(h+c)) & l in dom(f*c) by A25,A6,A16,RELAT_1:27; then
       l in dom(f/*(h+c)) /\ dom(f/*c) by A11,A17,XBOOLE_0:def 4; then
A29:   l in dom( f/*(h+c) - f/*c ) by VALUED_1:12;

       (h1"(#)((f|I)/*(h1+c) - (f|I)/*c)).i1
         = (h1"(#)((f|I)*(h1+c) - (f|I)*c)).i1 by A10,A15,FUNCT_2:def 11
        .= (h1").i1 * ((f|I)*(h1+c)-(f|I)*c).i1 by VALUED_1:5
        .= (h1").i1 * ( ((f|I)*(h1+c)).i1 - ((f|I)*c).i1 ) by A23,VALUED_1:13
        .= (h1").i1 * ( (f|I).((h1+c).i1) - ((f|I)*c).i1 ) by A22,FUNCT_1:13
        .= (h1").i1 * ( (f|I).((h1+c).i1) - (f|I).(c.i1) ) by A22,FUNCT_1:13
        .= (h1").i1 * ( f.((h1+c).i1) - (f|I).(c.i1) ) by A9,A24,FUNCT_1:47
        .= (h1").i1 * ( f.((h1+c).i1) - f.(c.i1) ) by A2,A14,A24,FUNCT_1:47
        .= (h").l * ( (f*(h+c)).l - (f*c).l ) by A8,A26,A27,A28
        .= (h").l * (f/*(h+c)-f/*c).l by A11,A17,A29,VALUED_1:13
        .= (h"(#)(f/*(h+c)-f/*c)).l by VALUED_1:5;
       hence |. (h"(#)(f/*(h+c)-f/*c)).l - g .| < p by A21,NAT_1:11;
      end;
     end;
     hence h"(#)(f/*(h+c)-f/*c) is convergent by SEQ_2:def 6;
     hence lim(h"(#)(f/*(h+c)-f/*c)) = Ldiff(f|I,x) by A19,A20,SEQ_2:def 7;
    end;
    hence f is_left_differentiable_in x &
     Ldiff(f,x) = Ldiff(f|I,x) by A2,A4,FDIFF_3:9;
end;
