:: Behaviour of an Arc Crossing a Line
:: by Yatsuka Nakamura
::
:: Copyright (c) 2004-2021 Association of Mizar Users

theorem Th1: :: JORDAN20:1
for P being Subset of ()
for p1, p2, p being Point of () st P is_an_arc_of p1,p2 & p in P holds
Segment (P,p1,p2,p,p) = {p}
proof end;

theorem Th2: :: JORDAN20:2
for p1, p2, p being Point of ()
for a being Real st p in LSeg (p1,p2) & p1 1 <= a & p2 1 <= a holds
p 1 <= a
proof end;

theorem Th3: :: JORDAN20:3
for p1, p2, p being Point of ()
for a being Real st p in LSeg (p1,p2) & p1 1 >= a & p2 1 >= a holds
p 1 >= a
proof end;

theorem :: JORDAN20:4
for p1, p2, p being Point of ()
for a being Real st p in LSeg (p1,p2) & p1 1 < a & p2 1 < a holds
p 1 < a
proof end;

theorem :: JORDAN20:5
for p1, p2, p being Point of ()
for a being Real st p in LSeg (p1,p2) & p1 1 > a & p2 1 > a holds
p 1 > a
proof end;

theorem Th6: :: JORDAN20:6
for j being Nat
for f being S-Sequence_in_R2
for p, q being Point of () st 1 <= j & j < len f & p in LSeg (f,j) & q in LSeg (f,j) & (f /. j) 2 = (f /. (j + 1)) 2 & (f /. j) 1 > (f /. (j + 1)) 1 & LE p,q, L~ f,f /. 1,f /. (len f) holds
p 1 >= q 1
proof end;

theorem Th7: :: JORDAN20:7
for j being Nat
for f being S-Sequence_in_R2
for p, q being Point of () st 1 <= j & j < len f & p in LSeg (f,j) & q in LSeg (f,j) & (f /. j) 2 = (f /. (j + 1)) 2 & (f /. j) 1 < (f /. (j + 1)) 1 & LE p,q, L~ f,f /. 1,f /. (len f) holds
p 1 <= q 1
proof end;

definition
let P be Subset of ();
let p1, p2, p be Point of ();
let e be Real;
pred p is_Lin P,p1,p2,e means :: JORDAN20:def 1
( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 < e & LE p4,p,P,p1,p2 & ( for p5 being Point of () st LE p4,p5,P,p1,p2 & LE p5,p,P,p1,p2 holds
p5 1 <= e ) ) );
pred p is_Rin P,p1,p2,e means :: JORDAN20:def 2
( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 > e & LE p4,p,P,p1,p2 & ( for p5 being Point of () st LE p4,p5,P,p1,p2 & LE p5,p,P,p1,p2 holds
p5 1 >= e ) ) );
pred p is_Lout P,p1,p2,e means :: JORDAN20:def 3
( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 < e & LE p,p4,P,p1,p2 & ( for p5 being Point of () st LE p5,p4,P,p1,p2 & LE p,p5,P,p1,p2 holds
p5 1 <= e ) ) );
pred p is_Rout P,p1,p2,e means :: JORDAN20:def 4
( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 > e & LE p,p4,P,p1,p2 & ( for p5 being Point of () st LE p5,p4,P,p1,p2 & LE p,p5,P,p1,p2 holds
p5 1 >= e ) ) );
pred p is_OSin P,p1,p2,e means :: JORDAN20:def 5
( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p7 being Point of () st
( LE p7,p,P,p1,p2 & ( for p8 being Point of () st LE p7,p8,P,p1,p2 & LE p8,p,P,p1,p2 holds
p8 1 = e ) & ( for p4 being Point of () st LE p4,p7,P,p1,p2 & p4 <> p7 holds
( ex p5 being Point of () st
( LE p4,p5,P,p1,p2 & LE p5,p7,P,p1,p2 & p5 1 > e ) & ex p6 being Point of () st
( LE p4,p6,P,p1,p2 & LE p6,p7,P,p1,p2 & p6 1 < e ) ) ) ) );
pred p is_OSout P,p1,p2,e means :: JORDAN20:def 6
( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p7 being Point of () st
( LE p,p7,P,p1,p2 & ( for p8 being Point of () st LE p8,p7,P,p1,p2 & LE p,p8,P,p1,p2 holds
p8 1 = e ) & ( for p4 being Point of () st LE p7,p4,P,p1,p2 & p4 <> p7 holds
( ex p5 being Point of () st
( LE p5,p4,P,p1,p2 & LE p7,p5,P,p1,p2 & p5 1 > e ) & ex p6 being Point of () st
( LE p6,p4,P,p1,p2 & LE p7,p6,P,p1,p2 & p6 1 < e ) ) ) ) );
correctness
;
end;

:: deftheorem defines is_Lin JORDAN20:def 1 :
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real holds
( p is_Lin P,p1,p2,e iff ( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 < e & LE p4,p,P,p1,p2 & ( for p5 being Point of () st LE p4,p5,P,p1,p2 & LE p5,p,P,p1,p2 holds
p5 1 <= e ) ) ) );

:: deftheorem defines is_Rin JORDAN20:def 2 :
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real holds
( p is_Rin P,p1,p2,e iff ( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 > e & LE p4,p,P,p1,p2 & ( for p5 being Point of () st LE p4,p5,P,p1,p2 & LE p5,p,P,p1,p2 holds
p5 1 >= e ) ) ) );

:: deftheorem defines is_Lout JORDAN20:def 3 :
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real holds
( p is_Lout P,p1,p2,e iff ( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 < e & LE p,p4,P,p1,p2 & ( for p5 being Point of () st LE p5,p4,P,p1,p2 & LE p,p5,P,p1,p2 holds
p5 1 <= e ) ) ) );

:: deftheorem defines is_Rout JORDAN20:def 4 :
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real holds
( p is_Rout P,p1,p2,e iff ( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p4 being Point of () st
( p4 1 > e & LE p,p4,P,p1,p2 & ( for p5 being Point of () st LE p5,p4,P,p1,p2 & LE p,p5,P,p1,p2 holds
p5 1 >= e ) ) ) );

:: deftheorem defines is_OSin JORDAN20:def 5 :
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real holds
( p is_OSin P,p1,p2,e iff ( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p7 being Point of () st
( LE p7,p,P,p1,p2 & ( for p8 being Point of () st LE p7,p8,P,p1,p2 & LE p8,p,P,p1,p2 holds
p8 1 = e ) & ( for p4 being Point of () st LE p4,p7,P,p1,p2 & p4 <> p7 holds
( ex p5 being Point of () st
( LE p4,p5,P,p1,p2 & LE p5,p7,P,p1,p2 & p5 1 > e ) & ex p6 being Point of () st
( LE p4,p6,P,p1,p2 & LE p6,p7,P,p1,p2 & p6 1 < e ) ) ) ) ) );

:: deftheorem defines is_OSout JORDAN20:def 6 :
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real holds
( p is_OSout P,p1,p2,e iff ( P is_an_arc_of p1,p2 & p in P & p 1 = e & ex p7 being Point of () st
( LE p,p7,P,p1,p2 & ( for p8 being Point of () st LE p8,p7,P,p1,p2 & LE p,p8,P,p1,p2 holds
p8 1 = e ) & ( for p4 being Point of () st LE p7,p4,P,p1,p2 & p4 <> p7 holds
( ex p5 being Point of () st
( LE p5,p4,P,p1,p2 & LE p7,p5,P,p1,p2 & p5 1 > e ) & ex p6 being Point of () st
( LE p6,p4,P,p1,p2 & LE p7,p6,P,p1,p2 & p6 1 < e ) ) ) ) ) );

theorem :: JORDAN20:8
for P being Subset of ()
for p1, p2, p being Point of ()
for e being Real st P is_an_arc_of p1,p2 & p1 1 <= e & p2 1 >= e holds
ex p3 being Point of () st
( p3 in P & p3 1 = e )
proof end;

theorem :: JORDAN20:9
for P being non empty Subset of ()
for p1, p2, p being Point of ()
for e being Real st P is_an_arc_of p1,p2 & p1 1 < e & p in P & p 1 = e & not p is_Lin P,p1,p2,e & not p is_Rin P,p1,p2,e holds
p is_OSin P,p1,p2,e
proof end;

theorem :: JORDAN20:10
for P being non empty Subset of ()
for p1, p2, p being Point of ()
for e being Real st P is_an_arc_of p1,p2 & p2 1 > e & p in P & p 1 = e & not p is_Lout P,p1,p2,e & not p is_Rout P,p1,p2,e holds
p is_OSout P,p1,p2,e
proof end;

theorem Th11: :: JORDAN20:11
for P being Subset of I[01]
for s being Real st P = [.0,s.[ holds
P is open
proof end;

theorem Th12: :: JORDAN20:12
for P being Subset of I[01]
for s being Real st P = ].s,1.] holds
P is open
proof end;

theorem Th13: :: JORDAN20:13
for P being non empty Subset of ()
for P1 being Subset of (() | P)
for Q being Subset of I[01]
for f being Function of I[01],(() | P)
for s being Real st s <= 1 & P1 = { q0 where q0 is Point of () : ex ss being Real st
( 0 <= ss & ss < s & q0 = f . ss )
}
& Q = [.0,s.[ holds
f .: Q = P1
proof end;

theorem Th14: :: JORDAN20:14
for P being non empty Subset of ()
for P1 being Subset of (() | P)
for Q being Subset of I[01]
for f being Function of I[01],(() | P)
for s being Real st s >= 0 & P1 = { q0 where q0 is Point of () : ex ss being Real st
( s < ss & ss <= 1 & q0 = f . ss )
}
& Q = ].s,1.] holds
f .: Q = P1
proof end;

Lm1:
;

theorem Th15: :: JORDAN20:15
for P being non empty Subset of ()
for P1 being Subset of (() | P)
for f being Function of I[01],(() | P)
for s being Real st s <= 1 & f is being_homeomorphism & P1 = { q0 where q0 is Point of () : ex ss being Real st
( 0 <= ss & ss < s & q0 = f . ss )
}
holds
P1 is open
proof end;

theorem Th16: :: JORDAN20:16
for P being non empty Subset of ()
for P1 being Subset of (() | P)
for f being Function of I[01],(() | P)
for s being Real st s >= 0 & f is being_homeomorphism & P1 = { q0 where q0 is Point of () : ex ss being Real st
( s < ss & ss <= 1 & q0 = f . ss )
}
holds
P1 is open
proof end;

theorem Th17: :: JORDAN20:17
for T being non empty TopStruct
for Q1, Q2 being Subset of T
for p1, p2 being Point of T st Q1 /\ Q2 = {} & Q1 \/ Q2 = the carrier of T & p1 in Q1 & p2 in Q2 & Q1 is open & Q2 is open holds
for P being Function of I[01],T holds
( not P is continuous or not P . 0 = p1 or not P . 1 = p2 )
proof end;

theorem Th18: :: JORDAN20:18
for P being non empty Subset of ()
for Q being Subset of (() | P)
for p1, p2, q being Point of () st P is_an_arc_of p1,p2 & q in P & q <> p1 & q <> p2 & Q = P \ {q} holds
( not Q is connected & ( for R being Function of I[01],((() | P) | Q) holds
( not R is continuous or not R . 0 = p1 or not R . 1 = p2 ) ) )
proof end;

theorem Th19: :: JORDAN20:19
for P being non empty Subset of ()
for p1, p2, q1, q2 being Point of () st P is_an_arc_of p1,p2 & q1 in P & q2 in P & not LE q1,q2,P,p1,p2 holds
LE q2,q1,P,p1,p2
proof end;

theorem Th20: :: JORDAN20:20
for n being Nat
for p1, p2 being Point of ()
for P, P1 being non empty Subset of () st P is_an_arc_of p1,p2 & P1 is_an_arc_of p1,p2 & P1 c= P holds
P1 = P
proof end;

theorem Th21: :: JORDAN20:21
for P being non empty Subset of ()
for p1, p2, q1 being Point of () st P is_an_arc_of p1,p2 & q1 in P & p2 <> q1 holds
Segment (P,p1,p2,q1,p2) is_an_arc_of q1,p2
proof end;

theorem Th22: :: JORDAN20:22
for P being non empty Subset of ()
for p1, p2, q1, q2, q3 being Point of () st P is_an_arc_of p1,p2 & LE q1,q2,P,p1,p2 & LE q2,q3,P,p1,p2 holds
(Segment (P,p1,p2,q1,q2)) \/ (Segment (P,p1,p2,q2,q3)) = Segment (P,p1,p2,q1,q3)
proof end;

theorem :: JORDAN20:23
for P being non empty Subset of ()
for p1, p2, q1, q2, q3 being Point of () st P is_an_arc_of p1,p2 & LE q1,q2,P,p1,p2 & LE q2,q3,P,p1,p2 holds
(Segment (P,p1,p2,q1,q2)) /\ (Segment (P,p1,p2,q2,q3)) = {q2}
proof end;

theorem Th24: :: JORDAN20:24
for P being non empty Subset of ()
for p1, p2 being Point of () st P is_an_arc_of p1,p2 holds
Segment (P,p1,p2,p1,p2) = P
proof end;

theorem Th25: :: JORDAN20:25
for P, Q1 being non empty Subset of ()
for p1, p2, q1, q2 being Point of () st P is_an_arc_of p1,p2 & Q1 is_an_arc_of q1,q2 & LE q1,q2,P,p1,p2 & Q1 c= P holds
Q1 = Segment (P,p1,p2,q1,q2)
proof end;

theorem :: JORDAN20:26
for P being non empty Subset of ()
for p1, p2, q1, q2, p being Point of ()
for e being Real st q1 is_Lin P,p1,p2,e & q2 1 = e & LSeg (q1,q2) c= P & p in LSeg (q1,q2) holds
p is_Lin P,p1,p2,e
proof end;

theorem :: JORDAN20:27
for P being non empty Subset of ()
for p1, p2, q1, q2, p being Point of ()
for e being Real st q1 is_Rin P,p1,p2,e & q2 1 = e & LSeg (q1,q2) c= P & p in LSeg (q1,q2) holds
p is_Rin P,p1,p2,e
proof end;

theorem :: JORDAN20:28
for P being non empty Subset of ()
for p1, p2, q1, q2, p being Point of ()
for e being Real st q1 is_Lout P,p1,p2,e & q2 1 = e & LSeg (q1,q2) c= P & p in LSeg (q1,q2) holds
p is_Lout P,p1,p2,e
proof end;

theorem :: JORDAN20:29
for P being non empty Subset of ()
for p1, p2, q1, q2, p being Point of ()
for e being Real st q1 is_Rout P,p1,p2,e & q2 1 = e & LSeg (q1,q2) c= P & p in LSeg (q1,q2) holds
p is_Rout P,p1,p2,e
proof end;

theorem :: JORDAN20:30
for P being non empty Subset of ()
for p1, p2, p being Point of ()
for e being Real st P is_S-P_arc_joining p1,p2 & p1 1 < e & p in P & p 1 = e & not p is_Lin P,p1,p2,e holds
p is_Rin P,p1,p2,e
proof end;

theorem :: JORDAN20:31
for P being non empty Subset of ()
for p1, p2, p being Point of ()
for e being Real st P is_S-P_arc_joining p1,p2 & p2 1 > e & p in P & p `1 = e & not p is_Lout P,p1,p2,e holds
p is_Rout P,p1,p2,e
proof end;