reserve n for Nat,
  a, b, r, w for Real,
  x, y, z for Point of TOP-REAL n,
  e for Point of Euclid n;
reserve V for RealLinearSpace,
        p,q,x for Element of V;
reserve p, q, x for Point of TOP-REAL n;
reserve s, t for Point of TOP-REAL 2;

theorem
  for S, T, X being Element of REAL 2 st S = s & T = t & X = |[a,b]| & w
  = (-(2*|(t-s,s-|[a,b]|)|) + sqrt delta (Sum sqr (T-S), 2 * |(t-s,s-|[a,b]|)|,
Sum sqr (S-X) - r^2)) / (2 * Sum sqr (T-S)) & s <> t & s in inside_of_circle(a,
b,r) ex e being Point of TOP-REAL 2 st {e} = halfline(s,t) /\ circle(a,b,r) & e
  = (1-w)*s + w*t
proof
A1: Ball(|[a,b]|,r) = inside_of_circle(a,b,r) & Sphere(|[a,b]|,r) = circle(a
  ,b,r ) by Th48,Th50;
  let S, T, X be Element of REAL 2;
  assume S = s & T = t & X = |[a,b]| & w = (-(2*|(t-s,s-|[a,b]|)|) + sqrt
delta ( Sum sqr (T-S), 2 * |(t-s,s-|[a,b]|)|, Sum sqr (S-X) - r^2)) / (2 * Sum
  sqr (T-S )) & s <> t & s in inside_of_circle(a,b,r);
  hence thesis by A1,Th35;
end;
