reserve n,k for Element of NAT;
reserve x,y,X for set;
reserve g,r,p for Real;
reserve S for RealNormSpace;
reserve rseq for Real_Sequence;
reserve seq,seq1 for sequence of S;
reserve x0 for Point of S;
reserve Y for Subset of S;
reserve S,T for RealNormSpace;
reserve f,f1,f2 for PartFunc of S,T;
reserve s1 for sequence of S;
reserve x0 for Point of S;
reserve h for (0.S)-convergent sequence of S;
reserve c for constant sequence of S;
reserve R,R1,R2 for RestFunc of S,T;
reserve L,L1,L2 for Point of R_NormSpace_of_BoundedLinearOperators(S,T);

theorem Th37:
  for r,f,x0 st f is_differentiable_in x0 holds r(#)f
  is_differentiable_in x0 & diff((r(#)f),x0) = r*diff(f,x0)
proof
  let r,f,x0;
  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 be Point of S st x in N1 holds f/.x - f/.x0 = L.(x-
  x0) + R/.(x-x0);
  consider L1,R1 such that
A4: for x be Point of S st x in N1 holds f/.x - f/.x0 = L1.(x-x0) + R1/.
  (x-x0) by A3;
  reconsider R = r(#)R1 as RestFunc of S,T by Th29;
  set L = r*L1;
A5: N1 c= dom(r(#)f) by A2,VFUNCT_1:def 4;
A6: R1 is total by Def5;
A7: now
    let x be Point of S;
A8: x0 in N1 by NFCONT_1:4;
    assume
A9: 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,A8,VFUNCT_1:def 4
      .= r*(f/.x - f/.x0) by RLVECT_1:34
      .= r*(L1.(x-x0) + R1/.(x-x0)) by A4,A9
      .= r*L1.(x-x0) + r*R1/.(x-x0) by RLVECT_1:def 5
      .= L.(x-x0) + r*R1/.(x-x0) by LOPBAN_1:36
      .= L.(x-x0) + R/.(x-x0) by A6,VFUNCT_1:39;
  end;
  hence r(#)f is_differentiable_in x0 by A5;
  hence diff((r(#)f),x0) = L by A5,A7,Def7
    .= r*diff(f,x0) by A1,A2,A4,Def7;
end;
