reserve m,n,i,i2,j for Nat,
  r,r1,r2,s,t for Real,
  x,y,z for object;
reserve p,p1,p2,p3,q,q1,q2,q3,q4 for Point of TOP-REAL n;
reserve u for Point of Euclid n;

theorem Th28:
  for w1,w2 being Point of TOP-REAL n,P being Subset of
  TopSpaceMetr(Euclid n) st P=LSeg(w1,w2)& not (0.TOP-REAL n) in LSeg(w1,w2)
holds ex w0 being Point of TOP-REAL n st w0 in LSeg(w1,w2) & |.w0.|>0 & |.w0.|=
  (dist_min(P)).(0.TOP-REAL n)
proof
  let w1,w2 be Point of TOP-REAL n,P be Subset of TopSpaceMetr(Euclid n);
  assume that
A1: P=LSeg(w1,w2) and
A2: not 0.TOP-REAL n in LSeg(w1,w2);
  set M=Euclid n;
  reconsider P0=P as Subset of TopSpaceMetr(M);
A3: the TopStruct of TOP-REAL n = TopSpaceMetr M by EUCLID:def 8;
  then reconsider Q={0.TOP-REAL n} as Subset of TopSpaceMetr(M);
  P0 is compact by A1,A3,COMPTS_1:23;
  then consider x1,x2 being Point of M such that
A4: x1 in P0 and
A5: x2 in Q and
A6: dist(x1,x2) = min_dist_min(P0,Q) by A1,A3,WEIERSTR:30;
  reconsider w01=x1 as Point of TOP-REAL n by EUCLID:67;
A7: x2=0.TOP-REAL n by A5,TARSKI:def 1;
  reconsider o=0.TOP-REAL n as Point of M by EUCLID:67;
  reconsider o2=0.TOP-REAL n as Point of TopSpaceMetr(M) by A3;
  for x being object holds x in (dist_min(P0)).:(Q) iff x=(dist_min(P0)).o
  proof
    let x be object;
    hereby
      assume x in (dist_min(P0)).:(Q);
      then
      ex y being object st y in dom(dist_min(P0)) & y in Q & x=( dist_min(P0)
      ).y by FUNCT_1:def 6;
      hence x=(dist_min(P0)).o by TARSKI:def 1;
    end;
    o2 in the carrier of TopSpaceMetr(M) by A3;
    then
A8: o in Q & o in dom (dist_min(P0)) by FUNCT_2:def 1,TARSKI:def 1;
    assume x=(dist_min(P0)).o;
    hence thesis by A8,FUNCT_1:def 6;
  end;
  then
A9: (dist_min(P0)).:(Q)={(dist_min(P0)).o} by TARSKI:def 1;
  [#] ((dist_min(P0)).:(Q))=(dist_min(P0)).:(Q) & lower_bound([#] ((
dist_min( P0)).:(Q)))=lower_bound((dist_min(P0)).:(Q)) by WEIERSTR:def 1,def 3;
  then
A10: lower_bound((dist_min(P0)).:(Q))=(dist_min(P0)).o by A9,SEQ_4:9;
A11: |.w01.|=|.w01-0.TOP-REAL n.| by RLVECT_1:13
    .=dist(x1,x2) by A7,JGRAPH_1:28;
  |.w01.| <> 0 by A1,A2,A4,TOPRNS_1:24;
  hence thesis by A1,A4,A6,A10,A11,WEIERSTR:def 7;
end;
