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;
reserve R for Subset of TOP-REAL n;
reserve P,Q for Subset of TOP-REAL n;
reserve D for non vertical non horizontal non empty compact Subset of TOP-REAL
  2;

theorem Th85:
  for q1,q2 being Point of TOP-REAL 2 holds LSeg(q1,q2) is boundary
proof
  let q1,q2 be Point of TOP-REAL 2;
  per cases;
  suppose
    q1=q2;
    then LSeg(q1,q2)={q1} by RLTOPSP1:70;
    hence thesis by Th83;
  end;
  suppose
A1: q1<>q2;
    set P=LSeg(q1,q2);
    the carrier of (TOP-REAL 2) c= Cl (P`)
    proof
      let z be object;
      assume
A2:   z in the carrier of TOP-REAL 2;
      per cases;
      suppose
A3:     z in P;
        reconsider ez=z as Point of Euclid 2 by A2,TOPREAL3:8;
        set p1=q1-q2;
        consider s being Real such that
A4:     z=(1-s)*q1+s*q2 and
        0<=s and
        s<=1 by A3;
        set p=(1-s)*q1+s*q2;
A5:     now
          assume |.p1.|=0;
          then p1=0.TOP-REAL 2 by TOPRNS_1:24;
          hence contradiction by A1,RLVECT_1:21;
        end;
        for G1 being Subset of (TOP-REAL 2) st G1 is open holds z in G1
        implies (P`) meets G1
        proof
          let G1 be Subset of TOP-REAL 2;
          assume
A6:       G1 is open;
          thus z in G1 implies (P`) meets G1
          proof
A7:         the TopStruct of TOP-REAL 2 = TopSpaceMetr Euclid 2 by EUCLID:def 8
;
            then reconsider GG = G1 as Subset of TopSpaceMetr Euclid 2;
            assume
A8:         z in G1;
            GG is open by A6,A7,PRE_TOPC:30;
            then consider r be Real such that
A9:         r>0 and
A10:        Ball(ez,r) c= G1 by A8,TOPMETR:15;
            reconsider r as Real;
A11:        r/2<r by A9,XREAL_1:216;
            set p2=(r/2/|.p1.|)*|[-p1`2,p1`1]| +p;
            now
              assume p2 in P;
              then consider s2 being Real such that
A12:          p2=(1-s2)*q1+s2*q2 and
              0<=s2 and
              s2<=1;
A13:          now
                assume s-s2=0;
                then (r/2/|.p1.|)*|[-p1`2,p1`1]|=p-p by A12,RLVECT_4:1;
                then
A14:            (r/2/|.p1.|)*|[-p1`2,p1`1]|=0.TOP-REAL 2 by RLVECT_1:5;
A15:            (r/2/|.p1.|)=r*2"*(|.p1.|)" by XCMPLX_0:def 9
                  .=r*(2"*(|. p1.|)");
                2"*(|.p1.|)" <>0 by A5;
                then |[-p1`2,p1`1]|=0.TOP-REAL 2 by A9,A14,A15,RLVECT_1:11
,XCMPLX_1:6;
                then
A16:            (0.TOP-REAL 2)`1=-p1`2 & (0.TOP-REAL 2)`2=p1`1;
                thus contradiction by A1,A16,EUCLID:53,54,RLVECT_1:21;
              end;
A17:          p2-p = (r/2/|.p1.|)*|[-p1`2,p1`1]| by RLVECT_4:1;
              p2-p=(1-s2)*q1+s2*q2 -(1-s)*q1-s*q2 by A12,RLVECT_1:27
                .=(1-s2)*q1-(1-s)*q1+s2*q2 -s*q2 by RLVECT_1:def 3
                .=((1-s2)-(1-s))*q1+s2*q2 -s*q2 by RLVECT_1:35
                .=(s-s2)*q1+(s2*q2 -s*q2) by RLVECT_1:def 3
                .=(s-s2)*q1+(s2-s)*q2 by RLVECT_1:35
                .=(s-s2)*q1+(-(s-s2))*q2
                .=(s-s2)*q1-(s-s2)*q2 by RLVECT_1:79
                .=(s-s2)*p1 by RLVECT_1:34;
              then 1/(s-s2)*(s-s2)*p1= 1/(s-s2)*((r/2/|.p1.|)*|[- p1`2,p1`1]|
              ) by A17,RLVECT_1:def 7;
              then 1 *p1= 1/(s-s2)*((r/2/|.p1.|)*|[-p1`2,p1`1]|) by A13,
XCMPLX_1:106;
              then p1= 1/(s-s2)*((r/2/|.p1.|)*|[-p1`2,p1`1]|) by RLVECT_1:def 8
;
              then
A18:          p1= 1/(s-s2)*(r/2/|.p1.|)*|[-p1`2,p1`1]| by RLVECT_1:def 7;
              p1`1=(|[-p1`2,p1`1]|)`2 & -p1`2=(|[-p1`2,p1`1]|)`1;
              then p1=0.TOP-REAL 2 by A18,Th84;
              hence contradiction by A1,RLVECT_1:21;
            end;
            then
A19:        p2 in (the carrier of TOP-REAL 2) \P by XBOOLE_0:def 5;
            reconsider ep2=p2 as Point of Euclid 2 by TOPREAL3:8;
A20:        p+-(r/2/|.p1.|)*|[-p1`2,p1`1]| -p = -(r/2/|.p1.|)*|[-p1`2,p1
            `1]| by RLVECT_4:1;
A21:        |[-p1`2,p1`1]|`1=-p1`2 & |[-p1`2,p1`1]|`2=p1`1;
            |.p-p2.|=|.p-(r/2/|.p1.|)*|[-p1`2,p1`1]| -p.| by RLVECT_1:27
              .=|.-(r/2/|.p1.|)*|[-p1`2,p1`1]|.| by A20
              .=|.(r/2/|.p1.|)*|[-p1`2,p1`1]|.| by TOPRNS_1:26
              .=|.r/2/|.p1.|.|*|.|[-p1`2,p1`1]|.| by TOPRNS_1:7
              .=|.r/2/|.p1.|.|*(sqrt ((-p1`2)^2+(p1`1)^2)) by A21,JGRAPH_1:30
              .=|.r/2/|.p1.|.|*(sqrt ((p1`1)^2+(p1`2)^2))
              .=|.r/2/|.p1.|.|*|.p1.| by JGRAPH_1:30
              .=|.r/2.|/(|.|.p1.|.|)*|.p1.| by COMPLEX1:67
              .=|.r/2.|/(|.p1.|)*|.p1.| by ABSVALUE:def 1
              .=|.r/2.| by A5,XCMPLX_1:87
              .=r/2 by A9,ABSVALUE:def 1;
            then dist(ez,ep2)<r by A4,A11,JGRAPH_1:28;
            then p2 in Ball(ez,r) by METRIC_1:11;
            hence thesis by A10,A19,XBOOLE_0:3;
          end;
        end;
        hence thesis by A2,PRE_TOPC:def 7;
      end;
      suppose
A22:    not z in P;
A23:    P` c= Cl(P`) by PRE_TOPC:18;
        z in (the carrier of (TOP-REAL 2)) \ P by A2,A22,XBOOLE_0:def 5;
        hence thesis by A23;
      end;
    end;
    then Cl (P`)=[#] (TOP-REAL 2);
    then P` is dense by TOPS_1:def 3;
    hence thesis by TOPS_1:def 4;
  end;
end;
