def super_categories(self): """ EXAMPLES:: sage: Rings().super_categories() [Category of rngs, Category of semirings] """ return [Rngs(), Semirings()]
def super_categories(self): """ EXAMPLES:: sage: Rings().super_categories() [Category of rngs, Category of semirings] """ from sage.categories.rngs import Rngs from sage.categories.semirings import Semirings return [Rngs(), Semirings()]
def __init__(self): r""" TESTS:: sage: NN = NonNegativeIntegerSemiring(); NN Non negative integer semiring sage: NN.category() Join of Category of semirings and Category of commutative monoids and Category of infinite enumerated sets and Category of facade sets sage: TestSuite(NN).run() """ NonNegativeIntegers.__init__(self, category=(Semirings().Commutative(), InfiniteEnumeratedSets()) )
def __init__(self): """ Parent class for all Newton polygons. sage: from sage.geometry.newton_polygon import ParentNewtonPolygon sage: ParentNewtonPolygon() Parent for Newton polygons TESTS: This class is a singleton. sage: ParentNewtonPolygon() is ParentNewtonPolygon() True :: sage: TestSuite(ParentNewtonPolygon()).run() """ from sage.categories.semirings import Semirings from sage.rings.rational_field import QQ Parent.__init__(self, category=Semirings(), base=QQ)