def OM2ring(ring_desc, ordering="dp"): assert isinstance(ring_desc, OMA) if (ring_desc.args[0] == Rationals): i = ring_desc.args[1] return create_ring(char=0, nvars=i, ordering=ordering) raise SingularException("ring not supported")
def OM2ring(ring_desc, ordering="dp"): assert isinstance(ring_desc, OMA) if (ring_desc.args[0]==Rationals): i=ring_desc.args[1] return create_ring(char=0, nvars=i, ordering=ordering) raise SingularException("ring not supported")
def ringFromOM(ring_desc, ordering="dp"): assert isinstance(ring_desc, OMApply) if (ring_desc.args[0] == Rationals): i = ring_desc.args[1].getValue() return create_ring(char=0, nvars=i, ordering=ordering) raise SingularException("ring not supported")
def ringFromOM(ring_desc, ordering="dp"): assert isinstance(ring_desc, OMApply) if (ring_desc.args[0]==Rationals): i=ring_desc.args[1].getValue() return create_ring(char=0, nvars=i, ordering=ordering) raise SingularException("ring not supported")