reserve n for Element of NAT,
  a, r for Real,
  x for Point of TOP-REAL n;
reserve n for Element of NAT,
  r for non negative Real,
  s, t, x for Point of TOP-REAL n;

theorem Th4:
  s <> t & s is Point of Tdisk(x,r) & s is not Point of Tcircle(x,r
) implies ex e being Point of Tcircle(x,r) st {e} = halfline(s,t) /\ Sphere(x,r
  )
proof
  assume that
A1: s <> t and
A2: s is Point of Tdisk(x,r) and
A3: s is not Point of Tcircle(x,r);
  reconsider S = s, T = t, X = x as Element of REAL n by EUCLID:22;
  set a = (-(2*|(t-s,s-x)|) + sqrt delta (Sum sqr (T-S), 2 * |(t-s,s-x)|, Sum
  sqr (S-X) - r^2)) / (2 * Sum sqr (T-S));
  the carrier of Tdisk(x,r) = cl_Ball(x,r) by Th3;
  then
A4: |. s-x .| <= r by A2,TOPREAL9:8;
A5: the carrier of Tcircle(x,r) = Sphere(x,r) by TOPREALB:9;
  then |. s-x .| <> r by A3,TOPREAL9:9;
  then |. s-x .| < r by A4,XXREAL_0:1;
  then s in Ball(x,r) by TOPREAL9:7;
  then consider e1 being Point of TOP-REAL n such that
A6: {e1} = halfline(s,t) /\ Sphere(x,r) and
  e1 = (1-a)*s + a*t by A1,TOPREAL9:37;
  e1 in {e1} by TARSKI:def 1;
  then e1 in Sphere(x,r) by A6,XBOOLE_0:def 4;
  hence thesis by A5,A6;
end;
