reserve k, k1, n, n1, m for Nat;
reserve X, y for set;
reserve p for Real;
reserve r for Real;
reserve a, a1, a2, b, b1, b2, x, x0, z, z0 for Complex;
reserve s1, s3, seq, seq1 for Complex_Sequence;
reserve Y for Subset of COMPLEX;
reserve f, f1, f2 for PartFunc of COMPLEX,COMPLEX;
reserve Nseq for increasing sequence of NAT;
reserve h for 0-convergent non-zero Complex_Sequence;
reserve c for constant Complex_Sequence;
reserve R, R1, R2 for C_RestFunc;
reserve L, L1, L2 for C_LinearFunc;
reserve Z for open Subset of COMPLEX;

theorem
  for a,f,Z st Z c= dom (a(#)f) & f is_differentiable_on Z holds a(#)f
  is_differentiable_on Z & for x st x in Z holds ((a(#)f)`|Z)/.x = a*diff(f,x)
proof
  let a,f,Z;
  assume that
A1: Z c= dom (a(#)f) and
A2: f is_differentiable_on Z;
  now
    let x0;
    assume x0 in Z;
    then f is_differentiable_in x0 by A2,Th15;
    hence a(#)f is_differentiable_in x0 by Th25;
  end;
  hence
A3: a(#)f is_differentiable_on Z by A1,Th15;
  now
    let x;
    assume
A4: x in Z;
    then
A5: f is_differentiable_in x by A2,Th15;
    thus ((a(#)f)`|Z)/.x = diff((a(#)f),x) by A3,A4,Def12
      .= a*diff(f,x) by A5,Th25;
  end;
  hence thesis;
end;
