:: FIN_TOPO semantic presentation

theorem Th1: :: FIN_TOPO:1
for b1 being set
for b2 being FinSequence of bool b1 st ( for b3 being Nat st 1 <= b3 & b3 < len b2 holds
b2 /. b3 c= b2 /. (b3 + 1) ) holds
for b3, b4 being Nat st b3 <= b4 & 1 <= b3 & b4 <= len b2 holds
b2 /. b3 c= b2 /. b4
proof end;

theorem Th2: :: FIN_TOPO:2
for b1 being set
for b2 being FinSequence of bool b1 st ( for b3 being Nat st 1 <= b3 & b3 < len b2 holds
b2 /. b3 c= b2 /. (b3 + 1) ) holds
for b3, b4 being Nat st b3 < b4 & 1 <= b3 & b4 <= len b2 & b2 /. b4 c= b2 /. b3 holds
for b5 being Nat st b3 <= b5 & b5 <= b4 holds
b2 /. b4 = b2 /. b5
proof end;

Lemma3: for b1 being Function st ( for b2 being Nat holds b1 . b2 c= b1 . (b2 + 1) ) holds
for b2, b3 being Nat st b2 <= b3 holds
b1 . b2 c= b1 . b3
by MEASURE2:22;

scheme :: FIN_TOPO:sch 1
s1{ F1() -> non empty set , F2() -> Subset of F1(), F3() -> Subset of F1(), F4( Subset of F1()) -> Subset of F1() } :
ex b1 being FinSequence of bool F1() st
( len b1 > 0 & b1 /. 1 = F3() & ( for b2 being Nat st b2 > 0 & b2 < len b1 holds
b1 /. (b2 + 1) = F4((b1 /. b2)) ) & F4((b1 /. (len b1))) = b1 /. (len b1) & ( for b2, b3 being Nat st b2 > 0 & b2 < b3 & b3 <= len b1 holds
( b1 /. b2 c= F2() & b1 /. b2 c< b1 /. b3 ) ) )
provided
E4: F2() is finite and
E5: F3() c= F2() and
E6: for b1 being Subset of F1() st b1 c= F2() holds
( b1 c= F4(b1) & F4(b1) c= F2() )
proof end;

definition
attr a1 is strict;
struct FT_Space_Str -> 1-sorted ;
aggr FT_Space_Str(# carrier, Nbd #) -> FT_Space_Str ;
sel Nbd c1 -> Function of the carrier of a1, bool the carrier of a1;
end;

registration
cluster non empty strict FT_Space_Str ;
existence
ex b1 being FT_Space_Str st
( not b1 is empty & b1 is strict )
proof end;
end;

definition
let c1 be non empty FT_Space_Str ;
let c2 be Element of c1;
func U_FT c2 -> Subset of a1 equals :: FIN_TOPO:def 1
the Nbd of a1 . a2;
coherence
the Nbd of c1 . c2 is Subset of c1
;
end;

:: deftheorem Def1 defines U_FT FIN_TOPO:def 1 :
for b1 being non empty FT_Space_Str
for b2 being Element of b1 holds U_FT b2 = the Nbd of b1 . b2;

definition
let c1 be set ;
let c2 be Subset of {c1};
redefine func .--> as c1 .--> c2 -> Function of {a1}, bool {a1};
coherence
c1 .--> c2 is Function of {c1}, bool {c1}
proof end;
end;

definition
func FT{0} -> strict FT_Space_Str equals :: FIN_TOPO:def 2
FT_Space_Str(# {0},(0 .--> ([#] {0})) #);
coherence
FT_Space_Str(# {0},(0 .--> ([#] {0})) #) is strict FT_Space_Str
;
end;

:: deftheorem Def2 defines FT{0} FIN_TOPO:def 2 :
FT{0} = FT_Space_Str(# {0},(0 .--> ([#] {0})) #);

registration
cluster FT{0} -> non empty strict ;
coherence
not FT{0} is empty
proof end;
end;

definition
let c1 be non empty FT_Space_Str ;
attr a1 is filled means :Def3: :: FIN_TOPO:def 3
for b1 being Element of a1 holds b1 in U_FT b1;
end;

:: deftheorem Def3 defines filled FIN_TOPO:def 3 :
for b1 being non empty FT_Space_Str holds
( b1 is filled iff for b2 being Element of b1 holds b2 in U_FT b2 );

theorem Th3: :: FIN_TOPO:3
canceled;

theorem Th4: :: FIN_TOPO:4
canceled;

theorem Th5: :: FIN_TOPO:5
canceled;

theorem Th6: :: FIN_TOPO:6
canceled;

theorem Th7: :: FIN_TOPO:7
FT{0} is filled
proof end;

theorem Th8: :: FIN_TOPO:8
FT{0} is finite
proof end;

registration
cluster non empty finite strict filled FT_Space_Str ;
existence
ex b1 being non empty FT_Space_Str st
( b1 is finite & b1 is filled & b1 is strict )
by Th7, Th8;
end;

definition
let c1 be 1-sorted ;
let c2 be set ;
canceled;
pred c2 is_a_cover_of c1 means :: FIN_TOPO:def 5
the carrier of a1 c= union a2;
end;

:: deftheorem Def4 FIN_TOPO:def 4 :
canceled;

:: deftheorem Def5 defines is_a_cover_of FIN_TOPO:def 5 :
for b1 being 1-sorted
for b2 being set holds
( b2 is_a_cover_of b1 iff the carrier of b1 c= union b2 );

theorem Th9: :: FIN_TOPO:9
for b1 being non empty filled FT_Space_Str holds { (U_FT b2) where B is Element of b1 : verum } is_a_cover_of b1
proof end;

definition
let c1 be non empty FT_Space_Str ;
let c2 be Subset of c1;
func c2 ^delta -> Subset of a1 equals :: FIN_TOPO:def 6
{ b1 where B is Element of a1 : ( U_FT b1 meets a2 & U_FT b1 meets a2 ` ) } ;
coherence
{ b1 where B is Element of c1 : ( U_FT b1 meets c2 & U_FT b1 meets c2 ` ) } is Subset of c1
proof end;
end;

:: deftheorem Def6 defines ^delta FIN_TOPO:def 6 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^delta = { b3 where B is Element of b1 : ( U_FT b3 meets b2 & U_FT b3 meets b2 ` ) } ;

theorem Th10: :: FIN_TOPO:10
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 holds
( b2 in b3 ^delta iff ( U_FT b2 meets b3 & U_FT b2 meets b3 ` ) )
proof end;

definition
let c1 be non empty FT_Space_Str ;
let c2 be Subset of c1;
func c2 ^deltai -> Subset of a1 equals :: FIN_TOPO:def 7
a2 /\ (a2 ^delta );
coherence
c2 /\ (c2 ^delta ) is Subset of c1
;
func c2 ^deltao -> Subset of a1 equals :: FIN_TOPO:def 8
(a2 ` ) /\ (a2 ^delta );
coherence
(c2 ` ) /\ (c2 ^delta ) is Subset of c1
;
end;

:: deftheorem Def7 defines ^deltai FIN_TOPO:def 7 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^deltai = b2 /\ (b2 ^delta );

:: deftheorem Def8 defines ^deltao FIN_TOPO:def 8 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^deltao = (b2 ` ) /\ (b2 ^delta );

theorem Th11: :: FIN_TOPO:11
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^delta = (b2 ^deltai ) \/ (b2 ^deltao )
proof end;

definition
let c1 be non empty FT_Space_Str ;
let c2 be Subset of c1;
func c2 ^i -> Subset of a1 equals :: FIN_TOPO:def 9
{ b1 where B is Element of a1 : U_FT b1 c= a2 } ;
coherence
{ b1 where B is Element of c1 : U_FT b1 c= c2 } is Subset of c1
proof end;
func c2 ^b -> Subset of a1 equals :: FIN_TOPO:def 10
{ b1 where B is Element of a1 : U_FT b1 meets a2 } ;
coherence
{ b1 where B is Element of c1 : U_FT b1 meets c2 } is Subset of c1
proof end;
func c2 ^s -> Subset of a1 equals :: FIN_TOPO:def 11
{ b1 where B is Element of a1 : ( b1 in a2 & (U_FT b1) \ {b1} misses a2 ) } ;
coherence
{ b1 where B is Element of c1 : ( b1 in c2 & (U_FT b1) \ {b1} misses c2 ) } is Subset of c1
proof end;
end;

:: deftheorem Def9 defines ^i FIN_TOPO:def 9 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^i = { b3 where B is Element of b1 : U_FT b3 c= b2 } ;

:: deftheorem Def10 defines ^b FIN_TOPO:def 10 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^b = { b3 where B is Element of b1 : U_FT b3 meets b2 } ;

:: deftheorem Def11 defines ^s FIN_TOPO:def 11 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^s = { b3 where B is Element of b1 : ( b3 in b2 & (U_FT b3) \ {b3} misses b2 ) } ;

definition
let c1 be non empty FT_Space_Str ;
let c2 be Subset of c1;
func c2 ^n -> Subset of a1 equals :: FIN_TOPO:def 12
a2 \ (a2 ^s );
coherence
c2 \ (c2 ^s ) is Subset of c1
;
func c2 ^f -> Subset of a1 equals :: FIN_TOPO:def 13
{ b1 where B is Element of a1 : ex b1 being Element of a1 st
( b2 in a2 & b1 in U_FT b2 )
}
;
coherence
{ b1 where B is Element of c1 : ex b1 being Element of c1 st
( b2 in c2 & b1 in U_FT b2 )
}
is Subset of c1
proof end;
end;

:: deftheorem Def12 defines ^n FIN_TOPO:def 12 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^n = b2 \ (b2 ^s );

:: deftheorem Def13 defines ^f FIN_TOPO:def 13 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^f = { b3 where B is Element of b1 : ex b1 being Element of b1 st
( b4 in b2 & b3 in U_FT b4 )
}
;

definition
let c1 be non empty FT_Space_Str ;
attr a1 is symmetric means :Def14: :: FIN_TOPO:def 14
for b1, b2 being Element of a1 st b2 in U_FT b1 holds
b1 in U_FT b2;
end;

:: deftheorem Def14 defines symmetric FIN_TOPO:def 14 :
for b1 being non empty FT_Space_Str holds
( b1 is symmetric iff for b2, b3 being Element of b1 st b3 in U_FT b2 holds
b2 in U_FT b3 );

theorem Th12: :: FIN_TOPO:12
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 holds
( b2 in b3 ^i iff U_FT b2 c= b3 )
proof end;

theorem Th13: :: FIN_TOPO:13
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 holds
( b2 in b3 ^b iff U_FT b2 meets b3 )
proof end;

theorem Th14: :: FIN_TOPO:14
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 holds
( b2 in b3 ^s iff ( b2 in b3 & (U_FT b2) \ {b2} misses b3 ) )
proof end;

theorem Th15: :: FIN_TOPO:15
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 holds
( b2 in b3 ^n iff ( b2 in b3 & (U_FT b2) \ {b2} meets b3 ) )
proof end;

theorem Th16: :: FIN_TOPO:16
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 holds
( b2 in b3 ^f iff ex b4 being Element of b1 st
( b4 in b3 & b2 in U_FT b4 ) )
proof end;

theorem Th17: :: FIN_TOPO:17
for b1 being non empty FT_Space_Str holds
( b1 is symmetric iff for b2 being Subset of b1 holds b2 ^b = b2 ^f )
proof end;

definition
let c1 be non empty FT_Space_Str ;
let c2 be Subset of c1;
attr a2 is open means :Def15: :: FIN_TOPO:def 15
a2 = a2 ^i ;
attr a2 is closed means :Def16: :: FIN_TOPO:def 16
a2 = a2 ^b ;
attr a2 is connected means :Def17: :: FIN_TOPO:def 17
for b1, b2 being Subset of a1 st a2 = b1 \/ b2 & b1 <> {} & b2 <> {} & b1 misses b2 holds
b1 ^b meets b2;
end;

:: deftheorem Def15 defines open FIN_TOPO:def 15 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds
( b2 is open iff b2 = b2 ^i );

:: deftheorem Def16 defines closed FIN_TOPO:def 16 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds
( b2 is closed iff b2 = b2 ^b );

:: deftheorem Def17 defines connected FIN_TOPO:def 17 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds
( b2 is connected iff for b3, b4 being Subset of b1 st b2 = b3 \/ b4 & b3 <> {} & b4 <> {} & b3 misses b4 holds
b3 ^b meets b4 );

definition
let c1 be non empty FT_Space_Str ;
let c2 be Subset of c1;
func c2 ^fb -> Subset of a1 equals :: FIN_TOPO:def 18
meet { b1 where B is Subset of a1 : ( a2 c= b1 & b1 is closed ) } ;
coherence
meet { b1 where B is Subset of c1 : ( c2 c= b1 & b1 is closed ) } is Subset of c1
proof end;
func c2 ^fi -> Subset of a1 equals :: FIN_TOPO:def 19
union { b1 where B is Subset of a1 : ( a2 c= b1 & b1 is open ) } ;
coherence
union { b1 where B is Subset of c1 : ( c2 c= b1 & b1 is open ) } is Subset of c1
proof end;
end;

:: deftheorem Def18 defines ^fb FIN_TOPO:def 18 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^fb = meet { b3 where B is Subset of b1 : ( b2 c= b3 & b3 is closed ) } ;

:: deftheorem Def19 defines ^fi FIN_TOPO:def 19 :
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^fi = union { b3 where B is Subset of b1 : ( b2 c= b3 & b3 is open ) } ;

theorem Th18: :: FIN_TOPO:18
for b1 being non empty filled FT_Space_Str
for b2 being Subset of b1 holds b2 c= b2 ^b
proof end;

theorem Th19: :: FIN_TOPO:19
for b1 being non empty FT_Space_Str
for b2, b3 being Subset of b1 st b2 c= b3 holds
b2 ^b c= b3 ^b
proof end;

theorem Th20: :: FIN_TOPO:20
for b1 being non empty finite filled FT_Space_Str
for b2 being Subset of b1 holds
( b2 is connected iff for b3 being Element of b1 st b3 in b2 holds
ex b4 being FinSequence of bool the carrier of b1 st
( len b4 > 0 & b4 /. 1 = {b3} & ( for b5 being Nat st b5 > 0 & b5 < len b4 holds
b4 /. (b5 + 1) = ((b4 /. b5) ^b ) /\ b2 ) & b2 c= b4 /. (len b4) ) )
proof end;

theorem Th21: :: FIN_TOPO:21
for b1 being non empty set
for b2 being Subset of b1
for b3 being Element of b1 holds
( b3 in b2 ` iff not b3 in b2 ) by SUBSET_1:50, SUBSET_1:54;

theorem Th22: :: FIN_TOPO:22
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds ((b2 ` ) ^i ) ` = b2 ^b
proof end;

theorem Th23: :: FIN_TOPO:23
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds ((b2 ` ) ^b ) ` = b2 ^i
proof end;

theorem Th24: :: FIN_TOPO:24
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds b2 ^delta = (b2 ^b ) /\ ((b2 ` ) ^b )
proof end;

theorem Th25: :: FIN_TOPO:25
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 holds (b2 ` ) ^delta = b2 ^delta
proof end;

theorem Th26: :: FIN_TOPO:26
for b1 being non empty FT_Space_Str
for b2 being Element of b1
for b3 being Subset of b1 st b2 in b3 ^s holds
not b2 in (b3 \ {b2}) ^b
proof end;

theorem Th27: :: FIN_TOPO:27
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 st b2 ^s <> {} & Card b2 <> 1 holds
not b2 is connected
proof end;

theorem Th28: :: FIN_TOPO:28
for b1 being non empty filled FT_Space_Str
for b2 being Subset of b1 holds b2 ^i c= b2
proof end;

theorem Th29: :: FIN_TOPO:29
for b1 being set
for b2, b3 being Subset of b1 holds
( b2 = b3 iff b2 ` = b3 ` )
proof end;

theorem Th30: :: FIN_TOPO:30
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 st b2 is open holds
b2 ` is closed
proof end;

theorem Th31: :: FIN_TOPO:31
for b1 being non empty FT_Space_Str
for b2 being Subset of b1 st b2 is closed holds
b2 ` is open
proof end;