let T be TopStruct ; :: thesis: for A being SubSpace of T
for Q being Subset of st Q c= [#] A holds
( Q is compact iff for P being Subset of st P = Q holds
P is compact )

let A be SubSpace of T; :: thesis: for Q being Subset of st Q c= [#] A holds
( Q is compact iff for P being Subset of st P = Q holds
P is compact )

let Q be Subset of ; :: thesis: ( Q c= [#] A implies ( Q is compact iff for P being Subset of st P = Q holds
P is compact ) )

[#] A c= [#] T by PRE_TOPC:def 9;
then reconsider AA = [#] A as Subset of ;
assume A1: Q c= [#] A ; :: thesis: ( Q is compact iff for P being Subset of st P = Q holds
P is compact )

then A2: Q /\ AA = Q by XBOOLE_1:28;
thus ( Q is compact implies for P being Subset of st P = Q holds
P is compact ) :: thesis: ( ( for P being Subset of st P = Q holds
P is compact ) implies Q is compact )
proof
assume A3: Q is compact ; :: thesis: for P being Subset of st P = Q holds
P is compact

let P be Subset of ; :: thesis: ( P = Q implies P is compact )
assume A4: P = Q ; :: thesis: P is compact
thus P is compact :: thesis: verum
proof
let G be Subset-Family of ; :: according to COMPTS_1:def 7 :: thesis: ( G is Cover of P & G is open implies ex G being Subset-Family of st
( G c= G & G is Cover of P & G is finite ) )

set GG = G;
assume that
A5: G is Cover of P and
A6: G is open ; :: thesis: ex G being Subset-Family of st
( G c= G & G is Cover of P & G is finite )

consider F being Subset-Family of such that
A7: F is open and
A8: for AA being Subset of st AA = [#] A holds
G = F | AA by A6, TOPS_2:49;
A9: Q c= union G by A4, A5, SETFAM_1:def 12;
union (F | AA) c= union F by TOPS_2:44;
then union G c= union F by A8;
then Q c= union F by A9, XBOOLE_1:1;
then F is Cover of Q by SETFAM_1:def 12;
then consider F' being Subset-Family of such that
A10: F' c= F and
A11: F' is Cover of Q and
A12: F' is finite by A3, A7, Def7;
F' | AA c= bool ([#] (T | AA)) ;
then reconsider G' = F' | AA as Subset-Family of by PRE_TOPC:def 10;
take G' ; :: thesis: ( G' c= G & G' is Cover of P & G' is finite )
F' | AA c= F | AA by A10, TOPS_2:40;
hence G' c= G by A8; :: thesis: ( G' is Cover of P & G' is finite )
Q c= union F' by A11, SETFAM_1:def 12;
then P c= union G' by A2, A4, TOPS_2:42;
hence G' is Cover of P by SETFAM_1:def 12; :: thesis: G' is finite
thus G' is finite by A12, TOPS_2:46; :: thesis: verum
end;
end;
thus ( ( for P being Subset of st P = Q holds
P is compact ) implies Q is compact ) :: thesis: verum
proof
reconsider QQ = Q as Subset of by A1;
assume for P being Subset of st P = Q holds
P is compact ; :: thesis: Q is compact
then A13: QQ is compact ;
thus Q is compact :: thesis: verum
proof
let F be Subset-Family of ; :: according to COMPTS_1:def 7 :: thesis: ( F is Cover of Q & F is open implies ex G being Subset-Family of st
( G c= F & G is Cover of Q & G is finite ) )

set F' = F;
assume that
A14: F is Cover of Q and
A15: F is open ; :: thesis: ex G being Subset-Family of st
( G c= F & G is Cover of Q & G is finite )

consider f being Function such that
A16: dom f = F and
A17: rng f = F | AA and
A18: for x being set st x in F holds
for Q being Subset of st Q = x holds
f . x = Q /\ AA by TOPS_2:50;
F | AA c= bool ([#] (T | AA)) ;
then reconsider F' = rng f as Subset-Family of by A17, PRE_TOPC:def 10;
A19: F' is open
proof
let X be Subset of ; :: according to TOPS_2:def 1 :: thesis: ( not X in F' or X is open )
assume A20: X in F' ; :: thesis: X is open
then reconsider Y = X as Subset of by A17;
consider R being Subset of such that
A21: R in F and
A22: R /\ AA = Y by A17, A20, TOPS_2:def 3;
R is open by A15, A21, TOPS_2:def 1;
then R in the topology of T by PRE_TOPC:def 5;
then X in the topology of A by A22, PRE_TOPC:def 9;
hence X is open by PRE_TOPC:def 5; :: thesis: verum
end;
Q c= union F by A14, SETFAM_1:def 12;
then QQ c= union F' by A2, A17, TOPS_2:42;
then F' is Cover of QQ by SETFAM_1:def 12;
then consider G being Subset-Family of such that
A23: G c= F' and
A24: G is Cover of QQ and
A25: G is finite by A13, A19, Def7;
consider X being set such that
A26: X c= dom f and
A27: X is finite and
A28: f .: X = G by A23, A25, ORDERS_1:195;
reconsider G' = X as Subset-Family of by A16, A26, TOPS_2:3;
take G' ; :: thesis: ( G' c= F & G' is Cover of Q & G' is finite )
Q c= union G'
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in Q or x in union G' )
assume A29: x in Q ; :: thesis: x in union G'
QQ c= union G by A24, SETFAM_1:def 12;
then consider Y being set such that
A30: x in Y and
A31: Y in G by A29, TARSKI:def 4;
consider z being set such that
A32: z in dom f and
A33: z in X and
A34: f . z = Y by A28, A31, FUNCT_1:def 12;
reconsider Z = z as Subset of by A16, A32;
Y = Z /\ AA by A16, A18, A32, A34;
then x in Z by A30, XBOOLE_0:def 4;
hence x in union G' by A33, TARSKI:def 4; :: thesis: verum
end;
hence ( G' c= F & G' is Cover of Q & G' is finite ) by A16, A26, A27, SETFAM_1:def 12; :: thesis: verum
end;
end;