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

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

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

[#] A c= [#] T by PRE_TOPC:def 4;
then reconsider AA = [#] A as Subset of T ;
assume A1: Q c= [#] A ; :: thesis: ( Q is compact iff for P being Subset of A 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 A st P = Q holds
P is compact ) :: thesis: ( ( for P being Subset of A st P = Q holds
P is compact ) implies Q is compact )
proof
assume A3: Q is compact ; :: thesis: for P being Subset of A st P = Q holds
P is compact

let P be Subset of A; :: 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 A; :: according to COMPTS_1:def 4 :: thesis: ( G is Cover of P & G is open implies ex G being Subset-Family of A 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 A st
( G c= G & G is Cover of P & G is finite )

consider F being Subset-Family of T such that
A7: F is open and
A8: for AA being Subset of T st AA = [#] A holds
G = F | AA by ;
A9: Q c= union G by ;
union (F | AA) c= union F by TOPS_2:34;
then union G c= union F by A8;
then Q c= union F by A9;
then F is Cover of Q by SETFAM_1:def 11;
then consider F9 being Subset-Family of T such that
A10: F9 c= F and
A11: F9 is Cover of Q and
A12: F9 is finite by A3, A7;
F9 | AA c= bool ([#] (T | AA)) ;
then reconsider G9 = F9 | AA as Subset-Family of A by PRE_TOPC:def 5;
take G9 ; :: thesis: ( G9 c= G & G9 is Cover of P & G9 is finite )
F9 | AA c= F | AA by ;
hence G9 c= G by A8; :: thesis: ( G9 is Cover of P & G9 is finite )
Q c= union F9 by ;
then P c= union G9 by ;
hence G9 is Cover of P by SETFAM_1:def 11; :: thesis: G9 is finite
thus G9 is finite by ; :: thesis: verum
end;
end;
thus ( ( for P being Subset of A st P = Q holds
P is compact ) implies Q is compact ) :: thesis: verum
proof
reconsider QQ = Q as Subset of A by A1;
assume for P being Subset of A 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 T; :: according to COMPTS_1:def 4 :: thesis: ( F is Cover of Q & F is open implies ex G being Subset-Family of T st
( G c= F & G is Cover of Q & G is finite ) )

set F9 = F;
assume that
A14: F is Cover of Q and
A15: F is open ; :: thesis: ex G being Subset-Family of T 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 T st Q = x holds
f . x = Q /\ AA by TOPS_2:40;
F | AA c= bool ([#] (T | AA)) ;
then reconsider F9 = rng f as Subset-Family of A by ;
A19: F9 is open
proof
let X be Subset of A; :: according to TOPS_2:def 1 :: thesis: ( not X in F9 or X is open )
assume A20: X in F9 ; :: thesis: X is open
then reconsider Y = X as Subset of (T | AA) by A17;
consider R being Subset of T such that
A21: R in F and
A22: R /\ AA = Y by ;
R is open by ;
then R in the topology of T ;
then X in the topology of A by ;
hence X is open ; :: thesis: verum
end;
Q c= union F by ;
then QQ c= union F9 by ;
then F9 is Cover of QQ by SETFAM_1:def 11;
then consider G being Subset-Family of A such that
A23: G c= F9 and
A24: G is Cover of QQ and
A25: G is finite by ;
consider X being set such that
A26: X c= dom f and
A27: X is finite and
A28: f .: X = G by ;
reconsider G9 = X as Subset-Family of T by ;
take G9 ; :: thesis: ( G9 c= F & G9 is Cover of Q & G9 is finite )
Q c= union G9
proof
let x be object ; :: according to TARSKI:def 3 :: thesis: ( not x in Q or x in union G9 )
assume A29: x in Q ; :: thesis: x in union G9
QQ c= union G by ;
then consider Y being set such that
A30: x in Y and
A31: Y in G by ;
consider z being object such that
A32: z in dom f and
A33: z in X and
A34: f . z = Y by ;
reconsider Z = z as Subset of T by ;
Y = Z /\ AA by A16, A18, A32, A34;
then x in Z by ;
hence x in union G9 by ; :: thesis: verum
end;
hence ( G9 c= F & G9 is Cover of Q & G9 is finite ) by ; :: thesis: verum
end;
end;