
theorem
  for p being Nat holds not p is prime iff p <= 1 or
  ex n being Element of NAT st n divides p & 1 < n & n*n <= p
  proof
    let p be Nat;
    thus not p is prime implies p <= 1 or
    ex n being Element of NAT st n divides p & 1 < n & n*n <= p
    proof
      assume not p is prime;
      then per cases by Th12;
      suppose p <= 1;
        hence thesis;
      end;
      suppose ex n being Element of NAT st n divides p & 1 < n & n < p;
        hence thesis by Th8;
      end;
    end;
    assume p <= 1 or
    ex n being Element of NAT st n divides p & 1 < n & n*n <= p;
    then per cases;
    suppose p <= 1;
      hence thesis by INT_2:def 4;
    end;
    suppose ex n being Element of NAT st n divides p & 1 < n & n*n <= p;
      then consider n being Element of NAT such that
A1:   n divides p and
A2:   1 < n and
A3:   n*n <= p;
      n*1 < n*n by A2,XREAL_1:68;
      hence thesis by A1,A3,INT_2:def 4;
    end;
  end;
