reserve n for non zero Element of NAT;
reserve a,b,r,t for Real;
reserve
  Z for open Subset of REAL,
 y0 for VECTOR of REAL-NS n,
  G for Function of REAL-NS n,REAL-NS n;

theorem Th46:
for n be Nat, g be Function of REAL,REAL
  st for x be Real holds g.x= (x-a) |^ (n+1)
 holds
    for x be Real holds g is_differentiable_in x
       & diff(g,x)= (n+1)* ((x-a) |^ n)
proof
  let n be Nat;
  let g be Function of REAL,REAL;
A1: dom(g)=REAL by FUNCT_2:def 1;
  assume A2: for x be Real holds g.x= (x-a) |^ (n+1);
  defpred X[set] means $1 in REAL;
  deffunc U(Real) = In($1-a,REAL);
  consider f being PartFunc of REAL,REAL such that
A3: for d be Element of REAL holds d in dom f iff X[d] and
A4: for d be Element of REAL st d in dom f holds f/.d = U(d)
  from PARTFUN2:sch 2;
  for x be object st x in REAL holds x in dom f by A3; then
  REAL c=dom(f) by TARSKI:def 3; then
A5: dom(f)=REAL by XBOOLE_0:def 10;
A6: for d be Element of REAL holds f.d = d-a
  proof
    let d be Element of REAL;
    f/.d = In(d-a,REAL) by A4,A5;
    hence thesis by A5,PARTFUN1:def 6;
  end;
A7: for d be Real holds f.d = d-a
  proof
    let d be Real;
    d in REAL by XREAL_0:def 1;
    hence thesis by A6;
  end;
  reconsider n1 = n + 1 as Element of NAT by ORDINAL1:def 12;
A8: f is Function of REAL,REAL by A5,FUNCT_2:67;
A9: dom( #Z (n1) ) = REAL & rng (f) c= REAL by FUNCT_2:def 1; then
A10: dom ( #Z (n1) *f ) = dom(f) by RELAT_1:27;
A11: now
    let x be Element of REAL;
    assume x in dom ( ( #Z (n1)) *f );
    hence ( #Z (n1) *f ).x = ( #Z (n1) *f )/.x by PARTFUN1:def 6
     .= #Z (n1) /.(f/.x) by A5,A10,PARTFUN2:3
     .= ( #Z (n1) ).(f.x) by A5,PARTFUN1:def 6
     .= (f.x) #Z (n1) by TAYLOR_1:def 1
     .= (f.x) |^ (n+1) by PREPOWER:36
     .= (x-a) |^ (n+1) by A6
     .= g.x by A2;
   end;
    reconsider n1 = n+1, nn=n,n0=(n+1)-1 as Element of NAT by ORDINAL1:def 12;
A12: for x be Real holds ( #Z (n1)) *f is_differentiable_in x
  & diff(( #Z (n1)) *f,x) = (n+1)* ((x-a) |^ n)
  proof
    let x be Real;
    A13: f is_differentiable_in x
    & #Z (n1) is_differentiable_in f.x by A8,Lm8,A7,TAYLOR_1:2;
    hence ( #Z (n1)) *f is_differentiable_in x by FDIFF_2:13;
    reconsider pp = (f.x) #Z (n0) as Real;
    reconsider px = (x-a) #Z nn as Real;
    diff(( #Z (n1) ),f.x) = (n1) * pp by TAYLOR_1:2;
    hence diff(( #Z (n1)) *f,x)
      = (n1) * pp * diff(f,x) by A13,FDIFF_2:13
     .= (n1) * pp * 1 by A8,Lm8,A7
     .= (n1) * px by A7
     .= (n+1) * (x-a) |^ n by PREPOWER:36;
  end;
  ( #Z (n1) *f) = g by A11,PARTFUN1:5,A1,A5,A9,RELAT_1:27;
  hence thesis by A12;
end;
