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 Th6:
  for G being finite Group, a being Element of G holds
  a is not being_of_order_0
proof
  let G be finite Group, a be Element of G;
  ex n st n<> 0 & a|^n = 1_G
  proof
    deffunc F(Nat) = a|^$1;
    consider F being FinSequence such that
A1: len F = card G +1 and
A2: for p be Nat st p in dom F holds F.p = F(p) from FINSEQ_1:sch 2;
A3: dom F = Seg (card G + 1) by A1,FINSEQ_1:def 3;
A4: for y st y in rng F holds ex n st y=a|^n
    proof
      let y;
      assume y in rng F;
      then consider x being object such that
A5:   x in dom F and
A6:   F.x=y by FUNCT_1:def 3;
      reconsider n=x as Element of NAT by A5;
      take n;
      thus thesis by A2,A5,A6;
    end;
    for x being object holds x in rng F implies x in the carrier of G
    proof
      let y be object;
      assume y in rng F;
      then ex n st y= a|^n by A4;
      hence thesis;
    end;
    then rng F c= the carrier of G;
    then reconsider
    F9=F as Function of Seg (card G +1),the carrier of G by A3,FUNCT_2:def 1
,RELSET_1:4;
A7: card G < card G +1 by XREAL_1:29;
    card Segm card G = card the carrier of G &
     card Seg(card G+1) = card Segm(card G +1) by FINSEQ_1:55;
    then card the carrier of G in card Seg (card G +1) by A7,NAT_1:41;
    then consider x,y being object such that
A8: x in Seg (card G +1) and
A9: y in Seg (card G +1) and
A10: x <> y and
A11: F9.x = F9.y by FINSEQ_4:65;
    reconsider p=x,n=y as Element of NAT by A8,A9;
    per cases by A10,XXREAL_0:1;
    suppose
A12:  n>p;
      then reconsider t = n-p as Element of NAT by INT_1:5;
      take t;
      F9.p =a|^p by A2,A3,A8;
      then a|^n=a|^p by A2,A3,A9,A11;
      then a|^(n+-p)=a|^p *a|^(-p) by GROUP_1:33;
      then a|^t =a|^(p+-p) by GROUP_1:33;
      hence thesis by A12,GROUP_1:25;
    end;
    suppose
A13:  p>n;
      then reconsider t = p-n as Element of NAT by INT_1:5;
      take t;
      F9.p =a|^p by A2,A3,A8;
      then a|^n=a|^p by A2,A3,A9,A11;
      then a|^(p+-n)=a|^n *a|^(-n) by GROUP_1:33;
      then a|^t =a|^(n+-n) by GROUP_1:33;
      hence thesis by A13,GROUP_1:25;
    end;
  end;
  hence thesis;
end;
