55# ****************************************************************************
66# Copyright (C) 2005 David Kohel <[email protected] > 77# William Stein <[email protected] > 8- # 2008 Teresa Gomez-Diaz (CNRS) <[email protected] > 8+ # 2008 Teresa Gomez-Diaz (CNRS)
9+ 910# 2008-2011 Nicolas M. Thiery <nthiery at users.sf.net>
1011#
1112# Distributed under the terms of the GNU General Public License (GPL)
@@ -751,109 +752,6 @@ def __pow__(self, n):
751752 from sage .modules .free_module import FreeModule
752753 return FreeModule (self , n )
753754
754- @cached_method
755- def ideal_monoid (self ):
756- """
757- The monoid of the ideals of this ring.
758-
759- EXAMPLES::
760-
761- sage: # needs sage.modules
762- sage: MS = MatrixSpace(QQ, 2, 2)
763- sage: isinstance(MS, Ring)
764- False
765- sage: MS in Rings()
766- True
767- sage: MS.ideal_monoid()
768- Monoid of ideals of Full MatrixSpace of 2 by 2 dense matrices
769- over Rational Field
770-
771- Note that the monoid is cached::
772-
773- sage: MS.ideal_monoid() is MS.ideal_monoid() # needs sage.modules
774- True
775-
776- More examples::
777-
778- sage: # needs sage.combinat sage.modules
779- sage: F.<x,y,z> = FreeAlgebra(ZZ, 3)
780- sage: I = F * [x*y + y*z, x^2 + x*y - y*x - y^2] * F
781- sage: Q = F.quotient(I)
782- sage: Q.ideal_monoid()
783- Monoid of ideals of Quotient of Free Algebra on 3 generators (x, y, z)
784- over Integer Ring by the ideal (x*y + y*z, x^2 + x*y - y*x - y^2)
785- sage: F.<x,y,z> = FreeAlgebra(ZZ, implementation='letterplace')
786- sage: I = F * [x*y + y*z, x^2 + x*y - y*x - y^2] * F
787- sage: Q = F.quo(I)
788- sage: Q.ideal_monoid()
789- Monoid of ideals of Quotient of Free Associative Unital Algebra
790- on 3 generators (x, y, z) over Integer Ring
791- by the ideal (x*y + y*z, x*x + x*y - y*x - y*y)
792-
793- sage: ZZ.ideal_monoid()
794- Monoid of ideals of Integer Ring
795- sage: R.<x> = QQ[]; R.ideal_monoid()
796- Monoid of ideals of Univariate Polynomial Ring in x over Rational Field
797- """
798- try :
799- from sage .rings .ideal_monoid import IdealMonoid
800- return IdealMonoid (self )
801- except TypeError :
802- from sage .rings .noncommutative_ideals import IdealMonoid_nc
803- return IdealMonoid_nc (self )
804-
805- def _ideal_class_ (self , n = 0 ):
806- r"""
807- Return a callable object that can be used to create ideals in this
808- ring.
809-
810- EXAMPLES::
811-
812- sage: MS = MatrixSpace(QQ, 2, 2) # needs sage.modules
813- sage: MS._ideal_class_() # needs sage.modules
814- <class 'sage.rings.noncommutative_ideals.Ideal_nc'>
815-
816- Since :issue:`7797`, non-commutative rings have ideals as well::
817-
818- sage: A = SteenrodAlgebra(2) # needs sage.combinat sage.modules
819- sage: A._ideal_class_() # needs sage.combinat sage.modules
820- <class 'sage.rings.noncommutative_ideals.Ideal_nc'>
821- """
822- from sage .rings .noncommutative_ideals import Ideal_nc
823- return Ideal_nc
824-
825- @cached_method
826- def zero_ideal (self ):
827- """
828- Return the zero ideal of this ring (cached).
829-
830- EXAMPLES::
831-
832- sage: ZZ.zero_ideal()
833- Principal ideal (0) of Integer Ring
834- sage: QQ.zero_ideal()
835- Principal ideal (0) of Rational Field
836- sage: QQ['x'].zero_ideal()
837- Principal ideal (0) of Univariate Polynomial Ring in x over Rational Field
838-
839- The result is cached::
840-
841- sage: ZZ.zero_ideal() is ZZ.zero_ideal()
842- True
843-
844- TESTS:
845-
846- Make sure that :issue:`13644` is fixed::
847-
848- sage: # needs sage.rings.padics
849- sage: K = Qp(3)
850- sage: R.<a> = K[]
851- sage: L.<a> = K.extension(a^2-3)
852- sage: L.ideal(a)
853- Principal ideal (1 + O(a^40)) of 3-adic Eisenstein Extension Field in a defined by a^2 - 3
854- """
855- return self ._ideal_class_ (1 )(self , [self .zero ()])
856-
857755 @cached_method
858756 def unit_ideal (self ):
859757 """
@@ -866,21 +764,6 @@ def unit_ideal(self):
866764 """
867765 return self ._ideal_class_ (1 )(self , [self .one ()])
868766
869- def principal_ideal (self , gen , coerce = True ):
870- """
871- Return the principal ideal generated by gen.
872-
873- EXAMPLES::
874-
875- sage: R.<x,y> = ZZ[]
876- sage: R.principal_ideal(x+2*y)
877- Ideal (x + 2*y) of Multivariate Polynomial Ring in x, y over Integer Ring
878- """
879- C = self ._ideal_class_ (1 )
880- if coerce :
881- gen = self (gen )
882- return C (self , [gen ])
883-
884767 def characteristic (self ):
885768 """
886769 Return the characteristic of this ring.
0 commit comments