Chinese theorem
Returns the solution of the system of equations given by the Chinese theorem: let be integers greater than 1, and let us denote by the product of the . The Chinese remainder theorem states that if the are pairwise coprime, and if are any integer, , then there exists an integer such that
and two such are congruent modulo .
Syntax
chinese_theorem(Integer, Integer, Integer, Integer)
chinese_theorem(List, List)
Description
Given four integers , , , , returns , the solution of the system of equations described above.
Given two lists and , returns , the solution of the system of equations described above.