|
|
5.1.7 chinrem
Syntax:
chinrem ( list, intvec )
chinrem ( list, list )
chinrem ( intvec, intvec )
Type:
- ideal resp. bigint
Purpose:
- applies chinese remainder theorem to the first argument w.r.t. the moduli given in the second.
The elements in the first list must be of same type which can be
ideal,
module or matrix.
The moduli, if given by a list, must be of type bigint or int.
If data depending on a ring are involved, the coeffcient field must be Q.
Example:
| | chinrem(intvec(2,-3),intvec(7,11));
==> 30
ring r=0,(x,y),dp;
ideal i1=5x+2y,x2+3y2+xy;
ideal i2=2x-3y,2x2+4y2+5xy;
chinrem(list(i1,i2),intvec(7,11));
==> _[1]=-9x+30y
==> _[2]=-20x2-6xy-18y2
chinrem(list(i1,i2),list(bigint(7),bigint(11)));
==> _[1]=-9x+30y
==> _[2]=-20x2-6xy-18y2
|
See
modstd_lib.
|