 reserve h,h1 for 0-convergent non-zero Real_Sequence,
         c,c1 for constant Real_Sequence;

theorem Th32:
  for a,b be Real, f,F be PartFunc of REAL,REAL st
   a <= b & [.a,b.] c= dom f & f|[.a,b.] is continuous & [.a,b.] c= dom F &
   (for x be Real st x in [.a,b.] holds F.x = integral(f,a,x)) holds
    for x be Real st x in ].a,b.[ holds
     F is_differentiable_in x & diff(F,x) = f.x
proof
    let a,b be Real, f,F be PartFunc of REAL,REAL;
    set O = ].a,b.[;
    assume that
A1:  a <= b and
A2:  [.a,b.] c= dom f and
A3:  f|[.a,b.] is continuous and
A4:  [.a,b.] c= dom F and
A5:  for x be Real st x in [.a,b.] holds F.x = integral(f,a,x);

A6:['a,b'] = [.a,b.] by A1,INTEGRA5:def 3;

A7: O c= [.a,b.] by XXREAL_1:25; then
A8: dom(F|O) = O & dom(f|O) = O by A2,A4,XBOOLE_1:1,RELAT_1:62;

    deffunc G0(Real) = In(integral(f,a,$1),REAL);
    consider G1 be Function of REAL,REAL such that
A9:  for h be Element of REAL holds G1.h=G0(h) from FUNCT_2:sch 4;
    reconsider G=G1|O as PartFunc of REAL,REAL;

    dom G1 = REAL by FUNCT_2:def 1; then
A10: dom G = O by RELAT_1:62;

A11:now let x be Real;
A12:  x is Element of REAL by XREAL_0:def 1;
     assume x in ].a,b.[; then
     G.x = G1.x by A10,FUNCT_1:47; then
     G.x = G0(x) by A9,A12;
     hence G.x = integral(f,a,x);
    end;

A13:now let x be Element of REAL;
     assume
A14:  x in dom(F|O);
     (F|O).x = F.x by A14,FUNCT_1:47;
     then (F|O).x = integral(f,a,x) by A5,A14,A7,A8;
     hence (F|O).x = G.x by A11,A8,A14;
    end;

A15: for x be Real st x in O holds G is_differentiable_in x & diff(G,x)=f.x
    proof
     let x be Real;
A16: f|O is continuous by A3,FCONT_1:16,XXREAL_1:25;
     assume
A17:  x in ]. a,b .[; then
     a < x & x < b by XXREAL_1:4; then
     a < b by XXREAL_0:2; then
A18:  inf O = a & sup O = b by XXREAL_2:28,32;

     ].a,b.[ c= dom f by A7,A2; then
A19: f is_continuous_in x by A16,A17,A18,Th6;

     f|[' a,b '] is bounded & f is_integrable_on [' a,b ']
       by A2,A3,A6,INTEGRA5:10,11;
     hence thesis by A1,A2,A10,A11,A6,A17,A19,INTEGRA6:28;
    end;
A20: F|O = G by A8,A10,A13,PARTFUN1:5;
    thus for x be Real st x in ].a,b.[ holds F is_differentiable_in x &
     diff(F,x) = f.x
    proof
     let x be Real;
     assume
A21:  x in ].a,b.[; then
A22:  G is_differentiable_in x & diff(G,x)=f.x by A15;
     hence F is_differentiable_in x by A20,A21,PDIFFEQ1:2;
     hence diff(F,x)=f.x by A20,A21,A22,PDIFFEQ1:2;
    end;
end;
