For example, say I have two equations for $n$:
$n\equiv 1 \mod 2$ and $n\equiv 1 \mod 3$
I can show that $ n \equiv 1 \mod 6$ by saying that:
$n \equiv 1, 3, 5 \mod 6$ and $n \equiv 1, 4 \mod 6$ using the previous two equations, and then seeing that $1$ is the only remainder both equations share.
However, I would like to know if there is a simpler way to perform simplify these simultaneous equations (ideally one that could be executed quickly by code).
Please note that I am interested in a method for solving the generalised form of the equations (ie. $n\equiv 1 \mod a$ and $n\equiv 1 \mod b$)