Browse Source

Derive prime property from compose

DricomDragon 5 years ago
parent
commit
50d79371b8
1 changed files with 1 additions and 0 deletions
  1. 1 0
      tp/1/prime.lp

+ 1 - 0
tp/1/prime.lp

@@ -1,3 +1,4 @@
 % Define
 #const n = 10.
 compose(N) :- N=1..n, I=2..N-1, N\I = 0.
+prime(N) :- N=2..n, not compose(N).