reserve r1,r2 for Real;
reserve n,i,i1,i2,j for Nat;
reserve D for non empty set;
reserve f for FinSequence of D;

theorem Th31:
  for f be FinSequence of TOP-REAL 2 for p,q be Point of TOP-REAL
2 st p in L~f & q in L~f & p<>q & Index(p,f) = Index(q,f) & LE p,q,f/.(Index(p,
  f)),f/.(Index(p,f)+1) holds q in L~L_Cut(f,p)
proof
  let f be FinSequence of TOP-REAL 2;
  let p,q be Point of TOP-REAL 2;
  assume that
A1: p in L~f and
A2: q in L~f and
A3: p<>q and
A4: Index(p,f)=Index(q,f) and
A5: LE p,q,f/.(Index(p,f)),f/.(Index(p,f)+1);
A6: Index(q,f)-'Index(p,f)=Index(q,f)-Index(p,f) by A4,XREAL_1:233
    .=0 by A4;
  Index(q,f)<len f by A2,Th8;
  then
A7: Index(q,f)+1<=len f by NAT_1:13;
A8: now
    q in LSeg(f/.(Index(p,f)),f/.(Index(p,f)+1)) by A5;
    then consider r be Real such that
A9: q = (1-r)*f/.(Index(p,f))+r*f/.(Index(p,f)+1) and
A10: 0 <= r and
A11: r <= 1;
A12: p = 1 * p by RLVECT_1:def 8
      .= 0.TOP-REAL 2 + 1 * p by RLVECT_1:4
      .= (1-1)*f/.(Index(p,f))+1 * p by RLVECT_1:10;
    assume
A13: p = f.(Index(p,f)+1);
    then p = f/.(Index(p,f)+1) by A4,A7,FINSEQ_4:15,NAT_1:11;
    then 1<=r by A5,A9,A10,A12;
    then r = 1 by A11,XXREAL_0:1;
    hence contradiction by A3,A4,A7,A13,A9,A12,FINSEQ_4:15,NAT_1:11;
  end;
  then
A14: len L_Cut(f,p)=len f -Index(p,f)+1 by A1,Th26;
  1<=Index(q,f) by A2,Th8;
  then
A15: 1<=Index(q,f)+1 by NAT_D:48;
  1<0+1+1;
  then
A16: len <*p*> < Index(q,f)-'Index(p,f)+1+1 by A6,FINSEQ_1:40;
A17: Index(q,f)<len f by A2,Th8;
  then
A18: Index(q,f)+1<=len f by NAT_1:13;
  then
A19: Index(q,f)+1-Index(p,f)<=len f -Index(p,f) by XREAL_1:9;
  then
A20: Index(q,f)-Index(p,f)+1+1<=len f -Index(p,f)+1 by XREAL_1:6;
  Index(q,f)-Index(p,f)+1<=len f -Index(p,f) by A19;
  then
A21: Index(q,f)-'Index(p,f)+1<=len f - (Index(p,f)+1)+1 by A4,XREAL_1:233;
A22: 1<=Index(p,f)+1 by NAT_1:11;
A23: Index(q,f)<len f by A2,Th8;
  then Index(q,f)-Index(p,f)<=len f -Index(p,f) by XREAL_1:9;
  then Index(q,f)-Index(p,f)+1<=len f -Index(p,f)+1 by XREAL_1:6;
  then
A24: (L_Cut(f,p))/.(Index(q,f)-'Index(p,f)+1) = L_Cut(f,p).(Index(q,f)-'
  Index(p,f)+1) by A4,A6,A14,FINSEQ_4:15
    .= (<*p*>^mid(f,Index(p,f)+1,len f)).(Index(q,f)-'Index(p,f)+1) by A8,Def3
    .= p by A6,FINSEQ_1:41;
  set i1=Index(q,f)-'Index(p,f)+1;
A25: Index(q,f)+1<=len f by A17,NAT_1:13;
  Index(q,f)+1-Index(p,f)<=len f -Index(p,f) by A18,XREAL_1:9;
  then Index(q,f)-Index(p,f)+1<=len f -Index(p,f);
  then i1<=len f -Index(p,f) by A4,XREAL_0:def 2;
  then
A26: i1+1<=len L_Cut(f,p) by A14,XREAL_1:6;
  1<=Index(q,f) by A2,Th8;
  then 1<len f by A23,XXREAL_0:2;
  then len mid(f,Index(p,f)+1,len f) = len f -'(Index(p,f)+1)+1 by A4,A7,A22,
FINSEQ_6:118;
  then
  len <*p*> + len mid(f,Index(p,f)+1,len f) = 1+(len f -'(Index(p,f)+1)+1
  ) by FINSEQ_1:40
    .= 1+(len f -(Index(p,f)+1)+1) by A4,A7,XREAL_1:233
    .= (len f -Index(p,f))+1;
  then
A27: Index(q,f)-'Index(p,f)+1+1<=len <*p*>+len mid(f,Index(p,f)+1,len f) by A4
,A20,XREAL_1:233;
  (L_Cut(f,p))/.(Index(q,f)-'Index(p,f)+1+1) = L_Cut(f,p).(Index(q,f)-'
  Index(p,f)+1+1) by A4,A6,A14,A20,FINSEQ_4:15
    .= (<*p*>^mid(f,Index(p,f)+1,len f)).(Index(q,f)-'Index(p,f)+1+1) by A8
,Def3
    .= mid(f,Index(p,f)+1,len f).(Index(q,f)-'Index(p,f)+1+1-len <*p*>) by A16
,A27,FINSEQ_6:108
    .= mid(f,Index(p,f)+1,len f).(Index(q,f)-'Index(p,f)+1+1-1) by FINSEQ_1:40
    .= f.(Index(p,f)+1+(Index(q,f)-Index(p,f)+1)-1) by A4,A7,A6,A22,A21,
FINSEQ_6:122
    .= f/.(Index(q,f)+1) by A15,A25,FINSEQ_4:15;
  then q in LSeg((L_Cut(f,p))/.((Index(q,f)-'Index(p,f)+1)), (L_Cut(f,p))/.((
  Index(q,f)-'Index(p,f)+1+1))) by A4,A5,A24,Th30;
  hence thesis by A6,A26,SPPOL_2:15;
end;
