reserve r,p,x for Real;
reserve n for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve Z for open Subset of REAL;

theorem Th18:
  (1/(n+1))(#)( #Z (n+1)) is_differentiable_on REAL & for x holds
  (((1/(n+1))(#)( #Z (n+1)))`|REAL).x = x #Z n
proof
A1: [#]REAL = dom ((1/(n+1))(#)( #Z (n+1))) by FUNCT_2:def 1;
  [#]REAL = dom ( #Z (n+1)) & for x st x in REAL holds ( #Z (n+1))
  is_differentiable_in x by FUNCT_2:def 1,TAYLOR_1:2;
  then
A2: ( #Z (n+1)) is_differentiable_on REAL by FDIFF_1:9;
  hence (1/(n+1))(#)( #Z (n+1)) is_differentiable_on REAL by A1,FDIFF_1:20;
A3: for x st x in REAL holds (( #Z (n+1))`|REAL).x=(n+1) * x #Z n
  proof
    set m=n+1;
    let x;
    assume
A4: x in REAL;
    diff(( #Z m),x) = m * x #Z (m-1) by TAYLOR_1:2;
    hence thesis by A2,FDIFF_1:def 7,A4;
  end;
A5:
  for x st x in REAL holds (((1/(n+1))(#)( #Z (n+1)))`|REAL).x=x #Z n
  proof
    let x;
    assume
A6: x in REAL;
    (((1/(n+1))(#)( #Z (n+1)))`|REAL).x=(1/(n+1))*diff(( #Z (n+1)),x) by A1,A2,
FDIFF_1:20,A6
      .=(1/(n+1))*(( #Z (n+1))`|REAL).x by A2,FDIFF_1:def 7,A6
      .=(1/(n+1))*((n+1) * x #Z n) by A3,A6
      .=(1/(n+1))*(n+1) * x #Z n
      .=(n+1)/(n+1) * x #Z n by XCMPLX_1:99
      .=1*x #Z n by XCMPLX_1:60;
    hence thesis;
  end;
  let x;
   x in REAL by XREAL_0:def 1;
  hence thesis by A5;
end;
