previous up next
Go backward to Input and Output Conditions
Go up to Top
Go forward to Output Condition
RISC-Linz logo

Output Condition

Definition: p is a prime number.

isPrime(p) : <=>
   1 < p /\ 
   ~(exists 1 < n < p: n | p).

A bit more elegant:

isPrime(p) : <=>
   1 < p /\ 
   forall 1 < n < p: n not | p.

Author: Wolfgang Schreiner
Last Modification: October 6, 1999

previous up next