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
 ::General Intermediate Value Point Theorem
  for X being non empty TopSpace,xa,xb being Point of X,
      a,b,d being Real,
  f being continuous Function of X,R^1 st X is connected & f.xa=a & f.xb=b &
  a<=d & d<=b ex xc being Point of X st f.xc =d
proof
  let X be non empty TopSpace,xa,xb be Point of X,
      a,b,d be Real,f be
  continuous Function of X,R^1;
  assume that
A1: X is connected and
A2: f.xa=a & f.xb=b and
A3: a<=d & d<=b;
  now
    assume ( not a=d)& not d=b;
    then
A4: a<d & d<b by A3,XXREAL_0:1;
    now
      assume
A5:   not ex rc being Point of X st f.rc=d;
A6:   now
        assume d in f.:([#](X));
        then ex x being object
   st x in the carrier of X & x in [#](X) & d = f.x by
FUNCT_2:64;
        hence contradiction by A5;
      end;
      dom f=the carrier of X by FUNCT_2:def 1;
      then
A7:   a in f.:([#](X)) & b in f.:([#](X)) by A2,FUNCT_1:def 6;
      [#](X) is connected by A1,CONNSP_1:27;
      hence contradiction by A4,A6,A7,Th3,TOPS_2:61;
    end;
    hence thesis;
  end;
  hence thesis by A2;
end;
