reserve X for set;
reserve a,b,c,k,m,n for Nat;
reserve i,j for Integer;
reserve r,s for Real;
reserve p,p1,p2,p3 for Prime;

theorem Th107:
  a,b are_coprime & p|^n divides a*b implies p|^n divides a or p|^n divides b
  proof
    per cases;
    suppose a = 0 or b = 0;
      hence thesis;
    end;
    suppose n = 0;
      then p|^n = 1 by NEWTON:4;
      hence thesis by INT_2:12;
    end;
    suppose that
A1:   a <> 0 and
A2:   b <> 0 and
A3:   n <> 0;
      assume
A4:   a,b are_coprime & p|^n divides a*b &
      not p|^n divides a & not p|^n divides b;
      p divides p|^n by A3,NEWTON02:6;
      then
A5:   p divides a*b by A4,NAT_D:4;
A6:   p > 1 by INT_2:def 4;
      per cases;
      suppose p divides a & p divides b;
        then p divides 1 by A4,NAT_D:def 5;
        hence contradiction by INT_2:27,def 4;
      end;
      suppose not p divides a & p divides b;
        then p|-count a = 0 by A6,NAT_3:27;
        then p |-count (a*b) = 0 + p |-count b by A1,A2,NAT_3:28;
        then n <= p |-count b by A1,A2,A4,MOEBIUS2:40;
        hence contradiction by A2,A4,MOEBIUS1:9;
      end;
      suppose p divides a & not p divides b;
        then p|-count b = 0 by A6,NAT_3:27;
        then p |-count (a*b) = 0 + p |-count a by A1,A2,NAT_3:28;
        then n <= p |-count a by A1,A2,A4,MOEBIUS2:40;
        hence contradiction by A1,A4,MOEBIUS1:9;
      end;
      suppose not p divides a & not p divides b;
        then p|-count a = 0 & p|-count b = 0 by A6,NAT_3:27;
        then p |-count (a*b) = 0+0 by A1,A2,NAT_3:28;
        hence contradiction by A1,A2,A5,A6,NAT_3:27;
      end;
    end;
  end;
