Example of a proposition that is true when its quantifier ranges over integers, but false over rationals

413 Views Asked by At

I was asked to give an example of a proposition with a quantifier which is true if the quantifier ranges over the integers, but false if it ranges over the rational numbers.

My attempt:

$$(\exists n \in \mathbb{Z}, 2n =n^2)$$

Is this the correct approach?

1

There are 1 best solutions below

0
On

One way is to find an expression that gives different values for integers than non-integers.

An obvious candidate is $\lfloor x \rfloor$, the integer part of $x$. This is $x$ when $x$ is an integer and less than $x$ otherwise.

Therefore one proposition that works is $P(x) \equiv (x = \lfloor x \rfloor)$.