reserve x for set;
reserve a,b,d,ra,rb,r0,s1,s2 for Real;
reserve r,s,r1,r2,r3,rc for Real;
reserve p,q,q1,q2 for Point of TOP-REAL 2;
reserve X,Y,Z for non empty TopSpace;

theorem Th9:
  for g being Function of I[01],R^1,s1,s2 st g is continuous & g.0
  <>g.1 & s1=g.0 & s2=g.1 holds ex r1 st 0<r1 & r1<1 & g.r1=(s1+s2)/2
proof
  let g be Function of I[01],R^1,s1,s2;
  assume that
A1: g is continuous and
A2: g.0<>g.1 and
A3: s1=g.0 & s2=g.1;
  now
    per cases by A2,A3,XXREAL_0:1;
    case
      s1<s2;
      then s1<(s1+s2)/2 & (s1+s2)/2<s2 by XREAL_1:226;
      hence ex rc st (g.rc) =(s1+s2)/2 & 0<rc & rc <1 by A1,A3,Th6,TOPMETR:20;
    end;
    case
      s2<s1;
      then s2<(s1+s2)/2 & (s1+s2)/2<s1 by XREAL_1:226;
      hence ex rc st (g.rc) =(s1+s2)/2 & 0<rc & rc <1 by A1,A3,Th7,TOPMETR:20;
    end;
  end;
  hence thesis;
end;
