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 Th22:
  for n being non zero Nat
   ex g being Element of INT.Group(n) st
   for b being Element of INT.Group(n) ex j1 st b = g|^j1
proof
  let n be non zero Nat;
  0+1 < n+1 by XREAL_1:6;
  then
A1: n >=1 by NAT_1:13;
  now
    per cases by A1,XXREAL_0:1;
    suppose
      n=1;
      then the carrier of INT.Group(n) = {1_INT.Group(n)} by Th14,CARD_1:49
        .= the carrier of (1).INT.Group(n) by GROUP_2:def 7;
      then INT.Group(n) = (1).INT.Group(n) by GROUP_2:61;
      hence thesis by Th17;
    end;
    suppose
      n>1;
      then reconsider g9= 1 as Element of Segm(n) by NAT_1:44;
      reconsider g=g9 as Element of INT.Group(n);
      for b being Element of INT.Group(n) ex j1 st b = g|^j1
      proof
        let b be Element of INT.Group(n);
        reconsider b9=b as Element of NAT by Lm1;
        defpred P[Nat] means g|^$1 = $1 mod n;
A2:     b9<n by NAT_1:44;
A3:     for k st P[k] holds P[k+1]
        proof
          let k;
          assume
A4:       g|^k = k mod n;
          k mod n < n by NAT_D:1;
          then reconsider e=(k mod n) as Element of Segm(n) by NAT_1:44;
          g|^(k+1) =g|^k*(g|^1) by GROUP_1:33
            .=g|^k*g by GROUP_1:26
            .= (e +g9) mod n by A4,Def4
            .=(k+1) mod n by NAT_D:22;
          hence thesis;
        end;
        g|^0 = 1_INT.Group(n) by GROUP_1:25
          .= 0 by Th14
          .= 0 mod n by NAT_D:26;
        then
A5:     P[0];
        for k holds P[k] from NAT_1:sch 2(A5,A3);
        then
A6:     g|^b9=b9 mod n .= b by A2,NAT_D:24;
        reconsider b9 as Integer;
        take b9;
        thus thesis by A6;
      end;
      hence thesis;
    end;
  end;
  hence thesis;
end;
