reserve h for non-zero 0-convergent Real_Sequence;
reserve c for constant Real_Sequence;
reserve R,R1,R2 for RestFunc;
reserve L,L1,L2 for LinearFunc;

theorem Th44:
for x0 be Real, f1,f2 be PartFunc of REAL,REAL st
 f1 is_differentiable_in x0 & f2 is_right_differentiable_in f1.x0 &
   (for r1 be Real st r1 > 0 ex r0 be Real st r0 > 0 &
    [.x0-r0,x0+r0.] c= dom([.f1.x0,f1.x0+r1.]|`f1)) holds
  f2*f1 is_differentiable_in x0 &
  diff(f2*f1,x0) = Rdiff(f2,f1.x0)*diff(f1,x0)
proof
    let x0 be Real, f1,f2 be PartFunc of REAL,REAL;
    assume that
A1:  f1 is_differentiable_in x0 and
A2:  f2 is_right_differentiable_in f1.x0 and
A3: for r1 be Real st r1 > 0 ex r0 be Real st r0>0 &
      [.x0-r0,x0+r0.] c= dom([.f1.x0,f1.x0+r1.]|`f1);

A4: f1 is_right_differentiable_in x0 & f1 is_left_differentiable_in x0 &
    diff(f1,x0) = Rdiff(f1,x0) & diff(f1,x0) = Ldiff(f1,x0)
      by A1,FDIFF_3:22;
    for r1 be Real st r1 > 0 ex r0 be Real st r0>0 &
      [.x0,x0+r0.] c= dom([.f1.x0,f1.x0+r1.]|`f1)
    proof
     let r1 be Real;
     assume r1 > 0; then
     consider r0 be Real such that
A5:  r0>0 &
      [.x0-r0,x0+r0.] c= dom([.f1.x0,f1.x0+r1.]|`f1) by A3;
     take r0;
     x0-r0 < x0 by A5,XREAL_1:44; then
     [.x0,x0+r0.] c= [.x0-r0,x0+r0.] by XXREAL_1:34;
     hence thesis by A5;

    end; then
A6: f2*f1 is_right_differentiable_in x0 &
    Rdiff(f2*f1,x0) = Rdiff(f2,f1.x0)*Rdiff(f1,x0) by A4,A2,Th42;

    for r1 be Real st r1 > 0 ex r0 be Real st r0 > 0 &
      [.x0-r0,x0.] c= dom([.f1.x0,f1.x0+r1.]|`f1)
    proof
     let r1 be Real;
     assume r1 > 0; then
     consider r0 be Real such that
A7:  r0>0 &
      [.x0-r0,x0+r0.] c= dom([.f1.x0,f1.x0+r1.]|`f1) by A3;
     take r0;
     x0 < x0+r0 by A7,XREAL_1:29; then
     [.x0-r0,x0.] c= [.x0-r0,x0+r0.] by XXREAL_1:34;
     hence thesis by A7;
    end; then
    f2*f1 is_left_differentiable_in x0 &
    Ldiff(f2*f1,x0) = Rdiff(f2,f1.x0)*Ldiff(f1,x0) by A4,A2,Th43;
    hence thesis by A4,A6,FDIFF_3:21;
end;
