reserve y for set;
reserve g,r,s,p,t,x,x0,x1,x2 for Real;
reserve n,n1 for Nat;
reserve s1,s2,s3 for Real_Sequence;
reserve f,f1,f2 for PartFunc of REAL,REAL;

theorem
  for x,t st 0<t for f st [.x,x+t.] c= dom f & f|[.x,x+t.] is continuous
& f.x=f.(x+t) & f is_differentiable_on ].x,x+t.[ ex s st 0<s & s<1 & diff(f,x+s
  *t)=0
proof
  let x,t such that
A1: 0<t;
  let f;
  assume [.x,x+t.] c= dom f & f|[.x,x+t.] is continuous & f.x=f.(x+t) & f
  is_differentiable_on ].x,x+t.[;
  then consider x0 such that
A2: x0 in ].x,x+t.[ and
A3: diff(f,x0)=0 by A1,Th1,XREAL_1:29;
  take s = (x0-x)/t;
  x0 in {r: x<r & r<x+t} by A2,RCOMP_1:def 2;
  then
A4: ex g st g=x0 & x<g & g<x+t;
  then 0<x0-x by XREAL_1:50;
  then 0/t < (x0-x)/t by A1,XREAL_1:74;
  hence 0<s;
  x0-x<t by A4,XREAL_1:19;
  then (x0-x)/t<t/t by A1,XREAL_1:74;
  hence s<1 by A1,XCMPLX_1:60;
  s*t+x = (x0-x)+x by A1,XCMPLX_1:87;
  hence thesis by A3;
end;
