reserve k,n,m,l,p for Nat;
reserve n0,m0 for non zero Nat;
reserve f for FinSequence;
reserve x,X,Y for set;
reserve f1,f2,f3 for FinSequence of REAL;
reserve n1,n2,m1,m2 for Nat;
reserve I,j for set;
reserve f,g for Function of I, NAT;
reserve J,K for finite Subset of I;

theorem Th34:
  for f,F being sequence of  NAT st f is multiplicative &
  (for n0 holds F.n0 = Sum(f|NatDivisors n0)) holds F is multiplicative
proof
  let f,F be sequence of  NAT;
  assume
A1: f is multiplicative;
  assume
A2: for n0 holds F.n0 = Sum(f|NatDivisors n0);
  for n,m being non zero Nat st n,m are_coprime holds F.
  (n*m) = F.n * F.m
  proof
    let n,m be non zero Nat;
    set b1 = f|NatDivisors(n*m);
    set b2 = (multnat * [:f,f:])|[:NatDivisors n, NatDivisors m:];
    consider f1 be FinSequence of REAL such that
A3: Sum b1 = Sum f1 and
A4: f1 = b1 * (canFS (support b1)) by UPROOTS:def 3;
    set h9 = multnat|[:NatDivisors n, NatDivisors m:];
    set g2 = canFS (support b2);
    set g1 = canFS (support b1);
    consider f2 be FinSequence of REAL such that
A5: Sum b2 = Sum f2 and
A6: f2 = b2 * (canFS (support b2)) by UPROOTS:def 3;
    dom multnat = [:NAT, NAT:] by FUNCT_2:def 1;
    then
A7: dom h9 = [:NatDivisors n, NatDivisors m:] by RELAT_1:62;
    assume
A8: n,m are_coprime;
    for x1,x2 being object st x1 in dom h9 & x2 in dom h9 & h9.x1 = h9.x2
    holds x1 = x2
    proof
      let x1,x2 be object;
      assume
A9:   x1 in dom h9;
      then consider n1, m1 be object such that
A10:  n1 in NatDivisors n & m1 in NatDivisors m and
A11:  x1 = [n1,m1] by ZFMISC_1:def 2;
      reconsider n1,m1 as Element of NAT by A10;
A12:  h9.x1 = multnat.x1 by A9,FUNCT_1:47
        .= multnat.(n1,m1) by A11,BINOP_1:def 1
        .= n1*m1 by BINOP_2:def 24;
      assume
A13:  x2 in dom h9;
      then consider n2, m2 be object such that
A14:  n2 in NatDivisors n and
A15:  m2 in NatDivisors m and
A16:  x2 = [n2,m2] by ZFMISC_1:def 2;
      reconsider n2,m2 as Element of NAT by A14,A15;
      assume
A17:  h9.x1 = h9.x2;
A18:  h9.x2 = multnat.x2 by A13,FUNCT_1:47
        .= multnat.(n2,m2) by A16,BINOP_1:def 1
        .= n2*m2 by BINOP_2:def 24;
      then n1=n2 by A8,A10,A14,A15,A17,A12,Th15;
      hence x1 = x2 by A8,A10,A11,A15,A16,A17,A12,A18,Th15;
    end;
    then reconsider h9 as one-to-one Function by FUNCT_1:def 4;
    set h = g1" * h9 * g2;
A19: support b2 c= dom b2 by PRE_POLY:37;
A20: dom [:f,f:] = [:NAT, NAT:] by FUNCT_2:def 1;
    for x being object st x in support b2 holds x in dom(g1" * h9)
    proof
      let x be object;
A21:  rng g1 = support b1 by FUNCT_2:def 3;
      assume
A22:  x in support b2;
      then
A23:  b2.x <> 0 by PRE_POLY:def 7;
A24:  x in [:NatDivisors n, NatDivisors m:] by A22;
      consider n1, m1 be object such that
A25:  n1 in NatDivisors n & m1 in NatDivisors m and
A26:  x = [n1,m1] by A22,ZFMISC_1:def 2;
      reconsider n1,m1 as Element of NAT by A25;
A27:  n1,m1 are_coprime by A8,A25,Th14;
      reconsider n19=n1,m19=m1 as non zero Nat by A25;
      set x9 = (g1").(n1*m1);
      set fn1=f.n1,fm1=f.m1;
      b2.x = (multnat * [:f,f:]).x by A22,FUNCT_1:49
        .= multnat.([:f,f:].x) by A20,A24,FUNCT_1:13
        .= multnat.([:f,f:].(n1,m1)) by A26,BINOP_1:def 1
        .= multnat.[f.n1,f.m1] by FUNCT_3:75
        .= multnat.(f.n1,f.m1) by BINOP_1:def 1
        .= (fn1)*(fm1) by BINOP_2:def 24
        .= f.(n19*m19) by A1,A27
        .= (f|NatDivisors(n*m)).(n1*m1) by A25,Th16,FUNCT_1:49;
      then
A28:  n1*m1 in rng g1 by A23,A21,PRE_POLY:def 7;
      then n1*m1 in dom(g1") by FUNCT_1:33;
      then x9 in rng(g1") by FUNCT_1:3;
      then
A29:  x9 in dom g1 by FUNCT_1:33;
      g1.x9 = n1*m1 by A28,FUNCT_1:35
        .= multnat.(n1,m1) by BINOP_2:def 24
        .= multnat.[n1,m1] by BINOP_1:def 1
        .= h9.x by A22,A26,FUNCT_1:49;
      then h9.x in rng g1 by A29,FUNCT_1:def 3;
      then h9.x in dom(g1") by FUNCT_1:33;
      hence x in dom(g1" * h9) by A7,A22,FUNCT_1:11;
    end;
    then support b2 c= dom(g1" * h9);
    then rng g2 c= dom(g1" * h9);
    then
A30: dom(g1" * h9 * g2) = dom g2 by RELAT_1:27;
    rng g2 c= dom b2 by A19;
    then
A31: dom h = dom f2 by A6,A30,RELAT_1:27;
A32: for x being object st x in dom f2 holds f2.x = f1.(h.x)
    proof
      let x be object;
      set x9 = g2.x;
A33:  b1*g1*(g1" * h9) = b1*g1* g1" * h9 by RELAT_1:36
        .= b1*(g1* g1")*h9 by RELAT_1:36
        .= b1*(id rng g1)*h9 by FUNCT_1:39
        .= b1*(id support b1)*h9 by FUNCT_2:def 3;
      assume
A34:  x in dom f2;
      then
A35:  x in dom g2 by A6,FUNCT_1:11;
      then
A36:  x9 in rng g2 by FUNCT_1:3;
      then
A37:  support b2 c= dom b2 & x9 in support b2 by PRE_POLY:37;
      then consider n1, m1 be object such that
A38:  n1 in NatDivisors n & m1 in NatDivisors m and
A39:  x9 = [n1,m1] by ZFMISC_1:def 2;
      reconsider n1,m1 as Element of NAT by A38;
A40:  n1,m1 are_coprime by A8,A38,Th14;
      reconsider n19=n1,m19=m1 as non zero Nat by A38;
      set fn1=f.n1,fm1=f.m1;
A41:  x9 in [:NatDivisors n, NatDivisors m:] by A37;
A42:  b2.x9 = (multnat * [:f,f:]).x9 by A37,FUNCT_1:49
        .= multnat.([:f,f:].x9) by A20,A41,FUNCT_1:13
        .= multnat.([:f,f:].(n1,m1)) by A39,BINOP_1:def 1
        .= multnat.[f.n1,f.m1] by FUNCT_3:75
        .= multnat.(f.n1,f.m1) by BINOP_1:def 1
        .= (fn1)*(fm1) by BINOP_2:def 24
        .= f.(n19*m19) by A1,A40;
A43:  b2.x9 <> 0 by A36,PRE_POLY:def 7;
      f.(n19*m19) = (f|NatDivisors(n*m)).(n1*m1) by A38,Th16,FUNCT_1:49;
      then
A44:  n1*m1 in support b1 by A43,A42,PRE_POLY:def 7;
      then
A45:  n1*m1 in dom (id support b1);
A46:  h9.x9 = multnat.x9 by A7,A37,FUNCT_1:47
        .= multnat.(n1,m1) by A39,BINOP_1:def 1
        .= n1*m1 by BINOP_2:def 24;
A47:  (b1*g1).(h.x) = (b1*g1*h).x by A31,A34,FUNCT_1:13
        .= (b1*g1*(g1" * h9) * g2).x by RELAT_1:36
        .= (b1*g1*(g1" * h9)).(g2.x) by A35,FUNCT_1:13;
      (b1*(id support b1)*h9).x9 = (b1*(id support b1)).(h9.x9) by A7,A37,
FUNCT_1:13
        .= b1.((id support b1).(n1*m1)) by A45,A46,FUNCT_1:13
        .= b1.(n1*m1) by A44,FUNCT_1:18
        .= b2.x9 by A38,A42,Th16,FUNCT_1:49;
      hence f2.x = f1.(h.x) by A4,A6,A35,A47,A33,FUNCT_1:13;
    end;
    for y being object st y in rng g1 holds y in rng(h9 * g2)
    proof
      let y be object;
      assume y in rng g1;
      then
A48:  y in support b1 by FUNCT_2:def 3;
      consider n1,m1 be Nat such that
A49:  n1 in NatDivisors n & m1 in NatDivisors m and
A50:  y=n1*m1 by A8,A48,Th18;
      reconsider n19=n1,m19=m1 as non zero Nat by A49;
      reconsider n1,m1 as Element of NAT by ORDINAL1:def 12;
A51:  n1,m1 are_coprime by A8,A49,Th14;
A52:  b1.y <> 0 by A48,PRE_POLY:def 7;
A53:  [n1,m1] in [:NatDivisors n, NatDivisors m:] by A49,ZFMISC_1:def 2;
      set x = g2".[n1,m1];
A54:  [n1,m1] in [:NatDivisors n, NatDivisors m:] by A49,ZFMISC_1:def 2;
      b1.y = f.y by A48,FUNCT_1:49
        .= (f.n19)*(f.m19) by A1,A50,A51
        .= multnat.(f.n1,f.m1) by BINOP_2:def 24
        .= multnat.[f.n1,f.m1] by BINOP_1:def 1
        .= multnat.([:f,f:].(n1,m1)) by FUNCT_3:75
        .= multnat.([:f,f:].[n1,m1]) by BINOP_1:def 1
        .= (multnat * [:f,f:]).[n1,m1] by A20,FUNCT_1:13
        .= b2.[n1,m1] by A54,FUNCT_1:49;
      then [n1,m1] in support b2 by A52,PRE_POLY:def 7;
      then
A55:  [n1,m1] in rng g2 by FUNCT_2:def 3;
      then [n1,m1] in dom(g2") by FUNCT_1:33;
      then x in rng(g2") by FUNCT_1:3;
      then
A56:  x in dom g2 by FUNCT_1:33;
A57:  y = multnat.(n1,m1) by A50,BINOP_2:def 24
        .= multnat.[n1,m1] by BINOP_1:def 1
        .= (multnat|[:NatDivisors n, NatDivisors m:]).[n1,m1] by A53,FUNCT_1:49
        .= h9.(g2.(g2".[n1,m1])) by A55,FUNCT_1:35
        .= (h9 * g2).x by A56,FUNCT_1:13;
      g2.(g2".[n1,m1]) = [n1,m1] by A55,FUNCT_1:35;
      then x in dom(h9 * g2) by A7,A53,A56,FUNCT_1:11;
      hence y in rng(h9 * g2) by A57,FUNCT_1:def 3;
    end;
    then rng g1 c= rng(h9 * g2);
    then dom(g1") c= rng(h9 * g2) by FUNCT_1:33;
    then rng(g1" * (h9 * g2)) = rng(g1") by RELAT_1:28;
    then
A58: rng(g1" * (h9 * g2)) = dom g1 by FUNCT_1:33;
    support b1 c= dom b1 by PRE_POLY:37;
    then rng g1 c= dom b1 by FUNCT_2:def 3;
    then dom(b1 * g1) = dom g1 by RELAT_1:27;
    then
A59: rng h = dom f1 by A4,A58,RELAT_1:36;
    then for x being object holds x in dom f2 iff x in dom h & h.x in dom f1
     by A31,FUNCT_1:3;
    then f2 = f1 * h by A32,FUNCT_1:10;
    then
A60: f1,f2 are_fiberwise_equipotent by A31,A59,CLASSES1:77;
    thus F.(n*m) = Sum(f|NatDivisors(n*m)) by A2
      .= Sum((multnat * [:f,f:])|[:NatDivisors n, NatDivisors m:]) by A3,A5,A60
,RFINSEQ:9
      .= Sum(f|NatDivisors n) * Sum(f|NatDivisors m) by Th28
      .= Sum(f|NatDivisors n) * F.m by A2
      .= F.n * F.m by A2;
  end;
  hence F is multiplicative;
end;
