4

I saw something similar that proved this statement here: Prove that the square root of a positive integer is either an integer or irrational

I was wondering how to formally write the statement "x is a perfect square or the square root of x is is irrational" in predicate logic. My attempt is this:

$\forall x\in \mathbb{Z^{\geq 0}}, (\forall a \in \mathbb{Z^{\geq 0}},\forall b \in \mathbb{Z^{\geq }}, \sqrt{x} \neq \frac{a}{b}) \lor (\exists d \in \mathbb{Z^{\geq 0}}, x = d^2)$

1 Answers1

2

What you've written looks great! Make sure you remember to specify that $b \neq 0$, though.

$$\forall x \in \mathbb{Z}^{\geq 0} . \forall a \in \mathbb{Z}^{\geq 0} . \forall b \in \mathbb{Z}^{\geq 1} . \left (\sqrt(x) \neq \frac{a}{b} \lor \exists d \in \mathbb{Z}^{\geq 0} . x = d^2 \right )$$

Another way you might phrase it, if you are familiar with $\mathbb{Q}$ denoting the set of all rationals, is as follows:

$$\forall x \in \mathbb{Z}^{\geq 0} . \left ( \sqrt{x} \not \in \mathbb{Q} \lor \sqrt{x} \in \mathbb{Z}^{\geq 0} \right )$$

This is (to me) more legible, but it requires some preexisting definitions.


I hope this helps! Welcome to MSE ^_^

HallaSurvivor
  • 38,115
  • 4
  • 46
  • 87
  • Thanks. If I were to prove this statement by contradiction, would I simply negate the entire thing and try to come to a contradiction? Or would I just divide this into cases? – John Simmons Dec 02 '19 at 20:01
  • I think negating the whole thing is slightly easier. The negation says that $\exists x. \sqrt{x} \in \mathbb{Q} \land \sqrt{x} \not \in \mathbb{Z})$ by demorgan's laws. Then write $\sqrt{x} = \frac{a}{b}$ and see if you can contradict (say, by showing $\sqrt{x} \in \mathbb{Z}$). – HallaSurvivor Dec 02 '19 at 20:03
  • 1
    Also - if this answered your question, you should mark it as such so that others on the website know where to spend their time – HallaSurvivor Dec 02 '19 at 20:34