reserve n for Nat,
        p,p1,p2 for Point of TOP-REAL n,
        x for Real;
reserve n,m for non zero Nat;
reserve i,j for Nat;
reserve f for PartFunc of REAL-NS m,REAL-NS n;
reserve g for PartFunc of REAL m,REAL n;
reserve h for PartFunc of REAL m,REAL;
reserve x for Point of REAL-NS m;
reserve y for Element of REAL m;
reserve X for set;

theorem Th43:
for m be non zero Nat, f be PartFunc of REAL m,REAL, p,q be Real,
    x be Element of REAL m,
    i be Nat
 st 1 <=i & i <= m
    & p <= q
    & (for h be Real st h in [. p,q .] holds reproj(i,x).h in dom f)
    & (for h be Element of REAL st h in [. p,q .] holds
          f is_partial_differentiable_in reproj(i,x).h,i) holds
ex r be Real, y be Element of REAL m st
  r in [. p,q .] & y = reproj(i,x).r
  & f/.(reproj(i,x).q) - f/.(reproj(i,x).p) = (q-p) * partdiff(f,y,i)
proof
   let m be non zero Nat,
       f be PartFunc of REAL m,REAL,
       p,q be Real,
       x be Element of REAL m,
       i be Nat;
   assume
A1: 1 <=i & i <= m & p <= q
    & (for h be Real st h in [. p,q .] holds reproj(i,x).h in dom f)
    & (for h be Element of REAL st h in [. p,q .] holds
         f is_partial_differentiable_in (reproj(i,x).h),i);
   per cases;
   suppose A2: p=q;
then A3: p in [. p,q .];
    reconsider p as Element of REAL by XREAL_0:def 1;
    reconsider y = reproj(i,x).p as Element of REAL m;
    (q-p) * partdiff(f,y,i) = 0 by A2;
    hence thesis by A3,A2;
   end;
   suppose p <> q;
    then p < q by A1,XXREAL_0:1;
then A4: ex r be Real, y be Element of REAL m st
      r in ]. p,q .[ & y =reproj(i,x).r
      & f/.(reproj(i,x).q) - f/.(reproj(i,x).p)
          = (q-p) * partdiff(f,y,i) by Th42,A1;
    ]. p,q .[ c= [. p,q .] by XXREAL_1:25;
    hence thesis by A4;
   end;
end;
