Writing "x is a perfect square or the square root of x is is irrational" in predicate logic

340 Views Asked by At

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

There are 1 best solutions below

3
On BEST ANSWER

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 ^_^