reserve a,b,r for Real;
reserve A for non empty set;
reserve X,x for set;
reserve f,g,F,G for PartFunc of REAL,REAL;
reserve n for Element of NAT;

theorem Th32:
for a,b be Real,
    f be PartFunc of REAL,REAL st a<=b
    & ['a,b'] c= dom f
    & f is continuous
 holds
  ex F being PartFunc of REAL,REAL
   st ].a,b.[ c= dom F
    & (for t being Real st t in ].a,b.[ holds
           F.t = integral (f,a,t))
    & for t being Real st t in ].a,b.[ holds
      F is_differentiable_in t
    & diff (F,t) = f . t
proof
  let a,b be Real,
      f be PartFunc of REAL,REAL;
  assume A1: a<=b & ['a,b'] c= dom f & f is continuous; then
  f| ['a,b'] is continuous; then
A2: f | ['a,b'] is bounded & f is_integrable_on ['a,b ']
    by A1,INTEGRA5:10,INTEGRA5:11;
  deffunc FX(Real) = In(integral(f,a,$1),REAL);
  consider F0 be Function of REAL,REAL such that
A3: for t being Element of REAL holds F0.t = FX(t)
       from FUNCT_2:sch 4;
A4: for t being Real holds F0.t = integral(f,a,t)
  proof
    let t be Real;
    t in REAL by XREAL_0:def 1; then
    F0.t = In(integral(f,a,t),REAL) by A3;
    hence thesis;
  end;
  set F = F0 | [.a,b.];
  dom F0 = REAL by FUNCT_2:def 1; then
A5: dom F = [.a,b.] by RELAT_1:62;
  reconsider F as PartFunc of REAL,REAL;
  take F;
  thus
A6: ].a,b.[ c= dom F by A5,XXREAL_1:25;
  thus
A7: for t be Real st t in ].a,b.[ holds F.t = integral(f,a,t)
   proof
     let t be Real;
     assume A8: t in ].a,b.[;
     ].a,b.[ c= [.a,b.] by XXREAL_1:25;
     hence F.t = F0.t by FUNCT_1:49,A8
               .= integral(f,a,t) by A4;
   end;
   let t be Real;
   assume A9: t in ].a,b.[;
   ].a,b.[ c= [.a,b.] by XXREAL_1:25; then
   t in [.a,b.] by A9; then
   t in ['a,b'] by A1,INTEGRA5:def 3; then
   f is_continuous_in t by A1;
   hence F is_differentiable_in t
    & diff (F,t) = f . t by A1,A2,A7,A6,A9,INTEGRA6:28;
end;
