# Why is my logical statement wrong?

"Express the following sentence symbollically, using only quantifiers for real numbers, logical connectives, the order relation < and the symbol Q having the meaning 'x is rational'"

I have to translate the sentence "There is a rational number between any two unequal real numbers". I worked a bit on it and eventually deduced the following:

$$(\forall x,y\in \mathbb{R})[x> y](\exists q\in \mathbb{Q})[q>y \wedge q< x]$$

In light of some comments a correct version of my incorrect statement should be: $$(\forall x,y\in \mathbb{R})[x≠ y \Rightarrow (\exists q\in \mathbb{Q})[q>y \wedge x> q]\vee[y>q \; \wedge \;q>x]]$$

Can you help me understand why my answer is wrong?

• Well, first, $x>y$ is not right. $x\ne y$ would be more appropriate. Also I believe you could shorten down $q>y∧q<x$ to $x<q<y$.
– user122283
Mar 4 '14 at 1:23
• Even though the statements with $x\neq y$ and $x>y$ are equivalent, they don't say the same. I don't know the notation you're using, maybe it is correct in the context you're in, but more common would be $$(\forall x,y\in \mathbb R)(x>y\to \exists q\in \mathbb Q(x>q\land q>y)).$$ Correct would be $$(\forall x,y\in \mathbb R)(x\neq y\to \exists q\in \mathbb Q(x>q\land q>y)).$$ Mar 4 '14 at 1:25
• @SanathDevalapurkar I corrected the statement, thanks for your input!
– torr
Mar 4 '14 at 1:26
• @GitGud It is in the context of a pre-college courses about Mathematical thinking. I understand the nuance and will correct that thanks!
– torr
Mar 4 '14 at 1:27
• @torr As pointed out, what I said was wrong, please see the correct answer below. Correct is $$(\forall x,y\in \mathbb R)(x\neq y\to \exists q\in \mathbb Q((x>q\land q>y)\lor (y>q \land q> x))).$$ Mar 4 '14 at 1:32

In your first formula, following @Danul G's advise, I assume $\mathbb R$ as the domain of the variables, and I'll rewrite it with the predicate $Q(x)$ (for $x$ is rational) to stay with the original formulation of the problem :

$\forall x \forall y ( x > y ) \exists q (Q(q) \land [q>y \land q<x])$

there are basically two mistakes :

(i) one substantial: as pointed in the above comments, in this way you are assuming that $x > y$, but your problem says $x \ne y$; so you must correct the formula accordingly.

(ii) the other one is connected to the way you have written the formula; juxtaposition of the two sub-formulas is not formally correct: at most you can read it as a conjunction.

But in this way you are saying that :

$\forall x \forall y ( x > y )$ and $\exists q (Q(q) \land [q>y \land q<x])$

i.e.that for two real numbers whatever, the first is greater than the second (false ! : take $0$ as $x$ and $1$ as $y$) and ... and the resulting statement is false, being the conjunction of two formulas, one of which is false.

• The question is slightly ill posed, I think. OP says that: "Express the following sentence symbollically, using only quantifiers for real numbers, logical connectives, the order relation < and the symbol Q having the meaning x is rational" which leads me to believe that he does not actually have $\in$ in his language to phrase is this way. Mar 4 '14 at 12:30
• @Danul G - I agree with you that is better to introduce two predicates $Q$ and $R$. Mar 4 '14 at 12:40
• I just assumed that the domain of discourse was the reals in my answer. I think that is what is meant by "quantifiers for real numbers". But I'm not sure. Mar 4 '14 at 12:43

I think that it should actually be $\forall{x,y}(x\neq{y}\implies{\exists{q}(Q(q)\wedge(\neg(x<q)\wedge{x\neq{q}}\wedge{y<q})\vee(\neg{(y<q)}\wedge{y\neq{q}}\wedge{x<q}})))$.

This answer is written assuming that your variables range accross $\mathbb{R}$, since you technically don't have $\epsilon$ symbol in your language and $x\neq{y}$ is shorthand for $\neg(x=y)$

• @Git Gud: I think the above addresses your issue about $\mathbb{Q}$ being used as a predicate. Mar 4 '14 at 1:49
• Can you explain why your answer is correct and why mine is not? Thanks!! :)
– torr
Mar 4 '14 at 1:55
• First it depends on what language you are using. I would actually like to see the question (as it is asked of you) before I give a final answer (For a start I don't even know if you have membership in your language). The error you are making for the most part is that you are assuming $x\neq{y}$ is logically equivalent to $x>y$. It is not. If $x=0$ and $y=1$, then $x\neq{y}$ is true. However there is no number $z$ (let alone a rational) such that $y<z$ and $z<x$. Mar 4 '14 at 2:02
• What you are saying is if $x>y$, then there is a rational between them. But what happens if $x<y$? After all if $x\neq{y}$, then that is a huge possibility Mar 4 '14 at 2:08
• @Danul_G math.stackexchange.com/questions/698347/… The solution of the book use existence for x,y and forall for q.
– torr
Mar 4 '14 at 2:10

Try the next. Using $\sim$ for denying: translate Trichomoty Law, use $\forall x,y\in\mathbb{R}\colon \phi(x,y)$ and $\phi(x,y)\equiv\sim(x=y)\rightarrow[[x<y]\vee[x>y]]$. Then we also have $\forall x\in\mathbb{R}\forall{q}\in Q\colon \phi(x,q)$ and as the antecedent is fullfilled we have $[x<q]\vee[x>q]$. The same holds for $\phi(q,y)$. Now the existence of q. Take p.e. $x<q$ and $q<y$, fix x and y; then you will have two sets of rationals for which the cut is not empty.

$$\forall x,y\in\mathbb{R} x\not=y \implies \exists q\in\mathbb{Q} (y-q)(q-x) > 0$$

• Can you explain why is true and why am I wrong? Thanks!
– torr
Mar 4 '14 at 1:30
• You have not made a stipulation about the order of $x$ and $y$. You could say $\forall x, y, x < y \implies \cdots$. Mar 4 '14 at 1:34
• @ncmathsadist I believe it is not nitpicking in saying that this is incorrect. Despite being equivalent to what is asked, it is not what is asked. Mar 4 '14 at 1:38
• This may be equivalent but it is certainly not a direct translation into logical notation. I would suggest just "$x<q<y$ or $y<q<x$"
– MPW
Mar 4 '14 at 1:38
• You are assuming that multiplication is there in the language. I believe that it isn't. Mar 4 '14 at 1:39