YES
0 QTRS
↳1 QTRSRRRProof (⇔, 64 ms)
↳2 QTRS
↳3 RisEmptyProof (⇔, 0 ms)
↳4 YES
prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)
prime1 > prime12 > false > [and2, =2, rem2]
prime1 > prime12 > s1 > [and2, =2, rem2]
prime1 > prime12 > true > [and2, =2, rem2]
prime1 > prime12 > divp2 > 0 > [and2, =2, rem2]
prime1: multiset
0: multiset
false: multiset
s1: multiset
prime12: [1,2]
true: multiset
and2: [1,2]
divp2: [2,1]
=2: multiset
rem2: multiset
prime(0) → false
prime(s(0)) → false
prime(s(s(x))) → prime1(s(s(x)), s(x))
prime1(x, 0) → false
prime1(x, s(0)) → true
prime1(x, s(s(y))) → and(not(divp(s(s(y)), x)), prime1(x, s(y)))
divp(x, y) → =(rem(x, y), 0)