:: JORDAN3 semantic presentation

theorem Th1: :: JORDAN3:1
for b1, b2 being natural number st ( b1 -' b2 >= 1 or b1 - b2 >= 1 ) holds
b1 -' b2 = b1 - b2
proof end;

theorem Th2: :: JORDAN3:2
for b1 being natural number holds b1 -' 0 = b1
proof end;

theorem Th3: :: JORDAN3:3
canceled;

theorem Th4: :: JORDAN3:4
for b1, b2, b3 being natural number st b1 <= b2 holds
b3 -' b2 <= b3 -' b1
proof end;

theorem Th5: :: JORDAN3:5
for b1, b2, b3 being natural number st b1 <= b2 holds
b1 -' b3 <= b2 -' b3
proof end;

theorem Th6: :: JORDAN3:6
for b1, b2 being natural number st ( b1 -' b2 >= 1 or b1 - b2 >= 1 ) holds
(b1 -' b2) + b2 = b1
proof end;

theorem Th7: :: JORDAN3:7
for b1, b2 being natural number st b1 <= b2 holds
b1 -' 1 <= b2
proof end;

theorem Th8: :: JORDAN3:8
for b1 being natural number holds b1 -' 2 = (b1 -' 1) -' 1
proof end;

theorem Th9: :: JORDAN3:9
for b1, b2 being natural number st b1 + 1 <= b2 holds
( b1 -' 1 < b2 & b1 -' 2 < b2 & b1 <= b2 )
proof end;

theorem Th10: :: JORDAN3:10
for b1, b2 being natural number st ( b1 + 2 <= b2 or (b1 + 1) + 1 <= b2 ) holds
( b1 + 1 < b2 & (b1 + 1) -' 1 < b2 & (b1 + 1) -' 2 < b2 & b1 + 1 <= b2 & (b1 -' 1) + 1 < b2 & ((b1 -' 1) + 1) -' 1 < b2 & b1 < b2 & b1 -' 1 < b2 & b1 -' 2 < b2 & b1 <= b2 )
proof end;

theorem Th11: :: JORDAN3:11
for b1, b2 being natural number st ( b1 <= b2 or b1 <= b2 -' 1 ) holds
( b1 < b2 + 1 & b1 <= b2 + 1 & b1 < (b2 + 1) + 1 & b1 <= (b2 + 1) + 1 & b1 < b2 + 2 & b1 <= b2 + 2 )
proof end;

theorem Th12: :: JORDAN3:12
for b1, b2 being natural number st ( b1 < b2 or b1 + 1 <= b2 ) holds
b1 <= b2 -' 1
proof end;

theorem Th13: :: JORDAN3:13
for b1, b2, b3 being natural number st b1 >= b2 holds
b1 >= b2 -' b3
proof end;

theorem Th14: :: JORDAN3:14
for b1, b2 being natural number st 1 <= b1 & 1 <= b2 -' b1 holds
b2 -' b1 < b2
proof end;

theorem Th15: :: JORDAN3:15
for b1 being Nat
for b2, b3 being FinSequence st len b2 < b1 & ( b1 <= (len b2) + (len b3) or b1 <= len (b2 ^ b3) ) holds
(b2 ^ b3) . b1 = b3 . (b1 - (len b2))
proof end;

theorem Th16: :: JORDAN3:16
canceled;

theorem Th17: :: JORDAN3:17
for b1 being non empty set
for b2 being set
for b3 being FinSequence of b1 st 1 <= len b3 holds
( (b3 ^ <*b2*>) . 1 = b3 . 1 & (b3 ^ <*b2*>) . 1 = b3 /. 1 & (<*b2*> ^ b3) . ((len b3) + 1) = b3 . (len b3) & (<*b2*> ^ b3) . ((len b3) + 1) = b3 /. (len b3) )
proof end;

theorem Th18: :: JORDAN3:18
for b1 being FinSequence st len b1 = 1 holds
Rev b1 = b1
proof end;

theorem Th19: :: JORDAN3:19
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat holds len (b2 /^ b3) = (len b2) -' b3
proof end;

theorem Th20: :: JORDAN3:20
canceled;

theorem Th21: :: JORDAN3:21
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat holds (b2 /^ b3) | (b4 -' b3) = (b2 | b4) /^ b3
proof end;

definition
let c1 be non empty set ;
let c2 be FinSequence of c1;
let c3, c4 be Nat;
func mid c2,c3,c4 -> FinSequence of a1 equals :Def1: :: JORDAN3:def 1
(a2 /^ (a3 -' 1)) | ((a4 -' a3) + 1) if a3 <= a4
otherwise Rev ((a2 /^ (a4 -' 1)) | ((a3 -' a4) + 1));
correctness
coherence
( ( c3 <= c4 implies (c2 /^ (c3 -' 1)) | ((c4 -' c3) + 1) is FinSequence of c1 ) & ( not c3 <= c4 implies Rev ((c2 /^ (c4 -' 1)) | ((c3 -' c4) + 1)) is FinSequence of c1 ) )
;
consistency
for b1 being FinSequence of c1 holds verum
;
;
end;

:: deftheorem Def1 defines mid JORDAN3:def 1 :
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat holds
( ( b3 <= b4 implies mid b2,b3,b4 = (b2 /^ (b3 -' 1)) | ((b4 -' b3) + 1) ) & ( not b3 <= b4 implies mid b2,b3,b4 = Rev ((b2 /^ (b4 -' 1)) | ((b3 -' b4) + 1)) ) );

theorem Th22: :: JORDAN3:22
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat st 1 <= b3 & b3 <= len b2 & 1 <= b4 & b4 <= len b2 holds
Rev (mid b2,b3,b4) = mid (Rev b2),(((len b2) -' b4) + 1),(((len b2) -' b3) + 1)
proof end;

theorem Th23: :: JORDAN3:23
for b1 being non empty set
for b2, b3 being Nat
for b4 being FinSequence of b1 st 1 <= b3 & b3 + b2 <= len b4 holds
(b4 /^ b2) . b3 = b4 . (b3 + b2)
proof end;

theorem Th24: :: JORDAN3:24
for b1 being non empty set
for b2 being Nat
for b3 being FinSequence of b1 st 1 <= b2 & b2 <= len b3 holds
(Rev b3) . b2 = b3 . (((len b3) - b2) + 1)
proof end;

theorem Th25: :: JORDAN3:25
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat st 1 <= b3 holds
mid b2,1,b3 = b2 | b3
proof end;

theorem Th26: :: JORDAN3:26
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat st b3 <= len b2 holds
mid b2,b3,(len b2) = b2 /^ (b3 -' 1)
proof end;

theorem Th27: :: JORDAN3:27
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat st 1 <= b3 & b3 <= len b2 & 1 <= b4 & b4 <= len b2 holds
( (mid b2,b3,b4) . 1 = b2 . b3 & ( b3 <= b4 implies ( len (mid b2,b3,b4) = (b4 -' b3) + 1 & ( for b5 being Nat st 1 <= b5 & b5 <= len (mid b2,b3,b4) holds
(mid b2,b3,b4) . b5 = b2 . ((b5 + b3) -' 1) ) ) ) & ( b3 > b4 implies ( len (mid b2,b3,b4) = (b3 -' b4) + 1 & ( for b5 being Nat st 1 <= b5 & b5 <= len (mid b2,b3,b4) holds
(mid b2,b3,b4) . b5 = b2 . ((b3 -' b5) + 1) ) ) ) )
proof end;

theorem Th28: :: JORDAN3:28
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat holds rng (mid b2,b3,b4) c= rng b2
proof end;

theorem Th29: :: JORDAN3:29
for b1 being non empty set
for b2 being FinSequence of b1 st 1 <= len b2 holds
mid b2,1,(len b2) = b2
proof end;

theorem Th30: :: JORDAN3:30
for b1 being non empty set
for b2 being FinSequence of b1 st 1 <= len b2 holds
mid b2,(len b2),1 = Rev b2
proof end;

theorem Th31: :: JORDAN3:31
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4, b5 being Nat st 1 <= b3 & b3 <= b4 & b4 <= len b2 & 1 <= b5 & ( b5 <= (b4 -' b3) + 1 or b5 <= (b4 - b3) + 1 or b5 <= (b4 + 1) - b3 ) holds
( (mid b2,b3,b4) . b5 = b2 . ((b5 + b3) -' 1) & (mid b2,b3,b4) . b5 = b2 . ((b5 -' 1) + b3) & (mid b2,b3,b4) . b5 = b2 . ((b5 + b3) - 1) & (mid b2,b3,b4) . b5 = b2 . ((b5 - 1) + b3) )
proof end;

theorem Th32: :: JORDAN3:32
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat st 1 <= b4 & b4 <= b3 & b3 <= len b2 holds
(mid b2,1,b3) . b4 = b2 . b4
proof end;

theorem Th33: :: JORDAN3:33
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat st 1 <= b3 & b3 <= b4 & b4 <= len b2 holds
len (mid b2,b3,b4) <= len b2
proof end;

theorem Th34: :: JORDAN3:34
for b1 being Nat
for b2 being FinSequence of (TOP-REAL b1) st 2 <= len b2 holds
( b2 . 1 in L~ b2 & b2 /. 1 in L~ b2 & b2 . (len b2) in L~ b2 & b2 /. (len b2) in L~ b2 )
proof end;

theorem Th35: :: JORDAN3:35
for b1, b2, b3, b4 being Point of (TOP-REAL 2) st ( b1 `1 = b2 `1 or b1 `2 = b2 `2 ) & b3 in LSeg b1,b2 & b4 in LSeg b1,b2 & not b3 `1 = b4 `1 holds
b3 `2 = b4 `2
proof end;

theorem Th36: :: JORDAN3:36
for b1, b2, b3, b4 being Point of (TOP-REAL 2) st ( b1 `1 = b2 `1 or b1 `2 = b2 `2 ) & LSeg b3,b4 c= LSeg b1,b2 & not b3 `1 = b4 `1 holds
b3 `2 = b4 `2
proof end;

theorem Th37: :: JORDAN3:37
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Nat st 2 <= b2 & b1 is_S-Seq holds
b1 | b2 is_S-Seq
proof end;

theorem Th38: :: JORDAN3:38
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Nat st b2 <= len b1 & 2 <= (len b1) -' b2 & b1 is_S-Seq holds
b1 /^ b2 is_S-Seq
proof end;

theorem Th39: :: JORDAN3:39
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Nat st b1 is_S-Seq & 1 <= b2 & b2 <= len b1 & 1 <= b3 & b3 <= len b1 & b2 <> b3 holds
mid b1,b2,b3 is_S-Seq
proof end;

definition
let c1 be FinSequence of (TOP-REAL 2);
let c2 be Point of (TOP-REAL 2);
assume E31: c2 in L~ c1 ;
func Index c2,c1 -> Nat means :Def2: :: JORDAN3:def 2
ex b1 being non empty Subset of NAT st
( a3 = min b1 & b1 = { b2 where B is Nat : a2 in LSeg a1,b2 } );
existence
ex b1 being Natex b2 being non empty Subset of NAT st
( b1 = min b2 & b2 = { b3 where B is Nat : c2 in LSeg c1,b3 } )
proof end;
uniqueness
for b1, b2 being Nat st ex b3 being non empty Subset of NAT st
( b1 = min b3 & b3 = { b4 where B is Nat : c2 in LSeg c1,b4 } ) & ex b3 being non empty Subset of NAT st
( b2 = min b3 & b3 = { b4 where B is Nat : c2 in LSeg c1,b4 } ) holds
b1 = b2
;
end;

:: deftheorem Def2 defines Index JORDAN3:def 2 :
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
for b3 being Nat holds
( b3 = Index b2,b1 iff ex b4 being non empty Subset of NAT st
( b3 = min b4 & b4 = { b5 where B is Nat : b2 in LSeg b1,b5 } ) );

theorem Th40: :: JORDAN3:40
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2)
for b3 being Nat st b2 in LSeg b1,b3 holds
Index b2,b1 <= b3
proof end;

theorem Th41: :: JORDAN3:41
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
( 1 <= Index b2,b1 & Index b2,b1 < len b1 )
proof end;

theorem Th42: :: JORDAN3:42
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
b2 in LSeg b1,(Index b2,b1)
proof end;

theorem Th43: :: JORDAN3:43
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in LSeg b1,1 holds
Index b2,b1 = 1
proof end;

theorem Th44: :: JORDAN3:44
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st len b1 >= 2 holds
Index (b1 /. 1),b1 = 1
proof end;

theorem Th45: :: JORDAN3:45
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2)
for b3 being Nat st b1 is_S-Seq & 1 < b3 & b3 <= len b1 & b2 = b1 . b3 holds
(Index b2,b1) + 1 = b3
proof end;

theorem Th46: :: JORDAN3:46
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2)
for b3 being Nat st b1 is s.n.c. & b2 in LSeg b1,b3 & not b3 = Index b2,b1 holds
b3 = (Index b2,b1) + 1
proof end;

theorem Th47: :: JORDAN3:47
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2)
for b3 being Nat st b1 is unfolded & b1 is s.n.c. & b3 + 1 <= len b1 & b2 in LSeg b1,b3 & b2 <> b1 . b3 holds
b3 = Index b2,b1
proof end;

definition
let c1 be FinSequence of (TOP-REAL 2);
let c2, c3 be Point of (TOP-REAL 2);
pred c1 is_S-Seq_joining c2,c3 means :Def3: :: JORDAN3:def 3
( a1 is_S-Seq & a1 . 1 = a2 & a1 . (len a1) = a3 );
end;

:: deftheorem Def3 defines is_S-Seq_joining JORDAN3:def 3 :
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) holds
( b1 is_S-Seq_joining b2,b3 iff ( b1 is_S-Seq & b1 . 1 = b2 & b1 . (len b1) = b3 ) );

theorem Th48: :: JORDAN3:48
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) st b1 is_S-Seq_joining b2,b3 holds
Rev b1 is_S-Seq_joining b3,b2
proof end;

theorem Th49: :: JORDAN3:49
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2)
for b4 being Nat st b3 in L~ b1 & b2 = <*b3*> ^ (mid b1,((Index b3,b1) + 1),(len b1)) & 1 <= b4 & b4 + 1 <= len b2 holds
LSeg b2,b4 c= LSeg b1,(((Index b3,b1) + b4) -' 1)
proof end;

theorem Th50: :: JORDAN3:50
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2) st b1 is_S-Seq & b3 in L~ b1 & b3 <> b1 . ((Index b3,b1) + 1) & b2 = <*b3*> ^ (mid b1,((Index b3,b1) + 1),(len b1)) holds
b2 is_S-Seq_joining b3,b1 /. (len b1)
proof end;

theorem Th51: :: JORDAN3:51
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2)
for b4 being Nat st b3 in L~ b1 & 1 <= b4 & b4 + 1 <= len b2 & b2 = (mid b1,1,(Index b3,b1)) ^ <*b3*> holds
LSeg b2,b4 c= LSeg b1,b4
proof end;

theorem Th52: :: JORDAN3:52
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2) st b1 is_S-Seq & b3 in L~ b1 & b3 <> b1 . 1 & b2 = (mid b1,1,(Index b3,b1)) ^ <*b3*> holds
b2 is_S-Seq_joining b1 /. 1,b3
proof end;

definition
let c1 be FinSequence of (TOP-REAL 2);
let c2 be Point of (TOP-REAL 2);
func L_Cut c1,c2 -> FinSequence of (TOP-REAL 2) equals :Def4: :: JORDAN3:def 4
<*a2*> ^ (mid a1,((Index a2,a1) + 1),(len a1)) if a2 <> a1 . ((Index a2,a1) + 1)
otherwise mid a1,((Index a2,a1) + 1),(len a1);
correctness
coherence
( ( c2 <> c1 . ((Index c2,c1) + 1) implies <*c2*> ^ (mid c1,((Index c2,c1) + 1),(len c1)) is FinSequence of (TOP-REAL 2) ) & ( not c2 <> c1 . ((Index c2,c1) + 1) implies mid c1,((Index c2,c1) + 1),(len c1) is FinSequence of (TOP-REAL 2) ) )
;
consistency
for b1 being FinSequence of (TOP-REAL 2) holds verum
;
;
func R_Cut c1,c2 -> FinSequence of (TOP-REAL 2) equals :Def5: :: JORDAN3:def 5
(mid a1,1,(Index a2,a1)) ^ <*a2*> if a2 <> a1 . 1
otherwise <*a2*>;
correctness
coherence
( ( c2 <> c1 . 1 implies (mid c1,1,(Index c2,c1)) ^ <*c2*> is FinSequence of (TOP-REAL 2) ) & ( not c2 <> c1 . 1 implies <*c2*> is FinSequence of (TOP-REAL 2) ) )
;
consistency
for b1 being FinSequence of (TOP-REAL 2) holds verum
;
;
end;

:: deftheorem Def4 defines L_Cut JORDAN3:def 4 :
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) holds
( ( b2 <> b1 . ((Index b2,b1) + 1) implies L_Cut b1,b2 = <*b2*> ^ (mid b1,((Index b2,b1) + 1),(len b1)) ) & ( not b2 <> b1 . ((Index b2,b1) + 1) implies L_Cut b1,b2 = mid b1,((Index b2,b1) + 1),(len b1) ) );

:: deftheorem Def5 defines R_Cut JORDAN3:def 5 :
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) holds
( ( b2 <> b1 . 1 implies R_Cut b1,b2 = (mid b1,1,(Index b2,b1)) ^ <*b2*> ) & ( not b2 <> b1 . 1 implies R_Cut b1,b2 = <*b2*> ) );

theorem Th53: :: JORDAN3:53
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b2 = b1 . ((Index b2,b1) + 1) & b2 <> b1 . (len b1) holds
((Index b2,(Rev b1)) + (Index b2,b1)) + 1 = len b1
proof end;

theorem Th54: :: JORDAN3:54
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is unfolded & b1 is s.n.c. & b2 in L~ b1 & b2 <> b1 . ((Index b2,b1) + 1) holds
(Index b2,(Rev b1)) + (Index b2,b1) = len b1
proof end;

theorem Th55: :: JORDAN3:55
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat
for b4 being Element of b1 holds (<*b4*> ^ b2) | (b3 + 1) = <*b4*> ^ (b2 | b3)
proof end;

theorem Th56: :: JORDAN3:56
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat st b3 < b4 & b3 in dom b2 holds
mid b2,b3,b4 = <*(b2 . b3)*> ^ (mid b2,(b3 + 1),b4)
proof end;

registration
let c1 be non empty FinSequence;
cluster Rev a1 -> non empty ;
coherence
not Rev c1 is empty
proof end;
end;

theorem Th57: :: JORDAN3:57
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 holds
L_Cut (Rev b1),b2 = Rev (R_Cut b1,b2)
proof end;

theorem Th58: :: JORDAN3:58
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
( (L_Cut b1,b2) . 1 = b2 & ( for b3 being Nat st 1 < b3 & b3 <= len (L_Cut b1,b2) holds
( ( b2 = b1 . ((Index b2,b1) + 1) implies (L_Cut b1,b2) . b3 = b1 . ((Index b2,b1) + b3) ) & ( b2 <> b1 . ((Index b2,b1) + 1) implies (L_Cut b1,b2) . b3 = b1 . (((Index b2,b1) + b3) - 1) ) ) ) )
proof end;

theorem Th59: :: JORDAN3:59
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
( (R_Cut b1,b2) . (len (R_Cut b1,b2)) = b2 & ( for b3 being Nat st 1 <= b3 & b3 <= Index b2,b1 holds
(R_Cut b1,b2) . b3 = b1 . b3 ) )
proof end;

theorem Th60: :: JORDAN3:60
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
( ( b2 <> b1 . 1 implies len (R_Cut b1,b2) = (Index b2,b1) + 1 ) & ( b2 = b1 . 1 implies len (R_Cut b1,b2) = Index b2,b1 ) )
proof end;

theorem Th61: :: JORDAN3:61
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
( ( b2 = b1 . ((Index b2,b1) + 1) implies len (L_Cut b1,b2) = (len b1) - (Index b2,b1) ) & ( b2 <> b1 . ((Index b2,b1) + 1) implies len (L_Cut b1,b2) = ((len b1) - (Index b2,b1)) + 1 ) )
proof end;

definition
let c1, c2, c3, c4 be Point of (TOP-REAL 2);
pred LE c3,c4,c1,c2 means :Def6: :: JORDAN3:def 6
( a3 in LSeg a1,a2 & a4 in LSeg a1,a2 & ( for b1, b2 being Real st 0 <= b1 & b1 <= 1 & a3 = ((1 - b1) * a1) + (b1 * a2) & 0 <= b2 & b2 <= 1 & a4 = ((1 - b2) * a1) + (b2 * a2) holds
b1 <= b2 ) );
end;

:: deftheorem Def6 defines LE JORDAN3:def 6 :
for b1, b2, b3, b4 being Point of (TOP-REAL 2) holds
( LE b3,b4,b1,b2 iff ( b3 in LSeg b1,b2 & b4 in LSeg b1,b2 & ( for b5, b6 being Real st 0 <= b5 & b5 <= 1 & b3 = ((1 - b5) * b1) + (b5 * b2) & 0 <= b6 & b6 <= 1 & b4 = ((1 - b6) * b1) + (b6 * b2) holds
b5 <= b6 ) ) );

definition
let c1, c2, c3, c4 be Point of (TOP-REAL 2);
pred LT c3,c4,c1,c2 means :Def7: :: JORDAN3:def 7
( LE a3,a4,a1,a2 & a3 <> a4 );
end;

:: deftheorem Def7 defines LT JORDAN3:def 7 :
for b1, b2, b3, b4 being Point of (TOP-REAL 2) holds
( LT b3,b4,b1,b2 iff ( LE b3,b4,b1,b2 & b3 <> b4 ) );

theorem Th62: :: JORDAN3:62
for b1, b2, b3, b4 being Point of (TOP-REAL 2) st LE b3,b4,b1,b2 & LE b4,b3,b1,b2 holds
b3 = b4
proof end;

theorem Th63: :: JORDAN3:63
for b1, b2, b3, b4 being Point of (TOP-REAL 2) st b3 in LSeg b1,b2 & b4 in LSeg b1,b2 & b1 <> b2 holds
( ( LE b3,b4,b1,b2 or LT b4,b3,b1,b2 ) & ( not LE b3,b4,b1,b2 or not LT b4,b3,b1,b2 ) )
proof end;

theorem Th64: :: JORDAN3:64
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) st b2 in L~ b1 & b3 in L~ b1 & Index b2,b1 < Index b3,b1 holds
b3 in L~ (L_Cut b1,b2)
proof end;

theorem Th65: :: JORDAN3:65
for b1, b2, b3, b4 being Point of (TOP-REAL 2) st LE b1,b2,b3,b4 holds
( b2 in LSeg b1,b4 & b1 in LSeg b3,b2 )
proof end;

theorem Th66: :: JORDAN3:66
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) st b2 in L~ b1 & b3 in L~ b1 & b2 <> b3 & Index b2,b1 = Index b3,b1 & LE b2,b3,b1 /. (Index b2,b1),b1 /. ((Index b2,b1) + 1) holds
b3 in L~ (L_Cut b1,b2)
proof end;

definition
let c1 be FinSequence of (TOP-REAL 2);
let c2, c3 be Point of (TOP-REAL 2);
func B_Cut c1,c2,c3 -> FinSequence of (TOP-REAL 2) equals :Def8: :: JORDAN3:def 8
R_Cut (L_Cut a1,a2),a3 if ( ( a2 in L~ a1 & a3 in L~ a1 & Index a2,a1 < Index a3,a1 ) or ( Index a2,a1 = Index a3,a1 & LE a2,a3,a1 /. (Index a2,a1),a1 /. ((Index a2,a1) + 1) ) )
otherwise Rev (R_Cut (L_Cut a1,a3),a2);
correctness
coherence
( ( ( ( c2 in L~ c1 & c3 in L~ c1 & Index c2,c1 < Index c3,c1 ) or ( Index c2,c1 = Index c3,c1 & LE c2,c3,c1 /. (Index c2,c1),c1 /. ((Index c2,c1) + 1) ) ) implies R_Cut (L_Cut c1,c2),c3 is FinSequence of (TOP-REAL 2) ) & ( ( c2 in L~ c1 & c3 in L~ c1 & Index c2,c1 < Index c3,c1 ) or ( Index c2,c1 = Index c3,c1 & LE c2,c3,c1 /. (Index c2,c1),c1 /. ((Index c2,c1) + 1) ) or Rev (R_Cut (L_Cut c1,c3),c2) is FinSequence of (TOP-REAL 2) ) )
;
consistency
for b1 being FinSequence of (TOP-REAL 2) holds verum
;
;
end;

:: deftheorem Def8 defines B_Cut JORDAN3:def 8 :
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) holds
( ( ( ( b2 in L~ b1 & b3 in L~ b1 & Index b2,b1 < Index b3,b1 ) or ( Index b2,b1 = Index b3,b1 & LE b2,b3,b1 /. (Index b2,b1),b1 /. ((Index b2,b1) + 1) ) ) implies B_Cut b1,b2,b3 = R_Cut (L_Cut b1,b2),b3 ) & ( ( b2 in L~ b1 & b3 in L~ b1 & Index b2,b1 < Index b3,b1 ) or ( Index b2,b1 = Index b3,b1 & LE b2,b3,b1 /. (Index b2,b1),b1 /. ((Index b2,b1) + 1) ) or B_Cut b1,b2,b3 = Rev (R_Cut (L_Cut b1,b3),b2) ) );

theorem Th67: :: JORDAN3:67
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b2 <> b1 . 1 holds
R_Cut b1,b2 is_S-Seq_joining b1 /. 1,b2
proof end;

theorem Th68: :: JORDAN3:68
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b2 <> b1 . (len b1) holds
L_Cut b1,b2 is_S-Seq_joining b2,b1 /. (len b1)
proof end;

theorem Th69: :: JORDAN3:69
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b2 <> b1 . (len b1) holds
L_Cut b1,b2 is_S-Seq
proof end;

theorem Th70: :: JORDAN3:70
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b2 <> b1 . 1 holds
R_Cut b1,b2 is_S-Seq
proof end;

Lemma66: for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b3 in L~ b1 & b2 <> b3 & ( Index b2,b1 < Index b3,b1 or ( Index b2,b1 = Index b3,b1 & LE b2,b3,b1 /. (Index b2,b1),b1 /. ((Index b2,b1) + 1) ) ) holds
B_Cut b1,b2,b3 is_S-Seq_joining b2,b3
proof end;

theorem Th71: :: JORDAN3:71
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b3 in L~ b1 & b2 <> b3 holds
B_Cut b1,b2,b3 is_S-Seq_joining b2,b3
proof end;

theorem Th72: :: JORDAN3:72
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Point of (TOP-REAL 2) st b1 is_S-Seq & b2 in L~ b1 & b3 in L~ b1 & b2 <> b3 holds
B_Cut b1,b2,b3 is_S-Seq
proof end;

theorem Th73: :: JORDAN3:73
for b1, b2 being FinSequence of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} holds
b1 ^ (mid b2,2,(len b2)) is_S-Seq
proof end;

theorem Th74: :: JORDAN3:74
for b1, b2 being FinSequence of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} holds
b1 ^ (mid b2,2,(len b2)) is_S-Seq_joining b1 /. 1,b2 /. (len b2)
proof end;

theorem Th75: :: JORDAN3:75
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Nat holds L~ (b1 /^ b2) c= L~ b1
proof end;

theorem Th76: :: JORDAN3:76
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
L~ (R_Cut b1,b2) c= L~ b1
proof end;

Lemma71: for b1 being natural number
for b2, b3 being Nat st b2 <= b3 holds
(b3 + b1) -' b2 = (b3 + b1) - b2
proof end;

Lemma72: for b1 being Nat
for b2 being non empty set holds (<*> b2) | b1 = <*> b2
proof end;

Lemma73: for b1 being non empty set holds Rev (<*> b1) = <*> b1
;

Lemma74: for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat st 1 <= b3 & b3 <= len b2 holds
( mid b2,b3,b3 = <*(b2 /. b3)*> & len (mid b2,b3,b3) = 1 )
proof end;

Lemma75: for b1 being non empty set
for b2 being FinSequence of b1 holds mid b2,0,0 = b2 | 1
proof end;

Lemma76: for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat st len b2 < b3 holds
mid b2,b3,b3 = <*> b1
proof end;

Lemma77: for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat holds mid b2,b3,b4 = Rev (mid b2,b4,b3)
proof end;

Lemma78: for b1 being FinSequence of (TOP-REAL 2)
for b2, b3 being Nat st 1 <= b2 & b2 <= len b1 & 1 <= b3 & b3 <= len b1 holds
L~ (mid b1,b2,b3) c= L~ b1
proof end;

Lemma79: for b1, b2 being Nat
for b3 being non empty set
for b4 being FinSequence of b3 st b1 in dom b4 & b2 in dom b4 holds
len (mid b4,b1,b2) >= 1
proof end;

Lemma80: for b1, b2 being Nat
for b3 being non empty set
for b4 being FinSequence of b3 st b1 in dom b4 & b2 in dom b4 holds
not mid b4,b1,b2 is empty
proof end;

Lemma81: for b1, b2 being Nat
for b3 being non empty set
for b4 being FinSequence of b3 st b1 in dom b4 & b2 in dom b4 holds
(mid b4,b1,b2) /. 1 = b4 /. b1
proof end;

theorem Th77: :: JORDAN3:77
for b1 being FinSequence of (TOP-REAL 2)
for b2 being Point of (TOP-REAL 2) st b2 in L~ b1 holds
L~ (L_Cut b1,b2) c= L~ b1
proof end;

theorem Th78: :: JORDAN3:78
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b3 in L~ b1 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} & b3 <> b1 . (len b1) holds
(L_Cut b1,b3) ^ (mid b2,2,(len b2)) is_S-Seq_joining b3,b2 /. (len b2)
proof end;

theorem Th79: :: JORDAN3:79
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b3 in L~ b1 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} & b3 <> b1 . (len b1) holds
(L_Cut b1,b3) ^ (mid b2,2,(len b2)) is_S-Seq
proof end;

theorem Th80: :: JORDAN3:80
for b1, b2 being FinSequence of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} holds
(mid b1,1,((len b1) -' 1)) ^ b2 is_S-Seq
proof end;

theorem Th81: :: JORDAN3:81
for b1, b2 being FinSequence of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} holds
(mid b1,1,((len b1) -' 1)) ^ b2 is_S-Seq_joining b1 /. 1,b2 /. (len b2)
proof end;

theorem Th82: :: JORDAN3:82
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b3 in L~ b2 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} & b3 <> b2 . 1 holds
(mid b1,1,((len b1) -' 1)) ^ (R_Cut b2,b3) is_S-Seq_joining b1 /. 1,b3
proof end;

theorem Th83: :: JORDAN3:83
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Point of (TOP-REAL 2) st b1 . (len b1) = b2 . 1 & b3 in L~ b2 & b1 is_S-Seq & b2 is_S-Seq & (L~ b1) /\ (L~ b2) = {(b2 . 1)} & b3 <> b2 . 1 holds
(mid b1,1,((len b1) -' 1)) ^ (R_Cut b2,b3) is_S-Seq
proof end;