
theorem Th34:
  for G being strict finite commutative Group
  st card G > 1 holds
  ex I be non empty finite set,
  F be associative Group-like commutative multMagma-Family of I,
  HFG be Homomorphism of product F,G st
  I = support (prime_factorization card G)
  & (for p be Element of I holds F.p is strict Subgroup of G &
  card (F.p) = (prime_factorization card G).p) &
  (for p,q be Element of I st p <> q holds
  (the carrier of (F.p)) /\ (the carrier of (F.q)) = {1_G}) &
  HFG is bijective &
  for x be (the carrier of G)-valued total I -defined Function
  st for p be Element of I holds x.p in F.p
  holds x in product F & HFG.x = Product x
  proof
    defpred P[Nat] means
    for G being strict finite commutative Group st
    card(support (prime_factorization card G)) = $1 & $1 <> 0 holds
    ex I be non empty finite set,
    F be associative Group-like commutative multMagma-Family of I,
    HFG be Homomorphism of product F,G st
    I = support (prime_factorization card G)
    & (for p be Element of I holds F.p is strict Subgroup of G &
    card (F.p) = (prime_factorization card G).p) &
    (for p,q be Element of I st p <> q holds
    (the carrier of (F.p)) /\ (the carrier of (F.q)) ={1_G}) &
    HFG is bijective &
    for x be (the carrier of G)-valued total I -defined Function
    st for p be Element of I holds x.p in F.p
    holds x in product F & HFG.x =Product x;
    A1:P[0];
    A2: for n be Nat st P[n] holds P[n+1]
    proof
      let n be Nat;
      assume A3: P[n];
      thus P[n+1]
      proof
        let G be strict finite commutative Group;
        assume A4:
        card(support (prime_factorization card G)) = n+1 & n+1 <> 0;
        per cases;
        suppose A5:n = 0;
          set f = prime_factorization card G;
          A6: support (f) = support pfexp card(G) by NAT_3:def 9;
          support (f) <> {} by A4;
          then
          consider q be object such that
      A7: q in support (f) by XBOOLE_0:def 1;
          reconsider q as Prime by A6,A7,NAT_3:34;
          card {q} = 1 by CARD_1:30;
          then
          consider q0 be object such that
          A8: support prime_factorization card G = {q0} by CARD_1:29,A5,A4;
          A9: {q} = support (prime_factorization card G) by A8,TARSKI:def 1,A7;
          reconsider Gq = q|^ (q |-count (card G)) as non zero Nat;
          set g = prime_factorization Gq;
          A10: Product g = Gq by NAT_3:61;
          q |-count (card G) <> 0
          proof
            assume q |-count (card G) = 0; then
            f. q = 0 by NAT_3:55;
            hence contradiction by A7,PRE_POLY:def 7;
          end; then
          A11: support pfexp Gq = {q} by NAT_3:42; then
          q in support pfexp Gq by TARSKI:def 1; then
          A12:g.q = q |^ (q |-count Gq) by NAT_3:def 9;
          support g = {q} by A11,NAT_3:def 9; then
          A13: support g = support pfexp (card G) by A9,NAT_3:def 9;
          for p being Nat st p in support pfexp (card G)
          holds g.p = p |^ (p |-count (card G))
          proof
            let p be Nat;
            assume p in support pfexp (card G);
            then p in {q} by NAT_3:def 9,A9;
            then p=q by TARSKI:def 1;
            hence thesis by A12,NAT_3:25,INT_2:def 4;
          end;
          then
          A14: Gq = Product (prime_factorization (card G))
            by A13,NAT_3:def 9,A10
          .= card G by NAT_3:61;
          reconsider I = {q} as non empty finite set;
          set F = q .--> G;
          reconsider F as multMagma-Family of I;
          A16: for s,t be Element of I st s <> t holds
          (the carrier of (F.s)) /\ (the carrier of (F.t)) ={1_G}
          proof
            let s,t be Element of I;
            s=q by TARSKI:def 1;
            hence thesis by TARSKI:def 1;
          end;
          A18: for x be Element of I holds
                    F.x is strict Subgroup of G &
          card (F.x) = (prime_factorization card G).x
          proof
            let x be Element of I;
            x in support f by TARSKI:def 1,A7; then
            A20: x in support pfexp (card G) by NAT_3:def 9;
            A21: x = q by TARSKI:def 1;
            card(F.x) = card G
            .= f.x by A21,A20,NAT_3:def 9,A14;
            hence thesis by GROUP_2:54;
          end;
          reconsider F as associative Group-like commutative
          multMagma-Family of I;
          take I,F;
          consider HFG be Homomorphism of product F,G such that
          A24: HFG is bijective &
          for x be (the carrier of G)-valued total {q} -defined Function
          holds HFG.x =Product x by Th26;
          for x be (the carrier of G)-valued total I -defined Function
          st for p be Element of I holds x.p in F.p holds
          x in product F & HFG.x =Product x by A24,Th25;
          hence thesis by A9,A24,A16,A18;
        end;
        suppose A25: n <> 0;
          set f = prime_factorization card G;
          A26: Product f = card G by NAT_3:61;
          A27: support (f) = support pfexp card(G) by NAT_3:def 9;
          support (f) <> {} by A4; then
          consider q be object such that
          A28: q in support (f) by XBOOLE_0:def 1;
          reconsider q as Prime by A27,A28,NAT_3:34;
          reconsider Gq = q|^ (q |-count (card G)) as non zero Nat;
          set g = prime_factorization Gq;
          set h = f -' g;
          q |-count (card G) <> 0
          proof
            assume q |-count (card G) = 0; then
            f. q = 0 by NAT_3:55;
            hence contradiction by A28,PRE_POLY:def 7;
          end;
          then
          A29: support pfexp Gq = {q} by NAT_3:42; then
          q in support pfexp Gq by TARSKI:def 1; then
          A30:g.q = q |^ (q |-count Gq) by NAT_3:def 9;
          A31:g.q = q|^ (q |-count (card G)) by NAT_3:25,INT_2:def 4,A30;
          A32: support g = {q} by A29,NAT_3:def 9;
          A33: for x be object holds x in support h iff
            x in (support f) \ {q}
          proof
            let x be object;
            hereby assume A34: x in support h; then
              A35: x in (support f) by PRE_POLY:39,TARSKI:def 3;
              then
              A36: x in support pfexp (card G) by NAT_3:def 9;
              not x in {q}
              proof
                assume x in {q};
                then
                A37: x = q by TARSKI:def 1;
                h.x = f.x -' g.x by PRE_POLY:def 6
                .=q |^ (q |-count (card G)) -' g.q by A37,A36,NAT_3:def 9
                .=q |^ (q |-count (card G)) -' q |^ (q |-count (card G))
                by NAT_3:25,INT_2:def 4,A30
                .=q |^ (q |-count (card G)) - q |^ (q |-count (card G))
                by XREAL_0:def 2
                .= 0;
                hence contradiction by A34,PRE_POLY:def 7;
              end;
              hence x in (support f) \ {q} by XBOOLE_0:def 5,A35;
            end;
            assume x in (support f) \ {q}; then
            A38: x in (support f) & not x in {q} by XBOOLE_0:def 5;
            x in support pfexp (card G) by A38,NAT_3:def 9; then
            reconsider x0=x as Prime by NAT_3:34;
            A39:h.x0 = f.x0 -' g.x0 by PRE_POLY:def 6;
            A40: g.x0 = 0 by A38,A32,PRE_POLY:def 7;
            f.x0 <> 0 by A38,PRE_POLY:def 7;
            then h.x <> 0 by A39,A40,NAT_D:40;
            hence x in (support h) by PRE_POLY:def 7;
          end;
          then
          A41: support h = (support f) \ {q} by TARSKI:2;
          then
          A42: support h misses support g by A32,XBOOLE_1:79;
          reconsider h as bag of SetPrimes;
          A43: for x being Prime st x in
          support h ex n be Nat st 0 < n & h.x = x |^n
          proof
            let x be Prime;
            assume x in support h; then
            A44: x in (support f) & not x in {q} by XBOOLE_0:def 5,A41;
            A45:h.x = f.x -' g.x by PRE_POLY:def 6;
            g.x = 0 by A44,A32,PRE_POLY:def 7;
            then h.x = f.x by A45,NAT_D:40;
            hence thesis by A44,INT_7:def 1;
          end;
          then
          A46: h is prime-factorization-like by INT_7:def 1;
          A47: {q} c= support (f) by A28,ZFMISC_1:31;
          A48: support h c= support f by XBOOLE_1:36,A41;
          A49: (support h) \/ {q} = support f
            by A28,ZFMISC_1:31,A41,XBOOLE_1:45;
          for x being object st x in SetPrimes holds
          f . x = (h . x) + (g . x)
          proof
            let x be object;
            assume x in SetPrimes;
            per cases;
            suppose A50: not x in support f;
              then
              A51: not x in support h by A48;
              A52: not x in support g by A32,A47,A50;
              thus f . x = (0 qua Real) by PRE_POLY:def 7,A50
              .= (h . x) + (0 qua Real) by PRE_POLY:def 7,A51
              .= (h . x) + (g . x) by PRE_POLY:def 7,A52;
            end;
            suppose A53: x in support f;
              A54: x in support pfexp (card G) by A53,NAT_3:def 9;
              thus f . x = (h . x) + (g . x)
              proof
                per cases by A53,A49,XBOOLE_0:def 3;
                suppose x in (support h); then
                  A55:x in (support f) & not x in {q}
                  by A41,XBOOLE_0:def 5;
                  x in support pfexp (card G) by A55,NAT_3:def 9; then
                  reconsider x0=x as Prime by NAT_3:34;
                  A56:h.x0 = f.x0 -' g.x0 by PRE_POLY:def 6;
                  g.x0 = 0 by A55,A32,PRE_POLY:def 7;
                  hence thesis by A56,NAT_D:40;
                end;
                suppose x in {q};
                  then
                  A57: x = q by TARSKI:def 1;
                  A58:h.x =f.q -' g.q by A57,PRE_POLY:def 6;
                  f.q = q |^ (q |-count (card G)) by A57,A54,NAT_3:def 9;
                  then
                  h.x = f.q - g.q by A58,XREAL_0:def 2,A31;
                  hence thesis by A57;
                end;
              end;
            end;
          end;
          then h + g = f by PRE_POLY:33;
          then
          A59: Product f = (Product h) * Product g
          by A32,XBOOLE_1:79,A41,NAT_3:19;
          Product h is non zero & Product g is non zero by A59,NAT_3:61;
          then consider H,K being
              strict finite Subgroup of G such that
          A60: card H = (Product h) & card K = (Product g) &
          (the carrier of H) /\ (the carrier of K) = {1_G} &
          ex F being Homomorphism of product <*H,K*>,G
          st F is bijective
          & for a,b be Element of G st a in H & b in K
          holds F.(<*a,b*>) = a*b by A26,A59,Th18,A46,A42,INT_7:12;
          reconsider H, K as finite commutative Group;
          A61: support prime_factorization card H = support h
          by INT_7:16,INT_7:def 1,A43,A60;
          card(support prime_factorization card H)
          = card (support h) by INT_7:16,INT_7:def 1,A43,A60
          .=card (support f) - card{q} by A41,A28,EULER_1:4
          .= n+1 -1 by A4,CARD_1:30
          .= n; then
          consider I0 be non empty finite set,
          F0 be associative Group-like commutative multMagma-Family of I0,
          HFG0 be Homomorphism of product F0,H such that A62:
          I0 = support (prime_factorization card H)
          & (for p be Element of I0 holds
               F0.p is strict Subgroup of H &
          card (F0.p) = (prime_factorization card H).p) &
          (for p,q be Element of I0 st p <> q holds
          (the carrier of (F0.p)) /\ (the carrier of (F0.q)) ={1_H}) &
          HFG0 is bijective &
          for x be (the carrier of H)-valued total I0 -defined Function
          st for p be Element of I0 holds x.p in F0.p
          holds x in product F0 & HFG0.x =Product x by A3,A25;
          set I = I0 \/ {q};
          reconsider I as non empty finite set;
          A63:Product (prime_factorization card H)
          = Product h by A60,NAT_3:61; then
          A64: prime_factorization card H = h by A46,INT_7:15;
          A65: I = support (prime_factorization card G)
          by A62,A49,A46,INT_7:15,A63;
          set F = F0 +* (q .--> K);
          A67: dom F = dom F0 \/ dom (q .--> K) by FUNCT_4:def 1
          .= I0 \/ dom (q .--> K) by PARTFUN1:def 2
          .= I0 \/ {q};
          then
          reconsider F as I -defined Function by RELAT_1:def 18;
          reconsider F as ManySortedSet of I by PARTFUN1:def 2,A67;
          reconsider F as multMagma-Family of I;
          A74: for x be Element of I holds
                 F.x is strict Subgroup of G &
          card (F.x) = (prime_factorization card G).x
          proof
            let x be Element of I;
            A75: x in dom F by A67;
            A76: x in dom F0 \/ dom (q .--> K) by A75,FUNCT_4:def 1;
            A77: I0 = support h by INT_7:16,INT_7:def 1,A43,A60,A62
            .= (support f) \ {q} by A33,TARSKI:2;
            per cases by XBOOLE_0:def 3;
            suppose A78: x in I0;
              then
              not x in dom (q .--> K) by A77,XBOOLE_0:def 5; then
              A79: F.x = F0.x by FUNCT_4:def 1,A76;
              reconsider p = x as Element of I0 by A78;
              A80: F0.p is strict Subgroup of H &
              card (F0.p) = (prime_factorization card H).p by A62;
              A81:x in (support f) & not x in {q}
              by A41,XBOOLE_0:def 5,A61,A62,A78;
              x in support pfexp card G by A81,NAT_3:def 9; then
              reconsider x0=x as Prime by NAT_3:34;
              A82:h.x0 = f.x0 -' g.x0 by PRE_POLY:def 6;
              g.x0 = 0 by A81,A32,PRE_POLY:def 7;
              hence F.x is strict Subgroup of G &
              card (F.x) = (prime_factorization card G).x
              by A79,A80,GROUP_2:56,A64,A82,NAT_D:40;
            end;
            suppose A83: x in {q}; then
              A84:F.x = (q .--> K).x by FUNCT_4:def 1,A76;
              x in support f by A83,A47; then
              A85: x in support pfexp (card G) by NAT_3:def 9;
              A86: x = q by TARSKI:def 1,A83;
              card(F.x) = (Product g) by A60,A83,FUNCOP_1:7,A84
              .= Gq by NAT_3:61
              .= f.x by A86,A85,NAT_3:def 9;
              hence F.x is strict Subgroup of G &
              card (F.x) = (prime_factorization card G).x
                by A84,A83,FUNCOP_1:7;
            end;
          end;
          A87:for i being Element of I holds F . i is Group-like by A74;
          A88:for i being Element of I holds F . i is associative by A74;
          for i being Element of I holds F . i is commutative by A74; then
          reconsider F as associative Group-like commutative
          multMagma-Family of I by A87,GROUP_7:def 6,
          A88,GROUP_7:def 7,GROUP_7:def 8;
          consider FHKG being Homomorphism of product <*H,K*>,G such that
          A89: FHKG is bijective
          & for a,b be Element of G
          st a in H & b in K holds FHKG.(<*a,b*>) = a*b by A60;
          A90: I0 = support h by INT_7:16,INT_7:def 1,A43,A60,A62
          .= (support f) \ {q} by TARSKI:2,A33
          .= I \ {q} by A62,A49,A46,INT_7:15,A63;
          A91: not q in I0
          proof
            assume q in I0; then
            q in I & not q in {q} by A90,XBOOLE_0:def 5;
            hence contradiction by TARSKI:def 1;
          end; then
          consider FHK be Homomorphism of (product F), product <*H,K*>
          such that
          A92: FHK is bijective & for x0 be Function,
          k be Element of K, h be Element of H
          st h = HFG0.x0 & x0 in product F0 holds
          FHK.(x0 +* (q .-->k)) = <* h, k *> by Th28,A62,A28,A65;
          reconsider HFG = FHKG*FHK as Function of (product F), G;
          A93: HFG is onto by FUNCT_2:27,A89,A92;
          reconsider HFG as Homomorphism of (product F), G;
          A94: for x be (the carrier of G)-valued total I -defined Function
          st for p be Element of I holds x.p in F.p
          holds x in product F & HFG.x =Product x
          proof
            let x be (the carrier of G)-valued total I -defined Function;
            assume A95: for p be Element of I holds x.p in F.p; then
            x in the carrier of product F by Th29; then
            consider x0 be total I0 -defined Function,
            k be Element of K such that
            A96: x0 in product F0 & x = x0 +* (q .-->k) &
            for p be Element of I0 holds
            x0.p in F0.p by Th30,A91,A28,A65;
            reconsider h = HFG0.x0 as Element of H by FUNCT_2:5,A96;
            reconsider hh=h,kk=k as Element of G by GROUP_2:42;
            now let y be object;
              assume y in rng x0; then
              consider z be object such that
              A97: z in dom x0 & y=x0.z by FUNCT_1:def 3;
              reconsider z as Element of I0 by A97;
              A98: x0.z in F0.z by A96;
              F0.z is strict Subgroup of H by A62;
              hence y in the carrier of H
                by A97,STRUCT_0:def 5,A98,GROUP_2:40;
            end; then
            reconsider x0 as
              (the carrier of H)-valued total I0 -defined Function
              by RELAT_1:def 19,TARSKI:def 3;
            A99: HFG0.x0 =Product x0 by A62,A96;
            the carrier of H c= the carrier of G by GROUP_2:def 5;
            then
            rng x0 c= the carrier of G by XBOOLE_1:1;
            then
            reconsider xx0=x0 as (the carrier of G)-valued
            total I0 -defined Function by RELAT_1:def 19;
            A100: Product x0 = Product xx0 by Th32;
            thus x in product F by Th29,A95;
            A101: hh in H & kk in K;
            thus HFG.x = FHKG.(FHK.x) by FUNCT_2:15,Th29,A95
            .= FHKG.(<* hh, kk *>) by A92,A96
            .= hh*kk by A89,A101
            .= Product x by A99,A100,Th33,A91,A28,A65,A96;
          end;
          for s,t be Element of I st s <> t holds
          (the carrier of (F.s)) /\ (the carrier of (F.t)) ={1_G}
          proof
            let s,t be Element of I;
            assume A102: s <> t;
            dom F = I by PARTFUN1:def 2; then
            A103: s in dom F & t in dom F;
            per cases;
            suppose s in I0 & t in I0; then
              reconsider ss=s,tt =t as Element of I0;
              A104: s in dom F0 \/ dom (q .--> K) by A103,FUNCT_4:def 1;
              A105: t in dom F0 \/ dom (q .--> K) by A103,FUNCT_4:def 1;
              A106: I0 = support h by INT_7:16,INT_7:def 1,A43,A60,A62
              .= (support f) \ {q} by TARSKI:2,A33;
              then
              not ss in dom (q .--> K) by XBOOLE_0:def 5;
              then
              A107: F.ss = F0.ss by FUNCT_4:def 1,A104;
              not tt in dom (q .--> K) by A106,XBOOLE_0:def 5;
              then
              A108: F.tt = F0.tt by FUNCT_4:def 1,A105;
              (the carrier of (F0.ss))
              /\ (the carrier of (F0.tt)) ={1_H} by A62,A102;
              hence (the carrier of (F.s))
              /\ (the carrier of (F.t)) ={1_G} by A107,A108,GROUP_2:44;
            end;
            suppose A109:not (s in I0 & t in I0);
              thus (the carrier of (F.s)) /\ (the carrier of (F.t)) ={1_G}
              proof
                per cases by A109;
                suppose A110: not s in I0;
                  A111: s in dom F0 \/ dom (q .--> K)
                  by A103,FUNCT_4:def 1;
                  A112: s in {q} by A110,A90,XBOOLE_0:def 5; then
                  F.s = (q .--> K).s by FUNCT_4:def 1,A111; then
                  A113: F.s = K by A112,FUNCOP_1:7;
                  t in I0
                  proof
                    assume not t in I0;
                    then not t in I or t in {q} by XBOOLE_0:def 5,A90;
                    then t=q by TARSKI:def 1;
                    hence contradiction by A102,TARSKI:def 1,A112;
                  end;
                  then
                  reconsider tt =t as Element of I0;
                  A114: tt in dom F0 \/ dom (q .--> K)
                  by A103,FUNCT_4:def 1;
                  I0 = support h by INT_7:16,INT_7:def 1,A43,A60,A62
                  .= (support f) \ {q} by TARSKI:2,A33;
                  then
                  not tt in dom (q .--> K) by XBOOLE_0:def 5;
                  then
                  A115: F.tt = F0.tt by FUNCT_4:def 1,A114;
                  reconsider S1=F0.tt as strict Subgroup of H by A62;
                  A116: (the carrier of K) /\ (the carrier of S1)
                  c= {1_G} by A60,XBOOLE_1:26,GROUP_2:def 5;
                  A117: 1_G in the carrier of K by GROUP_2:46,STRUCT_0:def 5;
                  1_H in the carrier of S1 by GROUP_2:46,STRUCT_0:def 5;
                  then
                  1_G in the carrier of S1 by GROUP_2:44; then
                  1_G in (the carrier of K) /\ (the carrier of S1)
                  by XBOOLE_0:def 4,A117; then
                  {1_G } c= (the carrier of K)
                  /\ (the carrier of S1) by ZFMISC_1:31;
                  hence (the carrier of (F.s))
                  /\ (the carrier of (F.t)) ={1_G}
                  by A113,A115,A116,XBOOLE_0:def 10;
                end;
                suppose A118: not t in I0;
                  A119: t in dom F0 \/ dom (q .--> K) by A103,FUNCT_4:def 1;
                  A120: t in {q} by A118,A90,XBOOLE_0:def 5; then
                  F.t = (q .--> K).t by FUNCT_4:def 1,A119; then
                  A121: F.t = K by A120,FUNCOP_1:7;
                  s in I0
                  proof
                    assume not s in I0; then
                    not s in I or s in {q} by XBOOLE_0:def 5,A90; then
                    s=q by TARSKI:def 1;
                    hence contradiction by A102,TARSKI:def 1,A120;
                  end;
                  then
                  reconsider ss = s as Element of I0;
                  A122: ss in dom F0 \/ dom (q .--> K)
                  by A103,FUNCT_4:def 1;
                  I0 = support h by INT_7:16,INT_7:def 1,A43,A60,A62
                  .= (support f) \ {q} by A33,TARSKI:2;
                  then
                  not ss in dom (q .--> K) by XBOOLE_0:def 5; then
                  A123: F.ss = F0.ss by FUNCT_4:def 1,A122;
                  reconsider S1=F0.ss as strict Subgroup of H by A62;
                  A124: (the carrier of K) /\ (the carrier of S1)
                  c= {1_G} by A60,XBOOLE_1:26,GROUP_2:def 5;
                  A125: 1_G in the carrier of K by GROUP_2:46,STRUCT_0:def 5;
                  1_H in the carrier of S1 by GROUP_2:46,STRUCT_0:def 5;
                  then
                  1_G in the carrier of S1 by GROUP_2:44;
                  then
                  1_G in (the carrier of K) /\ (the carrier of S1)
                  by XBOOLE_0:def 4,A125; then
                  {1_G } c= (the carrier of K)
                  /\ (the carrier of S1) by ZFMISC_1:31;
                  hence
                  (the carrier of (F.s)) /\ (the carrier of (F.t)) ={1_G}
                  by A121,A123,A124,XBOOLE_0:def 10;
                end;
              end;
            end;
          end;
          hence thesis by A65,A74,A93,A89,A92,A94;
        end;
      end;
    end;
    A126: for k be Nat holds P[k] from NAT_1:sch 2(A1,A2);
    let G be strict finite commutative Group;
    assume A127: card G > 1;
    card(support (prime_factorization card G)) <> 0
    proof
      assume card(support (prime_factorization card G)) = 0;
      then support prime_factorization card G = {};
      hence contradiction by A127,NAT_3:57;
    end;
    hence thesis by A126;
  end;
