let O be set ; :: thesis: for E being non empty set
for A being Action of O,E
for X being Subset of E
for a being Element of E st not X is empty holds
( a in the_stable_subset_generated_by X,A iff ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a )

let E be non empty set ; :: thesis: for A being Action of O,E
for X being Subset of E
for a being Element of E st not X is empty holds
( a in the_stable_subset_generated_by X,A iff ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a )

let A be Action of O,E; :: thesis: for X being Subset of E
for a being Element of E st not X is empty holds
( a in the_stable_subset_generated_by X,A iff ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a )

let X be Subset of E; :: thesis: for a being Element of E st not X is empty holds
( a in the_stable_subset_generated_by X,A iff ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a )

let a be Element of E; :: thesis: ( not X is empty implies ( a in the_stable_subset_generated_by X,A iff ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a ) )
assume A1: not X is empty ; :: thesis: ( a in the_stable_subset_generated_by X,A iff ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a )
defpred S1[ set ] means ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = $1;
set B = { e where e is Element of E : S1[e] } ;
reconsider B = { e where e is Element of E : S1[e] } as Subset of E from DOMAIN_1:sch 7();
now
let x be set ; :: thesis: ( x in X implies x in B )
assume A2: x in X ; :: thesis: x in B
set F = <*> O;
len (<*> O) = 0 ;
then A3: (Product (<*> O),A) . x = (id E) . x by Def3
.= x by A2, FUNCT_1:35 ;
reconsider e = x as Element of E by A2;
reconsider x' = e as Element of X by A2;
(Product (<*> O),A) . x' = e by A3;
hence x in B ; :: thesis: verum
end;
then A4: X c= B by TARSKI:def 3;
now
let o be Element of O; :: thesis: for f being Function of E,E st o in O & f = A . o holds
b3 .: B c= B

let f be Function of E,E; :: thesis: ( o in O & f = A . o implies b2 .: B c= B )
assume A5: o in O ; :: thesis: ( f = A . o implies b2 .: B c= B )
assume A6: f = A . o ; :: thesis: b2 .: B c= B
per cases ( O = {} or O <> {} ) ;
suppose O = {} ; :: thesis: b2 .: B c= B
hence f .: B c= B by A5; :: thesis: verum
end;
suppose A7: O <> {} ; :: thesis: b2 .: B c= B
now
let y be set ; :: thesis: ( y in f .: B implies y in B )
assume y in f .: B ; :: thesis: y in B
then consider x being set such that
A8: ( x in dom f & x in B & y = f . x ) by FUNCT_1:def 12;
consider e' being Element of E such that
A9: ( e' = x & ex F' being FinSequence of O ex x' being Element of X st (Product F',A) . x' = e' ) by A8;
consider F' being FinSequence of O, x' being Element of X such that
A10: (Product F',A) . x' = e' by A9;
reconsider o = o as Element of O ;
reconsider F'' = <*o*> as FinSequence of O by A7, FINSEQ_1:95;
reconsider F = F'' ^ F' as FinSequence of O ;
y in rng f by A8, FUNCT_1:12;
then reconsider e = y as Element of E ;
x' in X by A1;
then x' in E ;
then A11: x' in dom (Product F',A) by FUNCT_2:def 1;
(Product F,A) . x' = ((Product F'',A) * (Product F',A)) . x' by A7, Lm29
.= (Product F'',A) . ((Product F',A) . x') by A11, FUNCT_1:23
.= e by A6, A7, A8, A9, A10, Lm26 ;
hence y in B ; :: thesis: verum
end;
hence f .: B c= B by TARSKI:def 3; :: thesis: verum
end;
end;
end;
then A12: B is_stable_under_the_action_of A by Def1;
now
let Y be Subset of E; :: thesis: ( Y is_stable_under_the_action_of A & X c= Y implies B c= Y )
assume A13: Y is_stable_under_the_action_of A ; :: thesis: ( X c= Y implies B c= Y )
assume A14: X c= Y ; :: thesis: B c= Y
now
let x be set ; :: thesis: ( x in B implies x in Y )
assume x in B ; :: thesis: x in Y
then consider e being Element of E such that
A15: ( x = e & ex F being FinSequence of O ex x' being Element of X st (Product F,A) . x' = e ) ;
consider F being FinSequence of O, x' being Element of X such that
A16: (Product F,A) . x' = e by A15;
A17: x' in X by A1;
then x' in E ;
then A18: x' in dom (Product F,A) by FUNCT_2:def 1;
A19: (Product F,A) .: Y c= Y by A13, Lm30;
(Product F,A) . x' in (Product F,A) .: Y by A14, A17, A18, FUNCT_1:def 12;
hence x in Y by A15, A16, A19; :: thesis: verum
end;
hence B c= Y by TARSKI:def 3; :: thesis: verum
end;
then A20: B = the_stable_subset_generated_by X,A by A4, A12, Def2;
hereby :: thesis: ( ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a implies a in the_stable_subset_generated_by X,A )
assume a in the_stable_subset_generated_by X,A ; :: thesis: ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = a
then consider e being Element of E such that
A21: ( a = e & ex F being FinSequence of O ex x being Element of X st (Product F,A) . x = e ) by A20;
consider F being FinSequence of O, x being Element of X such that
A22: (Product F,A) . x = e by A21;
take F = F; :: thesis: ex x being Element of X st (Product F,A) . x = a
take x = x; :: thesis: (Product F,A) . x = a
thus (Product F,A) . x = a by A21, A22; :: thesis: verum
end;
given F being FinSequence of O, x being Element of X such that A23: (Product F,A) . x = a ; :: thesis: a in the_stable_subset_generated_by X,A
thus a in the_stable_subset_generated_by X,A by A20, A23; :: thesis: verum