
theorem Th18:
  for m be non zero Element of NAT, I be non empty FinSequence of NAT,
      X be non empty Subset of REAL m,f be PartFunc of REAL m,REAL,
      d be Real st X is open & f = X --> d  & rng I c= Seg m
    holds
      f is_partial_differentiable_on X,I & f`partial|(X,I) is_continuous_on X
proof
  let m be non zero Element of NAT,
     I be non empty FinSequence of NAT,
     X be non empty Subset of REAL m,
     f be PartFunc of REAL m,REAL,
     d be Real;
  assume
A1: X is open & f = X --> d & rng I c= Seg m;
  for i be Element of NAT st i <= (len I)-1
     holds (PartDiffSeq(f,X,I)).i is_partial_differentiable_on X,I/.(i+1)
  proof
     let i be Element of NAT;
     assume
A2:   i <= (len I)-1;
     (len I)-1 <= len I - (0 qua Real) by XREAL_1:10;
     then
A3:   i <= (len I) by A2,XXREAL_0:2;
     per cases;
      suppose i=0;
      then
A4:    (PartDiffSeq(f,X,I)).i = X --> d by A1,Th17;
      1 <= I/.(i+1) & I/.(i+1) <= m by Lm1,A1,A2;
      hence thesis by A4,A1,Th15;
      end;
      suppose i <> 0;
      then
        1 <= i by NAT_1:14;
      then
A5:    (PartDiffSeq(f,X,I)).i = X --> 0 by A1,A3,Th17;
      1 <= I/.(i+1) & I/.(i+1) <= m by Lm1,A1,A2;
      hence thesis by A5,A1,Th15;
      end;
  end;
  hence f is_partial_differentiable_on X,I;
    reconsider k=(len I)-1 as Element of NAT by INT_1:5,FINSEQ_1:20;
A6: f`partial|(X,I) = ((PartDiffSeq(f,X,I)).k)`partial|(X,I/.(k+1))
                                            by PDIFF_9:def 7;
A7: (len I) - 1 <= (len I) - (0 qua Real) by XREAL_1:10;
  per cases;
    suppose k = 0;
      then
A8:     (PartDiffSeq(f,X,I)).k = X --> d by A1,Th17;
      1 <= I/.(k+1) & I/.(k+1) <= m by A1,Lm1;
      hence f`partial|(X,I) is_continuous_on X by A1,A6,A8,Th15;
    end;
    suppose k <> 0;
      then
      1 <= k by NAT_1:14;
      then
A9:     (PartDiffSeq(f,X,I)).k = X --> 0 by A1,A7,Th17;
      1 <= I/.(k+1) & I/.(k+1) <= m by A1,Lm1;
      hence f`partial|(X,I) is_continuous_on X by A1,A6,A9,Th15;
    end;
end;
