# Is this logic proof correct?

I wanted to prove that $$\forall x \in \mathbb Z : x+x^2$$ is even (1).

This is the same as $$\forall x \in \mathbb Z \Rightarrow x+x^2$$ is even.

So applying the contrapositive : $$x+x^2$$ is odd $$\Rightarrow \exists x \not\in \mathbb Z$$.

So if I prove that then I prove (1).

But since the quantifier is the consequent the $$x$$ of the $$\exists$$ is not the same $$x$$ of the antecedent, basically I can prove both apart and I don't have to prove each $$x$$, then

(a) $$1,302775638+1,302775638^2 = 3$$ (odd)

(b) $$5,7 \not\in \mathbb Z$$ (not the same $$x$$)

I also taught that even if its the same $$x$$ because you have to particularize the quantificators before applying properties, I still just have to find a valid case to prove the contrapositive.

For the case when the antecedent ($$x+x^2$$ is odd) is false then by definition of the conditional, the truth value is true.

So I proved the contrapositive proving the original (1).

• You are using the word pair to mean even; I would suggest editing at least this. Nov 12, 2020 at 5:14
• I have made an edit to the maths formatting and layout which you will need to approve if you are happy with it. Nov 12, 2020 at 5:36

Your attempt does not make sense. The biggest problem is your misunderstanding of how the quantifiers work.

Expressions like '$$\forall x \in \mathbb Z$$' and $$'\exists x \in \mathbb N$$' are not propositions (statements) by themselves, so you cannot use them as either part of a conditional like you have.

Your first statement (1) is '$$\forall x \in \mathbb Z : x + x^2 \text{ is even}$$'. This can be rewritten correctly as

$$\forall x : (x \in \mathbb Z \rightarrow x + x^2 \text{ is even})$$

The contrapositive of the part in brackets would be '$$(x + x^2 \text{ is not even} \rightarrow x \not\in \mathbb Z)$$'. So the following statement is equivalent to (1):

$$\forall x : (x + x^2 \text{ is not even} \rightarrow x \not\in \mathbb Z)$$

If you found a counterexample, it would be a number $$x$$ such that $$x + x^2$$ was even, but $$x$$ was an integer: this would then be sufficient to show that (1) is false. But a single example is not enough to show that (1) is true, even using a contrapositive.

I'm not sure exactly what you meant in your sentence about particularizing the quantifiers. You can use the facts that $$(P \rightarrow Q)$$ is equivalent to $$\neg(P \land \neg Q)$$ and that $$\forall x \neg$$ is equivalent to $$\neg \exists x$$ to rewrite (1) in other ways:

$$\forall x : \neg (x + x^2 \text{ is not even} \land x \in \mathbb Z)$$

$$\neg \exists x : (x+x^2 \text{ is not even} \land x \in \mathbb Z)$$

But none of these allow you to prove what you want using a single example.

(It's not part of your question, but you can prove what you want very easily by considering the two cases where $$x$$ is odd or $$x$$ is even.)

You are trying to prove that:

$$\forall x \in \mathbb{Z}: x^2+x \ \text{is even}$$

Let $$x \in \mathbb{Z}$$. Suppose that $$x$$ is even. Then, we are done because $$x^2+x = x(x+1)$$ and that has to be divisible by $$2$$ if $$x$$ is even (you can write out explicitly why this is for your own understanding).

Let $$x$$ be odd. Then, $$x+1$$ is even. So, again, $$x(x+1)$$ is divisible by $$2$$. You can write this out explicitly if you wish.

I'm not sure why you found the need to use the contrapositive. I think I would advise you to try looking for direct proofs to a given statement first. Like, when you get a statement, just try to prove it directly. If that doesn't work out, then try to find a proof by contradiction/contraposition.

One other thing that I've noticed is that you seem to be using terminology from logic quite a bit. While I find this rather laudable and I do wish more people made use of notation and concepts from logic when writing out proofs, it is rare that someone will talk about "truth values" or whatnot when writing out proofs (at least, I don't see that being the case very often with topics that aren't within logic).

So, I'd say that you should have a conceptual understanding of the logic that you're making use of but you don't actually have to speak in terms of truth values and so on. Of course, you can still do it if you want to but it's not necessary and, in some cases, it may obfuscate the idea you're trying to get across.

So, I'm just going to comment on a few things that I personally found a little strange. I'm not going to comment on typesetting issues or whatever because that is something that is easily fixed. I will quote you rather extensively here.

But since the quantifier is the consequent the $$x$$ of the $$\exists$$ is not the same $$x$$ of the antecedent, basically I can prove both apart and I don't have to prove each $$x$$.

You're kind of misusing terminology here from logic. When we have two propositions $$p$$ and $$q$$, then the implication $$p \implies q$$ is where we typically use the words "antecedent" and "consequent". $$p$$ is usually called the antecedent with respect to the given implication and $$q$$ is called the consequent with respect to the given implication.

In this instance, there is no implication. Now, you can turn this into an implication if you want by the following:

$$x \in \mathbb{Z} \implies x^2+x \ \text{is even}$$

If you want to show the contrapositive of the implication, then you need to show that:

$$x^2+x \ \text{is odd} \implies x \notin \mathbb{Z}$$

In other words, you assume that $$x^2+x$$ is odd and then you actively show that $$x \notin \mathbb{Z}$$.

I also tought that even if its the same x because you have to particularize the quantificators before applying properties, i still just have to find a valid case to prove the contrapositive

I'm not sure what you mean by "particularizing the quantifiers". There is no such notion that I have heard of. Did you mean "choosing an arbitrary but fixed $$x$$" or something of the like?

If you observe the argument that I presented above, you'll notice that I did choose an $$x \in \mathbb{Z}$$ for each case. However, I kept it entirely ambiguous what this $$x$$ was, other than assuming odd and even-ness for each case. In other words, I'm not saying that $$x = 3$$ or something. I'm saying that we should allow $$x$$ to be, generically, any odd number.

a) 1,302775638+1,302775638^2 = 3 (odd) b) 5,7 ∉ ℤ (not the same x)

I'm not exactly sure what you're doing here. I think it's common in Europe to use $$,$$ as the decimal point. But I'm not exactly sure how that sum on the left is equal to 3? Besides, I'm not even really sure what that's supposed to accomplish.

No one is saying, really, that if $$x \notin \mathbb{Z}$$, then $$x^2+x$$ is even. In fact, if you just looked at, say, $$x = 1.5$$, then this is clearly not true. However, the statement that's being made is that if $$x \in \mathbb{Z}$$, then $$x^2+x$$ is even.

So, you can't object to it and say "Ah but it doesn't work when $$x = 1.5$$". That isn't a valid objection because no one made the claim that it did work for numbers of that form.

So, in short, your argument doesn't work. I have, of course, given an indication on how to proceed.

• While your alternative proof is certainly what I would suggest instead (and I agree with you about not getting hung up on logical terminology in everyday proofs), I don't think this answers the OP's question about whether the proof they presented actually works. Nov 12, 2020 at 5:38
• Let me edit my answer so I give my own take on their argument. Nov 12, 2020 at 5:39