:: TEX_1 semantic presentation

theorem Th1: :: TEX_1:1
for b1 being non empty TopSpace
for b2, b3 being Subset of b1
for b4 being Subset of (b1 modified_with_respect_to b2) st b3 = b4 & b3 is open holds
b4 is open
proof end;

theorem Th2: :: TEX_1:2
for b1 being non empty TopSpace
for b2, b3 being Subset of b1
for b4 being Subset of (b1 modified_with_respect_to b2) st b3 = b4 & b3 is closed holds
b4 is closed
proof end;

theorem Th3: :: TEX_1:3
for b1 being non empty TopSpace
for b2 being Subset of b1
for b3 being Subset of (b1 modified_with_respect_to (b2 ` )) st b3 = b2 holds
b3 is closed
proof end;

theorem Th4: :: TEX_1:4
for b1 being non empty TopSpace
for b2 being Subset of b1
for b3 being Subset of (b1 modified_with_respect_to b2) st b3 = b2 & b2 is dense holds
( b3 is dense & b3 is open )
proof end;

theorem Th5: :: TEX_1:5
for b1 being non empty TopSpace
for b2 being Subset of b1
for b3 being Subset of (b1 modified_with_respect_to b2) st b2 c= b3 & b2 is dense holds
b3 is everywhere_dense
proof end;

theorem Th6: :: TEX_1:6
for b1 being non empty TopSpace
for b2 being Subset of b1
for b3 being Subset of (b1 modified_with_respect_to (b2 ` )) st b3 = b2 & b2 is boundary holds
( b3 is boundary & b3 is closed )
proof end;

theorem Th7: :: TEX_1:7
for b1 being non empty TopSpace
for b2 being Subset of b1
for b3 being Subset of (b1 modified_with_respect_to (b2 ` )) st b3 c= b2 & b2 is boundary holds
b3 is nowhere_dense
proof end;

Lemma7: for b1, b2 being set holds
( b1 c= b2 iff b1 is Subset of b2 )
;

definition
let c1 be non empty 1-sorted ;
redefine attr a1 is trivial means :Def1: :: TEX_1:def 1
ex b1 being Element of a1 st the carrier of a1 = {b1};
compatibility
( c1 is trivial iff ex b1 being Element of c1 st the carrier of c1 = {b1} )
proof end;
end;

:: deftheorem Def1 defines trivial TEX_1:def 1 :
for b1 being non empty 1-sorted holds
( b1 is trivial iff ex b2 being Element of b1 st the carrier of b1 = {b2} );

registration
let c1 be non empty set ;
cluster 1-sorted(# a1 #) -> non empty ;
coherence
not 1-sorted(# c1 #) is empty
by STRUCT_0:def 1;
end;

registration
cluster strict non empty trivial 1-sorted ;
existence
ex b1 being 1-sorted st
( b1 is trivial & b1 is strict & not b1 is empty )
proof end;
cluster strict non empty non trivial 1-sorted ;
existence
ex b1 being 1-sorted st
( not b1 is trivial & b1 is strict & not b1 is empty )
proof end;
end;

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

theorem Th8: :: TEX_1:8
for b1 being non empty trivial TopStruct st not the topology of b1 is empty & b1 is almost_discrete holds
b1 is TopSpace-like
proof end;

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

registration
cluster non empty trivial -> non empty discrete anti-discrete TopStruct ;
coherence
for b1 being non empty TopSpace st b1 is trivial holds
( b1 is anti-discrete & b1 is discrete )
proof end;
cluster non empty discrete anti-discrete -> non empty trivial TopStruct ;
coherence
for b1 being non empty TopSpace st b1 is discrete & b1 is anti-discrete holds
b1 is trivial
proof end;
end;

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

registration
cluster non empty non discrete -> non empty non trivial TopStruct ;
coherence
for b1 being non empty TopSpace st not b1 is discrete holds
not b1 is trivial
proof end;
cluster non empty non anti-discrete -> non empty non trivial TopStruct ;
coherence
for b1 being non empty TopSpace st not b1 is anti-discrete holds
not b1 is trivial
proof end;
end;

definition
let c1 be set ;
func cobool c1 -> Subset-Family of a1 equals :: TEX_1:def 2
{{} ,a1};
coherence
{{} ,c1} is Subset-Family of c1
proof end;
end;

:: deftheorem Def2 defines cobool TEX_1:def 2 :
for b1 being set holds cobool b1 = {{} ,b1};

registration
let c1 be set ;
cluster cobool a1 -> non empty ;
coherence
not cobool c1 is empty
;
end;

definition
let c1 be set ;
func ADTS c1 -> TopStruct equals :: TEX_1:def 3
TopStruct(# a1,(cobool a1) #);
coherence
TopStruct(# c1,(cobool c1) #) is TopStruct
;
end;

:: deftheorem Def3 defines ADTS TEX_1:def 3 :
for b1 being set holds ADTS b1 = TopStruct(# b1,(cobool b1) #);

registration
let c1 be set ;
cluster ADTS a1 -> strict TopSpace-like anti-discrete ;
coherence
( ADTS c1 is strict & ADTS c1 is anti-discrete & ADTS c1 is TopSpace-like )
proof end;
end;

registration
let c1 be non empty set ;
cluster ADTS a1 -> non empty strict TopSpace-like anti-discrete ;
coherence
not ADTS c1 is empty
;
end;

theorem Th9: :: TEX_1:9
for b1 being non empty anti-discrete TopSpace holds TopStruct(# the carrier of b1,the topology of b1 #) = ADTS the carrier of b1 by TDLAT_3:def 2;

theorem Th10: :: TEX_1:10
for b1 being non empty TopSpace st TopStruct(# the carrier of b1,the topology of b1 #) = TopStruct(# the carrier of (ADTS the carrier of b1),the topology of (ADTS the carrier of b1) #) holds
b1 is anti-discrete by TDLAT_3:def 2;

theorem Th11: :: TEX_1:11
for b1 being non empty anti-discrete TopSpace
for b2 being Subset of b1 holds
( ( b2 is empty implies Cl b2 = {} ) & ( not b2 is empty implies Cl b2 = the carrier of b1 ) )
proof end;

theorem Th12: :: TEX_1:12
for b1 being non empty anti-discrete TopSpace
for b2 being Subset of b1 holds
( ( b2 <> the carrier of b1 implies Int b2 = {} ) & ( b2 = the carrier of b1 implies Int b2 = the carrier of b1 ) )
proof end;

theorem Th13: :: TEX_1:13
for b1 being non empty TopSpace st ( for b2 being Subset of b1 st not b2 is empty holds
Cl b2 = the carrier of b1 ) holds
b1 is anti-discrete
proof end;

theorem Th14: :: TEX_1:14
for b1 being non empty TopSpace st ( for b2 being Subset of b1 st b2 <> the carrier of b1 holds
Int b2 = {} ) holds
b1 is anti-discrete
proof end;

theorem Th15: :: TEX_1:15
for b1 being non empty anti-discrete TopSpace
for b2 being Subset of b1 holds
( ( b2 <> {} implies b2 is dense ) & ( b2 <> the carrier of b1 implies b2 is boundary ) )
proof end;

theorem Th16: :: TEX_1:16
for b1 being non empty TopSpace st ( for b2 being Subset of b1 st b2 <> {} holds
b2 is dense ) holds
b1 is anti-discrete
proof end;

theorem Th17: :: TEX_1:17
for b1 being non empty TopSpace st ( for b2 being Subset of b1 st b2 <> the carrier of b1 holds
b2 is boundary ) holds
b1 is anti-discrete
proof end;

registration
let c1 be set ;
cluster 1TopSp a1 -> discrete ;
coherence
1TopSp c1 is discrete
proof end;
end;

theorem Th18: :: TEX_1:18
for b1 being non empty discrete TopSpace holds TopStruct(# the carrier of b1,the topology of b1 #) = 1TopSp the carrier of b1
proof end;

theorem Th19: :: TEX_1:19
for b1 being non empty TopSpace st TopStruct(# the carrier of b1,the topology of b1 #) = TopStruct(# the carrier of (1TopSp the carrier of b1),the topology of (1TopSp the carrier of b1) #) holds
b1 is discrete
proof end;

theorem Th20: :: TEX_1:20
for b1 being non empty discrete TopSpace
for b2 being Subset of b1 holds
( Cl b2 = b2 & Int b2 = b2 )
proof end;

theorem Th21: :: TEX_1:21
for b1 being non empty TopSpace st ( for b2 being Subset of b1 holds Cl b2 = b2 ) holds
b1 is discrete
proof end;

theorem Th22: :: TEX_1:22
for b1 being non empty TopSpace st ( for b2 being Subset of b1 holds Int b2 = b2 ) holds
b1 is discrete
proof end;

theorem Th23: :: TEX_1:23
for b1 being non empty set holds
( ADTS b1 = 1TopSp b1 iff ex b2 being Element of b1 st b1 = {b2} )
proof end;

registration
cluster non empty non trivial strict discrete non anti-discrete TopStruct ;
existence
ex b1 being TopSpace st
( b1 is discrete & not b1 is anti-discrete & b1 is strict & not b1 is empty )
proof end;
cluster non empty non trivial strict non discrete anti-discrete TopStruct ;
existence
ex b1 being TopSpace st
( b1 is anti-discrete & not b1 is discrete & b1 is strict & not b1 is empty )
proof end;
end;

definition
let c1 be set ;
let c2 be Subset-Family of c1;
let c3 be set ;
redefine func \ as c2 \ c3 -> Subset-Family of a1;
coherence
c2 \ c3 is Subset-Family of c1
proof end;
end;

definition
let c1 be set ;
let c2 be Element of c1;
canceled;
func STS c1,c2 -> TopStruct equals :: TEX_1:def 5
TopStruct(# a1,((bool a1) \ { b1 where B is Subset of a1 : ( a2 in b1 & b1 <> a1 ) } ) #);
coherence
TopStruct(# c1,((bool c1) \ { b1 where B is Subset of c1 : ( c2 in b1 & b1 <> c1 ) } ) #) is TopStruct
;
end;

:: deftheorem Def4 TEX_1:def 4 :
canceled;

:: deftheorem Def5 defines STS TEX_1:def 5 :
for b1 being set
for b2 being Element of b1 holds STS b1,b2 = TopStruct(# b1,((bool b1) \ { b3 where B is Subset of b1 : ( b2 in b3 & b3 <> b1 ) } ) #);

registration
let c1 be set ;
let c2 be Element of c1;
cluster STS a1,a2 -> strict TopSpace-like ;
coherence
( STS c1,c2 is strict & STS c1,c2 is TopSpace-like )
proof end;
end;

registration
let c1 be non empty set ;
let c2 be Element of c1;
cluster STS a1,a2 -> non empty strict TopSpace-like ;
coherence
not STS c1,c2 is empty
;
end;

theorem Th24: :: TEX_1:24
for b1 being non empty set
for b2 being Element of b1
for b3 being Subset of (STS b1,b2) holds
( ( {b2} c= b3 implies b3 is closed ) & ( not b3 is empty & b3 is closed implies {b2} c= b3 ) )
proof end;

theorem Th25: :: TEX_1:25
for b1 being non empty set
for b2 being Element of b1 st not b1 \ {b2} is empty holds
for b3 being Subset of (STS b1,b2) holds
( ( b3 = {b2} implies ( b3 is closed & b3 is boundary ) ) & ( not b3 is empty & b3 is closed & b3 is boundary implies b3 = {b2} ) )
proof end;

theorem Th26: :: TEX_1:26
for b1 being non empty set
for b2 being Element of b1
for b3 being Subset of (STS b1,b2) holds
( ( b3 c= b1 \ {b2} implies b3 is open ) & ( b3 <> b1 & b3 is open implies b3 c= b1 \ {b2} ) )
proof end;

theorem Th27: :: TEX_1:27
for b1 being non empty set
for b2 being Element of b1 st not b1 \ {b2} is empty holds
for b3 being Subset of (STS b1,b2) holds
( ( b3 = b1 \ {b2} implies ( b3 is open & b3 is dense ) ) & ( b3 <> b1 & b3 is open & b3 is dense implies b3 = b1 \ {b2} ) )
proof end;

registration
cluster non empty non trivial strict non discrete non anti-discrete TopStruct ;
existence
ex b1 being TopSpace st
( not b1 is anti-discrete & not b1 is discrete & b1 is strict & not b1 is empty )
proof end;
end;

theorem Th28: :: TEX_1:28
for b1 being non empty set
for b2 being Element of b1
for b3 being non empty TopSpace holds
( TopStruct(# the carrier of b3,the topology of b3 #) = TopStruct(# the carrier of (STS b1,b2),the topology of (STS b1,b2) #) iff ( the carrier of b3 = b1 & ( for b4 being Subset of b3 holds
( ( {b2} c= b4 implies b4 is closed ) & ( not b4 is empty & b4 is closed implies {b2} c= b4 ) ) ) ) )
proof end;

theorem Th29: :: TEX_1:29
for b1 being non empty set
for b2 being Element of b1
for b3 being non empty TopSpace holds
( TopStruct(# the carrier of b3,the topology of b3 #) = TopStruct(# the carrier of (STS b1,b2),the topology of (STS b1,b2) #) iff ( the carrier of b3 = b1 & ( for b4 being Subset of b3 holds
( ( b4 c= b1 \ {b2} implies b4 is open ) & ( b4 <> b1 & b4 is open implies b4 c= b1 \ {b2} ) ) ) ) )
proof end;

theorem Th30: :: TEX_1:30
for b1 being non empty set
for b2 being Element of b1
for b3 being non empty TopSpace holds
( TopStruct(# the carrier of b3,the topology of b3 #) = TopStruct(# the carrier of (STS b1,b2),the topology of (STS b1,b2) #) iff ( the carrier of b3 = b1 & ( for b4 being non empty Subset of b3 holds Cl b4 = b4 \/ {b2} ) ) )
proof end;

theorem Th31: :: TEX_1:31
for b1 being non empty set
for b2 being Element of b1
for b3 being non empty TopSpace holds
( TopStruct(# the carrier of b3,the topology of b3 #) = TopStruct(# the carrier of (STS b1,b2),the topology of (STS b1,b2) #) iff ( the carrier of b3 = b1 & ( for b4 being Subset of b3 st b4 <> b1 holds
Int b4 = b4 \ {b2} ) ) )
proof end;

E21: now
let c1 be non empty set ;
let c2 be Element of c1;
let c3 be set ;
assume E22: c3 = { b1 where B is Subset of c1 : ( c2 in b1 & b1 <> c1 ) } ;
assume E23: c1 = {c2} ;
assume E24: c3 <> {} ;
consider c4 being Element of c3;
c4 in c3 by E24;
then consider c5 being Subset of c1 such that
c4 = c5 and
E25: c2 in c5 and
E26: c5 <> c1 by E22;
E27: now
assume c1 \ c5 = {} ;
then c1 c= c5 by XBOOLE_1:37;
hence contradiction by E26, XBOOLE_0:def 10;
end;
consider c6 being Element of c1 \ c5;
reconsider c7 = c6 as Element of c1 by E27, XBOOLE_0:def 4;
c2 <> c7 by E25, E27, XBOOLE_0:def 4;
hence contradiction by E23, TARSKI:def 1;
end;

theorem Th32: :: TEX_1:32
for b1 being non empty set
for b2 being Element of b1 holds
( STS b1,b2 = ADTS b1 iff b1 = {b2} )
proof end;

theorem Th33: :: TEX_1:33
for b1 being non empty set
for b2 being Element of b1 holds
( STS b1,b2 = 1TopSp b1 iff b1 = {b2} )
proof end;

theorem Th34: :: TEX_1:34
for b1 being non empty set
for b2 being Element of b1
for b3 being Subset of (STS b1,b2) st b3 = {b2} holds
1TopSp b1 = (STS b1,b2) modified_with_respect_to b3
proof end;

definition
let c1 be non empty TopSpace;
redefine attr a1 is discrete means :Def6: :: TEX_1:def 6
for b1 being non empty Subset of a1 holds not b1 is boundary;
compatibility
( c1 is discrete iff for b1 being non empty Subset of c1 holds not b1 is boundary )
proof end;
end;

:: deftheorem Def6 defines discrete TEX_1:def 6 :
for b1 being non empty TopSpace holds
( b1 is discrete iff for b2 being non empty Subset of b1 holds not b2 is boundary );

theorem Th35: :: TEX_1:35
for b1 being non empty TopSpace holds
( b1 is discrete iff for b2 being Subset of b1 st b2 <> the carrier of b1 holds
not b2 is dense )
proof end;

registration
cluster non empty non almost_discrete -> non empty non trivial non discrete non anti-discrete TopStruct ;
coherence
for b1 being non empty TopSpace st not b1 is almost_discrete holds
( not b1 is discrete & not b1 is anti-discrete )
proof end;
end;

definition
let c1 be non empty TopSpace;
redefine attr a1 is almost_discrete means :Def7: :: TEX_1:def 7
for b1 being non empty Subset of a1 holds not b1 is nowhere_dense;
compatibility
( c1 is almost_discrete iff for b1 being non empty Subset of c1 holds not b1 is nowhere_dense )
proof end;
end;

:: deftheorem Def7 defines almost_discrete TEX_1:def 7 :
for b1 being non empty TopSpace holds
( b1 is almost_discrete iff for b2 being non empty Subset of b1 holds not b2 is nowhere_dense );

theorem Th36: :: TEX_1:36
for b1 being non empty TopSpace holds
( b1 is almost_discrete iff for b2 being Subset of b1 st b2 <> the carrier of b1 holds
not b2 is everywhere_dense )
proof end;

theorem Th37: :: TEX_1:37
for b1 being non empty TopSpace holds
( not b1 is almost_discrete iff ex b2 being non empty Subset of b1 st
( b2 is boundary & b2 is closed ) )
proof end;

theorem Th38: :: TEX_1:38
for b1 being non empty TopSpace holds
( not b1 is almost_discrete iff ex b2 being Subset of b1 st
( b2 <> the carrier of b1 & b2 is dense & b2 is open ) )
proof end;

registration
cluster non empty non trivial strict non discrete non anti-discrete almost_discrete TopStruct ;
existence
ex b1 being TopSpace st
( b1 is almost_discrete & not b1 is discrete & not b1 is anti-discrete & b1 is strict & not b1 is empty )
proof end;
end;

theorem Th39: :: TEX_1:39
for b1 being non empty set
for b2 being Element of b1 holds
( not b1 \ {b2} is empty iff not STS b1,b2 is almost_discrete )
proof end;

registration
cluster non empty non trivial strict non discrete non anti-discrete non almost_discrete TopStruct ;
existence
ex b1 being TopSpace st
( not b1 is almost_discrete & b1 is strict & not b1 is empty )
proof end;
end;

theorem Th40: :: TEX_1:40
for b1 being non empty TopSpace
for b2 being non empty Subset of b1 st b2 is boundary holds
not b1 modified_with_respect_to (b2 ` ) is almost_discrete
proof end;

theorem Th41: :: TEX_1:41
for b1 being non empty TopSpace
for b2 being Subset of b1 st b2 <> the carrier of b1 & b2 is dense holds
not b1 modified_with_respect_to b2 is almost_discrete
proof end;