Florent, Thanks for pointing that out. There are a few semirings
which I'd like to see in there:
1) Boolean semiring: where '+' is 'or' and '*' is and
2) Tropical semiring: if R is an ordered abelian group then there is a
semiring whose elements are R union {Infinity}, and '+' is min, '*' is
plus
3) Noncommutative polynomials and power series: if X is a finite set,
and M is the free monoid on X (which is already in sage):
If R is a semiring, then noncommutative polynomials (usually written
as R<X>) is the semiring of maps from M --> R with finite support,
and noncommutative power series are maps from M-->R with the obvious
+ and multiplication. There is also a subcategory of semirings called
"starred" semirings (J. H. Conway has a monograph on these), in which
there is an ideal of R with an additional operation called '*' only
defined on elements of that ideal (I won't bother to give to the
axioms). This also extends in standard ways to power series.
Victor
On Oct 27, 5:07 pm, Florent Hivert <[email protected]>
wrote:
> Hi Victor,
>
> On Wed, Oct 27, 2010 at 01:55:21PM -0700, VictorMiller wrote:
> > I would like to experiment with adding some new types. One of the is
> > SemiRing (this is an algebraic structure which is like a ring except
> > that there might not be an additive inverse -- think of the
> > nonnegative integers). I would like to insert it in the class
> > hierarchy so that every Ring is a SemiRing. Would the best way to to
> > change ring.pyx in sage.rings, or is there something extra that I need
> > to do with categories?
>
> There is already a category Semirings (with not that much in it) together with
> an example: NonNegativeIntegerSemiring. See
> sage/category/semirings.py
> sage/rings/semirings/non_negative_integer_semiring.py
> See #9056 (merged in 4.4.4). I'm not sure what the plan is but probably
> everything which is in the rings.pyx file should be moved in the proper
> category file.
>
> Cheers,
>
> Florent
--
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org