let a, b, c, d be real number ; :: thesis: for p1, p2 being Point of (TOP-REAL 2) st a < b & c < d & p1 in LSeg |[a,d]|,|[b,d]| & p2 in LSeg |[a,d]|,|[b,d]| holds
( LE p1,p2, rectangle a,b,c,d iff p1 `1 <= p2 `1 )

let p1, p2 be Point of (TOP-REAL 2); :: thesis: ( a < b & c < d & p1 in LSeg |[a,d]|,|[b,d]| & p2 in LSeg |[a,d]|,|[b,d]| implies ( LE p1,p2, rectangle a,b,c,d iff p1 `1 <= p2 `1 ) )
set K = rectangle a,b,c,d;
assume A1: ( a < b & c < d & p1 in LSeg |[a,d]|,|[b,d]| & p2 in LSeg |[a,d]|,|[b,d]| ) ; :: thesis: ( LE p1,p2, rectangle a,b,c,d iff p1 `1 <= p2 `1 )
then A2: rectangle a,b,c,d is being_simple_closed_curve by Th60;
A3: ( p1 `2 = d & a <= p1 `1 & p1 `1 <= b ) by A1, Th11;
A4: ( p2 `2 = d & a <= p2 `1 & p2 `1 <= b ) by A1, Th11;
A5: W-min (rectangle a,b,c,d) = |[a,c]| by A1, Th56;
A6: E-max (rectangle a,b,c,d) = |[b,d]| by A1, Th56;
A7: Upper_Arc (rectangle a,b,c,d) = (LSeg |[a,c]|,|[a,d]|) \/ (LSeg |[a,d]|,|[b,d]|) by A1, Th61;
then A8: LSeg |[a,d]|,|[b,d]| c= Upper_Arc (rectangle a,b,c,d) by XBOOLE_1:7;
A9: (Upper_Arc (rectangle a,b,c,d)) /\ (Lower_Arc (rectangle a,b,c,d)) = {(W-min (rectangle a,b,c,d)),(E-max (rectangle a,b,c,d))} by A2, JORDAN6:def 9;
A10: now end;
thus ( LE p1,p2, rectangle a,b,c,d implies p1 `1 <= p2 `1 ) :: thesis: ( p1 `1 <= p2 `1 implies LE p1,p2, rectangle a,b,c,d )
proof
assume LE p1,p2, rectangle a,b,c,d ; :: thesis: p1 `1 <= p2 `1
then A12: ( ( p1 in Upper_Arc (rectangle a,b,c,d) & p2 in Lower_Arc (rectangle a,b,c,d) & not p2 = W-min (rectangle a,b,c,d) ) or ( p1 in Upper_Arc (rectangle a,b,c,d) & p2 in Upper_Arc (rectangle a,b,c,d) & LE p1,p2, Upper_Arc (rectangle a,b,c,d), W-min (rectangle a,b,c,d), E-max (rectangle a,b,c,d) ) or ( p1 in Lower_Arc (rectangle a,b,c,d) & p2 in Lower_Arc (rectangle a,b,c,d) & not p2 = W-min (rectangle a,b,c,d) & LE p1,p2, Lower_Arc (rectangle a,b,c,d), E-max (rectangle a,b,c,d), W-min (rectangle a,b,c,d) ) ) by JORDAN6:def 10;
now
per cases ( p2 = E-max (rectangle a,b,c,d) or p2 <> E-max (rectangle a,b,c,d) ) ;
case p2 = E-max (rectangle a,b,c,d) ; :: thesis: p1 `1 <= p2 `1
hence p1 `1 <= p2 `1 by A3, A6, EUCLID:56; :: thesis: verum
end;
case A13: p2 <> E-max (rectangle a,b,c,d) ; :: thesis: p1 `1 <= p2 `1
consider f being Function of I[01] ,((TOP-REAL 2) | (Upper_Arc (rectangle a,b,c,d))) such that
A14: ( f is being_homeomorphism & f . 0 = W-min (rectangle a,b,c,d) & f . 1 = E-max (rectangle a,b,c,d) & rng f = Upper_Arc (rectangle a,b,c,d) & ( for r being Real st r in [.0 ,(1 / 2).] holds
f . r = ((1 - (2 * r)) * |[a,c]|) + ((2 * r) * |[a,d]|) ) & ( for r being Real st r in [.(1 / 2),1.] holds
f . r = ((1 - ((2 * r) - 1)) * |[a,d]|) + (((2 * r) - 1) * |[b,d]|) ) & ( for p being Point of (TOP-REAL 2) st p in LSeg |[a,c]|,|[a,d]| holds
( 0 <= (((p `2 ) - c) / (d - c)) / 2 & (((p `2 ) - c) / (d - c)) / 2 <= 1 & f . ((((p `2 ) - c) / (d - c)) / 2) = p ) ) & ( for p being Point of (TOP-REAL 2) st p in LSeg |[a,d]|,|[b,d]| holds
( 0 <= ((((p `1 ) - a) / (b - a)) / 2) + (1 / 2) & ((((p `1 ) - a) / (b - a)) / 2) + (1 / 2) <= 1 & f . (((((p `1 ) - a) / (b - a)) / 2) + (1 / 2)) = p ) ) ) by A1, Th63;
reconsider s1 = ((((p1 `1 ) - a) / (b - a)) / 2) + (1 / 2), s2 = ((((p2 `1 ) - a) / (b - a)) / 2) + (1 / 2) as Real ;
A15: f . s1 = p1 by A1, A14;
A16: f . s2 = p2 by A1, A14;
A17: b - a > 0 by A1, XREAL_1:52;
A18: ( 0 <= s1 & s1 <= 1 ) by A1, A14;
( 0 <= s2 & s2 <= 1 ) by A1, A14;
then s1 <= s2 by A10, A12, A13, A14, A15, A16, A18, JORDAN5C:def 3;
then (((p1 `1 ) - a) / (b - a)) / 2 <= (((p2 `1 ) - a) / (b - a)) / 2 by XREAL_1:8;
then ((((p1 `1 ) - a) / (b - a)) / 2) * 2 <= ((((p2 `1 ) - a) / (b - a)) / 2) * 2 by XREAL_1:66;
then (((p1 `1 ) - a) / (b - a)) * (b - a) <= (((p2 `1 ) - a) / (b - a)) * (b - a) by A17, XREAL_1:66;
then (p1 `1 ) - a <= (((p2 `1 ) - a) / (b - a)) * (b - a) by A17, XCMPLX_1:88;
then (p1 `1 ) - a <= (p2 `1 ) - a by A17, XCMPLX_1:88;
then ((p1 `1 ) - a) + a <= ((p2 `1 ) - a) + a by XREAL_1:9;
hence p1 `1 <= p2 `1 ; :: thesis: verum
end;
end;
end;
hence p1 `1 <= p2 `1 ; :: thesis: verum
end;
thus ( p1 `1 <= p2 `1 implies LE p1,p2, rectangle a,b,c,d ) :: thesis: verum
proof
assume A19: p1 `1 <= p2 `1 ; :: thesis: LE p1,p2, rectangle a,b,c,d
for g being Function of I[01] ,((TOP-REAL 2) | (Upper_Arc (rectangle a,b,c,d)))
for s1, s2 being Real st g is being_homeomorphism & g . 0 = W-min (rectangle a,b,c,d) & g . 1 = E-max (rectangle a,b,c,d) & g . s1 = p1 & 0 <= s1 & s1 <= 1 & g . s2 = p2 & 0 <= s2 & s2 <= 1 holds
s1 <= s2
proof
let g be Function of I[01] ,((TOP-REAL 2) | (Upper_Arc (rectangle a,b,c,d))); :: thesis: for s1, s2 being Real st g is being_homeomorphism & g . 0 = W-min (rectangle a,b,c,d) & g . 1 = E-max (rectangle a,b,c,d) & g . s1 = p1 & 0 <= s1 & s1 <= 1 & g . s2 = p2 & 0 <= s2 & s2 <= 1 holds
s1 <= s2

let s1, s2 be Real; :: thesis: ( g is being_homeomorphism & g . 0 = W-min (rectangle a,b,c,d) & g . 1 = E-max (rectangle a,b,c,d) & g . s1 = p1 & 0 <= s1 & s1 <= 1 & g . s2 = p2 & 0 <= s2 & s2 <= 1 implies s1 <= s2 )
assume A20: ( g is being_homeomorphism & g . 0 = W-min (rectangle a,b,c,d) & g . 1 = E-max (rectangle a,b,c,d) & g . s1 = p1 & 0 <= s1 & s1 <= 1 & g . s2 = p2 & 0 <= s2 & s2 <= 1 ) ; :: thesis: s1 <= s2
A21: dom g = the carrier of I[01] by FUNCT_2:def 1;
A22: g is one-to-one by A20, TOPS_2:def 5;
A23: the carrier of ((TOP-REAL 2) | (Upper_Arc (rectangle a,b,c,d))) = Upper_Arc (rectangle a,b,c,d) by PRE_TOPC:29;
then reconsider g1 = g as Function of I[01] ,(TOP-REAL 2) by FUNCT_2:9;
g is continuous by A20, TOPS_2:def 5;
then A24: g1 is continuous by PRE_TOPC:56;
reconsider h1 = proj1 as Function of (TOP-REAL 2),R^1 by TOPMETR:24;
reconsider h2 = proj2 as Function of (TOP-REAL 2),R^1 by TOPMETR:24;
reconsider hh1 = h1 as Function of TopStruct(# the carrier of (TOP-REAL 2),the topology of (TOP-REAL 2) #),R^1 ;
reconsider hh2 = h2 as Function of TopStruct(# the carrier of (TOP-REAL 2),the topology of (TOP-REAL 2) #),R^1 ;
A25: TopStruct(# the carrier of (TOP-REAL 2),the topology of (TOP-REAL 2) #) = TopStruct(# the carrier of (TOP-REAL 2),the topology of (TOP-REAL 2) #) | ([#] TopStruct(# the carrier of (TOP-REAL 2),the topology of (TOP-REAL 2) #)) by TSEP_1:3
.= TopStruct(# the carrier of ((TOP-REAL 2) | ([#] (TOP-REAL 2))),the topology of ((TOP-REAL 2) | ([#] (TOP-REAL 2))) #) by PRE_TOPC:66
.= (TOP-REAL 2) | ([#] (TOP-REAL 2)) ;
then B24: ( ( for p being Point of ((TOP-REAL 2) | ([#] (TOP-REAL 2))) holds hh1 . p = proj1 . p ) implies hh1 is continuous ) by JGRAPH_2:39;
A26: ( ( for p being Point of ((TOP-REAL 2) | ([#] (TOP-REAL 2))) holds hh1 . p = proj1 . p ) implies h1 is continuous ) by B24, PRE_TOPC:62;
BB: ( ( for p being Point of ((TOP-REAL 2) | ([#] (TOP-REAL 2))) holds hh2 . p = proj2 . p ) implies hh2 is continuous ) by A25, JGRAPH_2:40;
( ( for p being Point of ((TOP-REAL 2) | ([#] (TOP-REAL 2))) holds hh2 . p = proj2 . p ) implies h2 is continuous ) by BB, PRE_TOPC:62;
then consider h being Function of (TOP-REAL 2),R^1 such that
A27: ( ( for p being Point of (TOP-REAL 2)
for r1, r2 being real number st h1 . p = r1 & h2 . p = r2 holds
h . p = r1 + r2 ) & h is continuous ) by A26, JGRAPH_2:29;
reconsider k = h * g1 as Function of I[01] ,R^1 ;
A28: k is continuous Function of I[01] ,R^1 by A24, A27;
A29: W-min (rectangle a,b,c,d) = |[a,c]| by A1, Th56;
now
assume A30: s1 > s2 ; :: thesis: contradiction
A31: dom g = [.0 ,1.] by BORSUK_1:83, FUNCT_2:def 1;
0 in [.0 ,1.] by XXREAL_1:1;
then A32: k . 0 = h . (W-min (rectangle a,b,c,d)) by A20, A31, FUNCT_1:23
.= (h1 . (W-min (rectangle a,b,c,d))) + (h2 . (W-min (rectangle a,b,c,d))) by A27
.= ((W-min (rectangle a,b,c,d)) `1 ) + (proj2 . (W-min (rectangle a,b,c,d))) by PSCOMP_1:def 28
.= ((W-min (rectangle a,b,c,d)) `1 ) + ((W-min (rectangle a,b,c,d)) `2 ) by PSCOMP_1:def 29
.= ((W-min (rectangle a,b,c,d)) `1 ) + c by A29, EUCLID:56
.= a + c by A29, EUCLID:56 ;
s1 in [.0 ,1.] by A20, XXREAL_1:1;
then A33: k . s1 = h . p1 by A20, A31, FUNCT_1:23
.= (h1 . p1) + (h2 . p1) by A27
.= (p1 `1 ) + (proj2 . p1) by PSCOMP_1:def 28
.= (p1 `1 ) + d by A3, PSCOMP_1:def 29 ;
A34: s2 in [.0 ,1.] by A20, XXREAL_1:1;
then k . s2 = h . p2 by A20, A31, FUNCT_1:23
.= (h1 . p2) + (h2 . p2) by A27
.= (p2 `1 ) + (proj2 . p2) by PSCOMP_1:def 28
.= (p2 `1 ) + d by A4, PSCOMP_1:def 29 ;
then A35: ( k . 0 <= k . s1 & k . s1 <= k . s2 ) by A1, A3, A19, A32, A33, XREAL_1:9;
A36: 0 in [.0 ,1.] by XXREAL_1:1;
then A37: [.0 ,s2.] c= [.0 ,1.] by A34, XXREAL_2:def 12;
reconsider B = [.0 ,s2.] as Subset of I[01] by A34, A36, BORSUK_1:83, XXREAL_2:def 12;
A38: B is connected by A20, A34, A36, BORSUK_1:83, BORSUK_4:49;
A39: 0 in B by A20, XXREAL_1:1;
A40: s2 in B by A20, XXREAL_1:1;
A41: k . 0 is Real by XREAL_0:def 1;
A42: k . s2 is Real by XREAL_0:def 1;
k . s1 is Real by XREAL_0:def 1;
then consider xc being Point of I[01] such that
A43: ( xc in B & k . xc = k . s1 ) by A28, A35, A38, A39, A40, A41, A42, TOPREAL5:11;
xc in [.0 ,1.] by BORSUK_1:83;
then reconsider rxc = xc as Real ;
A44: k is one-to-one
proof
for x1, x2 being set st x1 in dom k & x2 in dom k & k . x1 = k . x2 holds
x1 = x2
proof
let x1, x2 be set ; :: thesis: ( x1 in dom k & x2 in dom k & k . x1 = k . x2 implies x1 = x2 )
assume A45: ( x1 in dom k & x2 in dom k & k . x1 = k . x2 ) ; :: thesis: x1 = x2
then reconsider r1 = x1 as Point of I[01] ;
reconsider r2 = x2 as Point of I[01] by A45;
A46: k . x1 = h . (g1 . x1) by A45, FUNCT_1:22
.= (h1 . (g1 . r1)) + (h2 . (g1 . r1)) by A27
.= ((g1 . r1) `1 ) + (proj2 . (g1 . r1)) by PSCOMP_1:def 28
.= ((g1 . r1) `1 ) + ((g1 . r1) `2 ) by PSCOMP_1:def 29 ;
A47: k . x2 = h . (g1 . x2) by A45, FUNCT_1:22
.= (h1 . (g1 . r2)) + (h2 . (g1 . r2)) by A27
.= ((g1 . r2) `1 ) + (proj2 . (g1 . r2)) by PSCOMP_1:def 28
.= ((g1 . r2) `1 ) + ((g1 . r2) `2 ) by PSCOMP_1:def 29 ;
A48: g . r1 in Upper_Arc (rectangle a,b,c,d) by A23;
A49: g . r2 in Upper_Arc (rectangle a,b,c,d) by A23;
reconsider gr1 = g . r1 as Point of (TOP-REAL 2) by A48;
reconsider gr2 = g . r2 as Point of (TOP-REAL 2) by A49;
now
per cases ( ( g . r1 in LSeg |[a,c]|,|[a,d]| & g . r2 in LSeg |[a,c]|,|[a,d]| ) or ( g . r1 in LSeg |[a,c]|,|[a,d]| & g . r2 in LSeg |[a,d]|,|[b,d]| ) or ( g . r1 in LSeg |[a,d]|,|[b,d]| & g . r2 in LSeg |[a,c]|,|[a,d]| ) or ( g . r1 in LSeg |[a,d]|,|[b,d]| & g . r2 in LSeg |[a,d]|,|[b,d]| ) ) by A7, A23, XBOOLE_0:def 3;
case A50: ( g . r1 in LSeg |[a,c]|,|[a,d]| & g . r2 in LSeg |[a,c]|,|[a,d]| ) ; :: thesis: x1 = x2
then A51: ( gr1 `1 = a & c <= gr1 `2 & gr1 `2 <= d ) by A1, Th9;
( gr2 `1 = a & c <= gr2 `2 & gr2 `2 <= d ) by A1, A50, Th9;
then |[(gr1 `1 ),(gr1 `2 )]| = g . r2 by A45, A46, A47, A51, EUCLID:57;
then g . r1 = g . r2 by EUCLID:57;
hence x1 = x2 by A21, A22, FUNCT_1:def 8; :: thesis: verum
end;
case A52: ( g . r1 in LSeg |[a,c]|,|[a,d]| & g . r2 in LSeg |[a,d]|,|[b,d]| ) ; :: thesis: x1 = x2
then A53: ( gr1 `1 = a & c <= gr1 `2 & gr1 `2 <= d ) by A1, Th9;
A54: ( gr2 `2 = d & a <= gr2 `1 & gr2 `1 <= b ) by A1, A52, Th11;
A55: a + (gr1 `2 ) = (gr2 `1 ) + d by A1, A45, A46, A47, A52, A53, Th11;
A56: now end;
then |[(gr1 `1 ),(gr1 `2 )]| = g . r2 by A53, A54, A56, EUCLID:57;
then g . r1 = g . r2 by EUCLID:57;
hence x1 = x2 by A21, A22, FUNCT_1:def 8; :: thesis: verum
end;
case A57: ( g . r1 in LSeg |[a,d]|,|[b,d]| & g . r2 in LSeg |[a,c]|,|[a,d]| ) ; :: thesis: x1 = x2
then A58: ( gr2 `1 = a & c <= gr2 `2 & gr2 `2 <= d ) by A1, Th9;
A59: ( gr1 `2 = d & a <= gr1 `1 & gr1 `1 <= b ) by A1, A57, Th11;
A60: a + (gr2 `2 ) = (gr1 `1 ) + d by A1, A45, A46, A47, A57, A58, Th11;
A61: now end;
then |[(gr2 `1 ),(gr2 `2 )]| = g . r1 by A58, A59, A61, EUCLID:57;
then g . r1 = g . r2 by EUCLID:57;
hence x1 = x2 by A21, A22, FUNCT_1:def 8; :: thesis: verum
end;
case A62: ( g . r1 in LSeg |[a,d]|,|[b,d]| & g . r2 in LSeg |[a,d]|,|[b,d]| ) ; :: thesis: x1 = x2
then A63: ( gr1 `2 = d & a <= gr1 `1 & gr1 `1 <= b ) by A1, Th11;
( gr2 `2 = d & a <= gr2 `1 & gr2 `1 <= b ) by A1, A62, Th11;
then |[(gr1 `1 ),(gr1 `2 )]| = g . r2 by A45, A46, A47, A63, EUCLID:57;
then g . r1 = g . r2 by EUCLID:57;
hence x1 = x2 by A21, A22, FUNCT_1:def 8; :: thesis: verum
end;
end;
end;
hence x1 = x2 ; :: thesis: verum
end;
hence k is one-to-one by FUNCT_1:def 8; :: thesis: verum
end;
A64: dom k = [.0 ,1.] by BORSUK_1:83, FUNCT_2:def 1;
then s1 in dom k by A20, XXREAL_1:1;
then rxc = s1 by A37, A43, A44, A64, FUNCT_1:def 8;
hence contradiction by A30, A43, XXREAL_1:1; :: thesis: verum
end;
hence s1 <= s2 ; :: thesis: verum
end;
then ( p1 in Upper_Arc (rectangle a,b,c,d) & p2 in Upper_Arc (rectangle a,b,c,d) & LE p1,p2, Upper_Arc (rectangle a,b,c,d), W-min (rectangle a,b,c,d), E-max (rectangle a,b,c,d) ) by A1, A8, JORDAN5C:def 3;
hence LE p1,p2, rectangle a,b,c,d by JORDAN6:def 10; :: thesis: verum
end;