
theorem Th20:
  for m,n be non zero Element of NAT,
      f be PartFunc of REAL-NS m,REAL-NS n,
      X be Subset of REAL-NS m,
      i be Nat st 1 <=i & i <= m & X is open holds
  (f is_partial_differentiable_on X,i &
  f`partial|(X,i) is_continuous_on X)
  iff
  for j be Nat st 1 <= j <= n holds
  (Proj(j,n)*f) is_partial_differentiable_on X,i &
   (Proj(j,n)*f)`partial|(X,i) is_continuous_on X
proof
let m,n be non zero Element of NAT,
    f be PartFunc of REAL-NS m,REAL-NS n,
    X be Subset of REAL-NS m, i be Nat;
assume A1: 1 <=i & i <= m & X is open;
hereby assume A2:
  f is_partial_differentiable_on X,i & f`partial|(X,i) is_continuous_on X;
then
A3:X c= dom f by A1,PDIFF_7:8;
thus for j be Nat st 1 <= j <= n holds
 ( (Proj(j,n)*f) is_partial_differentiable_on X,i &
   (Proj(j,n)*f)`partial|(X,i) is_continuous_on X )
  proof
   let j be Nat;
    assume A4: 1 <=j & j <= n;
    A5:dom (Proj(j,n)) = the carrier of (REAL-NS n) by FUNCT_2:def 1;
    rng f c= the carrier of (REAL-NS n); then
    A6: X c= dom (Proj(j,n)*f) by A5,A3,RELAT_1:27;
    now let x0 be Point of REAL-NS m;
     assume x0 in X; then
     f is_partial_differentiable_in x0,i by A2,A1,PDIFF_7:8; then
     f*reproj(i,x0) is_differentiable_in Proj(i,m).x0 by PDIFF_1:def 9;
     then Proj(j,n)*(f*reproj(i,x0)) is_differentiable_in Proj(i,m).x0
         by A4,PDIFF_6:29; then
      (Proj(j,n)*f)*reproj(i,x0) is_differentiable_in Proj(i,m).x0
         by RELAT_1:36;
  hence (Proj(j,n)*f) is_partial_differentiable_in x0,i by PDIFF_1:def 9;
    end;
    hence A7:(Proj(j,n)*f) is_partial_differentiable_on X,i
        by A6,A1,PDIFF_7:8; then
    A8:X c= dom((Proj(j,n)*f)`partial|(X,i) ) by PDIFF_1:def 20;
 A9: for x0 be Point of REAL-NS m st x0 in X
      holds ((Proj(j,n)*f)`partial|(X,i))/.x0
            = Proj(j,n)*(f`partial|(X,i)/.x0)
      proof
       let x0 be Point of REAL-NS m;
      assume A10:x0 in X; then
      f is_partial_differentiable_in x0,i by A2,A1,PDIFF_7:8; then
      A11: f*reproj(i,x0) is_differentiable_in Proj(i,m).x0 by PDIFF_1:def 9;
   thus ((Proj(j,n)*f)`partial|(X,i))/.x0
             = partdiff((Proj(j,n)*f),x0,i)
                    by A7,A10,PDIFF_1:def 20
            .= diff((Proj(j,n)*f)*reproj(i,x0),Proj(i,m).x0)
                    by PDIFF_1:def 10
            .= diff(Proj(j,n)*(f*reproj(i,x0)),Proj(i,m).x0)
                    by RELAT_1:36
            .= Proj(j,n)*(diff(f*reproj(i,x0),Proj(i,m).x0))
                    by A11,A4,PDIFF_6:28
            .= Proj(j,n)*(partdiff(f,x0,i)) by PDIFF_1:def 10
          .= Proj(j,n)*(f`partial|(X,i)/.x0) by A2,A10,PDIFF_1:def 20;
  end;
for x0 be Point of REAL-NS m, r be Real st x0 in X & 0 <r
 ex s be Real st 0 < s & for x1 be Point of REAL-NS m
    st x1 in X & ||. x1- x0 .|| < s holds
   ||. ((Proj(j,n)*f)`partial|(X,i) )/.x1
       - ((Proj(j,n)*f)`partial|(X,i) )/.x0 .|| < r
proof
let x0 be Point of REAL-NS m, r be Real;
 assume A12: x0 in X & 0 <r; then
 consider s be Real such that
  A13: 0< s & for x1 be Point of REAL-NS m
    st x1 in X & ||. x1- x0 .|| < s holds
   ||. (f`partial|(X,i) )/.x1 - (f`partial|(X,i) )/.x0 .|| < r
  by A2,NFCONT_1:19;
 take s;
 thus 0 < s by A13;
  let x1 be Point of REAL-NS m;
    assume A14: x1 in X & ||. x1- x0 .|| < s; then
    A15: ||. (f`partial|(X,i) )/.x1
       - (f`partial|(X,i) )/.x0 .|| < r by A13;
   A16:  ((Proj(j,n)*f)`partial|(X,i) )/.x0
    = Proj(j,n)*(f`partial|(X,i)/.x0) by A9,A12;
  reconsider p1=Proj(j,n)*(f`partial|(X,i)/.x1) as Point of
    R_NormSpace_of_BoundedLinearOperators(REAL-NS 1,REAL-NS 1)
      by Th7,A4;
  reconsider p0=Proj(j,n)*(f`partial|(X,i)/.x0) as Point of
    R_NormSpace_of_BoundedLinearOperators(REAL-NS 1,REAL-NS 1) by Th7,A4;
    ||. ((Proj(j,n)*f)`partial|(X,i) )/.x1
       - ((Proj(j,n)*f)`partial|(X,i) )/.x0 .||
    = ||. p1 - p0 .|| by A9,A14,A16; then
   ||. ((Proj(j,n)*f)`partial|(X,i))/.x1
       - ((Proj(j,n)*f)`partial|(X,i))/.x0 .||
    <= ||. (f`partial|(X,i) )/.x1 - (f`partial|(X,i) )/.x0 .|| by Th14,A4;
 hence ||. ((Proj(j,n)*f)`partial|(X,i) )/.x1
       - ((Proj(j,n)*f)`partial|(X,i) )/.x0 .|| < r by A15,XXREAL_0:2;
end;
hence (Proj(j,n)*f)`partial|(X,i) is_continuous_on X by A8,NFCONT_1:19;
end;
end;
assume
A17:  for j be Nat st 1 <= j <= n holds
 ( (Proj(j,n)*f) is_partial_differentiable_on X,i &
   (Proj(j,n)*f)`partial|(X,i) is_continuous_on X);
  1<=n by NAT_1:14; then
  (Proj(1,n)*f) is_partial_differentiable_on X,i by A17; then
  A18: X c= dom (Proj(1,n)*f) by PDIFF_1:def 19;
  A19:dom (Proj(1,n)) = the carrier of (REAL-NS n) by FUNCT_2:def 1;
  rng f c= the carrier of (REAL-NS n); then
  A20: X c= dom f by A18,A19,RELAT_1:27;
  A21: now let x0 be Point of REAL-NS m;
         assume A22:x0 in X;
      now let j be Nat;
          assume 1 <=j & j <= n; then
         (Proj(j,n)*f) is_partial_differentiable_on X,i by A17; then
         (Proj(j,n)*f) is_partial_differentiable_in x0,i
           by A22,A1,PDIFF_7:8; then
        (Proj(j,n)*f)*reproj(i,x0) is_differentiable_in Proj(i,m).x0
         by PDIFF_1:def 9;
        hence Proj(j,n)*(f*reproj(i,x0)) is_differentiable_in Proj(i,m).x0
         by RELAT_1:36;
       end; then
    (f*reproj(i,x0)) is_differentiable_in Proj(i,m).x0 by PDIFF_6:29;
    hence f is_partial_differentiable_in x0,i by PDIFF_1:def 9;
  end;
  hence
 A23: f is_partial_differentiable_on X,i by A1,A20,PDIFF_7:8; then
  A24: X c= dom (f`partial|(X,i)) by PDIFF_1:def 20;
 A25:for x0 be Point of REAL-NS m, j be Element of NAT
      st x0 in X & 1 <=j & j <= n holds
      Proj(j,n)*( (f`partial|(X,i))/.x0)
         = ((Proj(j,n)*f)`partial|(X,i))/.x0
  proof
    let x0 be Point of REAL-NS m,j be Element of NAT;
    assume A26:x0 in X & 1 <=j & j <= n; then
    f is_partial_differentiable_in x0,i by A21; then
    A27: f*reproj(i,x0) is_differentiable_in Proj(i,m).x0 by PDIFF_1:def 9;
        A28: ( Proj(j,n)*f ) is_partial_differentiable_on X,i by A17,A26;
        thus Proj(j,n)*( (f`partial|(X,i))/.x0  )
       =Proj(j,n)*(partdiff(f,x0,i)) by A26,A23,PDIFF_1:def 20
       .=Proj(j,n)*(diff(f*reproj(i,x0),Proj(i,m).x0)) by PDIFF_1:def 10
      .=diff(Proj(j,n)*(f*reproj(i,x0)),Proj(i,m).x0) by A27,A26,PDIFF_6:28
      .=diff((Proj(j,n)*f)*reproj(i,x0),Proj(i,m).x0) by RELAT_1:36
      .= partdiff((Proj(j,n)*f),x0,i) by PDIFF_1:def 10
      .= ((Proj(j,n)*f)`partial|(X,i) )/.x0 by A28,A26,PDIFF_1:def 20;
end;
for x0 be Point of REAL-NS m, r be Real
  st x0 in X & 0 <r ex s be Real st 0< s &
  for x1 be Point of REAL-NS m
    st x1 in X & ||. x1- x0 .|| < s holds
   ||. (f`partial|(X,i))/.x1 - (f`partial|(X,i))/.x0 .|| < r
proof
let x0 be Point of REAL-NS m, r0 be Real;
 assume A29: x0 in X & 0 <r0;
 set r=r0/2;
defpred P[set,set] means
  ex j be Element of NAT, sj be Real st $2=sj & $1=j & 0 < sj &
      for x1 be Point of REAL-NS m
     st x1 in X & ||. x1- x0 .|| < sj holds
      ||. ((Proj(j,n)*f)`partial|(X,i))/.x1
         - ((Proj(j,n)*f)`partial|(X,i))/.x0 .|| < (r/n);
  A30: for j0 be Nat st j0 in Seg n holds
    ex x be Element of REAL st P[j0,x]
  proof
   let j0 be Nat;
    assume j0 in Seg n; then
    A31: 1 <=j0 & j0 <= n by FINSEQ_1:1;
    reconsider j=j0 as Element of NAT by ORDINAL1:def 12;
   (Proj(j,n)*f)`partial|(X,i) is_continuous_on X by A17,A31; then
   consider sj be Real such that
   A32: 0 < sj & for x1 be Point of REAL-NS m
     st x1 in X & ||. x1- x0 .|| < sj holds
      ||. ((Proj(j,n)*f)`partial|(X,i))/.x1
         - ((Proj(j,n)*f)`partial|(X,i))/.x0 .|| < (r/n) by A29,NFCONT_1:19;
    reconsider sj as Element of REAL by XREAL_0:def 1;
    0 < sj by A32;
   hence thesis by A32;
 end;
consider s0 be FinSequence of REAL such that
A33: dom s0 = Seg n &
for k be Nat st k in Seg n holds P[k,s0.k] from FINSEQ_1:sch 5(A30);
A34:rng s0 is finite by A33,FINSET_1:8;
     n in Seg n by FINSEQ_1:3;
 then reconsider rs0= rng s0 as non empty ext-real-membered set
      by A33,FUNCT_1:3;
 reconsider rs0 as left_end right_end non empty ext-real-membered set
      by A34;
A35:min rs0 in rng s0 by XXREAL_2:def 7;
    reconsider s = min rs0 as Real;
   take s;
   consider i1 be object such that
A36: i1 in dom s0 & s = s0.i1 by A35,FUNCT_1:def 3;
ex j be Element of NAT, sj be Real st
   s0.i1=sj & i1=j & 0 < sj &
      for x1 be Point of REAL-NS m
     st x1 in X & ||. x1- x0 .|| < sj holds
       ||. ((Proj(j,n)*f)`partial|(X,i))/.x1
         - ((Proj(j,n)*f)`partial|(X,i))/.x0 .|| < (r/n) by A33,A36;
  hence 0 < s by A36;
  let x1 be Point of REAL-NS m;
  assume A37: x1 in X & ||. x1- x0 .|| < s;
 now
 let j be Element of NAT,p1,p0 be Point of
    R_NormSpace_of_BoundedLinearOperators(REAL-NS 1,REAL-NS 1);
 assume A38:
    p1=Proj(j,n)*((f`partial|(X,i))/.x1)
  & p0=Proj(j,n)*((f`partial|(X,i))/.x0) & 1 <=j & j <= n; then
     A39:j in Seg n; then
     consider jj be Element of NAT,sj be Real such that
     A40: s0.j=sj & jj = j & 0 < sj &
      for x1 be Point of REAL-NS m
      st x1 in X & ||. x1- x0 .|| < sj holds
    ||. ((Proj(jj,n)*f)`partial|(X,i))/.x1
         - ((Proj(jj,n)*f)`partial|(X,i))/.x0 .|| < (r/n) by A33;
    A41: Proj(j,n)*( (f`partial|(X,i))/.x0)
     = ((Proj(j,n)*f)`partial|(X,i))/.x0 by A25,A29,A38;
    A42: Proj(j,n)*( (f`partial|(X,i))/.x1)
     = ((Proj(j,n)*f)`partial|(X,i))/.x1 by A25,A37,A38;
    sj in rng s0 by A39,A40,A33,FUNCT_1:3;
    then s <= sj by XXREAL_2:def 7; then
     ||. x1- x0 .|| < sj by A37,XXREAL_0:2;
    hence ||. p1 - p0 .|| <= (r/n) by A40,A37,A38,A41,A42;
 end; then
  ||. (f`partial|(X,i))/.x1 - (f`partial|(X,i))/.x0 .|| <= n*(r/n) by Th19;
 then
A43: ||. (f`partial|(X,i))/.x1 - (f`partial|(X,i))/.x0 .|| <= r by XCMPLX_1:87;
r < r0 by A29,XREAL_1:216;
  hence ||. (f`partial|(X,i) )/.x1
    - (f`partial|(X,i))/.x0 .|| < r0 by A43,XXREAL_0:2;
end;
hence thesis by A24,NFCONT_1:19;
end;
