Macaulay2 » Documentation
Packages » Parametrization :: chineseRemainder
next | previous | forward | backward | up | index | toc

# chineseRemainder -- Solve simultaneous congruences.

- Usage:
    `chineseRemainder(L,M)`
- Inputs:
  - L, a list, of integers.
  - M, a list, of positive integers, which are relatively prime.
- Outputs:
  - x, an integer, an integer x between 0 and the product of the entries of M minus 1 representing the solution of the simultaneous congruences x=L#i mod M#i.

## Description

Solves the simultaneous congruences x=L#i mod M#i.

    i1 : chineseRemainder({1,2,3},{3,5,7})

    o1 = 52

## Caveat

This should be extended slightly to non prime integers.

## Ways to use chineseRemainder:

- `chineseRemainder(List,List)`

## For the programmer

The object chineseRemainder is a method function.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Parametrization.m2:1314:0.