let f be S-Sequence_in_R2; :: thesis: for p, q being Point of (TOP-REAL 2)
for j being Element of NAT st 1 <= j & j < len f & p in LSeg f,j & q in LSeg p,(f /. (j + 1)) holds
LE p,q, L~ f,f /. 1,f /. (len f)

let p, q be Point of (TOP-REAL 2); :: thesis: for j being Element of NAT st 1 <= j & j < len f & p in LSeg f,j & q in LSeg p,(f /. (j + 1)) holds
LE p,q, L~ f,f /. 1,f /. (len f)

let j be Element of NAT ; :: thesis: ( 1 <= j & j < len f & p in LSeg f,j & q in LSeg p,(f /. (j + 1)) implies LE p,q, L~ f,f /. 1,f /. (len f) )
assume that
A1: ( 1 <= j & j < len f ) and
A2: p in LSeg f,j and
A3: q in LSeg p,(f /. (j + 1)) ; :: thesis: LE p,q, L~ f,f /. 1,f /. (len f)
A4: j + 1 <= len f by A1, NAT_1:13;
then A5: LSeg f,j = LSeg (f /. j),(f /. (j + 1)) by A1, TOPREAL1:def 5;
A6: f /. (j + 1) in LSeg f,j by A1, A4, TOPREAL1:27;
then A7: LSeg p,(f /. (j + 1)) c= LSeg f,j by A2, A5, TOPREAL1:12;
then A8: q in LSeg f,j by A3;
A9: LSeg f,j c= L~ f by TOPREAL3:26;
per cases ( p = q or q <> p ) ;
suppose p = q ; :: thesis: LE p,q, L~ f,f /. 1,f /. (len f)
hence LE p,q, L~ f,f /. 1,f /. (len f) by A2, A9, JORDAN5C:9; :: thesis: verum
end;
suppose A10: q <> p ; :: thesis: LE p,q, L~ f,f /. 1,f /. (len f)
for i, j being Element of NAT st p in LSeg f,i & q in LSeg f,j & 1 <= i & i + 1 <= len f & 1 <= j & j + 1 <= len f holds
( i <= j & ( i = j implies LE p,q,f /. i,f /. (i + 1) ) )
proof
let i1, i2 be Element of NAT ; :: thesis: ( p in LSeg f,i1 & q in LSeg f,i2 & 1 <= i1 & i1 + 1 <= len f & 1 <= i2 & i2 + 1 <= len f implies ( i1 <= i2 & ( i1 = i2 implies LE p,q,f /. i1,f /. (i1 + 1) ) ) )
assume that
A11: p in LSeg f,i1 and
A12: q in LSeg f,i2 and
A13: ( 1 <= i1 & i1 + 1 <= len f ) and
A14: ( 1 <= i2 & i2 + 1 <= len f ) ; :: thesis: ( i1 <= i2 & ( i1 = i2 implies LE p,q,f /. i1,f /. (i1 + 1) ) )
A15: now
assume ( i1 + 1 > j & j + 1 > i1 ) ; :: thesis: i1 = j
then ( i1 <= j & j <= i1 ) by NAT_1:13;
hence i1 = j by XXREAL_0:1; :: thesis: verum
end;
A16: p in (LSeg f,i1) /\ (LSeg f,j) by A2, A11, XBOOLE_0:def 4;
then LSeg f,i1 meets LSeg f,j by XBOOLE_0:4;
then A17: ( i1 + 1 >= j & j + 1 >= i1 ) by TOPREAL1:def 9;
A18: now
assume A19: j + 1 = i1 ; :: thesis: contradiction
j + (1 + 1) = (j + 1) + 1 ;
then p in {(f /. (j + 1))} by A1, A13, A16, A19, TOPREAL1:def 8;
then p = f /. (j + 1) by TARSKI:def 1;
then q in {p} by A3, RLTOPSP1:71;
hence contradiction by A10, TARSKI:def 1; :: thesis: verum
end;
then ( i1 + 1 = j or i1 = j ) by A15, A17, XXREAL_0:1;
then A20: i1 <= j by NAT_1:11;
A21: now
assume ( i2 + 1 > j & j + 1 > i2 ) ; :: thesis: i2 = j
then ( i2 <= j & j <= i2 ) by NAT_1:13;
hence i2 = j by XXREAL_0:1; :: thesis: verum
end;
A22: q in (LSeg f,i2) /\ (LSeg f,j) by A3, A7, A12, XBOOLE_0:def 4;
then LSeg f,i2 meets LSeg f,j by XBOOLE_0:4;
then ( i2 + 1 >= j & j + 1 >= i2 ) by TOPREAL1:def 9;
then A23: ( i2 + 1 = j or i2 = j or j + 1 = i2 ) by A21, XXREAL_0:1;
1 <= j + 1 by NAT_1:11;
then A24: j + 1 in dom f by A4, FINSEQ_3:27;
A25: j in dom f by A1, FINSEQ_3:27;
A26: now
assume f /. (j + 1) = f /. j ; :: thesis: contradiction
then j = j + 1 by A24, A25, PARTFUN2:17;
hence contradiction ; :: thesis: verum
end;
A27: now
assume A28: i2 + 1 = j ; :: thesis: contradiction
i2 + (1 + 1) = (i2 + 1) + 1 ;
then q in {(f /. j)} by A4, A14, A22, A28, TOPREAL1:def 8;
then q = f /. j by TARSKI:def 1;
hence contradiction by A2, A3, A5, A6, A10, A26, SPPOL_1:24, TOPREAL1:12; :: thesis: verum
end;
then i2 >= j by A23, NAT_1:11;
hence i1 <= i2 by A20, XXREAL_0:2; :: thesis: ( i1 = i2 implies LE p,q,f /. i1,f /. (i1 + 1) )
assume A29: i1 = i2 ; :: thesis: LE p,q,f /. i1,f /. (i1 + 1)
not p in LSeg q,(f /. (j + 1)) by A3, A10, SPRECT_3:16;
then not LE q,p,f /. j,f /. (j + 1) by JORDAN3:65;
then LT p,q,f /. j,f /. (j + 1) by A2, A5, A12, A15, A17, A18, A26, A27, A29, JORDAN3:63, XXREAL_0:1;
hence LE p,q,f /. i1,f /. (i1 + 1) by A15, A17, A18, A27, A29, JORDAN3:def 7, XXREAL_0:1; :: thesis: verum
end;
hence LE p,q, L~ f,f /. 1,f /. (len f) by A2, A8, A9, A10, JORDAN5C:30; :: thesis: verum
end;
end;