reserve F,G for Group;
reserve G1 for Subgroup of G;
reserve Gc for cyclic Group;
reserve H for Subgroup of Gc;
reserve f for Homomorphism of G,Gc;
reserve a,b for Element of G;
reserve g for Element of Gc;
reserve a1 for Element of G1;
reserve k,m,n,p,s for Element of NAT;
reserve i0,i,i1,i2 for Integer;
reserve j,j1 for Element of INT.Group;
reserve x,y,t for set;

theorem
  for G being strict finite Group, a be Element of G holds G = gr {a} &
  card G = n implies ( G = gr {a|^k} iff k gcd n = 1 )
proof
  let G be strict finite Group, a be Element of G;
  assume that
A1: G = gr {a} and
A2: card G = n;
A3: G=gr {a|^k} implies k gcd n = 1
  proof
    set d=k gcd n;
    assume that
A4: G = gr {a|^k} and
A5: k gcd n <> 1;
    d divides n by NAT_D:def 5;
    then consider p be Nat such that
A6: n=d*p by NAT_D:def 3;
A7: p <> 0 by A2,A6;
A8: p <> n
    proof
      assume p=n;
      then d*p = p*1 by A6;
      hence contradiction by A5,A2,A6,XCMPLX_1:5;
    end;
    d divides k by NAT_D:def 5;
    then consider l be Nat such that
A9: k=d*l by NAT_D:def 3;
A10: a|^k is not being_of_order_0 by GR_CY_1:6;
    (a|^k)|^p = a|^((l*d)*p) by A9,GROUP_1:35
      .=a|^(n*l) by A6
      .=a|^n|^l by GROUP_1:35
      .=(1_G)|^l by A2,GR_CY_1:9
      .= 1_G by GROUP_1:31;
    then
A11: ord (a|^k) <= p by A7,A10,GROUP_1:def 11;
    p divides n by A6,NAT_D:def 3;
    then p <= n by A2,NAT_D:7;
    then p<n by A8,XXREAL_0:1;
    hence contradiction by A2,A4,A11,GR_CY_1:7;
  end;
  k gcd n = 1 implies G=gr {a|^k}
  proof
    assume k gcd n = 1;
    then consider i,i1 such that
A12: i*k+ i1*n=1 by NEWTON:67;
    for b be Element of G holds b in gr {a|^k}
    proof
      let b be Element of G;
      b in G by STRUCT_0:def 5;
      then consider i0 such that
A13:  b=a|^i0 by A1,GR_CY_1:5;
A14:  i0=(k*i+n*i1)*i0 by A12
        .= k*i*i0+n*i1*i0;
      ex i2 st b=(a|^k)|^i2
      proof
        take i*i0;
        b= (a|^(k*i*i0)) *a|^(n*(i1*i0)) by A13,A14,GROUP_1:33
          .= (a|^(k*i*i0))*a|^n|^(i1*i0) by GROUP_1:35
          .= (a|^(k*i*i0))*(1_G)|^(i1*i0) by A2,GR_CY_1:9
          .= (a|^(k*i*i0))*1_G by GROUP_1:31
          .= a|^(k*(i*i0)) by GROUP_1:def 4
          .= a|^k|^(i*i0) by GROUP_1:35;
        hence thesis;
      end;
      hence thesis by GR_CY_1:5;
    end;
    hence thesis by GROUP_2:62;
  end;
  hence thesis by A3;
end;
