reserve n for non zero Element of NAT;
reserve a,b,r,t for Real;
reserve
  Z for open Subset of REAL,
 y0 for VECTOR of REAL-NS n,
  G for Function of REAL-NS n,REAL-NS n;

theorem Th36:
  for f be continuous PartFunc of REAL,REAL-NS n,
      g be PartFunc of REAL,REAL-NS n st a <= b
          & dom f = [' a,b '] & dom g = [' a,b '] & Z = ]. a,b .[
          & for t be Real st t in [' a,b ']
                 holds g.t = y0+ integral(f,a,t) holds
       g is continuous & g/.a=y0 &
       g is_differentiable_on Z
       & for t be Real st t in Z holds diff(g,t) = f/.t
proof
  let f be continuous PartFunc of REAL,REAL-NS n,
      g be PartFunc of REAL,REAL-NS n;
  assume A1:a <= b & dom f = [' a,b '] & dom g = [' a,b '] & Z = ]. a,b .[
         & for t be Real st t in [' a,b '] holds g.t = y0+ integral(f,a,t);
A2: f is_integrable_on ['a,b'] by A1,Th33;
A3: f| ['a,b'] is bounded by A1,Th32;
A4: ['a,b'] = [.a,b.] by A1,INTEGRA5:def 3;
  deffunc FX(Element of REAL) = integral(f,a,$1);
  consider F0 be Function of REAL,REAL-NS n such that
A5: for x be Element of REAL
    holds F0.x = FX(x) from FUNCT_2:sch 4;
  set F = F0| ['a,b'];
A6: dom F = dom F0 /\ ['a,b'] by RELAT_1:61
         .= REAL /\ ['a,b'] by FUNCT_2:def 1
         .= ['a,b'] by XBOOLE_1:28;
A7: now let x be Real;
    assume x in [.a,b.]; then
  A8: x in ['a,b'] by A1,INTEGRA5:def 3;
  A9: x in REAL by XREAL_0:def 1;
    thus F.x = F0.x by A8,A6,FUNCT_1:47
       .= integral(f,a,x) by A5,A9;
  end;
A10: ].a,b.[ c= [.a,b.] by XXREAL_1:25;
A11: for x be Real st x in [.a,b.]
       holds F is_continuous_in x by Th34,A1,A6,A7;
A12: for x be Real st x in ].a,b.[
       holds F.x = integral(f,a,x) by A7,A10;
A13: Z c= dom F by A1,A6,A10,INTEGRA5:def 3;
A14: now let x be Real;
    assume A15: x in Z;
    then f is_continuous_in x by A10,A4,A1,NFCONT_3:def 2;
    hence F is_differentiable_in x & diff(F,x)=f/.x
       by A15,A1,A2,A3,A12,A13,INTEGR19:55;
  end;
  then for x be Real st x in Z holds F is_differentiable_in x;
  then
A16: F is_differentiable_on Z by A13,NDIFF_3:10;
  set G0 = REAL --> y0;
  set G = G0| ['a,b'];
A17: dom G = dom G0 /\ ['a,b'] by RELAT_1:61
          .= REAL /\ ['a,b']
          .= ['a,b'] by XBOOLE_1:28;
A18: now let x be Real;
    assume x in [.a,b.]; then
  A19: x in ['a,b'] by A1,INTEGRA5:def 3;
    thus G.x = G0.x by A19,A17,FUNCT_1:47
            .= y0 by XREAL_0:def 1,FUNCOP_1:7;
  end;
A20: F is continuous by A4,A6,A11,NFCONT_3:def 2;
A21: G|Z is constant; then
A22: G is_differentiable_on Z &
  for x be Real st x in Z holds (G`|Z).x = 0.(REAL-NS n)
    by A17,A1,A10,A4,NDIFF_3:20;
A23: dom g = dom F /\ dom G by A6,A17,A1;
  now let x be Element of REAL;
    assume A24: x in dom g;
  A25: x in [.a,b.] by A24,A1,INTEGRA5:def 3;
  A26: G/.x = G.x by A24,A1,A17,PARTFUN1:def 6
           .= y0 by A25,A18;
  A27: F/.x = F.x by A24,A1,A6,PARTFUN1:def 6
           .= integral(f,a,x) by A25,A7;
    thus g/.x = g.x by A24,PARTFUN1:def 6
             .= G/.x + F/.x by A26,A27,A1,A24;
  end; then
A28: g = G + F by A23,VFUNCT_1:def 1;
  thus g is continuous by A20,A28;
A29: a in ['a,b'] by A1,A4;
A30: 0.(REAL-NS n)
   =integral(f,a,a) - integral(f,a,a) by RLVECT_1:15
  .= integral(f,a,a) + integral(f,a,a) - integral(f,a,a)
     by A29,A1,Th33,A3,INTEGR19:53
  .= integral(f,a,a) + ( integral(f,a,a) - integral(f,a,a) )
     by RLVECT_1:28
  .= integral(f,a,a) + 0.(REAL-NS n) by RLVECT_1:15
  .= integral(f,a,a);
  thus g/.a = g.a by A1,A29,PARTFUN1:def 6
           .= y0+ integral(f,a,a) by A1,A29
           .= y0 by A30;
A31: g is_differentiable_on Z &
  for x be Real st x in Z holds
    (g`|Z).x = diff(G,x) + diff(F,x) by A28,A16,A22,A1,A10,A4,NDIFF_3:17;
  thus g is_differentiable_on Z by A28,A16,A22,A1,A10,A4,NDIFF_3:17;
  thus for t be Real st t in Z holds diff(g,t) = f/.t
  proof
    let t be Real;
    assume A32: t in Z;
  A33: diff(g,t) =(g`|Z).t by A31,A32,NDIFF_3:def 6
                .=diff(G,t) + diff(F,t)
                  by A28,A16,A22,A1,A10,A4,NDIFF_3:17,A32;
  A34: diff(G,t) = (G`|Z).t by A22,A32,NDIFF_3:def 6
                .= 0.(REAL-NS n) by A21,A17,A1,A10,A4,NDIFF_3:20,A32;
    thus diff(g,t) = 0.(REAL-NS n)  + f/.t by A33,A34,A14,A32
                  .= f/.t;
  end;
end;
