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 Th30:
  for a being Real, Q being Subset of TOP-REAL n, w1,w4 being
Point of TOP-REAL n st Q=(REAL n)\ {q : (|.q.|) < a } & w1 in Q & w4 in Q & not
(ex r being Real st w1=r*w4 or w4=r*w1)
 holds ex w2,w3 being Point of TOP-REAL
n st w2 in Q & w3 in Q & LSeg(w1,w2) c=Q & LSeg(w2,w3) c= Q & LSeg(w3,w4) c= Q
proof
  let a be Real,
      Q be Subset of TOP-REAL n, w1,w4 be Point of TOP-REAL n;
  the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
  then reconsider P=LSeg(w1,w4) as Subset of TopSpaceMetr(Euclid n);
  assume
A1: Q=(REAL n)\ {q : (|.q.|) < a } & w1 in Q & w4 in Q & not (ex r being
  Real st w1=r*w4 or w4=r*w1);
  then not (0.TOP-REAL n) in LSeg(w1,w4) by RLTOPSP1:71;
  then consider w0 being Point of TOP-REAL n such that
  w0 in LSeg(w1,w4) and
A2: |.w0.|>0 and
A3: |.w0.|=(dist_min(P)).(0.TOP-REAL n) by Th28;
  set l9=a/|.w0.|;
  set w2= l9*w1,w3=l9*w4;
A4: (REAL n)\ {q : (|.q.|) < a } = {q1 : (|.q1.|) >= a }
  proof
    thus (REAL n)\ {q : (|.q.|) < a } c= {q1 : (|.q1.|) >= a }
    proof
      let z be object;
      assume
A5:   z in (REAL n)\ {q : (|.q.|) < a };
      then reconsider q2=z as Point of TOP-REAL n by EUCLID:22;
      not z in {q : (|.q.|) < a } by A5,XBOOLE_0:def 5;
      then |.q2.| >= a;
      hence thesis;
    end;
    let z be object;
    assume z in {q1 : (|.q1.|) >= a };
    then consider q1 such that
A6: z=q1 and
A7: (|.q1.|) >= a;
    q1 in the carrier of TOP-REAL n;
    then
A8: z in REAL n by A6,EUCLID:22;
    for q st q=z holds (|.q.|) >= a by A6,A7;
    then not z in {q : (|.q.|) < a };
    hence thesis by A8,XBOOLE_0:def 5;
  end;
A9: LSeg(w1,w2) c=Q
  proof
    let x be object;
    assume x in LSeg(w1,w2);
    then consider r such that
A10: x=(1-r)*w1 + r*w2 and
A11: 0 <= r and
A12: r <= 1;
    now
      per cases;
      case
A13:    a>0;
        the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
        then reconsider P=LSeg(w1,w4) as Subset of TopSpaceMetr(Euclid n);
        reconsider o=0.TOP-REAL n as Point of Euclid n by EUCLID:67;
        reconsider w5=(1-0)*w1 + 0 * w4 as Point of TOP-REAL n;
A14:    (1-0)*w1+0 * w4=(1-0)*w1+0.TOP-REAL n by RLVECT_1:10
          .=(1-0)*w1 by RLVECT_1:4
          .=w1 by RLVECT_1:def 8;
        ((dist(o)).:(P)) c= REAL
        by XREAL_0:def 1;
        then reconsider F=((dist(o)).:(P)) as Subset of REAL;
        reconsider w59=w5 as Point of Euclid n by TOPREAL3:8;
    0 is LowerBound of (dist o).:P
        proof
          let r be ExtReal;
          assume r in ((dist(o)).:(P));
          then consider x being object such that
          x in dom (dist(o)) and
A15:      x in P and
A16:      r=(dist(o)).x by FUNCT_1:def 6;
          reconsider w0=x as Point of Euclid n by A15,TOPREAL3:8;
          r=dist(w0,o) by A16,WEIERSTR:def 4;
          hence thesis by METRIC_1:5;
        end;
        then
A17:    F is bounded_below;
        the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
        then w59 in the carrier of TopSpaceMetr(Euclid n);
        then
A18:    w59 in dom (dist(o)) by FUNCT_2:def 1;
        w5 in LSeg(w1,w4) & dist(w59,o)=(dist(o)).w59 by WEIERSTR:def 4;
        then dist(w59,o) in ((dist(o)).:(P)) by A18,FUNCT_1:def 6;
        then lower_bound F <=dist(w59,o) by A17,SEQ_4:def 2;
        then dist(w59,o)>= lower_bound([#]((dist(o)).:(P))) by WEIERSTR:def 1;
        then dist(w59,o)>= lower_bound((dist(o)).:(P)) by WEIERSTR:def 3;
        then dist(w59,o)>=|.w0.| by A3,WEIERSTR:def 6;
        then |.w5-0.TOP-REAL n.| >=|.w0.| by JGRAPH_1:28;
        then
A19:    |.w5.| >=|.w0.| by RLVECT_1:13;
A20:    1-r>=0 by A12,XREAL_1:48;
        then
A21:    |.(1-r)+r*l9.|*|.w1.|=((1-r)+ r*l9)*|.w1.| by A11,A13,ABSVALUE:def 1
          .= (1-r)*|.w1.|+r*l9*|.w1.|;
        ex q1 being Point of TOP-REAL n st q1=w1 & |.q1.| >= a by A1,A4;
        then
A22:    (1-r)*|.w1.|>=(1-r)*a by A20,XREAL_1:64;
        r*l9*|.w0.| =r*a/|.w0.|*|.w0.| by XCMPLX_1:74
          .=r*a by A2,XCMPLX_1:87;
        then r*l9*|.w1.|>= r*a by A11,A13,A14,A19,XREAL_1:64;
        then |.(1-r)+r*l9.|*|.w1.|>=r*a+(1-r)*a by A22,A21,XREAL_1:7;
        then |.((1-r)+ r*l9)*w1.|>=a by TOPRNS_1:7;
        then |.(1-r)*w1 + r*l9*w1.|>=a by RLVECT_1:def 6;
        hence |.(1-r)*w1 + r*w2.|>=a by RLVECT_1:def 7;
      end;
      case
        a<=0;
        hence |.(1-r)*w1 + r*w2.|>=a;
      end;
    end;
    hence thesis by A1,A4,A10;
  end;
A23: LSeg(w4,w3) c=Q
  proof
    let x be object;
    assume x in LSeg(w4,w3);
    then consider r such that
A24: x=(1-r)*w4 + r*w3 and
A25: 0 <= r and
A26: r <= 1;
    now
      per cases;
      case
A27:    a>0;
        the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
        then reconsider P=LSeg(w4,w1) as Subset of TopSpaceMetr(Euclid n);
        reconsider o=0.TOP-REAL n as Point of Euclid n by EUCLID:67;
        reconsider w5=(1-0)*w4 + 0 * w1 as Point of TOP-REAL n;
A28:    (1-0)*w4+0 * w1=(1-0)*w4+0.TOP-REAL n by RLVECT_1:10
          .=(1-0)*w4 by RLVECT_1:4
          .=w4 by RLVECT_1:def 8;
        ((dist(o)).:(P)) c= REAL
        by XREAL_0:def 1;
        then reconsider F=((dist(o)).:(P)) as Subset of REAL;
        reconsider w59=w5 as Point of Euclid n by TOPREAL3:8;
A29:    dist(w59,o)=(dist(o)).w59 by WEIERSTR:def 4;
    0 is LowerBound of (dist o).:P
        proof
          let r be ExtReal;
          assume r in ((dist(o)).:(P));
          then consider x being object such that
          x in dom (dist(o)) and
A30:      x in P and
A31:      r=(dist(o)).x by FUNCT_1:def 6;
          reconsider w0=x as Point of Euclid n by A30,TOPREAL3:8;
          r=dist(w0,o) by A31,WEIERSTR:def 4;
          hence thesis by METRIC_1:5;
        end;
        then
A32:    F is bounded_below;
        the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
        then w59 in the carrier of TopSpaceMetr(Euclid n);
        then
A33:    w59 in dom (dist(o)) by FUNCT_2:def 1;
        w5 in {(1-r1)*w4 + r1 * w1:0 <= r1 & r1 <= 1};
        then dist(w59,o) in ((dist(o)).:(P)) by A33,A29,FUNCT_1:def 6;
        then lower_bound F <=dist(w59,o) by A32,SEQ_4:def 2;
        then dist(w59,o)>= lower_bound([#]((dist(o)).:(P))) by WEIERSTR:def 1;
        then dist(w59,o)>= lower_bound((dist(o)).:(P)) by WEIERSTR:def 3;
        then dist(w59,o)>=|.w0.| by A3,WEIERSTR:def 6;
        then |.w5-0.TOP-REAL n.| >=|.w0.| by JGRAPH_1:28;
        then
A34:    |.w5.| >=|.w0.| by RLVECT_1:13;
A35:    1-r>=0 by A26,XREAL_1:48;
        then
A36:    |.(1-r)+r*l9.|*|.w4.|=((1-r)+ r*l9)*|.w4.| by A25,A27,ABSVALUE:def 1
          .= (1-r)*|.w4.|+r*l9*|.w4.|;
        ex q1 being Point of TOP-REAL n st q1=w4 & |.q1.| >= a by A1,A4;
        then
A37:    (1-r)*|.w4.|>=(1-r)*a by A35,XREAL_1:64;
        r*l9*|.w0.| =r*a/|.w0.|*|.w0.| by XCMPLX_1:74
          .=r*a by A2,XCMPLX_1:87;
        then r*l9*|.w4.|>= r*a by A25,A27,A28,A34,XREAL_1:64;
        then |.(1-r)+r*l9.|*|.w4.|>=r*a+(1-r)*a by A37,A36,XREAL_1:7;
        then |.((1-r)+ r*l9)*w4.|>=a by TOPRNS_1:7;
        then |.(1-r)*w4 + r*l9*w4.|>=a by RLVECT_1:def 6;
        hence |.(1-r)*w4 + r*w3.|>=a by RLVECT_1:def 7;
      end;
      case
        a<=0;
        hence |.(1-r)*w4 + r*w3.|>=a;
      end;
    end;
    hence thesis by A1,A4,A24;
  end;
A38: LSeg(w2,w3)c=Q
  proof
    the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
    then reconsider P=LSeg(w1,w4) as Subset of TopSpaceMetr(Euclid n);
    reconsider o=0.TOP-REAL n as Point of Euclid n by EUCLID:67;
    let x be object;
A39: |.l9.|=|.a.|/|.|.w0.|.| by COMPLEX1:67
      .=|.a.|/|.w0.| by ABSVALUE:def 1;
    ((dist(o)).:(P)) c= REAL
    by XREAL_0:def 1;
    then reconsider F=(dist(o)).:(P) as Subset of REAL;
    assume x in LSeg(w2,w3);
    then consider r such that
A40: x=(1-r)*w2 + r*w3 and
A41: 0 <= r & r <= 1;
    reconsider w5=(1-r)*w1 + r*w4 as Point of TOP-REAL n;
    reconsider w59=w5 as Point of Euclid n by TOPREAL3:8;
A42: dist(w59,o)=(dist(o)).w59 by WEIERSTR:def 4;
    0 is LowerBound of (dist o).:P
    proof
      let r be ExtReal;
      assume r in ((dist(o)).:(P));
      then consider x being object such that
      x in dom (dist(o)) and
A43:  x in P and
A44:  r=(dist(o)).x by FUNCT_1:def 6;
      reconsider w0=x as Point of Euclid n by A43,TOPREAL3:8;
      r=dist(w0,o) by A44,WEIERSTR:def 4;
      hence thesis by METRIC_1:5;
    end;
    then
A45: F is bounded_below;
    the TopStruct of TOP-REAL n = TopSpaceMetr Euclid n by EUCLID:def 8;
    then w59 in the carrier of TopSpaceMetr(Euclid n);
    then
A46: w59 in dom (dist(o)) by FUNCT_2:def 1;
    w5 in LSeg(w1,w4) by A41;
    then dist(w59,o) in ((dist(o)).:(P)) by A46,A42,FUNCT_1:def 6;
    then lower_bound F <=dist(w59,o) by A45,SEQ_4:def 2;
    then dist(w59,o)>= lower_bound([#]((dist(o)).:(P))) by WEIERSTR:def 1;
    then dist(w59,o)>= lower_bound((dist(o)).:(P)) by WEIERSTR:def 3;
    then dist(w59,o)>=|.w0.| by A3,WEIERSTR:def 6;
    then |.w5-0.TOP-REAL n.| >=|.w0.| by JGRAPH_1:28;
    then |.w5.| >=|.w0.| by RLVECT_1:13;
    then |.a.|>=0 & |.w5.|/|.w0.|>=1 by A2,COMPLEX1:46,XREAL_1:181;
    then |.a.|*(|.w5.|/|.w0.|)>=|.a.|*1 by XREAL_1:66;
    then |.a.|*(|.w5.|*|.w0.|")>=|.a.| by XCMPLX_0:def 9;
    then |.a.|*|.w0.|"*|.w5.|>=|.a.|;
    then
A47: |.a.|/|.w0.|*|.w5.|>=|.a.| by XCMPLX_0:def 9;
    |.a.|>=a by ABSVALUE:4;
    then |.a.|/|.w0.|*|.w5.|>=a by A47,XXREAL_0:2;
    then |.l9*((1-r)*w1 + r*w4).|>=a by A39,TOPRNS_1:7;
    then |.l9*((1-r)*w1) + l9*(r*w4).|>=a by RLVECT_1:def 5;
    then |.l9*((1-r)*w1) + (l9*r)*w4.|>=a by RLVECT_1:def 7;
    then |.(l9*(1-r))*w1 + (l9*r)*w4.|>=a by RLVECT_1:def 7;
    then |.((1-r)*l9)*w1 + r*(l9*w4).|>=a by RLVECT_1:def 7;
    then |.(1-r)*w2 + r*w3.|>=a by RLVECT_1:def 7;
    hence thesis by A1,A4,A40;
  end;
  w2 in LSeg(w2,w3) & w3 in LSeg(w2,w3) by RLTOPSP1:68;
  hence thesis by A38,A9,A23;
end;
