
theorem Th44:
  for G be Group, A be non empty Subset of G
  st for x,y be Element of G st x in A & y in A holds x * y = y * x
  holds gr A is commutative
  proof
    let G be Group, A be non empty Subset of G;
    assume
    A1: for x,y be Element of G st x in A & y in A  holds x * y = y * x;
    A2: for x,y be Element of G, i,j be Element of INT st x in A & y in A
        holds (x|^i) * (y|^j) = (y|^j) * (x|^i)
    proof
      let x,y be Element of G, i,j be Element of INT;
      assume x in A & y in A; then
      x * y = y * x by A1;
      hence thesis by GROUP_1:39;
    end;
    A3: for y be Element of G, j be Element of INT st y in A holds
        for F be FinSequence of G, I be FinSequence of INT
        st len F = len I & rng F c= A
        holds Product(F|^I) * (y|^j) = (y|^j) * Product(F|^I)
    proof
      let y be Element of G, j be Element of INT;
      assume
      A4: y in A;
      set x = y|^j;
      defpred P[Nat] means
      for F be FinSequence of G, I be FinSequence of INT
      st len F = $1 & len F = len I & rng F c= A
      holds Product(F|^I) * x = x * Product(F|^I);
      A5: P[0]
      proof
        let F be FinSequence of G,
            I be FinSequence of INT such that
        A6: len F = 0 & len F = len I & rng F c= A;
        F = <*>([#]G) & I = <*>INT by A6; then
        F|^I = <*>([#]G) by GROUP_4:21; then
        A7: Product(F|^I) = 1_G by GROUP_4:8;
        hence Product(F|^I) * x = x by GROUP_1:def 4
                              .= x * Product(F|^I) by A7,GROUP_1:def 4;
      end;
      A8: for k be Nat st P[k] holds P[k+1]
      proof
        let k be Nat;
        assume
        A9: P[k];
        let F be FinSequence of G,
            I be FinSequence of INT such that
        A10: len F = k+1 & len F = len I & rng F c= A;
        reconsider g = F/.(k+1) as Element of G;
        reconsider i = I/.(k+1) as Element of INT;
        reconsider F0 = F|k as FinSequence of G;
        reconsider I0 = I|k as FinSequence of INT;
        rng F0 c= rng F by RELAT_1:70; then
        A11: rng F0 c= A by A10;
        reconsider F1 = <*g*> as FinSequence of G;
        reconsider I1 = <*i*> as FinSequence of INT;
        A12: <* @i *> = I1 by GROUP_4:def 1;
        k+1 in Seg (k+1) by FINSEQ_1:4; then
        A13: k+1 in dom F by A10,FINSEQ_1:def 3; then
        F/.(k+1) = F.(k+1) by PARTFUN1:def 6; then
        A14: F = F0^F1 by A10,FINSEQ_3:55;
        k+1 in Seg (k+1) by FINSEQ_1:4; then
        k+1 in dom I by A10,FINSEQ_1:def 3; then
        A15: I/.(k+1) = I.(k+1) by PARTFUN1:def 6;
        g = F.(k+1) by A13,PARTFUN1:def 6; then
        A17: g in A by A10,A13,FUNCT_1:3;
        k <= len F & k <= len I by A10,XREAL_1:31; then
        A18: len F0 = k & len I0 = k by FINSEQ_1:17;
        A19: len F1 = 1 & len I1 = 1 by FINSEQ_1:39;
        A20: F|^I = (F0^F1) |^ (I0^I1) by A10,A14,A15,FINSEQ_3:55
                 .= (F0|^I0)^(F1|^I1) by A18,A19,GROUP_4:19
                 .= (F0|^I0)^<*g|^i*> by A12,GROUP_4:22;
        hence Product(F|^I) * x
                = (Product(F0|^I0) * (g|^i)) * x by GROUP_4:6
               .= Product(F0|^I0) * ((g|^i) * x) by GROUP_1:def 3
               .= Product(F0|^I0) * (x * (g|^i)) by A2,A4,A17
               .= Product(F0|^I0) * x * (g|^i) by GROUP_1:def 3
               .= x * Product(F0|^I0) * (g|^i) by A9,A11,A18
               .= x * (Product(F0|^I0) * (g|^i)) by GROUP_1:def 3
               .= x * Product(F|^I) by A20,GROUP_4:6;
      end;
      for k be Nat holds P[k] from NAT_1:sch 2(A5,A8);
      hence thesis;
    end;
    A22: for x,g be Element of G, i be Element of INT st x in gr A & g in A
         holds x * g|^i = g|^i * x
    proof
      let x,g be Element of G, i be Element of INT such that
      A23: x in gr A & g in A;
      consider F be FinSequence of G,
               I be FinSequence of INT such that
      A24: len F = len I & rng F c= A & Product(F|^I) = x by A23,GROUP_4:28;
      thus x * g|^i = g|^i * x by A3,A23,A24;
    end;
    A25: for x be Element of G st x in gr A holds
         for F be FinSequence of G, I be FinSequence of INT
         st len F = len I & rng F c= A
         holds Product(F|^I) * x = x * Product(F|^I)
    proof
      let x be Element of G;
      assume
      A26: x in gr A;
      defpred P[Nat] means
      for x be Element of G st x in gr A holds
      for F be FinSequence of G, I be FinSequence of INT
      st len F = $1 & len F = len I & rng F c= A
      holds Product(F|^I) * x = x * Product(F|^I);
      A27: P[0]
      proof
        let x be Element of G;
        assume x in gr A;
        let F be FinSequence of G,
            I be FinSequence of INT such that
        A29: len F = 0 & len F = len I & rng F c= A;
        F = <*>([#]G) & I = <*>INT by A29; then
        F|^I = <*>(the  carrier of G) by GROUP_4:21; then
        A30: Product(F|^I) = 1_G by GROUP_4:8;
        hence Product(F|^I) * x = x by GROUP_1:def 4
                              .= x * Product(F|^I) by A30,GROUP_1:def 4;
      end;
      A31: for k be Nat st P[k] holds P[k+1]
      proof
        let k be Nat;
        assume
        A32: P[k];
        let x be Element of G;
        assume
        A33: x in gr A;
        let F be FinSequence of G,
            I be FinSequence of INT such that
        A34: len F = k+1 & len F = len I & rng F c= A;
        reconsider g = F/.(k+1) as Element of G;
        reconsider i = I/.(k+1) as Element of INT;
        reconsider F0 = F|k as FinSequence of G;
        reconsider I0 = I|k as FinSequence of INT;
        rng F0 c= rng F by RELAT_1:70; then
        A35: rng F0 c= A by A34;
        reconsider F1 = <*g*> as FinSequence of G;
        reconsider I1 = <*i*> as FinSequence of INT;
        A36: <* @i *> = I1 by GROUP_4:def 1;
        k+1 in Seg (k+1) by FINSEQ_1:4; then
        A37: k+1 in dom F by A34,FINSEQ_1:def 3; then
        F/.(k+1) = F.(k+1) by PARTFUN1:def 6; then
        A38: F = F0^F1 by A34,FINSEQ_3:55;
        k+1 in Seg(k+1) by FINSEQ_1:4; then
        k+1 in dom I by A34,FINSEQ_1:def 3; then
        A39: I/.(k+1) = I.(k+1) by PARTFUN1:def 6;
        g = F.(k+1) by A37,PARTFUN1:def 6; then
        A40: g in A by A34,A37,FUNCT_1:3;
        k <= len F & k <= len I by A34,XREAL_1:31; then
        A41: len F0 = k & len I0 = k by FINSEQ_1:17;
        A42: len F1 = 1 & len I1 = 1 by FINSEQ_1:39;
        A43: F|^I = (F0^F1) |^ (I0^I1) by A34,A38,A39,FINSEQ_3:55
                 .= (F0|^I0) ^ (F1|^I1) by A41,A42,GROUP_4:19
                 .= (F0|^I0) ^ <*g|^i*> by A36,GROUP_4:22;
        hence Product(F|^I) * x
              = (Product(F0|^I0) * (g|^i)) * x by GROUP_4:6
             .= Product(F0|^I0) * ((g|^i) * x) by GROUP_1:def 3
             .= Product(F0|^I0) * (x * (g|^i)) by A22,A33,A40
             .= Product(F0|^I0) * x * (g|^i) by GROUP_1:def 3
             .= x * Product(F0|^I0) * (g|^i) by A32,A33,A35,A41
             .= x * (Product(F0|^I0) * (g|^i)) by GROUP_1:def 3
             .= x * Product(F|^I) by A43,GROUP_4:6;
      end;
      for k be Nat holds P[k] from NAT_1:sch 2(A27,A31);
      hence thesis by A26;
    end;
    for x,y be Element of gr A holds x * y = y * x
    proof
      let x be Element of gr A;
      let y be Element of gr A;
      A45: x in gr A;
      x in G by GROUP_2:41; then
      reconsider x0 = x as Element of G;
      consider F be FinSequence of G,
               I be FinSequence of INT such that
      A46: len F = len I & rng F c= A & Product(F|^I) = x0 by A45,GROUP_4:28;
      y in G by GROUP_2:41; then
      reconsider z = y as Element of G;
      A47: z in gr A;
      thus x * y = Product(F|^I) * z by A46,GROUP_2:43
                .= z * Product(F|^I) by A25,A46,A47
                .= y * x by A46,GROUP_2:43;
    end;
    hence gr A is commutative by GROUP_1:def 12;
  end;
