defpred S1[ object , object ] means ex a being Element of X st
( $1 = a & $2 = A . (g,a) );
A: for x being object st x in X holds
ex y being object st
( y in X & S1[x,y] )
proof
let x be object ; :: thesis: ( x in X implies ex y being object st
( y in X & S1[x,y] ) )

assume x in X ; :: thesis: ex y being object st
( y in X & S1[x,y] )

then reconsider a = x as Element of X ;
take A . (g,a) ; :: thesis: ( A . (g,a) in X & S1[x,A . (g,a)] )
thus ( A . (g,a) in X & S1[x,A . (g,a)] ) ; :: thesis: verum
end;
consider f being Function of X,X such that
B: for x being object st x in X holds
S1[x,f . x] from FUNCT_2:sch 1(A);
defpred S2[ object , object ] means ex a being Element of X st
( $1 = a & $2 = A . ((g "),a) );
C: for x being object st x in X holds
ex y being object st
( y in X & S2[x,y] )
proof
let x be object ; :: thesis: ( x in X implies ex y being object st
( y in X & S2[x,y] ) )

assume x in X ; :: thesis: ex y being object st
( y in X & S2[x,y] )

then reconsider a = x as Element of X ;
take A . ((g "),a) ; :: thesis: ( A . ((g "),a) in X & S2[x,A . ((g "),a)] )
thus ( A . ((g "),a) in X & S2[x,A . ((g "),a)] ) ; :: thesis: verum
end;
consider h being Function of X,X such that
D: for x being object st x in X holds
S2[x,h . x] from FUNCT_2:sch 1(C);
now :: thesis: for x being object st x in X holds
(f * h) . x = (id X) . x
let x be object ; :: thesis: ( x in X implies (f * h) . x = (id X) . x )
assume x in X ; :: thesis: (f * h) . x = (id X) . x
then reconsider a = x as Element of X ;
consider b being Element of X such that
H1: ( b = a & h . a = A . ((g "),b) ) by D;
consider c being Element of X such that
H2: ( c = A . ((g "),a) & f . (A . ((g "),a)) = A . (g,c) ) by B;
thus (f * h) . x = f . (A . ((g "),a)) by H1, FUNCT_2:15
.= A . ((g * (g ")),a) by H2, defAC
.= A . ((1_ G),a) by GROUP_1:def 5
.= (id X) . x by defAC ; :: thesis: verum
end;
then f * h = id X ;
then E: f is onto by FUNCT_2:23;
now :: thesis: for x being object st x in X holds
(h * f) . x = (id X) . x
let x be object ; :: thesis: ( x in X implies (h * f) . x = (id X) . x )
assume x in X ; :: thesis: (h * f) . x = (id X) . x
then reconsider a = x as Element of X ;
consider b being Element of X such that
H1: ( b = a & f . a = A . (g,b) ) by B;
consider c being Element of X such that
H2: ( c = A . (g,a) & h . (A . (g,a)) = A . ((g "),c) ) by D;
thus (h * f) . x = h . (A . (g,a)) by H1, FUNCT_2:15
.= A . (((g ") * g),a) by H2, defAC
.= A . ((1_ G),a) by GROUP_1:def 5
.= (id X) . x by defAC ; :: thesis: verum
end;
then h * f = id X ;
then f is one-to-one by FUNCT_2:23;
then reconsider f = f as Permutation of X by E;
take f ; :: thesis: for a being Element of X holds f . a = A . (g,a)
now :: thesis: for a being Element of X holds f . a = A . (g,a)
let a be Element of X; :: thesis: f . a = A . (g,a)
consider b being Element of X such that
H: ( b = a & f . a = A . (g,b) ) by B;
thus f . a = A . (g,a) by H; :: thesis: verum
end;
hence for a being Element of X holds f . a = A . (g,a) ; :: thesis: verum