reserve F for RealNormSpace;
reserve G for RealNormSpace;
reserve y,X for set;
reserve x,x0,x1,x2,g,g1,g2,r,r1,s,p,p1,p2 for Real;
reserve i,m,k for Element of NAT;
reserve n,k for non zero Element of NAT;
reserve Y for Subset of REAL;
reserve Z for open Subset of REAL;
reserve s1,s3 for Real_Sequence;
reserve seq,seq1 for sequence of G;
reserve f,f1,f2 for PartFunc of REAL,REAL n;
reserve g,g1,g2 for PartFunc of REAL,REAL-NS n;
reserve h for 0-convergent non-zero Real_Sequence;
reserve c for constant Real_Sequence;
reserve GR,R for RestFunc of REAL-NS n;
reserve DFG,L for LinearFunc of REAL-NS n;

theorem Th42:
for I be Function of REAL,REAL-NS 1,
    x0 be Point of REAL-NS 1,
    y0 be Element of REAL,
    g be PartFunc of REAL,REAL-NS n,
    f be PartFunc of REAL-NS 1,REAL-NS n
   st I=proj(1,1) qua Function" & x0 in dom f & y0 in dom g
   & x0=<*y0*> & f*I = g & f is_differentiable_in x0
   holds g is_differentiable_in y0
     & diff(g,y0)=diff(f,x0).<*1*>
     & for r be Element of REAL holds diff(f,x0).<*r*> = r*diff(g,y0)
proof
  let I be Function of REAL,REAL-NS 1,
      x0 be Point of REAL-NS 1,
      y0 be Element of REAL,
      g be PartFunc of REAL,REAL-NS n,
      f be PartFunc of REAL-NS 1,REAL-NS n;
  assume that
A1: I=proj(1,1) qua Function" and
A2: x0 in dom f and
A3: y0 in dom g and
A4: x0=<*y0*> and
A5: f*I = g;
  reconsider J= proj(1,1) as Function of REAL-NS 1, REAL by Lm1;
    assume A6: f is_differentiable_in x0;
    then
    consider NN being Neighbourhood of x0 such that
A7:   NN c= dom f and
A8:   ex L be
      Point of R_NormSpace_of_BoundedLinearOperators(REAL-NS 1,REAL-NS n),
      R be RestFunc of REAL-NS 1,REAL-NS n
      st for x be Point of REAL-NS 1 st x in NN
     holds f/.x - f/.x0 = L.(x-x0) + R/.(x-x0) by NDIFF_1:def 6;
A9: I*J = id REAL-NS 1 by Lm1,A1,Lm2,FUNCT_1:39;
A10: g*J = f*(id REAL-NS 1) by A9,A5,RELAT_1:36
       .= f by FUNCT_2:17;
    consider e be Real such that
A11:   0 < e and
A12: {z where z is Point of REAL-NS 1 : ||.z-x0.|| < e} c= NN by NFCONT_1:def 1
;
    consider L be
      Point of R_NormSpace_of_BoundedLinearOperators(REAL-NS 1,REAL-NS n),
      R being RestFunc of REAL-NS 1,REAL-NS n such that
A13:   for x9 be Point of REAL-NS 1 st x9 in NN holds
        f/.x9 - f/.x0 = L.(x9-x0) + R/.(x9-x0) by A8;
  reconsider R0=R*I as RestFunc of REAL-NS n by A1,Th40;
  L is LinearOperator of REAL-NS 1,REAL-NS n by LOPBAN_1:def 9;
  then
  reconsider L0=L*I as LinearFunc of REAL-NS n by A1,Th40;
  set N={z where z is Point of REAL-NS 1 : ||.z-x0.|| < e};
A14: N c= the carrier of REAL-NS 1
  proof
    let y be object;
    assume y in N;
    then ex z be Point of REAL-NS 1 st y=z & ||.z-x0.|| < e;
    hence thesis;
  end;
  then reconsider N as Neighbourhood of x0 by A11,NFCONT_1:def 1;
  set N0={z where z is Element of REAL: |.z-y0.| < e};
A15: N c= dom f by A7,A12;
  now
    let z be object;
    hereby
      assume z in N0;
      then consider y9 be Element of REAL such that
A16:  z=y9 and
A17:  |.y9-y0.| < e;
      reconsider w=I.y9 as Point of REAL-NS 1;
      x0=I.y0 by A1,A4,Lm2;
      then w-x0=I.(y9-y0) by A1,Lm1,PDIFF_1:3;
      then ||.w-x0.||=|.y9-y0.| by A1,Lm1,PDIFF_1:3;
      then
A18:   w in {z0 where z0 is Point of REAL-NS 1 : ||.z0 - x0.|| < e} by A17;
      J.(I.y9) = y9 by A1,Lm2,FUNCT_1:35;
      hence z in J.:N by A18,A16,FUNCT_2:35;
    end;
    assume z in J.:N;
    then consider ww be object such that
    ww in REAL 1 and
A19: ww in N and
A20: z=J.ww by FUNCT_2:64;
    consider w be Point of REAL-NS 1 such that
A21: ww=w and
A22: ||.w-x0.|| < e by A19;
    reconsider y9=J.w as Element of REAL;
    J.x0=y0 by A4,Lm2;
    then J.(w-x0) =y9-y0 by PDIFF_1:4;
    then |.y9-y0.| < e by A22,PDIFF_1:4;
    hence z in N0 by A20,A21;
  end;
  then
A23: N0=J.:N by TARSKI:2;
  J.:(dom f) = J.:(J"(dom g)) by A10,RELAT_1:147;
  then
A24: J.:(dom f) = dom(f*I) by A5,Lm2,FUNCT_1:77;
A25: I*J =id (REAL 1) by A1,Lm2,FUNCT_1:39;
  N c= dom f by A7,A12;
  then
A26: N0 c= dom(f*I) by A24,A23,RELAT_1:123;
A27: ].y0-e,y0+e.[ c= N0
  proof
    now let d be object such that
A28: d in ].y0-e,y0+e.[;
    reconsider y1=d as Element of REAL by A28;
    |.y1-y0.| < e by A28,RCOMP_1:1;
    hence d in N0;
    end;
    hence thesis;
  end;
  N0 c= ].y0-e,y0+e.[
  proof
    let d be object;
    assume d in N0;
    then ex r be Element of REAL st d=r & |.r-y0.| < e;
    hence thesis by RCOMP_1:1;
  end;
  then
  N0 = ].y0-e,y0+e.[ by A27,XBOOLE_0:def 10;
  then
A29: N0 is Neighbourhood of y0 by A11,RCOMP_1:def 6;
  N c= REAL 1 by A14,REAL_NS1:def 4;
  then (I*J).:N = N by A25,FRECHET:13;
  then
A30: I.:N0 = N by A23,RELAT_1:126;
A31: for y1 be Real st y1 in N0 holds
       (f*I)/.y1 - (f*I)/.y0 = L0/.(y1-y0) + R0/.(y1-y0)
  proof
    let y1 be Real;
    reconsider yy=y1 as Element of REAL by XREAL_0:def 1;
    reconsider y9 = I.yy as Point of REAL-NS 1;
    R is total by NDIFF_1:def 5;
    then
A32: dom R = the carrier of REAL-NS 1 by PARTFUN1:def 2;
    R0 is total by NDIFF_3:def 1;
    then
A33: dom(R*I) = REAL by PARTFUN1:def 2;
    reconsider dy1y0 = y1 - y0 as Element of REAL by XREAL_0:def 1;
    I.(dy1y0) in dom R by A32;
    then R/.(I.(y1-y0)) =R.(I.(y1-y0)) by PARTFUN1:def 6;
    then R/.(I.(dy1y0)) =R0.(dy1y0) by A33,FUNCT_1:12;
    then
A34: R/.(I.(y1-y0)) =R0/.(dy1y0) by A33,PARTFUN1:def 6;
    L0 is total;
    then
A35: dom(L*I) = REAL by PARTFUN1:def 2;
    assume
A36: y1 in N0;
    then
A37: I.yy in N by A30,FUNCT_2:35;
    then
A38: f/.(I.y1) =f.(I.y1) by A15,PARTFUN1:def 6;
    f/.(I.y1) =(f*I).y1 by A38,A26,A36,FUNCT_1:12;
    then
A39: f/.(I.y1) =(f*I)/.y1 by A26,A36,PARTFUN1:def 6;
A40: x0=I.y0 by A4,A1,Lm2;
    then f/.(I.y0) =f.(I.y0) by A2,PARTFUN1:def 6;
    then f/.(I.y0) =(f*I).y0 by A3,A5,FUNCT_1:12;
    then
A41: f/.(I.y0) =(f*I)/.y0 by A3,A5,PARTFUN1:def 6;
    reconsider d = y1 - y0 as Element of REAL by XREAL_0:def 1;
    f/.y9 - f/.x0=L.(y9-x0) + R/.(y9-x0) by A13,A12,A37;
    then
A42: f/.(I.y1) - f/.(I.y0)=L.(I.d) + R/.(y9-x0)
       by A1,A40,Lm1,PDIFF_1:3;
    L.(I.d) =L0/.(dy1y0) by A35,FUNCT_1:12;
    hence thesis by A40,A42,A34,A39,A41,A1,Lm1,PDIFF_1:3;
  end;
  then
A43:f*I is_differentiable_in y0 by A29,A26,NDIFF_3:def 3;
  thus
    g is_differentiable_in y0 by A5,A31,A29,A26,NDIFF_3:def 3;
A44: diff(f*I,y0)=L0/.jj by A31,A43,A29,A26,NDIFF_3:def 4;
  thus
A45:diff(g,y0)=(diff(f,x0)*I).1 by A5,A44,A6,A13,A7,NDIFF_1:def 7
          .=diff(f,x0).(I.jj) by A1,FUNCT_1:13,PDIFF_1:2
          .=diff(f,x0).<*1*> by A1,Lm2;
   let r be Element of REAL;
A46:  <*jj*> is Element of REAL 1 by FINSEQ_2:98;
     then reconsider x = <*1*> as Point of REAL-NS 1 by REAL_NS1:def 4;
A47:  diff(f,x0) is LinearOperator of REAL-NS 1,REAL-NS n
          by LOPBAN_1:def 9;
     thus diff(f,x0).<*r*> = diff(f,x0).<*r*1*>
     .= diff(f,x0).(r*<*1*>) by RVSUM_1:47
     .= diff(f,x0).(r*x) by A46,REAL_NS1:3
     .= r*diff(g,y0) by A45,A47,LOPBAN_1:def 5;
end;
