reserve F for RealNormSpace;
reserve G for RealNormSpace;
reserve X for set;
reserve x,x0,g,r,s,p for Real;
reserve n,m,k for Element of NAT;
reserve Y for Subset of REAL;
reserve Z for open Subset of REAL;
reserve s1,s3 for Real_Sequence;
reserve seq for sequence of G;
reserve f,f1,f2 for PartFunc of REAL,the carrier of F;
reserve h for 0-convergent non-zero Real_Sequence;
reserve c for constant Real_Sequence;
reserve R,R1,R2 for RestFunc of F;
reserve L,L1,L2 for LinearFunc of F;

theorem Th16:
  for r be Real st
  f is_differentiable_in x0 holds r(#)f is_differentiable_in x0
  & diff((r(#)f),x0) = r*diff(f,x0)
  proof
    let r be Real;
    assume
    A1: f is_differentiable_in x0;
    then consider N1 be Neighbourhood of x0 such that
    A2: N1 c= dom f and
    A3: ex L,R st for x st x in N1 holds f/.x - f/.x0 = L/.(x-x0) + R/.(x-x0);
    consider L1,R1 such that
    A4: for x st x in N1 holds f/.x - f/.x0 = L1/.(x-x0) + R1/.(x-x0) by A3;
    reconsider R = r(#)R1 as RestFunc of F by Th8;
    reconsider L = r(#)L1 as LinearFunc of F by Th4;
    A5: N1 c= dom(r(#)f) by A2,VFUNCT_1:def 4;
    R1 is total by Def1; then
    r(#)R1 is total by VFUNCT_1:34; then
    A6: dom (r(#)R1) = REAL by FUNCT_2:def 1;
    r(#)L1 is total by VFUNCT_1:34; then
    A7: dom (r(#)L1) = REAL by FUNCT_2:def 1;
    A8: now
    let x;
    A9: x0 in N1 by RCOMP_1:16;
A10:  x - x0 in REAL by XREAL_0:def 1;
    assume
    A11: x in N1;
    hence (r(#)f)/.x - (r(#)f)/.x0
     = r*(f/.x) - (r(#)f)/.x0 by A5,VFUNCT_1:def 4
    .= r*f/.x - r*f/.x0 by A5,A9,VFUNCT_1:def 4
    .= r*(f/.x - f/.x0) by RLVECT_1:34
    .= r*(L1/.(x-x0) + R1/.(x-x0)) by A4,A11
    .= r*L1/.(x-x0) + r*R1/.(x-x0) by RLVECT_1:def 5
    .= L/.(x-x0) + r*R1/.(x-x0) by A7,VFUNCT_1:def 4,A10
    .= L/.(x-x0) + R/.(x-x0) by A6,VFUNCT_1:def 4,A10;
  end;
  hence r(#)f is_differentiable_in x0 by A5;
  hence diff((r(#)f),x0) = L/.jj by A5,A8,Def4
  .=L/.jj
  .=r*L1/.jj by A7,VFUNCT_1:def 4
  .= r*L1/.jj
  .= r*diff(f,x0) by A1,A2,A4,Def4;
end;
