def __init__(self, R): """ EXAMPLES:: sage: RingIdeals(ZZ) Category of ring ideals in Integer Ring sage: RingIdeals(3) Traceback (most recent call last): ... TypeError: R (=3) must be a ring TESTS:: sage: TestSuite(RingIdeals(ZZ)).run() """ if not R in _Rings: raise TypeError, "R (=%s) must be a ring"%R Category_ideal.__init__(self, R)
def __init__(self, A): """ EXAMPLES:: sage: AlgebraIdeals(QQ['a']) Category of algebra ideals in Univariate Polynomial Ring in a over Rational Field sage: AlgebraIdeals(QQ) Traceback (most recent call last): ... TypeError: A (=Rational Field) must be an algebra TESTS:: sage: TestSuite(AlgebraIdeals(QQ['a'])).run() """ from sage.algebras.algebra import is_Algebra if not is_Algebra(A): # A not in Algebras() ? raise TypeError("A (=%s) must be an algebra"%A) Category_ideal.__init__(self, A)
def __init__(self, A): """ EXAMPLES:: sage: AlgebraIdeals(FreeAlgebra(QQ,2,'a,b')) Category of algebra ideals in Free Algebra on 2 generators (a, b) over Rational Field sage: AlgebraIdeals(QQ) Traceback (most recent call last): ... TypeError: A (=Rational Field) must be an algebra TESTS:: sage: TestSuite(AlgebraIdeals(FreeAlgebra(QQ,2,'a,b'))).run() """ from sage.algebras.algebra import is_Algebra if not is_Algebra(A): # A not in Algebras() ? raise TypeError("A (=%s) must be an algebra" % A) Category_ideal.__init__(self, A)
def __init__(self, A): """ EXAMPLES:: sage: AlgebraIdeals(FreeAlgebra(QQ,2,'a,b')) Category of algebra ideals in Free Algebra on 2 generators (a, b) over Rational Field sage: AlgebraIdeals(QQ) Traceback (most recent call last): ... TypeError: A (=Rational Field) must be an algebra TESTS:: sage: TestSuite(AlgebraIdeals(FreeAlgebra(QQ,2,'a,b'))).run() """ from sage.algebras.algebra import is_Algebra if not is_Algebra(A): # A not in Algebras() ? raise TypeError("A (=%s) must be an algebra"%A) Category_ideal.__init__(self, A)
def __init__(self, R): """ EXAMPLES:: sage: CommutativeRingIdeals(ZZ) Category of commutative ring ideals in Integer Ring sage: CommutativeRingIdeals(IntegerModRing(4)) Category of commutative ring ideals in Ring of integers modulo 4 TESTS:: sage: CommutativeRingIdeals(Partitions(4)) Traceback (most recent call last): ... TypeError: R (=Partitions of the integer 4) must be a commutative ring sage: TestSuite(CommutativeRingIdeals(ZZ)).run() """ if R not in CommutativeRings(): raise TypeError, "R (=%s) must be a commutative ring" % R Category_ideal.__init__(self, R)
def __init__(self, R): """ EXAMPLES:: sage: CommutativeRingIdeals(ZZ) Category of commutative ring ideals in Integer Ring sage: CommutativeRingIdeals(IntegerModRing(4)) Category of commutative ring ideals in Ring of integers modulo 4 TESTS:: sage: CommutativeRingIdeals(Partitions(4)) Traceback (most recent call last): ... TypeError: R (=Partitions of the integer 4) must be a commutative ring sage: TestSuite(CommutativeRingIdeals(ZZ)).run() """ if R not in CommutativeRings(): raise TypeError("R (=%s) must be a commutative ring" % R) Category_ideal.__init__(self, R)