|f| is periodic implies f is periodic I can think of an example where this wouldn't hold.
Take 1,-1,1,-1,-1,1,-1,-1,-1,1,-1,-1,-1,-1.
But I can also prove that the statement holds.
Claim: $|f|$ is periodic then $f$ is periodic
Proof:
$|f(x+p)|=|f(x)|$
$f(x+p)=\pm f(x)$
if $f(x+p)=+f(x)$ then we are done,
if $f(x+p)=-f(x)$ we get:
$f(x+2p)=-f(x+p)=f(x)$, so the period is twice bigger, but It still holds that $f$ is periodic.
Where is my mistake?
 A: Your mistake is in the last line. $|f(x+2p)| = |f(x)|$ so $f(x+2p) = \pm f(x)$. However, you can't guarantee which of those it is.
A: The mistake is that you're playing too hard and fast with the $\pm$ symbol.
You have concluded correctly that for each particular $x$ it is true that $ f(x+p)=\pm f(x)$. Or in other words, for each $x$ either $f(x+p)=f(x)$ or $f(x+p)=-f(x)$ holds. But this doesn't tell you that it will be the same of these for every $x$.
Written symbolically (and without the $\pm$ symbol), what you have concluded is
$$ \forall x \; \exists k\in\{-1,1\} : f(x+p)=k\cdot f(x) $$
but you're trying to use it as if it were
$$ \exists k\in\{-1,1\} \; \forall x : f(x+p)=k\cdot f(x) $$
The $\pm$ symbol can be confusing in this way because it implies a quantifier but leaves no way to express what the scope of that quantifier is. It is best avoided when you're trying to be rigorous -- except, perhaps, when you're extremely sure it will be clear to everyone what the shorthand actually means in each particular case.
