reserve n,i,k,m for Nat;
reserve r,r1,r2,s,s1,s2 for Real;
reserve p,p1,p2,q1,q2 for Point of TOP-REAL n;
reserve P,Q for Subset of TOP-REAL 2,
  f,f1,f2 for FinSequence of the carrier of TOP-REAL 2,
  p,p1,p2,p3,q,q3 for Point of TOP-REAL 2;

theorem
  f is special alternating & 1<=i & i+2<=len f implies not LSeg(f/.i,f/.
  (i+2)) c= LSeg(f,i) \/ LSeg(f,i+1)
proof
  set p1=f/.i, p2=f/.(i+2);
  assume that
A1: f is special and
A2: f is alternating and
A3: 1<=i and
A4: i+2<=len f;
  set p0 = f/.(i+1);
  i+1 <= i+2 by XREAL_1:6;
  then i+1 <= len f by A4,XXREAL_0:2;
  then
A5: LSeg(f,i)=LSeg(p1,p0) by A3,TOPREAL1:def 3;
  1 <= i+1 & i+(1+1) = i+1+1 by NAT_1:11;
  then
A6: LSeg(f,i+1)=LSeg(p0,p2) by A4,TOPREAL1:def 3;
  consider p such that
A7: p in LSeg(p1,p2) and
A8: p`1<>p1`1 and
A9: p`1<>p2`1 and
A10: p`2<>p1`2 and
A11: p`2<>p2`2 by A2,A3,A4,Lm5;
  assume
A12: LSeg(p1,p2)c= LSeg(f,i) \/ LSeg(f,i+1);
  per cases by A7,A5,A6,A12,XBOOLE_0:def 3;
  suppose
A13: p in LSeg(p1,p0);
A14: p1 in LSeg(p1,p0) by RLTOPSP1:68;
    LSeg(p1,p0) is vertical or LSeg(p1,p0) is horizontal by A1,A5,Th19;
    hence contradiction by A8,A10,A13,A14;
  end;
  suppose
A15: p in LSeg(p0,p2);
A16: p2 in LSeg(p0,p2) by RLTOPSP1:68;
    LSeg(p0,p2) is vertical or LSeg(p0,p2) is horizontal by A1,A6,Th19;
    hence contradiction by A9,A11,A15,A16;
  end;
end;
