Help with the negation of a complicated(and poorly written, in my opinion) definition of almost periodic function I am being asked to write the negation of the following statement:
For every $\varepsilon > 0$ there is $T > 0$ such that for every $x \in \mathbb R$ there exists $y$ such that
$x < y < x + T$ and such that for all $z \in \mathbb R,$
$|f(z + y) − f(z)| < \varepsilon.$
Firstly I am having trouble with the second part of this definition. Is there supposed to be a $y$ in every interval that satisfies $|f(z + y) − f(z)| < \varepsilon$ for all $z?$ Or can you choose a new $y$ for each $z?$
This is the negation I have so far: For all $T > 0$ there exists $\varepsilon > 0$ such that there exists $x \in \mathbb R$ such that for all $y$ such that $x < y < x+T$ there exists $z \in \mathbb R$ such that $|f(z + y) − f(z)| \geq \varepsilon.$
 A: First the interpretation: $y$ depends on $x$ (and $T$ and $\epsilon$), but once you pick your $y$, the ineqaulity $|f(z+y)-f(z)|<\epsilon$ must hold for all $z$.
Now your negation: You swapped the $\epsilon$ and the $T$ quantifier. This is no good idea. For all such negation tasks there exists a counterexample that such switching is bad (however, there is no counterexample that shows this for all such tasks at once).
I think the negation ist most easily performed if you write all in quantifier formulas and "mindlessly" (that is: just as a syntactical operation) let the negation percolate from outside to inside.
Thus for 
$$\forall \epsilon>0\colon \exists T>0\colon\forall x\in\mathbb R\colon\exists y\colon (x<y<x+T\land \forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon)$$
or preferably 
$$\forall \epsilon>0\colon \exists T>0\colon\forall x\in\mathbb R\colon\exists y\in(x,x+T)\colon \forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon$$
we do this:
$$\neg\forall \epsilon>0\colon \exists T>0\colon\forall x\in\mathbb R\colon\exists y\in(x,x+T)\colon \forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon\\
\exists \epsilon>0\colon\neg \exists T>0\colon\forall x\in\mathbb R\colon\exists y\in(x,x+T)\colon\forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon\\
\exists \epsilon>0\colon\forall T>0\colon\neg\forall x\in\mathbb R\colon\exists y\in(x,x+T)\colon \forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon\\
\exists \epsilon>0\colon\forall T>0\colon\exists x\in\mathbb R\colon\neg\exists y\in(x,x+T)\colon \forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon\\
\exists \epsilon>0\colon\forall T>0\colon\exists x\in\mathbb R\colon\forall y\in(x,x+T)\colon\neg \forall z\in \mathbb R\colon |f(z+y)-f(z)|<\epsilon\\
\exists \epsilon>0\colon\forall T>0\colon\exists x\in\mathbb R\colon\forall y\in(x,x+T)\colon\exists z\in \mathbb R\colon \neg(|f(z+y)-f(z)|<\epsilon)\\
\exists \epsilon>0\colon\forall T>0\colon\exists x\in\mathbb R\colon\forall y\in(x,x+T)\colon\exists z\in \mathbb R\colon |f(z+y)-f(z)|\ge\epsilon\\
$$
(In other words: Except for thet swpping of the first two quantifiers, you were right)
