- #1
favq
- 8
- 0
- Homework Statement
- In this problem we’ll examine predicate logic formulas where the domain of discourse is [itex]\mathbb{N}[/itex]. In addition to the logical symbols, the formulas may contain ternary predicate symbols A and M, where:
[itex]A(k,m,n)[/itex] means [itex]k = m + n[/itex]
[itex]M(k,m,n)[/itex] means [itex]k = mn[/itex]
For example, a formula [itex]Zero(n)[/itex] meaning that n is zero could be defined as
[itex]Zero(n)=A(n,n,n)[/itex]
Having defined Zero, it is now OK to use it in subsequent formulas. So a formula for Greater(m,n) meaning m > n could be defined as
[itex]Greater(m,n) = \exists k \left( \neg \left( Zero(k) \right) \wedge A(m,n,k) \right)[/itex]
This makes it OK to use Greater in subsequent formulas.
Write predicate formulas using only the allowed predicates A, M that define the following predicates:
(a) [itex]Equal(m,n)[/itex] meaning that [itex]m = n[/itex].
(b) [itex]One(n)[/itex] meaning that [itex]n = 1[/itex].
(c) [itex]n = i(m \cdot j + k^2)[/itex].
(d) [itex]Prime(p)[/itex] meaning [itex]p[/itex] is a prime number.
(e) [itex]Two(n)[/itex] meaning that [itex]n = 2[/itex].
(f) [itex]Even(n)[/itex] meaning [itex]n[/itex] is even.
(g) (Goldbach Conjecture) Every integer [itex]n \geq 4[/itex] can be expressed as the sum of two primes.
(h) (Fermat's Last Theorem) Now suppose we also have
[itex]X(k,m,n)[/itex] means [itex]k = m^n[/itex]
Express the assertion that there are no positive integer solutions to the equation:
[itex]x^n + y^n = z^n[/itex]
when [itex]n > 2[/itex].
(i) (Twin Prime Conjecture) There are infinitely many primes that differ by two.
- Relevant Equations
- [itex]A(k,m,n)[/itex] means [itex]k = m + n[/itex]
[itex]M(k,m,n)[/itex] means [itex]k = mn[/itex]
Attempts for each item:
a) Since [itex]m=n[/itex] if and only if [itex]m \leq n[/itex] and [itex]n \leq m[/itex]:
[itex]Equal(m,n) = \left( \neg Greater(m,n) \right) \wedge \left( \neg Greater(n,m) \right)[/itex]b) Any natural number [itex]n[/itex] multiplied by 1 is equal to [itex]n[/itex], so:[itex]One(n) = \forall k \left(M(k,n,k)\right)[/itex]c) What I've attempted here is to break down the expression as follows: [itex]n = i \cdot x_1[/itex] for some [itex]x_1[/itex], [itex]x_1 = (x_2 + x_3)[/itex] for some [itex]x_2[/itex] and some [itex]x_3[/itex], [itex]x_2 = (m \cdot j)[/itex] for some [itex]m[/itex] and some [itex]j[/itex], and [itex]x_3 = k^2[/itex]. So the attempt becomes:
[itex]C(n) = \exists i \exists x_1 \exists x_2 \exists x_3 \exists j \exists k \left(M(n,i,x_1) \wedge A(x_1,x_2,x_3) \wedge M(x_2,m,j) \wedge M(x_3,k,k)\right)[/itex]
d)
There are two ways that seem to work:
[itex]Prime(p) = \forall a \forall i (One(a) \rightarrow \left( \neg Equal(i,a) \wedge \neg Equal(i,p) \rightarrow \neg \exists k \left( M(p,i,k) \right) \right)[/itex]
[itex]Prime(p) = \forall i \exists a (One(a) \wedge \left( \neg Equal(i,a) \wedge \neg Equal(i,p) \rightarrow \neg \exists k \left( M(p,i,k) \right) \right)[/itex]
e) There are two ways that I thought of that seem to work for this one, based on the fact that 2 = 1 + 1:
[itex]Two(n) = \exists k \left( One(k) \wedge A(n,k,k) \right)[/itex]
[itex]Two(n) = \forall k \left( One(k) \rightarrow A(n,k,k) \right)[/itex]
f)
[itex]Even(n) = \exists a \exists b \left( Two(a) \wedge M(n,a,b) \right) [/itex]
The idea is that, if there exists a and b such that a is the number 2, and n = a*b, then n is even.
g) My attempt:
[itex]\forall n \forall a \left( Four(a) \wedge \left(Greater(n,a) \lor Equal(n,a)\right) \wedge Even(n) \rightarrow \exists p_1p_2\left( Prime(p_1) \wedge Prime(p_2) \wedge A(n,p_1,p_2) \right ) \right)[/itex]
h)
[itex]\forall n \forall a \left( Two(a) \wedge Greater(n,a) \rightarrow \left( \neg \exists x,y,z,x_n,y_n,z_n \left ( X(x_n,x,n) \wedge X(y_n, y, n) \wedge X(z_n, z, n) \wedge A(z_n,x_n,y_n) \right ) \right ) \right)[/itex]
i)
First, define a predicate that tests whether two numbers m and n are twin primes by checking that they are primes and they differ by 2:
[itex]TwinPrime(m,n) = Prime(m) \wedge Prime(n) \wedge \exists t \left( Two(t) \wedge \left( A(q,n,t) \lor A(n,q,t) \right) \right )[/itex]
Then, the conjecture could be expressed as below:
[itex]\left( \exists n,m \left( TwinPrime(n,m) \right) \right) \wedge (\forall n,m \left( TwinPrime(n,m) \rightarrow \exists q,p \left ( Greater(q,n) \wedge Greater(p,m) \wedge TwinPrime(q,p) \right ) \right ) )[/itex]
As an attempt to express that there are infinitely many twin primes, I'm stating two things: (1) there exist two numbers that are twin primes, (2) if there are two numbers m, n that are twin primes, there are two numbers p,q that are greater than m,n and are also twin primes.
Could someone please verify if these attempts make sense?
a) Since [itex]m=n[/itex] if and only if [itex]m \leq n[/itex] and [itex]n \leq m[/itex]:
[itex]Equal(m,n) = \left( \neg Greater(m,n) \right) \wedge \left( \neg Greater(n,m) \right)[/itex]b) Any natural number [itex]n[/itex] multiplied by 1 is equal to [itex]n[/itex], so:[itex]One(n) = \forall k \left(M(k,n,k)\right)[/itex]c) What I've attempted here is to break down the expression as follows: [itex]n = i \cdot x_1[/itex] for some [itex]x_1[/itex], [itex]x_1 = (x_2 + x_3)[/itex] for some [itex]x_2[/itex] and some [itex]x_3[/itex], [itex]x_2 = (m \cdot j)[/itex] for some [itex]m[/itex] and some [itex]j[/itex], and [itex]x_3 = k^2[/itex]. So the attempt becomes:
[itex]C(n) = \exists i \exists x_1 \exists x_2 \exists x_3 \exists j \exists k \left(M(n,i,x_1) \wedge A(x_1,x_2,x_3) \wedge M(x_2,m,j) \wedge M(x_3,k,k)\right)[/itex]
d)
There are two ways that seem to work:
[itex]Prime(p) = \forall a \forall i (One(a) \rightarrow \left( \neg Equal(i,a) \wedge \neg Equal(i,p) \rightarrow \neg \exists k \left( M(p,i,k) \right) \right)[/itex]
[itex]Prime(p) = \forall i \exists a (One(a) \wedge \left( \neg Equal(i,a) \wedge \neg Equal(i,p) \rightarrow \neg \exists k \left( M(p,i,k) \right) \right)[/itex]
e) There are two ways that I thought of that seem to work for this one, based on the fact that 2 = 1 + 1:
[itex]Two(n) = \exists k \left( One(k) \wedge A(n,k,k) \right)[/itex]
[itex]Two(n) = \forall k \left( One(k) \rightarrow A(n,k,k) \right)[/itex]
f)
[itex]Even(n) = \exists a \exists b \left( Two(a) \wedge M(n,a,b) \right) [/itex]
The idea is that, if there exists a and b such that a is the number 2, and n = a*b, then n is even.
g) My attempt:
[itex]\forall n \forall a \left( Four(a) \wedge \left(Greater(n,a) \lor Equal(n,a)\right) \wedge Even(n) \rightarrow \exists p_1p_2\left( Prime(p_1) \wedge Prime(p_2) \wedge A(n,p_1,p_2) \right ) \right)[/itex]
h)
[itex]\forall n \forall a \left( Two(a) \wedge Greater(n,a) \rightarrow \left( \neg \exists x,y,z,x_n,y_n,z_n \left ( X(x_n,x,n) \wedge X(y_n, y, n) \wedge X(z_n, z, n) \wedge A(z_n,x_n,y_n) \right ) \right ) \right)[/itex]
i)
First, define a predicate that tests whether two numbers m and n are twin primes by checking that they are primes and they differ by 2:
[itex]TwinPrime(m,n) = Prime(m) \wedge Prime(n) \wedge \exists t \left( Two(t) \wedge \left( A(q,n,t) \lor A(n,q,t) \right) \right )[/itex]
Then, the conjecture could be expressed as below:
[itex]\left( \exists n,m \left( TwinPrime(n,m) \right) \right) \wedge (\forall n,m \left( TwinPrime(n,m) \rightarrow \exists q,p \left ( Greater(q,n) \wedge Greater(p,m) \wedge TwinPrime(q,p) \right ) \right ) )[/itex]
As an attempt to express that there are infinitely many twin primes, I'm stating two things: (1) there exist two numbers that are twin primes, (2) if there are two numbers m, n that are twin primes, there are two numbers p,q that are greater than m,n and are also twin primes.
Could someone please verify if these attempts make sense?
Last edited: