Given $n=pq$ where $p\;\&\; q,p\ne q$ are primes, P(x) is polynomial and $z\in\mathbb Z_{n}$
I need to prove that:
$p(z)\equiv 0\pmod{n}\iff p(z\pmod{p})\equiv 0\pmod{p}\;\land p(z\pmod{q})\equiv0\pmod{q}$
If i could prove the more general case: P(z) mod n ≡ P(z mod p) mod p
(q is the same) then i could also prove what i need of course.
from my understanding so far, the above is true, but i can't figure out a way to prove this.
Back to the original question, i tried to see why the fact that p divides P(z mod p) and q divides P(z mod q) implies that pq divides P(z) and vice versa, but i didn't have much success with this.
A hint is sufficient. thank you!