Predicate Logic formula

96 Views Asked by At

I came across this problem and found it quite challenging to solve in predicate logic. Here is the signature of the logic:

$$\sigma=\{a,P/1,Q/2\}$$ where $a$ represents 10, $P(x)$ represents "$x$ is prime," and $Q(x,y)$ denotes $x<y$.

We need to represent the idea of "$x-1$ is a prime" where $x$ ranges from integers 0 to $N$.

I am trying to get a formula for this like "there exists $y$ such that $Q(y,x)$ and $Q(z,y)$" but not sure of how to limit the range of $z$ to make $y$ have only $x-1$ as its value. I don't know if this is right or not.

Or if anyone has a better solution. Let me know.

Thanks.

1

There are 1 best solutions below

0
On

HINT: You can write a formula $\varphi(x,y)$ saying that $y=x-1$, by noting that $Q(y,x)$ holds, and there is no $z$ strictly between them.