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?