
theorem Th39:
  for I be non empty set,
      J be non-empty disjoint_valued ManySortedSet of I,
      G be Group,
      M be DirectSumComponents of G,I,
      N be Group-Family of I,J
  st for i be Element of I holds
     N.i is DirectSumComponents of M.i,J.i
  holds
    Union N is DirectSumComponents of G,Union J
  proof
    let I be non empty set,
        J be non-empty disjoint_valued ManySortedSet of I,
        G be Group,
        M be DirectSumComponents of G,I,
        N be Group-Family of I,J;
    assume
    A1: for i be Element of I holds
        N.i is DirectSumComponents of M.i,J.i;
    consider fM2G be Homomorphism of sum M,G such that
    A2: fM2G is bijective by GROUP_19:def 8;
    deffunc P(object) = [#] sum N.In($1,I);
    consider DS being Function such that
    A3: dom DS = I
      & for i be object st i in I holds DS.i = P(i) from FUNCT_1:sch 3;
    reconsider DS as ManySortedSet of I by A3,PARTFUN1:def 2,RELAT_1:def 18;
    deffunc Q(object) = [#](M.In($1,I));
    consider RS being Function such that
    A4: dom RS = I
      & for i be object st i in I holds RS.i = Q(i) from FUNCT_1:sch 3;
    reconsider RS as ManySortedSet of I by A4,PARTFUN1:def 2,RELAT_1:def 18;
    defpred R[object,object] means
    ex fi be Homomorphism of sum N.In($1,I), M.In($1,I)
    st fi = $2 & fi is bijective;
    A5: for i being Element of I
        ex y being Element of PFuncs(Union DS,Union RS) st R[i,y]
    proof
      let i being Element of I;
      N.i is DirectSumComponents of M.i,J.i by A1; then
      consider h be Homomorphism of sum(N.i), M.i such that
      A6: h is bijective by GROUP_19:def 8;
      A7: In(i,I) = i;
      DS.i = [#] sum(N.i) & RS.i = [#](M.i) by A3,A4,A7;
      then [#] sum(N.i) c= Union DS & [#](M.i) c= Union RS
      by A3,A4,FUNCT_1:3,ZFMISC_1:74; then
      dom h c= Union DS & rng h c= Union RS; then
      reconsider y = h as Element of PFuncs(Union DS,Union RS)
        by PARTFUN1:def 3;
      take y;
      thus thesis by A6;
    end;
    consider fBN2M being Function of I,PFuncs(Union DS,Union RS) such that
    A9: for i being Element of I holds R[i,fBN2M.i] from FUNCT_2:sch 3(A5);
    reconsider fBN2M as ManySortedSet of I;
    set fDN2M = ProductHom(G,M,N,fBN2M);
    for i be Element of I holds
    ex hi be Homomorphism of (sum_bundle N).i,M.i
    st hi = fBN2M.i & hi is bijective
    proof
      let i be Element of I;
      consider fi be Homomorphism of sum N.In(i,I), M.In(i,I) such that
      A11: fi = fBN2M.i & fi is bijective by A9;
      sum N.i = (sum_bundle N).i by Def7; then
      reconsider fi as Homomorphism of (sum_bundle N).i, M.i;
      take fi;
      thus fi = fBN2M.i & fi is bijective by A11;
    end; then
    A12: fDN2M is bijective by Def16;
    reconsider h = fM2G * fDN2M * sum2dsum(N)
      as Homomorphism of sum(Union N),G;
    take h;
    fM2G * fDN2M is one-to-one onto by A2,A12,FUNCT_2:27; then
    h is one-to-one onto by FUNCT_2:27;
    hence thesis;
  end;
