Thanks for the report. This is indeed a bug in sage. The problem is that for 
some reason the algorithm in sage is asuming the moduli are coprime. If you 
need the functionality now, here is an updated version of the function is 
sage.

def CRT_list(v, moduli):
    if not isinstance(v,list) or not isinstance(moduli,list):
        raise ValueError, "Arguments to CRT_list should be lists"
    if len(v) != len(moduli):
        raise ValueError, "Arguments to CRT_list should be lists of the same 
length"
    if len(v) == 0:
        return ZZ(0)
    if len(v) == 1:
        return moduli[0].parent()(v[0])
    x = v[0]
    m = moduli[0]
    for i in range(1,len(v)):
        x = CRT(x,v[i],m,moduli[i])
        m=m.lcm(moduli[i])
    return x%m

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to