Prove that: $$(p - 1)! \equiv p - 1 \pmod{p(p - 1)}$$
In text it's not mentioned that $p$ is prime, but I checked and this doesn't hold for non-prime, so I guess $p$ is prime .. I know that $(p - 1)! \equiv -1 \equiv p - 1 \pmod p$, and $(p - 1)! \equiv 0 \equiv (p - 1) \pmod{p - 1}$, the problem is that I don't know how to combine these. Is it true that then we have: $(p - 1)! \equiv (p - 1)^2 = p^2 - p - p + 1 \equiv - p + 1 = - (p - 1) \pmod{p(p - 1)}$, which is not the desired result .. ? Or I need to multiply both sides of congruences ? What are the laws for congruences that allow me to do this ? (I hope you get the idea of what I'm trying to ask).
$$\begin{align}& x\equiv a!!\pmod{p!-!1}\ &x\equiv b!!\pmod{p}\end{align} \iff x\equiv a + (p!-!1)(a!-!b) !!\pmod {p(p!-!1)}\qquad$$
– Bill Dubuque Dec 06 '21 at 00:17$$(p!-!1)!\bmod (p!-!1)p ,=, (p!-!1)\underbrace{\left[{\dfrac{(p!-!1)!}{p!-!1}\bmod p}\right]}_{\textstyle\equiv (-1)/(-1)\equiv 1} =:! p!-!1\qquad\qquad\qquad\qquad\ $$
– Bill Dubuque Dec 06 '21 at 00:54