reserve x,x0, r, s, h for Real,

  n for Element of NAT,
  rr, y for set,
  Z for open Subset of REAL,

  f, f1, f2 for PartFunc of REAL,REAL;

theorem Th101:
  Z c= dom (f1+f2) & (for x st x in Z holds f1.x=1) & f2=#Z 2
implies f1+f2 is_differentiable_on Z & for x st x in Z holds ((f1+f2)`|Z).x = 2
  *x
proof
  assume that
A1: Z c= dom (f1+f2) and
A2: for x st x in Z holds f1.x=1 and
A3: f2=#Z 2;
A4: for x st x in Z holds f2 is_differentiable_in x by A3,TAYLOR_1:2;
A5: Z c= dom f1 /\ dom f2 by A1,VALUED_1:def 1;
  then
A6: Z c= dom f1 by XBOOLE_1:18;
A7: for x st x in Z holds f1.x=0*x+1 by A2;
  then
A8: f1 is_differentiable_on Z by A6,FDIFF_1:23;
  Z c= dom f2 by A5,XBOOLE_1:18;
  then
A9: f2 is_differentiable_on Z by A4,FDIFF_1:9;
A10: for x st x in Z holds (f2`|Z).x=2*x
  proof
    let x;
    2*(x #Z (2-1)) = 2*x by PREPOWER:35;
    then
A11: diff(f2,x) = 2*x by A3,TAYLOR_1:2;
    assume x in Z;
    hence thesis by A9,A11,FDIFF_1:def 7;
  end;
  for x st x in Z holds ((f1+f2)`|Z).x = 2*x
  proof
    let x;
    assume
A12: x in Z;
    then ((f1+f2)`|Z).x = diff(f1,x) + diff(f2,x) by A1,A8,A9,FDIFF_1:18
      .= (f1`|Z).x + diff(f2,x) by A8,A12,FDIFF_1:def 7
      .= (f1`|Z).x + (f2`|Z).x by A9,A12,FDIFF_1:def 7
      .= 0 + (f2`|Z).x by A6,A7,A12,FDIFF_1:23
      .= 2*x by A10,A12;
    hence thesis;
  end;
  hence thesis by A1,A8,A9,FDIFF_1:18;
end;
