| 
 | 
The chinrem command finds the polynomial P.
| 
 | 
Find P such that
| 
 | 
| chinrem([[1,0],[1,0,1]],[[1,-1],[1,0,-1]]) | 
| 
 | 
or:
| chinrem([x,x^2+1],[x-1,x^2-1]) | 
| 
 | 
hence P(x)≡ −x2−2x+1/2 (mod x4−1 ).
| chinrem([[1,2],[1,0,1]],[[1,1],[1,1,1]]) | 
| 
 | 
or:
| chinrem([y+2,y^2+1],[y+1,y^2+y+1],y) | 
| 
 |