sage: help(CRT)
crt(a, b, m=None, n=None)
Returns a solution to a Chinese Remainder Theorem problem.
INPUT:
- ``a``, ``b`` - two residues (elements of some ring for which
extended gcd is available), or two lists, one of residues and
one of moduli.
[...]
If ``a`` and ``b`` are lists, returns a simultaneous solution to
the congruences `x\equiv a_i\pmod{b_i}`, if one exists.
.. SEEALSO::
- :func:`CRT_list`
sage: CRT([1,2,3],[3,5,7])
52
sage: x = CRT([1,2,3],[3,5,7])
sage: x % 3, x % 5, x % 7
(1, 2, 3)
Doug
--
To post to this group, send email to sage-s...@googlegroups.com
To unsubscribe from this group, send email to sage-support...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-support
URL: http://www.sagemath.org