# Modular arithmetic rules

where $$a = b\,\textrm{mod }c$$:

$ad = bd\,\textrm{mod }cd$

$\frac{a}{d} = \frac{b}{d}\,\textrm{mod }\frac{c}{d}$

where $$p$$ is a prime and $$a$$ is any integer

$a^{p} = a\,\textrm{mod }p$