:: TOPREAL1 semantic presentation

Lemma1: for b1 being Nat holds
( the carrier of (Euclid b1) = REAL b1 & the carrier of (TOP-REAL b1) = REAL b1 )
by TOPMETR:16;

scheme :: TOPREAL1:sch 1
s1{ F1() -> non empty set , P1[ set ], P2[ set ] } :
{ b1 where B is Element of F1() : ( P1[b1] or P2[b1] ) } = { b1 where B is Element of F1() : P1[b1] } \/ { b1 where B is Element of F1() : P2[b1] }
proof end;

definition
let c1 be TopSpace;
let c2, c3 be Point of c1;
let c4 be Subset of c1;
canceled;
pred c4 is_an_arc_of c2,c3 means :Def2: :: TOPREAL1:def 2
ex b1 being Function of I[01] ,(a1 | a4) st
( b1 is_homeomorphism & b1 . 0 = a2 & b1 . 1 = a3 );
end;

:: deftheorem Def1 TOPREAL1:def 1 :
canceled;

:: deftheorem Def2 defines is_an_arc_of TOPREAL1:def 2 :
for b1 being TopSpace
for b2, b3 being Point of b1
for b4 being Subset of b1 holds
( b4 is_an_arc_of b2,b3 iff ex b5 being Function of I[01] ,(b1 | b4) st
( b5 is_homeomorphism & b5 . 0 = b2 & b5 . 1 = b3 ) );

theorem Th1: :: TOPREAL1:1
canceled;

theorem Th2: :: TOPREAL1:2
canceled;

theorem Th3: :: TOPREAL1:3
canceled;

theorem Th4: :: TOPREAL1:4
for b1 being TopSpace
for b2 being Subset of b1
for b3, b4 being Point of b1 st b2 is_an_arc_of b3,b4 holds
( b3 in b2 & b4 in b2 )
proof end;

theorem Th5: :: TOPREAL1:5
for b1 being being_T2 TopSpace
for b2, b3 being Subset of b1
for b4, b5, b6 being Point of b1 st b2 is_an_arc_of b4,b5 & b3 is_an_arc_of b5,b6 & b2 /\ b3 = {b5} holds
b2 \/ b3 is_an_arc_of b4,b6
proof end;

definition
let c1 be Nat;
let c2, c3 be Point of (TOP-REAL c1);
func LSeg c2,c3 -> Subset of (TOP-REAL a1) equals :Def3: :: TOPREAL1:def 3
{ (((1 - b1) * a2) + (b1 * a3)) where B is Real : ( 0 <= b1 & b1 <= 1 ) } ;
coherence
{ (((1 - b1) * c2) + (b1 * c3)) where B is Real : ( 0 <= b1 & b1 <= 1 ) } is Subset of (TOP-REAL c1)
proof end;
end;

:: deftheorem Def3 defines LSeg TOPREAL1:def 3 :
for b1 being Nat
for b2, b3 being Point of (TOP-REAL b1) holds LSeg b2,b3 = { (((1 - b4) * b2) + (b4 * b3)) where B is Real : ( 0 <= b4 & b4 <= 1 ) } ;

definition
func R^2-unit_square -> Subset of (TOP-REAL 2) equals :: TOPREAL1:def 4
((LSeg |[0,0]|,|[0,1]|) \/ (LSeg |[0,1]|,|[1,1]|)) \/ ((LSeg |[1,1]|,|[1,0]|) \/ (LSeg |[1,0]|,|[0,0]|));
coherence
((LSeg |[0,0]|,|[0,1]|) \/ (LSeg |[0,1]|,|[1,1]|)) \/ ((LSeg |[1,1]|,|[1,0]|) \/ (LSeg |[1,0]|,|[0,0]|)) is Subset of (TOP-REAL 2)
;
end;

:: deftheorem Def4 defines R^2-unit_square TOPREAL1:def 4 :
R^2-unit_square = ((LSeg |[0,0]|,|[0,1]|) \/ (LSeg |[0,1]|,|[1,1]|)) \/ ((LSeg |[1,1]|,|[1,0]|) \/ (LSeg |[1,0]|,|[0,0]|));

registration
let c1 be Nat;
let c2, c3 be Point of (TOP-REAL c1);
cluster LSeg a2,a3 -> non empty ;
coherence
not LSeg c2,c3 is empty
proof end;
end;

theorem Th6: :: TOPREAL1:6
for b1 being Nat
for b2, b3 being Point of (TOP-REAL b1) holds
( b2 in LSeg b2,b3 & b3 in LSeg b2,b3 )
proof end;

theorem Th7: :: TOPREAL1:7
for b1 being Nat
for b2 being Point of (TOP-REAL b1) holds LSeg b2,b2 = {b2}
proof end;

theorem Th8: :: TOPREAL1:8
for b1 being Nat
for b2, b3 being Point of (TOP-REAL b1) holds LSeg b2,b3 = LSeg b3,b2
proof end;

definition
let c1 be Nat;
let c2, c3 be Point of (TOP-REAL c1);
redefine func LSeg as LSeg c2,c3 -> Subset of (TOP-REAL a1);
commutativity
for b1, b2 being Point of (TOP-REAL c1) holds LSeg b1,b2 = LSeg b2,b1
by Th8;
end;

Lemma9: for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) st b2 in LSeg b3,b4 holds
LSeg b3,b2 c= LSeg b3,b4
proof end;

theorem Th9: :: TOPREAL1:9
for b1, b2, b3 being Point of (TOP-REAL 2) st b1 `1 <= b2 `1 & b3 in LSeg b1,b2 holds
( b1 `1 <= b3 `1 & b3 `1 <= b2 `1 )
proof end;

theorem Th10: :: TOPREAL1:10
for b1, b2, b3 being Point of (TOP-REAL 2) st b1 `2 <= b2 `2 & b3 in LSeg b1,b2 holds
( b1 `2 <= b3 `2 & b3 `2 <= b2 `2 )
proof end;

theorem Th11: :: TOPREAL1:11
for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) st b2 in LSeg b3,b4 holds
LSeg b3,b4 = (LSeg b3,b2) \/ (LSeg b2,b4)
proof end;

theorem Th12: :: TOPREAL1:12
for b1 being Nat
for b2, b3, b4, b5 being Point of (TOP-REAL b1) st b4 in LSeg b2,b3 & b5 in LSeg b2,b3 holds
LSeg b4,b5 c= LSeg b2,b3
proof end;

theorem Th13: :: TOPREAL1:13
for b1 being Nat
for b2, b3, b4, b5 being Point of (TOP-REAL b1) st b2 in LSeg b4,b5 & b3 in LSeg b4,b5 holds
LSeg b4,b5 = ((LSeg b4,b2) \/ (LSeg b2,b3)) \/ (LSeg b3,b5)
proof end;

theorem Th14: :: TOPREAL1:14
for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) st b2 in LSeg b3,b4 holds
(LSeg b3,b2) /\ (LSeg b2,b4) = {b2}
proof end;

theorem Th15: :: TOPREAL1:15
for b1 being Nat
for b2, b3 being Point of (TOP-REAL b1) st b2 <> b3 holds
LSeg b2,b3 is_an_arc_of b2,b3
proof end;

registration
let c1 be Nat;
cluster TOP-REAL a1 -> being_T2 ;
coherence
TOP-REAL c1 is being_T2
by PCOMPS_1:38;
end;

theorem Th16: :: TOPREAL1:16
for b1 being Nat
for b2 being Subset of (TOP-REAL b1)
for b3, b4, b5 being Point of (TOP-REAL b1) st b2 is_an_arc_of b3,b4 & b2 /\ (LSeg b4,b5) = {b4} holds
b2 \/ (LSeg b4,b5) is_an_arc_of b3,b5
proof end;

theorem Th17: :: TOPREAL1:17
for b1 being Nat
for b2 being Subset of (TOP-REAL b1)
for b3, b4, b5 being Point of (TOP-REAL b1) st b2 is_an_arc_of b4,b3 & (LSeg b5,b4) /\ b2 = {b4} holds
(LSeg b5,b4) \/ b2 is_an_arc_of b5,b3
proof end;

theorem Th18: :: TOPREAL1:18
for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) st ( b2 <> b3 or b3 <> b4 ) & (LSeg b2,b3) /\ (LSeg b3,b4) = {b3} holds
(LSeg b2,b3) \/ (LSeg b3,b4) is_an_arc_of b2,b4
proof end;

theorem Th19: :: TOPREAL1:19
( LSeg |[0,0]|,|[0,1]| = { b1 where B is Point of (TOP-REAL 2) : ( b1 `1 = 0 & b1 `2 <= 1 & b1 `2 >= 0 ) } & LSeg |[0,1]|,|[1,1]| = { b1 where B is Point of (TOP-REAL 2) : ( b1 `1 <= 1 & b1 `1 >= 0 & b1 `2 = 1 ) } & LSeg |[0,0]|,|[1,0]| = { b1 where B is Point of (TOP-REAL 2) : ( b1 `1 <= 1 & b1 `1 >= 0 & b1 `2 = 0 ) } & LSeg |[1,0]|,|[1,1]| = { b1 where B is Point of (TOP-REAL 2) : ( b1 `1 = 1 & b1 `2 <= 1 & b1 `2 >= 0 ) } )
proof end;

theorem Th20: :: TOPREAL1:20
R^2-unit_square = { b1 where B is Point of (TOP-REAL 2) : ( ( b1 `1 = 0 & b1 `2 <= 1 & b1 `2 >= 0 ) or ( b1 `1 <= 1 & b1 `1 >= 0 & b1 `2 = 1 ) or ( b1 `1 <= 1 & b1 `1 >= 0 & b1 `2 = 0 ) or ( b1 `1 = 1 & b1 `2 <= 1 & b1 `2 >= 0 ) ) }
proof end;

registration
cluster R^2-unit_square -> non empty ;
coherence
not R^2-unit_square is empty
proof end;
end;

theorem Th21: :: TOPREAL1:21
(LSeg |[0,0]|,|[0,1]|) /\ (LSeg |[0,1]|,|[1,1]|) = {|[0,1]|}
proof end;

theorem Th22: :: TOPREAL1:22
(LSeg |[0,0]|,|[1,0]|) /\ (LSeg |[1,0]|,|[1,1]|) = {|[1,0]|}
proof end;

theorem Th23: :: TOPREAL1:23
(LSeg |[0,0]|,|[0,1]|) /\ (LSeg |[0,0]|,|[1,0]|) = {|[0,0]|}
proof end;

theorem Th24: :: TOPREAL1:24
(LSeg |[0,1]|,|[1,1]|) /\ (LSeg |[1,0]|,|[1,1]|) = {|[1,1]|}
proof end;

theorem Th25: :: TOPREAL1:25
LSeg |[0,0]|,|[1,0]| misses LSeg |[0,1]|,|[1,1]|
proof end;

theorem Th26: :: TOPREAL1:26
LSeg |[0,0]|,|[0,1]| misses LSeg |[1,0]|,|[1,1]|
proof end;

definition
let c1 be Nat;
let c2 be FinSequence of (TOP-REAL c1);
let c3 be Nat;
func LSeg c2,c3 -> Subset of (TOP-REAL a1) equals :Def5: :: TOPREAL1:def 5
LSeg (a2 /. a3),(a2 /. (a3 + 1)) if ( 1 <= a3 & a3 + 1 <= len a2 )
otherwise {} ;
coherence
( ( 1 <= c3 & c3 + 1 <= len c2 implies LSeg (c2 /. c3),(c2 /. (c3 + 1)) is Subset of (TOP-REAL c1) ) & ( ( not 1 <= c3 or not c3 + 1 <= len c2 ) implies {} is Subset of (TOP-REAL c1) ) )
proof end;
correctness
consistency
for b1 being Subset of (TOP-REAL c1) holds verum
;
;
end;

:: deftheorem Def5 defines LSeg TOPREAL1:def 5 :
for b1 being Nat
for b2 being FinSequence of (TOP-REAL b1)
for b3 being Nat holds
( ( 1 <= b3 & b3 + 1 <= len b2 implies LSeg b2,b3 = LSeg (b2 /. b3),(b2 /. (b3 + 1)) ) & ( ( not 1 <= b3 or not b3 + 1 <= len b2 ) implies LSeg b2,b3 = {} ) );

theorem Th27: :: TOPREAL1:27
for b1, b2 being Nat
for b3 being FinSequence of (TOP-REAL b1) st 1 <= b2 & b2 + 1 <= len b3 holds
( b3 /. b2 in LSeg b3,b2 & b3 /. (b2 + 1) in LSeg b3,b2 )
proof end;

definition
let c1 be Nat;
let c2 be FinSequence of (TOP-REAL c1);
func L~ c2 -> Subset of (TOP-REAL a1) equals :: TOPREAL1:def 6
union { (LSeg a2,b1) where B is Nat : ( 1 <= b1 & b1 + 1 <= len a2 ) } ;
coherence
union { (LSeg c2,b1) where B is Nat : ( 1 <= b1 & b1 + 1 <= len c2 ) } is Subset of (TOP-REAL c1)
proof end;
end;

:: deftheorem Def6 defines L~ TOPREAL1:def 6 :
for b1 being Nat
for b2 being FinSequence of (TOP-REAL b1) holds L~ b2 = union { (LSeg b2,b3) where B is Nat : ( 1 <= b3 & b3 + 1 <= len b2 ) } ;

theorem Th28: :: TOPREAL1:28
for b1 being Nat
for b2 being FinSequence of (TOP-REAL b1) holds
( ( len b2 = 0 or len b2 = 1 ) iff L~ b2 = {} )
proof end;

theorem Th29: :: TOPREAL1:29
for b1 being Nat
for b2 being FinSequence of (TOP-REAL b1) st len b2 >= 2 holds
L~ b2 <> {}
proof end;

definition
let c1 be FinSequence of (TOP-REAL 2);
attr a1 is special means :: TOPREAL1:def 7
for b1 being Nat st 1 <= b1 & b1 + 1 <= len a1 & not (a1 /. b1) `1 = (a1 /. (b1 + 1)) `1 holds
(a1 /. b1) `2 = (a1 /. (b1 + 1)) `2 ;
attr a1 is unfolded means :Def8: :: TOPREAL1:def 8
for b1 being Nat st 1 <= b1 & b1 + 2 <= len a1 holds
(LSeg a1,b1) /\ (LSeg a1,(b1 + 1)) = {(a1 /. (b1 + 1))};
attr a1 is s.n.c. means :Def9: :: TOPREAL1:def 9
for b1, b2 being Nat st b1 + 1 < b2 holds
LSeg a1,b1 misses LSeg a1,b2;
end;

:: deftheorem Def7 defines special TOPREAL1:def 7 :
for b1 being FinSequence of (TOP-REAL 2) holds
( b1 is special iff for b2 being Nat st 1 <= b2 & b2 + 1 <= len b1 & not (b1 /. b2) `1 = (b1 /. (b2 + 1)) `1 holds
(b1 /. b2) `2 = (b1 /. (b2 + 1)) `2 );

:: deftheorem Def8 defines unfolded TOPREAL1:def 8 :
for b1 being FinSequence of (TOP-REAL 2) holds
( b1 is unfolded iff for b2 being Nat st 1 <= b2 & b2 + 2 <= len b1 holds
(LSeg b1,b2) /\ (LSeg b1,(b2 + 1)) = {(b1 /. (b2 + 1))} );

:: deftheorem Def9 defines s.n.c. TOPREAL1:def 9 :
for b1 being FinSequence of (TOP-REAL 2) holds
( b1 is s.n.c. iff for b2, b3 being Nat st b2 + 1 < b3 holds
LSeg b1,b2 misses LSeg b1,b3 );

definition
let c1 be FinSequence of (TOP-REAL 2);
attr a1 is being_S-Seq means :Def10: :: TOPREAL1:def 10
( a1 is one-to-one & len a1 >= 2 & a1 is unfolded & a1 is s.n.c. & a1 is special );
end;

:: deftheorem Def10 defines being_S-Seq TOPREAL1:def 10 :
for b1 being FinSequence of (TOP-REAL 2) holds
( b1 is being_S-Seq iff ( b1 is one-to-one & len b1 >= 2 & b1 is unfolded & b1 is s.n.c. & b1 is special ) );

notation
let c1 be FinSequence of (TOP-REAL 2);
synonym c1 is_S-Seq for being_S-Seq c1;
end;

theorem Th30: :: TOPREAL1:30
ex b1, b2 being FinSequence of (TOP-REAL 2) st
( b1 is_S-Seq & b2 is_S-Seq & R^2-unit_square = (L~ b1) \/ (L~ b2) & (L~ b1) /\ (L~ b2) = {|[0,0]|,|[1,1]|} & b1 /. 1 = |[0,0]| & b1 /. (len b1) = |[1,1]| & b2 /. 1 = |[0,0]| & b2 /. (len b2) = |[1,1]| )
proof end;

theorem Th31: :: TOPREAL1:31
for b1 being FinSequence of (TOP-REAL 2) st b1 is_S-Seq holds
L~ b1 is_an_arc_of b1 /. 1,b1 /. (len b1)
proof end;

definition
let c1 be Subset of (TOP-REAL 2);
attr a1 is being_S-P_arc means :Def11: :: TOPREAL1:def 11
ex b1 being FinSequence of (TOP-REAL 2) st
( b1 is_S-Seq & a1 = L~ b1 );
end;

:: deftheorem Def11 defines being_S-P_arc TOPREAL1:def 11 :
for b1 being Subset of (TOP-REAL 2) holds
( b1 is being_S-P_arc iff ex b2 being FinSequence of (TOP-REAL 2) st
( b2 is_S-Seq & b1 = L~ b2 ) );

notation
let c1 be Subset of (TOP-REAL 2);
synonym c1 is_S-P_arc for being_S-P_arc c1;
end;

theorem Th32: :: TOPREAL1:32
for b1 being Subset of (TOP-REAL 2) st b1 is_S-P_arc holds
b1 <> {}
proof end;

registration
cluster being_S-P_arc -> non empty Element of K40(the carrier of (TOP-REAL 2));
coherence
for b1 being Subset of (TOP-REAL 2) st b1 is being_S-P_arc holds
not b1 is empty
by Th32;
end;

theorem Th33: :: TOPREAL1:33
canceled;

theorem Th34: :: TOPREAL1:34
ex b1, b2 being non empty Subset of (TOP-REAL 2) st
( b1 is_S-P_arc & b2 is_S-P_arc & R^2-unit_square = b1 \/ b2 & b1 /\ b2 = {|[0,0]|,|[1,1]|} )
proof end;

theorem Th35: :: TOPREAL1:35
for b1 being Subset of (TOP-REAL 2) st b1 is_S-P_arc holds
ex b2, b3 being Point of (TOP-REAL 2) st b1 is_an_arc_of b2,b3
proof end;

theorem Th36: :: TOPREAL1:36
for b1 being Subset of (TOP-REAL 2) st b1 is_S-P_arc holds
ex b2 being Function of I[01] ,((TOP-REAL 2) | b1) st b2 is_homeomorphism
proof end;