Yes, "for any" means "for all" means $\forall$. "Any" implies you pick an arbitrary integer, so it must be true for all of them.
As for mods: usually, it's not expressed as an operator, but instead as a kind of equivalence relation: $a \equiv b \pmod{n}$ means that $n$ divides $a - b$. So you would write "m is odd" as $m \equiv 1 \pmod 2$.
The formula :
$NOT(∃x.P(x).∀y.P(x,y).∃z∃k.P(z,k))$
is not correctly written; the issue is not with the dots after the quantifiers; we can delete them and we have still an "un-grammatical" formuala :
$NOT(∃xP(x).∀yP(x,y).∃z∃kP(z,k))$.
The formula is meaningless exactly as is meaningless the natural language expression :
"there exist a prime number all prime numbers are ..."
$∃xP(x)$ is a formula correctly written; thus it can be part of a more complex formula containing also the formula $∀yP(x,y)$ only if there is a connective : $\land, \lor, \rightarrow, \leftrightarrow$ "joining" them.
Having said that, the basic rules for managing the quantifiers are :
$\forall \lnot$ is equivalent to : $\lnot \exists$
$\lnot \forall$ is equivalent to : $\exists \lnot$.
Thus, your example :
$NOT(∀xP(x)) \leftrightarrow ∃x NOT(P(x))$
is correct.
With more "complex" formulae, like e.g. :
$NOT (∀xP(x) \lor ∃y Q(y))$
we have, by De Morgan's laws :
$NOT (∀xP(x)) \land NOT (∃y Q(y)) \leftrightarrow \exists x NOT P(x) \land \forall y NOT Q(y)$.
Examples from your courseware are :
$∀n ∈ Evens ∃p ∈ Primes ∃q ∈ Primes (n = p + q)$ [page 75]
all the quantifers prefix a formula (a "matrix") and the scope of all three quantifiers is the formula : $(n = p + q)$.
Thus, its negation will be :
$\lnot (∀n ∃p ∃q (n = p + q)) \leftrightarrow ∃n \lnot (∃p ∃q (n = p + q)) \leftrightarrow \ldots \leftrightarrow ∃n ∀p ∀q \lnot (n = p + q)$.
In the case of :
$∃x∀yP(x, y) \rightarrow ∀y∃xP(x, y)$ [page 77]
we have two sub-formulae : $∃x∀yP(x, y)$ and $∀y∃xP(x, y)$ "joined" by the connective : $\rightarrow$ (IMPLIES).
Here we have to apply first the rule for the negation of a formula with $\rightarrow$, i.e. : $\lnot (p \rightarrow q)$ is equivalent to : $p \land \lnot q$, in order to "move inside" the negation sign, followed by the rules for the negation of quantifiers.
Thus :
$\lnot (∃x∀yP(x, y) \rightarrow ∀y∃xP(x, y)) \leftrightarrow ((∃x∀yP(x, y) \land \lnot ∀y∃xP(x, y)) \leftrightarrow ((∃x∀yP(x, y) \land ∃y∀x \lnot P(x, y))$
Best Answer
A correct formalization of the phrase "an integer is even iff it equals double some other integer" is the following: \begin{align} \forall x \in \mathbb{Z} \, (\exists y \in \mathbb{Z} \, (x = 2y) \iff \textrm{even}(x)) \end{align}