let n, k be Element of NAT ; :: thesis: for G being finite strict Group
for a being Element of G st G = gr {a} & card G = n holds
( G = gr {(a |^ k)} iff k gcd n = 1 )

let G be finite strict Group; :: thesis: for a being Element of G st G = gr {a} & card G = n holds
( G = gr {(a |^ k)} iff k gcd n = 1 )

let a be Element of G; :: thesis: ( G = gr {a} & card G = n implies ( G = gr {(a |^ k)} iff k gcd n = 1 ) )
assume that
A1: G = gr {a} and
A2: card G = n ; :: thesis: ( G = gr {(a |^ k)} iff k gcd n = 1 )
A3: n > 0 by A2, GROUP_1:90;
A4: ( G = gr {(a |^ k)} implies k gcd n = 1 )
proof
assume that
A5: G = gr {(a |^ k)} and
A6: k gcd n <> 1 ; :: thesis: contradiction
set d = k gcd n;
A7: k gcd n divides k by NAT_D:def 5;
A8: k gcd n divides n by NAT_D:def 5;
consider l being Nat such that
A9: k = (k gcd n) * l by A7, NAT_D:def 3;
consider p being Nat such that
A10: n = (k gcd n) * p by A8, NAT_D:def 3;
A11: p divides n by A10, NAT_D:def 3;
A12: (a |^ k) |^ p = a |^ ((l * (k gcd n)) * p) by A9, GROUP_1:67
.= a |^ (n * l) by A10
.= (a |^ n) |^ l by GROUP_1:67
.= (1_ G) |^ l by A2, GR_CY_1:29
.= 1_ G by GROUP_1:61 ;
A13: p <> 0 by A2, A10, GROUP_1:90;
A14: p < n
proof
A15: p <= n by A3, A11, NAT_D:7;
p <> n
proof
assume p = n ; :: thesis: contradiction
then (k gcd n) * p = p * 1 by A10;
hence contradiction by A6, A13, XCMPLX_1:5; :: thesis: verum
end;
hence p < n by A15, XXREAL_0:1; :: thesis: verum
end;
not a |^ k is being_of_order_0 by GR_CY_1:26;
then ord (a |^ k) <= p by A12, A13, GROUP_1:def 12;
hence contradiction by A2, A5, A14, GR_CY_1:27; :: thesis: verum
end;
( k gcd n = 1 implies G = gr {(a |^ k)} )
proof
assume k gcd n = 1 ; :: thesis: G = gr {(a |^ k)}
then consider i, i1 being Integer such that
A16: (i * k) + (i1 * n) = 1 by A3, NEWTON:81;
for b being Element of G holds b in gr {(a |^ k)}
proof
let b be Element of G; :: thesis: b in gr {(a |^ k)}
b in G by STRUCT_0:def 5;
then consider i0 being Integer such that
A17: b = a |^ i0 by A1, GR_CY_1:25;
A18: i0 = ((k * i) + (n * i1)) * i0 by A16
.= ((k * i) * i0) + ((n * i1) * i0) ;
ex i2 being Integer st b = (a |^ k) |^ i2
proof
A19: b = (a |^ ((k * i) * i0)) * (a |^ (n * (i1 * i0))) by A17, A18, GROUP_1:63
.= (a |^ ((k * i) * i0)) * ((a |^ n) |^ (i1 * i0)) by GROUP_1:67
.= (a |^ ((k * i) * i0)) * ((1_ G) |^ (i1 * i0)) by A2, GR_CY_1:29
.= (a |^ ((k * i) * i0)) * (1_ G) by GROUP_1:61
.= a |^ (k * (i * i0)) by GROUP_1:def 5
.= (a |^ k) |^ (i * i0) by GROUP_1:67 ;
take i * i0 ; :: thesis: b = (a |^ k) |^ (i * i0)
thus b = (a |^ k) |^ (i * i0) by A19; :: thesis: verum
end;
hence b in gr {(a |^ k)} by GR_CY_1:25; :: thesis: verum
end;
hence G = gr {(a |^ k)} by GROUP_2:71; :: thesis: verum
end;
hence ( G = gr {(a |^ k)} iff k gcd n = 1 ) by A4; :: thesis: verum