Definition of Even and Whether Non-Integers are Even

elementary-number-theorylogic

My textbook defines even as such:

If $n$ is an integer, then $n$ is even $\iff \exists$ an integer k such that $n=2k$.

Question 1: which of the following is the correct formal restatement of the definition?

(1) $\forall n \in \mathbb{Z} (($$n$ is even$) \iff(\exists k \in \mathbb{Z}$ such that $n=2k))$.

(2) $\forall n ((n \in \mathbb{Z}) \implies ((n$ is even$) \iff (\exists k \in \mathbb{Z}$ such that $n=2k)))$.

Question 2: How does the definition guarantee that any element that is not an integer is not even?

This is the part I am mainly confused about. I know that any element that is not an integer obviously cannot be even, but I am not sure if the definition supports that. If the definition is an if statement as in statement (2), then isn't the conditional vacuously true for all non-integers? Then why would any non-integer not be even with this definition?

Subquestion: If the domain of a predicate variable is restricted to a set, then is the predicate false for all elements outside the domain?

For instance, does statement (1) imply that the biconditional is false for non-integers?

Best Answer

We say that a natural number is 'perfect' if and only if it is the sum of its divisors, including $1$, but excluding itself.

Suppose we now change domains, and ask "Is this the perfect answer?"

Here is what you do not want to say:

'An answer is a not a natural number, and so yes, it is trivially perfect'

Here is what you also do not want to say:

'An answer is a not a natural number, and so no, it is trivially not perfect'

Here is what you do want to say:

'I know what it means for a natural number to be perfect, but I am not sure what it means for an answer to be perfect. I just don't know what 'perfect' means in this context.'