reserve a, b, n for Nat,
  r for Real,
  f for FinSequence of REAL;
reserve p for Prime;
reserve n, m for non zero Nat;

theorem Th58:
  for a,b being non zero Nat st a, b are_coprime holds ppf(a*b) = ppf a + ppf b
proof
  let a, b be non zero Nat such that
A1: a, b are_coprime;
  reconsider an = a, bn = b as non zero Nat;
  now
A2: a gcd b = 1 by A1;
    let i be object;
    assume i in SetPrimes;
    then reconsider p = i as prime Element of NAT by NEWTON:def 6;
A3: p > 1 by INT_2:def 4;
A4: p |-count (an*bn) = (p |-count a) + (p |-count b) by Th28;
    per cases;
    suppose
A5:   p |-count (a*b) = 0;
      then
A6:   (p |-count b) = 0 by A4;
A7:   (p |-count a) = 0 by A4,A5;
      thus (ppf (a*b)).i = 0 by A5,Th55
        .= 0 + (ppf b).i by A6,Th55
        .= (ppf a).i + (ppf b).i by A7,Th55
        .= (ppf a + ppf b).i by PRE_POLY:def 5;
    end;
    suppose
A8:   p |-count (a*b) <> 0;
      thus (ppf (a*b)).i = (ppf a + ppf b).i
      proof
        per cases by A4,A8;
        suppose
A9:       (p |-count a) <> 0;
A10:      now
            consider ka being Nat such that
A11:        (p |-count a) = ka+1 by A9,NAT_1:6;
            p |^ (p |-count a) divides a by A3,Def7;
            then p*(p|^ka) divides a by A11,NEWTON:6;
            then consider la being Nat such that
A12:        a = p*(p|^ka)*la;
            a = p*((p|^ka)*la) by A12;
            then
A13:        p divides a;
            assume (p |-count b) <> 0;
            then consider kb being Nat such that
A14:        (p |-count b) = kb+1 by NAT_1:6;
            p |^ (p |-count b) divides b by A3,Def7;
            then p*(p|^kb) divides b by A14,NEWTON:6;
            then consider lb being Nat such that
A15:        b = p*(p|^kb)*lb;
            b = p*((p|^kb)*lb) by A15;
            then p divides b;
            then p divides 1 by A2,A13,NAT_D:def 5;
            hence contradiction by A3,NAT_D:7;
          end;
          hence (ppf (a*b)).i = p |^ (p |-count a) by A4,A8,Th56
            .= (ppf a).p + 0 by A9,Th56
            .= (ppf a).p + (ppf b).p by A10,Th55
            .= (ppf a + ppf b).i by PRE_POLY:def 5;
        end;
        suppose
A16:      (p |-count b) <> 0;
A17:      now
            assume (p |-count a) <> 0;
            then consider ka being Nat such that
A18:        (p |-count a) = ka+1 by NAT_1:6;
            p |^ (p |-count a) divides a by A3,Def7;
            then p*(p|^ka) divides a by A18,NEWTON:6;
            then consider la being Nat such that
A19:        a = p*(p|^ka)*la;
            a = p*((p|^ka)*la) by A19;
            then
A20:        p divides a;
            consider kb being Nat such that
A21:        (p |-count b) = kb+1 by A16,NAT_1:6;
            p |^ (p |-count b) divides b by A3,Def7;
            then p*(p|^kb) divides b by A21,NEWTON:6;
            then consider lb being Nat such that
A22:        b = p*(p|^kb)*lb;
            b = p*((p|^kb)*lb) by A22;
            then p divides b;
            then p divides 1 by A2,A20,NAT_D:def 5;
            hence contradiction by A3,NAT_D:7;
          end;
          hence (ppf (a*b)).i = p |^ (p |-count b) by A4,A8,Th56
            .= 0+(ppf b).p by A16,Th56
            .= (ppf a).p + (ppf b).p by A17,Th55
            .= (ppf a + ppf b).i by PRE_POLY:def 5;
        end;
      end;
    end;
  end;
  hence thesis;
end;
