let a, b, c, d be Real; :: thesis: for p1, p2 being Point of () 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 (); :: 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 that
A1: a < b and
A2: c < d and
A3: p1 in LSeg (|[a,d]|,|[b,d]|) and
A4: p2 in LSeg (|[a,d]|,|[b,d]|) ; :: thesis: ( LE p1,p2, rectangle (a,b,c,d) iff p1 `1 <= p2 `1 )
A5: rectangle (a,b,c,d) is being_simple_closed_curve by A1, A2, Th50;
A6: p1 `2 = d by A1, A3, Th3;
A7: a <= p1 `1 by A1, A3, Th3;
A8: p1 `1 <= b by A1, A3, Th3;
A9: p2 `2 = d by A1, A4, Th3;
A10: W-min (rectangle (a,b,c,d)) = |[a,c]| by A1, A2, Th46;
A11: E-max (rectangle (a,b,c,d)) = |[b,d]| by A1, A2, Th46;
A12: Upper_Arc (rectangle (a,b,c,d)) = (LSeg (|[a,c]|,|[a,d]|)) \/ (LSeg (|[a,d]|,|[b,d]|)) by A1, A2, Th51;
then A13: LSeg (|[a,d]|,|[b,d]|) c= Upper_Arc (rectangle (a,b,c,d)) by XBOOLE_1:7;
A14: (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 ;
A15: now :: thesis: ( p2 in Lower_Arc (rectangle (a,b,c,d)) implies p2 = E-max (rectangle (a,b,c,d)) )
assume p2 in Lower_Arc (rectangle (a,b,c,d)) ; :: thesis: p2 = E-max (rectangle (a,b,c,d))
then A16: p2 in (Upper_Arc (rectangle (a,b,c,d))) /\ (Lower_Arc (rectangle (a,b,c,d))) by ;
now :: thesis: not p2 = W-min (rectangle (a,b,c,d))
assume p2 = W-min (rectangle (a,b,c,d)) ; :: thesis: contradiction
then p2 `2 = c by ;
hence contradiction by A2, A4, TOPREAL3:12; :: thesis: verum
end;
hence p2 = E-max (rectangle (a,b,c,d)) by ; :: thesis: verum
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 A17: ( ( 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 :: thesis: ( ( p2 = E-max (rectangle (a,b,c,d)) & p1 `1 <= p2 `1 ) or ( p2 <> E-max (rectangle (a,b,c,d)) & p1 `1 <= p2 `1 ) )
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 ; :: thesis: verum
end;
case A18: p2 <> E-max (rectangle (a,b,c,d)) ; :: thesis: p1 `1 <= p2 `1
consider f being Function of I,(() | (Upper_Arc (rectangle (a,b,c,d)))) such that
A19: f is being_homeomorphism and
A20: f . 0 = W-min (rectangle (a,b,c,d)) and
A21: f . 1 = E-max (rectangle (a,b,c,d)) and
rng f = Upper_Arc (rectangle (a,b,c,d)) and
for r being Real st r in [.0,(1 / 2).] holds
f . r = ((1 - (2 * r)) * |[a,c]|) + ((2 * r) * |[a,d]|) and
for r being Real st r in [.(1 / 2),1.] holds
f . r = ((1 - ((2 * r) - 1)) * |[a,d]|) + (((2 * r) - 1) * |[b,d]|) and
for p being Point of () 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 ) and
A22: for p being Point of () 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, A2, Th53;
reconsider s1 = ((((p1 `1) - a) / (b - a)) / 2) + (1 / 2), s2 = ((((p2 `1) - a) / (b - a)) / 2) + (1 / 2) as Real ;
A23: f . s1 = p1 by ;
A24: f . s2 = p2 by ;
A25: b - a > 0 by ;
A26: s1 <= 1 by ;
A27: 0 <= s2 by ;
s2 <= 1 by ;
then s1 <= s2 by ;
then (((p1 `1) - a) / (b - a)) / 2 <= (((p2 `1) - a) / (b - a)) / 2 by XREAL_1:6;
then ((((p1 `1) - a) / (b - a)) / 2) * 2 <= ((((p2 `1) - a) / (b - a)) / 2) * 2 by XREAL_1:64;
then (((p1 `1) - a) / (b - a)) * (b - a) <= (((p2 `1) - a) / (b - a)) * (b - a) by ;
then (p1 `1) - a <= (((p2 `1) - a) / (b - a)) * (b - a) by ;
then (p1 `1) - a <= (p2 `1) - a by ;
then ((p1 `1) - a) + a <= ((p2 `1) - a) + a by XREAL_1:7;
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 A28: p1 `1 <= p2 `1 ; :: thesis: LE p1,p2, rectangle (a,b,c,d)
for g being Function of I,(() | (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,(() | (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 that
A29: g is being_homeomorphism and
A30: g . 0 = W-min (rectangle (a,b,c,d)) and
g . 1 = E-max (rectangle (a,b,c,d)) and
A31: g . s1 = p1 and
A32: 0 <= s1 and
A33: s1 <= 1 and
A34: g . s2 = p2 and
A35: 0 <= s2 and
A36: s2 <= 1 ; :: thesis: s1 <= s2
A37: dom g = the carrier of I by FUNCT_2:def 1;
A38: g is one-to-one by ;
A39: the carrier of (() | (Upper_Arc (rectangle (a,b,c,d)))) = Upper_Arc (rectangle (a,b,c,d)) by PRE_TOPC:8;
then reconsider g1 = g as Function of I,() by FUNCT_2:7;
g is continuous by ;
then A40: g1 is continuous by PRE_TOPC:26;
reconsider h1 = proj1 as Function of (),R^1 by TOPMETR:17;
reconsider h2 = proj2 as Function of (),R^1 by TOPMETR:17;
reconsider hh1 = h1 as Function of TopStruct(# the carrier of (), the topology of () #),R^1 ;
reconsider hh2 = h2 as Function of TopStruct(# the carrier of (), the topology of () #),R^1 ;
A41: TopStruct(# the carrier of (), the topology of () #) = TopStruct(# the carrier of (), the topology of () #) | ([#] TopStruct(# the carrier of (), the topology of () #)) by TSEP_1:3
.= TopStruct(# the carrier of (() | ([#] ())), the topology of (() | ([#] ())) #) by PRE_TOPC:36
.= () | ([#] ()) ;
then ( ( for p being Point of (() | ([#] ())) holds hh1 . p = proj1 . p ) implies hh1 is continuous ) by JGRAPH_2:29;
then A42: ( ( for p being Point of (() | ([#] ())) holds hh1 . p = proj1 . p ) implies h1 is continuous ) by PRE_TOPC:32;
( ( for p being Point of (() | ([#] ())) holds hh2 . p = proj2 . p ) implies hh2 is continuous ) by ;
then ( ( for p being Point of (() | ([#] ())) holds hh2 . p = proj2 . p ) implies h2 is continuous ) by PRE_TOPC:32;
then consider h being Function of (),R^1 such that
A43: for p being Point of ()
for r1, r2 being Real st h1 . p = r1 & h2 . p = r2 holds
h . p = r1 + r2 and
A44: h is continuous by ;
reconsider k = h * g1 as Function of I,R^1 ;
A45: W-min (rectangle (a,b,c,d)) = |[a,c]| by A1, A2, Th46;
now :: thesis: not s1 > s2
assume A46: s1 > s2 ; :: thesis: contradiction
A47: dom g = [.0,1.] by ;
0 in [.0,1.] by XXREAL_1:1;
then A48: k . 0 = h . (W-min (rectangle (a,b,c,d))) by
.= (h1 . (W-min (rectangle (a,b,c,d)))) + (h2 . (W-min (rectangle (a,b,c,d)))) by A43
.= ((W-min (rectangle (a,b,c,d))) `1) + (proj2 . (W-min (rectangle (a,b,c,d)))) by PSCOMP_1:def 5
.= ((W-min (rectangle (a,b,c,d))) `1) + ((W-min (rectangle (a,b,c,d))) `2) by PSCOMP_1:def 6
.= ((W-min (rectangle (a,b,c,d))) `1) + c by
.= a + c by ;
s1 in [.0,1.] by ;
then A49: k . s1 = h . p1 by
.= (h1 . p1) + (h2 . p1) by A43
.= (p1 `1) + (proj2 . p1) by PSCOMP_1:def 5
.= (p1 `1) + d by ;
A50: s2 in [.0,1.] by ;
then A51: k . s2 = h . p2 by
.= (h1 . p2) + (h2 . p2) by A43
.= (p2 `1) + (proj2 . p2) by PSCOMP_1:def 5
.= (p2 `1) + d by ;
A52: k . 0 <= k . s1 by ;
A53: k . s1 <= k . s2 by ;
A54: 0 in [.0,1.] by XXREAL_1:1;
then A55: [.0,s2.] c= [.0,1.] by ;
reconsider B = [.0,s2.] as Subset of I by ;
A56: B is connected by ;
A57: 0 in B by ;
A58: s2 in B by ;
consider xc being Point of I such that
A59: xc in B and
A60: k . xc = k . s1 by ;
reconsider rxc = xc as Real ;
A61: 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 that
A62: x1 in dom k and
A63: x2 in dom k and
A64: k . x1 = k . x2 ; :: thesis: x1 = x2
reconsider r1 = x1 as Point of I by A62;
reconsider r2 = x2 as Point of I by A63;
A65: k . x1 = h . (g1 . x1) by
.= (h1 . (g1 . r1)) + (h2 . (g1 . r1)) by A43
.= ((g1 . r1) `1) + (proj2 . (g1 . r1)) by PSCOMP_1:def 5
.= ((g1 . r1) `1) + ((g1 . r1) `2) by PSCOMP_1:def 6 ;
A66: k . x2 = h . (g1 . x2) by
.= (h1 . (g1 . r2)) + (h2 . (g1 . r2)) by A43
.= ((g1 . r2) `1) + (proj2 . (g1 . r2)) by PSCOMP_1:def 5
.= ((g1 . r2) `1) + ((g1 . r2) `2) by PSCOMP_1:def 6 ;
A67: g . r1 in Upper_Arc (rectangle (a,b,c,d)) by A39;
A68: g . r2 in Upper_Arc (rectangle (a,b,c,d)) by A39;
reconsider gr1 = g . r1 as Point of () by A67;
reconsider gr2 = g . r2 as Point of () by A68;
now :: thesis: ( ( g . r1 in LSeg (|[a,c]|,|[a,d]|) & g . r2 in LSeg (|[a,c]|,|[a,d]|) & x1 = x2 ) or ( g . r1 in LSeg (|[a,c]|,|[a,d]|) & g . r2 in LSeg (|[a,d]|,|[b,d]|) & x1 = x2 ) or ( g . r1 in LSeg (|[a,d]|,|[b,d]|) & g . r2 in LSeg (|[a,c]|,|[a,d]|) & x1 = x2 ) or ( g . r1 in LSeg (|[a,d]|,|[b,d]|) & g . r2 in LSeg (|[a,d]|,|[b,d]|) & x1 = x2 ) )
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 ;
case A69: ( g . r1 in LSeg (|[a,c]|,|[a,d]|) & g . r2 in LSeg (|[a,c]|,|[a,d]|) ) ; :: thesis: x1 = x2
then A70: gr1 `1 = a by ;
gr2 `1 = a by A2, A69, Th1;
then |[(gr1 `1),(gr1 `2)]| = g . r2 by ;
then g . r1 = g . r2 by EUCLID:53;
hence x1 = x2 by ; :: thesis: verum
end;
case A71: ( g . r1 in LSeg (|[a,c]|,|[a,d]|) & g . r2 in LSeg (|[a,d]|,|[b,d]|) ) ; :: thesis: x1 = x2
then A72: gr1 `1 = a by ;
A73: gr1 `2 <= d by A2, A71, Th1;
A74: gr2 `2 = d by A1, A71, Th3;
A75: a <= gr2 `1 by A1, A71, Th3;
A76: a + (gr1 `2) = (gr2 `1) + d by A1, A64, A65, A66, A71, A72, Th3;
A77: now :: thesis: not a <> gr2 `1
assume a <> gr2 `1 ; :: thesis: contradiction
then a < gr2 `1 by ;
hence contradiction by A73, A76, XREAL_1:8; :: thesis: verum
end;
now :: thesis: not gr1 `2 <> d
assume gr1 `2 <> d ; :: thesis: contradiction
then d > gr1 `2 by ;
hence contradiction by A64, A65, A66, A72, A74, A75, XREAL_1:8; :: thesis: verum
end;
then |[(gr1 `1),(gr1 `2)]| = g . r2 by ;
then g . r1 = g . r2 by EUCLID:53;
hence x1 = x2 by ; :: thesis: verum
end;
case A78: ( g . r1 in LSeg (|[a,d]|,|[b,d]|) & g . r2 in LSeg (|[a,c]|,|[a,d]|) ) ; :: thesis: x1 = x2
then A79: gr2 `1 = a by ;
A80: gr2 `2 <= d by A2, A78, Th1;
A81: gr1 `2 = d by A1, A78, Th3;
A82: a <= gr1 `1 by A1, A78, Th3;
A83: a + (gr2 `2) = (gr1 `1) + d by A1, A64, A65, A66, A78, A79, Th3;
A84: now :: thesis: not a <> gr1 `1
assume a <> gr1 `1 ; :: thesis: contradiction
then a < gr1 `1 by ;
hence contradiction by A80, A83, XREAL_1:8; :: thesis: verum
end;
now :: thesis: not gr2 `2 <> d
assume gr2 `2 <> d ; :: thesis: contradiction
then d > gr2 `2 by ;
hence contradiction by A64, A65, A66, A79, A81, A82, XREAL_1:8; :: thesis: verum
end;
then |[(gr2 `1),(gr2 `2)]| = g . r1 by ;
then g . r1 = g . r2 by EUCLID:53;
hence x1 = x2 by ; :: thesis: verum
end;
case A85: ( g . r1 in LSeg (|[a,d]|,|[b,d]|) & g . r2 in LSeg (|[a,d]|,|[b,d]|) ) ; :: thesis: x1 = x2
then A86: gr1 `2 = d by ;
gr2 `2 = d by A1, A85, Th3;
then |[(gr1 `1),(gr1 `2)]| = g . r2 by ;
then g . r1 = g . r2 by EUCLID:53;
hence x1 = x2 by ; :: thesis: verum
end;
end;
end;
hence x1 = x2 ; :: thesis: verum
end;
A87: dom k = [.0,1.] by ;
then s1 in dom k by ;
then rxc = s1 by A55, A59, A60, A61, A87;
hence contradiction by A46, A59, XXREAL_1:1; :: thesis: verum
end;
hence s1 <= s2 ; :: thesis: verum
end;
then 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 ;
hence LE p1,p2, rectangle (a,b,c,d) by ; :: thesis: verum
end;