Stating a Restriction in the Quantifier Portion of a Logical Statement

41 Views Asked by At

I have the following Claim: For every prime number $p > 3$, $p = 6n + 1$ or $p = 6n + 5$. I rewrote it using quantifiers as:

$$∀p ∈ N_{>3}, prime(p) → p = 6n + 1 ∨ p = 6n + 5$$

And to prove it, I proved the contrapositive:

$$∀p ∈ N_{>3}, (p \neq 6n + 1 \wedge p \neq 6n + 5) → ¬prime(p)$$

However I saw that the solution wrote:

$$∀p ∈ N,(prime(p) ∧ p > 3) → p = 6n + 1 ∨ p = 6n + 5$$

Where the restriction on the quantifier's "domain" was part of the premise, instead of the quantifier itself. This led to a different contrapositive: $$∀p ∈ N,(p \neq 6n + 1 ∧ p \neq 6n + 5) → ¬prime(p) ∨ p ≤ 3$$ For the contrapositives, I let each of the predicates be a propositional variable,
$a$ be $p >3$,
$b$ be $p\neq6n+1$,
$c$ be $p\neq6n+5$,
$d$ be $prime(p)$
My contrapositive ends up being expressed as $a \wedge b \wedge c \to \neg d$, while the solution's is $b \wedge c \to \neg d \vee \neg a$. After some rough work I found they were both equivalent.

I'm wondering whether my logic is correct and my original statement and contrapositive is in fact equivalent to the solution's original statement and contrapositive, and whether stating a restriction like $p>3$ in the quantifier will work for all cases, not just this question.

Side note: I recognize that $n$ is not quantified in the solution, it should be

$$\forall p \in N, \exists n \in N, (prime(p) ∧ p > 3) → p = 6n + 1 ∨ p = 6n + 5$$, I believe.

1

There are 1 best solutions below

0
On BEST ANSWER

Your reasoning and assertions are entirely correct, and yes, in general, $$\forall x{\in}S\:\Big(P(x)\to Q(x)\Big)$$ is shorthand for $$\forall x\:\Big(x{\in}S\to\big( P(x)\to Q(x)\big)\Big),$$ which is equivalent to $$\forall x\:\Big(\big(x{\in}S\land P(x)\big)\to Q(x)\Big).$$

For every prime number $p > 3$, $p = 6n + 1$ or $p = 6n + 5.$

$$\forall p \in N, \exists n \in N, (prime(p) ∧ p > 3) → p = 6n + 1 ∨ p = 6n + 5$$

This is correct, or $$\forall p \:\Big( \text{Prime}(p) \:∧\: p > 3 \implies \exists n {\in} \mathbb Z\:\big(p = 6n + 1 \:∨\: p = 6n + 5\big)\Big)$$ or even $$\forall p{\in}\left\{\text{Prime}(p) \mid p > 3\right\} \;\exists n {\in} \mathbb Z\,\big(p = 6n + 1 \:∨\: p = 6n + 5\big).$$