reserve i1 for Element of INT;
reserve j1,j2,j3 for Integer;
reserve p,s,k,n for Nat;
reserve x,y,xp,yp for set;
reserve G for Group;
reserve a,b for Element of G;
reserve F for FinSequence of G;
reserve I for FinSequence of INT;

theorem Th18:
  for G being finite Group holds
  G is cyclic iff ex a being Element of G st
  for b being Element of G ex n st b = a|^n
proof
  let G be finite Group;
  thus G is cyclic implies ex a being Element of G st for b being Element of G
  ex n st b=a|^n
  proof
    assume G is cyclic;
    then consider a being Element of G such that
A1: for b being Element of G ex j2 st b=a|^j2 by Th17;
    take a;
    let b be Element of G;
    consider j2 such that
A2: b = a|^j2 by A1;
    consider n being Nat such that
A3: j2=n or j2=-n by INT_1:2;
    per cases by A3;
    suppose
      j2=n;
      hence thesis by A2;
    end;
    suppose
A4:   j2=-n;
      n mod card G <=card G by NAT_D:1;
      then reconsider q9=card G -( n mod card G) as Element of NAT by INT_1:5;
      take q9;
      b=(a|^n)" by A2,A4,GROUP_1:36
        .= a|^q9 by Th10;
      hence thesis;
    end;
  end;
  given a being Element of G such that
A5: for b being Element of G ex n st b=a|^n;
  for b being Element of G ex j2 st b=a|^j2
  proof
    let b be Element of G;
    consider n such that
A6: b=a|^n by A5;
    reconsider n as Integer;
    take n;
    thus thesis by A6;
  end;
  hence thesis by Th17;
end;
