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