The Chinese Remainder Theorem states that if R(x) and Q(x) are relatively prime polynomials, then for any polynomials A(x) and B(x), there exists a polynomial P(x) such that:
|
The chinrem command finds the polynomial P.
|
Examples.
⎧ ⎨ ⎩ |
|
⎡ ⎢ ⎢ ⎣ | ⎡ ⎢ ⎢ ⎣ | − |
| ,1,− |
| ⎤ ⎥ ⎥ ⎦ | , | ⎡ ⎣ | 1,0,0,0,−1 | ⎤ ⎦ | ⎤ ⎥ ⎥ ⎦ |
⎡ ⎢ ⎢ ⎣ | − |
| +x− |
| ,x4−1 | ⎤ ⎥ ⎥ ⎦ |
⎡ ⎣ | ⎡ ⎣ | −1,−1,0,1 | ⎤ ⎦ | , | ⎡ ⎣ | 1,1,2,1,1 | ⎤ ⎦ | ⎤ ⎦ |
⎡ ⎣ | −y3−y2+1,y4+y3+2 y2+y+1 | ⎤ ⎦ |