Some authors define semirings without the requirement for there to be a or. This makes the analogy betweenring andsemiring on the one hand andgroup andsemigroup on the other hand work more smoothly. These authors often userig for the concept defined here.[1][a] This originated as a joke, suggesting that rigs are rings withoutnegative elements. (Akin to usingrng to mean a ring without a multiplicativeidentity.)
The termdioid (for "double monoid") has been used to mean semirings or other structures. It was used by Kuntzmann in 1972 to denote a semiring.[2] (It is alternatively sometimes used fornaturally ordered semirings[3] but the term was also used for idempotent subgroups byBaccelli et al. in 1992.[4])
The symbol is usually omitted from the notation; that is, is just written
Similarly, anorder of operations is conventional, in which is applied before. That is, denotes.
For the purpose of disambiguation, one may write or to emphasize which structure the units at hand belong to.
If is an element of a semiring and, then-times repeated multiplication of with itself is denoted, and one similarly writes for the-times repeated addition.
Thezero ring with underlying set is a semiring called the trivial semiring. This triviality can be characterized via and so when speaking of nontrivial semirings, is often silently assumed as if it were an additional axiom.Now given any semiring, there are several ways to define new ones.
As noted, the natural numbers with its arithmetic structure form a semiring. Taking the zero and the image of the successor operation in a semiring, i.e., the set together with the inherited operations, is always a sub-semiring of.
If is a commutative monoid, function composition provides the multiplication to form a semiring: The set of endomorphisms forms a semiring where addition is defined from pointwise addition in. Thezero morphism and the identity are the respective neutral elements. If with a semiring, we obtain a semiring that can be associated with the squarematrices with coefficients in, thematrix semiring using ordinaryaddition andmultiplication rules of matrices. Given and a semiring, is always a semiring also. It is generally non-commutative even if was commutative.
Dorroh extensions: If is a semiring, then with pointwise addition and multiplication given by defines another semiring with multiplicative unit. Very similarly, if is any sub-semiring of, one may also define a semiring on, just by replacing the repeated addition in the formula by multiplication. Indeed, these constructions even work under looser conditions, as the structure is not actually required to have a multiplicative unit.
Zerosumfree semirings are in a sense furthest away from being rings. Given a semiring, one may adjoin a new zero to the underlying set and thus obtain such a zerosumfree semiring that also lackszero divisors. In particular, now and the old semiring is actually not a sub-semiring. One may then go on and adjoin new elements "on top" one at a time, while always respecting the zero. These two strategies also work under looser conditions. Sometimes the notations resp. are used when performing these constructions.
Adjoining a new zero to the trivial semiring, in this way, results in another semiring which may be expressed in terms of thelogical connectives of disjunction and conjunction:. Consequently, this is the smallest semiring that is not a ring. Explicitly, it violates the ring axioms as for all, i.e. has no additive inverse. In theself-dual definition, the fault is with. (This is not to be conflated with the ring, whose addition functions asxor.) In thevon Neumann model of the naturals,, and. The two-element semiring may be presented in terms of the set theoretic union and intersection as. Now this structure in fact still constitutes a semiring when is replaced by any inhabited set whatsoever.
Theideals on a semiring, with their standard operations on subset, form a lattice-ordered, simple and zerosumfree semiring. The ideals of are in bijection with the ideals of. The collection of left ideals of (and likewise the right ideals) also have much of that algebraic structure, except that then does not function as a two-sided multiplicative identity.
If is a semiring and is aninhabited set, denotes thefree monoid and the formal polynomials over its words form another semiring. For small sets, the generating elements are conventionally used to denote the polynomial semiring. For example, in case of a singleton such that, one writes. Zerosumfree sub-semirings of can be used to determine sub-semirings of.
Given a set, not necessarily just a singleton, adjoining a default element to the set underlying a semiring one may define the semiring of partial functions from to.
Given aderivation on a semiring, another the operation "" fulfilling can be defined as part of a new multiplication on, resulting in another semiring.
The above is by no means an exhaustive list of systematic constructions.
A basic property of semirings is that is not a left or rightzero divisor, and that but also squares to itself, i.e. these have.
Some notable properties are inherited from the monoid structures: The monoid axioms demand unit existence, and so the set underlying a semiring cannot be empty. Also, the2-ary predicate defined as, here defined for the addition operation, always constitutes the rightcanonicalpreorder relation.Reflexivity is witnessed by the identity. Further, is always valid, and so zero is theleast element with respect to this preorder. Considering it for the commutative addition in particular, the distinction of "right" may be disregarded. In the non-negative integers, for example, this relation isanti-symmetric andstrongly connected, and thus in fact a (non-strict)total order.
Any field is also aring, which in turn is a semiring in which also additive inverses exist. Note that a semiring omits such a requirement, i.e., it requires only acommutative monoid, not acommutative group. The extra requirement for a ring itself already implies the existence of a multiplicative zero. This contrast is also why for the theory of semirings, the multiplicative zero must be specified explicitly.
Here, the additive inverse of, squares to. As additive differences always exist in a ring, is a trivial binary relation in a ring.
A semiring is called acommutative semiring if also the multiplication is commutative.[8] Its axioms can be stated concisely: It consists of two commutative monoids and on one set such that and.
Thecenter of a semiring is a sub-semiring and being commutative is equivalent to being its own center.
The commutative semiring of natural numbers is theinitial object among its kind, meaning there is a unique structure preserving map of into any commutative semiring.
The bounded distributive lattices arepartially ordered, commutative semirings fulfilling certain algebraic equations relating to distributivity and idempotence. Thus so are theirduals.
Notions or order can be defined using strict, non-strict orsecond-order formulations. Additional properties such as commutativity simplify the axioms.
Given astrict total order (also sometimes called linear order, orpseudo-order in a constructive formulation), then by definition, thepositive andnegative elements fulfill resp.. By irreflexivity of a strict order, if is a left zero divisor, then is false. Thenon-negative elements are characterized by, which is then written.
Generally, the strict total order can be negated to define an associated partial order. Theasymmetry of the former manifests as. In fact inclassical mathematics the latter is a (non-strict) total order and such that implies. Likewise, given any (non-strict) total order, its negation isirreflexive andtransitive, and those two properties found together are sometimes called strict quasi-order. Classically this defines a strict total order – indeed strict total order and total order can there be defined in terms of one another.
Recall that "" defined above is trivial in any ring. The existence of rings that admit a non-trivial non-strict order shows that these need not necessarily coincide with "".
A semiring in which every element is an additiveidempotent, that is, for all elements, is called an(additively) idempotent semiring.[9] Establishing suffices. Be aware that sometimes this is just called idempotent semiring, regardless of rules for multiplication.
In such a semiring, is equivalent to and always constitutes a partial order, here now denoted. In particular, here. So additively idempotent semirings are zerosumfree and, indeed, the only additively idempotent semiring that has all additive inverses is the trivial ring and so this property is specific to semiring theory. Addition and multiplication respect the ordering in the sense that implies, and furthermore implies as well as, for all and.
If is additively idempotent, then so are the polynomials in.
A semiring such that there is a lattice structure on its underlying set islattice-ordered if the sum coincides with the meet,, and the product lies beneath the join. The lattice-ordered semiring of ideals on a semiring is not necessarilydistributive with respect to the lattice structure.
More strictly than just additive idempotence, a semiring is calledsimple iff for all. Then also and for all. Here then functions akin to an additively infinite element. If is an additively idempotent semiring, then with the inherited operations is its simple sub-semiring. An example of an additively idempotent semiring that is not simple is thetropical semiring on with the 2-ary maximum function, with respect to the standard order, as addition. Its simple sub-semiring is trivial.
Ac-semiring is an idempotent semiring and with addition defined over arbitrary sets.
An additively idempotent semiring with idempotent multiplication,, is calledadditively and multiplicatively idempotent semiring, but sometimes also just idempotent semiring. The commutative, simple semirings with that property are exactly the bounded distributive lattices with unique minimal and maximal element (which then are the units).Heyting algebras are such semirings and theBoolean algebras are a special case.
Further, given two bounded distributive lattices, there are constructions resulting in commutative additively-idempotent semirings, which are more complicated than just the direct sum of structures.
In a model of the ring, one can define a non-trivial positivity predicate and a predicate as that constitutes a strict total order, which fulfills properties such as, or classically thelaw of trichotomy. With its standard addition and multiplication, this structure forms the strictlyordered field that isDedekind-complete.By definition, allfirst-order properties proven in the theory of the reals are also provable in thedecidable theory of thereal closed field. For example, here is mutually exclusive with.
But beyond just ordered fields, the four properties listed below are also still valid in many sub-semirings of, including the rationals, the integers, as well as the non-negative parts of each of these structures. In particular, the non-negative reals, the non-negative rationals and the non-negative integers are such a semirings.The first two properties are analogous to the property valid in the idempotent semirings: Translation and scaling respect theseordered rings, in the sense that addition and multiplication in this ring validate
In particular, and so squaring of elements preserves positivity.
Take note of two more properties that are always valid in a ring. Firstly, trivially for any. In particular, thepositive additive difference existence can be expressed as
Secondly, in the presence of a trichotomous order, the non-zero elements of the additive group are partitioned into positive and negative elements, with the inversion operation moving between them. With, all squares are proven non-negative. Consequently, non-trivial rings have a positive multiplicative unit,
Having discussed a strict order, it follows that and, etc.
There are a few conflicting notions of discreteness in order theory. Given some strict order on a semiring, one such notion is given by being positive andcovering, i.e. there being no element between the units,. Now in the present context, an order shall be calleddiscrete if this is fulfilled and, furthermore, all elements of the semiring are non-negative, so that the semiring starts out with the units.
Denote by the theory of a commutative, discretely ordered semiring also validating the above four properties relating a strict order with the algebraic structure. All of its models have the model as its initial segment andGödel incompleteness andTarski undefinability already apply to. The non-negative elements of a commutative,discretely ordered ring always validate the axioms of. So a slightly more exotic model of the theory is given by the positive elements in thepolynomial ring, with positivity predicate for defined in terms of the last non-zero coefficient,, and as above. While proves all-sentences that are true about, beyond this complexity one can find simple such statements that areindependent of. For example, while-sentences true about are still true for the other model just defined, inspection of the polynomial demonstrates-independence of the-claim that all numbers are of the form or ("odd or even"). Showing that also can be discretely ordered demonstrates that the-claim for non-zero ("no rational squared equals") is independent. Likewise, analysis for demonstrates independence of some statements aboutfactorization true in. There are characterizations of primality that does not validate for the number.
In the other direction, from any model of one may construct an ordered ring, which then has elements that are negative with respect to the order, that is still discrete the sense that covers. To this end one defines an equivalence class of pairs from the original semiring. Roughly, the ring corresponds to the differences of elements in the old structure, generalizing the way in which theinitial ringcan be defined from. This, in effect, adds all the inverses and then the preorder is again trivial in that.
Beyond the size of the two-element algebra, no simple semiring starts out with the units. Being discretely ordered also stands in contrast to, e.g., the standard ordering on the semiring of non-negative rationals, which isdense between the units. For another example, can be ordered, but not discretely so.
The standard axiomatization of is more concise and the theory of its order is commonly treated in terms of the non-strict "". However, just removing the potent induction principle from that axiomatization does not leave a workable algebraic theory. Indeed, evenRobinson arithmetic, which removes induction but adds back the predecessor existence postulate, does not prove the monoid axiom.
Acomplete semiring is a semiring for which the additive monoid is acomplete monoid, meaning that it has aninfinitary sum operation for anyindex set and that the following (infinitary) distributive laws must hold:[10][11][12]
Examples of a complete semiring are the power set of a monoid under union and the matrix semiring over a complete semiring.[13]For commutative, additively idempotent and simple semirings, this property is related toresiduated lattices.
Acontinuous semiring is similarly defined as one for which the addition monoid is acontinuous monoid. That is, partially ordered with theleast upper bound property, and for which addition and multiplication respect order and suprema. The semiring with usual addition, multiplication and order extended is a continuous semiring.[14]
Any continuous semiring is complete:[10] this may be taken as part of the definition.[13]
In acomplete star semiring, the star operator behaves more like the usualKleene star: for a complete semiring we use the infinitary sum operator to give the usual definition of the Kleene star:[11]
where
Note that star semirings are not related to*-algebra, where the star operation should instead be thought of ascomplex conjugation.
AConway semiring is a star semiring satisfying the sum-star and product-star equations:[9][17]
Every complete star semiring is also a Conway semiring,[18] but the converse does not hold. An example of Conway semiring that is not complete is the set of extended non-negativerational numbers with the usual addition and multiplication (this is a modification of the example with extended non-negative reals given in this section by eliminating irrational numbers).[11]Aniteration semiring is a Conway semiring satisfying the Conway group axioms,[9] associated byJohn Conway to groups in star-semirings.[19]
By definition, any ring and any semifield is also a semiring.
The non-negative elements of a commutative, discretely ordered ring form a commutative, discretely (in the sense defined above) ordered semiring. This includes the non-negative integers.
Also the non-negativerational numbers as well as the non-negativereal numbers form commutative, ordered semirings.[20][21][22] The latter is calledprobability semiring.[6] Neither are rings or distributive lattices. These examples also have multiplicative inverses.
New semirings can conditionally be constructed from existing ones, as described. Theextended natural numbers with addition and multiplication extended so that.[21]
The set ofpolynomials with natural number coefficients, denoted forms a commutative semiring. In fact, this is thefree commutative semiring on a single generator Also polynomials with coefficients in other semirings may be defined, as discussed.
The non-negativeterminating fractions, in apositional number system to a given base, form a sub-semiring of the rationals. One has if divides. For, the set is the ring of all terminating fractions to base and isdense in.
Thelog semiring on with addition given by with multiplication zero element and unit element[6]
Similarly, in the presence of an appropriate order with bottom element,
Tropical semirings are variously defined. Themax-plus semiring is a commutative semiring with serving as semiring addition (identity) and ordinary addition (identity 0) serving as semiring multiplication. In an alternative formulation, the tropical semiring is and min replaces max as the addition operation.[23] A related version has as the underlying set.[6][10] They are an active area of research, linkingalgebraic varieties withpiecewise linear structures.[24]
TheŁukasiewicz semiring: the closed interval with addition of and given by taking the maximum of the arguments () and multiplication of and given by appears inmulti-valued logic.[11]
TheViterbi semiring is also defined over the base set and has the maximum as its addition, but its multiplication is the usual multiplication of real numbers. It appears inprobabilistic parsing.[11]
The set of all ideals of a given semiring form a semiring under addition and multiplication of ideals.
Any bounded, distributive lattice is a commutative, semiring under join and meet. A Boolean algebra is a special case of these. ABoolean ring is also a semiring (indeed, a ring) but it is not idempotent underaddition. ABoolean semiring is a semiring isomorphic to a sub-semiring of a Boolean algebra.[20]
The commutative semiring formed by the two-element Boolean algebra and defined by. It is also calledtheBoolean semiring.[6][21][22][9] Now given two sets andbinary relations between and correspond to matrices indexed by and with entries in the Boolean semiring,matrix addition corresponds to union of relations, andmatrix multiplication corresponds tocomposition of relations.[25]
Anyunital quantale is a semiring under join and multiplication.
A normalskew lattice in a ring is a semiring for the operations multiplication and nabla, where the latter operation is defined by
More using monoids,
The construction of semirings from a commutative monoid has been described. As noted, give a semiring, the matrices form another semiring. For example, the matrices with non-negative entries, form a matrix semiring.[20]
Given an alphabet (finite set) Σ, the set offormal languages over (subsets of) is a semiring with product induced bystring concatenation and addition as the union of languages (that is, ordinary union as sets). The zero of this semiring is the empty set (empty language) and the semiring's unit is the language containing only theempty string.[11]
Generalizing the previous example (by viewing as thefree monoid over), take to be any monoid; the power set of all subsets of forms a semiring under set-theoretic union as addition and set-wise multiplication:[22]
Similarly, if is a monoid, then the set of finitemultisets in forms a semiring. That is, an element is a function; given an element of the function tells you how many times that element occurs in the multiset it represents. The additive unit is the constant zero function. The multiplicative unit is the function mapping to and all other elements of to The sum is given by and the product is given by
The set ofcardinal numbers smaller than any giveninfinite cardinal form a semiring under cardinal addition and multiplication. The class ofall cardinals of aninner model form a (class) semiring under (inner model) cardinal addition and multiplication.
The family of (isomorphism equivalence classes of)combinatorial classes (sets of countably many objects with non-negative integer sizes such that there are finitely many objects of each size) with the empty class as the zero object, the class consisting only of the empty set as the unit,disjoint union of classes as addition, andCartesian product of classes as multiplication.[26]
Isomorphism classes of objects in anydistributive category, undercoproduct andproduct operations, form a semiring known as a Burnside rig.[27] A Burnside rig is a ring if and only if the category istrivial.
Thesemiring of formal languages is also a complete star semiring, with the star operation coinciding with the Kleene star (for sets/languages).[11]
The set of non-negativeextended reals together with the usual addition and multiplication of reals is a complete star semiring with the star operation given by for (that is, thegeometric series) and for[11]
The andtropical semirings on the reals are often used inperformance evaluation on discrete event systems. The real numbers then are the "costs" or "arrival time"; the "max" operation corresponds to having to wait for all prerequisites of an events (thus taking the maximal time) while the "min" operation corresponds to being able to choose the best, less costly choice; and + corresponds to accumulation along the same path.
TheFloyd–Warshall algorithm forshortest paths can thus be reformulated as a computation over a algebra. Similarly, theViterbi algorithm for finding the most probable state sequence corresponding to an observation sequence in ahidden Markov model can also be formulated as a computation over a algebra on probabilities. Thesedynamic programming algorithms rely on thedistributive property of their associated semirings to compute quantities over a large (possibly exponential) number of terms more efficiently than enumerating each of them.[28][29]
A generalization of semirings does not require the existence of a multiplicative identity, so that multiplication is asemigroup rather than a monoid. Such structures are calledhemirings[30] orpre-semirings.[31] A further generalization areleft-pre-semirings,[32] which additionally do not require right-distributivity (orright-pre-semirings, which do not require left-distributivity).
Yet a further generalization arenear-semirings: in addition to not requiring a neutral element for product, or right-distributivity (or left-distributivity), they do not require addition to be commutative. Just as cardinal numbers form a (class) semiring, so doordinal numbers form anear-semiring, when the standardordinal addition and multiplication are taken into account. However, the class of ordinals can be turned into a semiring by considering the so-callednatural (or Hessenberg) operations instead.
Incategory theory, a2-rig is a category withfunctorial operations analogous to those of a rig. That the cardinal numbers form a rig can be categorified to say that thecategory of sets (or more generally, anytopos) is a 2-rig.
^Baccelli, François Louis; Olsder, Geert Jan; Quadrat, Jean-Pierre; Cohen, Guy (1992).Synchronization and linearity. An algebra for discrete event systems. Wiley Series on Probability and Mathematical Statistics. Chichester: Wiley.Zbl0824.93003.
^abcdeÉsik, Zoltán (2008). "Iteration semirings". In Ito, Masami (ed.).Developments in language theory. 12th international conference, DLT 2008, Kyoto, Japan, September 16–19, 2008. Proceedings. Lecture Notes in Computer Science. Vol. 5257. Berlin:Springer-Verlag. pp. 1–20.doi:10.1007/978-3-540-85780-8_1.ISBN978-3-540-85779-2.Zbl1161.68598.
^abcKuich, Werner (2011). "Algebraic systems and pushdown automata". In Kuich, Werner (ed.).Algebraic foundations in computer science. Essays dedicated to Symeon Bozapalidis on the occasion of his retirement. Lecture Notes in Computer Science. Vol. 7020. Berlin:Springer-Verlag. pp. 228–256.ISBN978-3-642-24896-2.Zbl1251.68135.
^Ésik, Zoltán; Leiß, Hans (2002). "Greibach normal form in algebraically complete semirings". In Bradfield, Julian (ed.).Computer science logic. 16th international workshop, CSL 2002, 11th annual conference of the EACSL, Edinburgh, Scotland, September 22–25, 2002. Proceedings. Lecture Notes in Computer Science. Vol. 2471. Berlin:Springer-Verlag. pp. 135–150.Zbl1020.68056.
^Ésik, Zoltán; Kuich, Werner (2004). "Equational axioms for a theory of automata". In Martín-Vide, Carlos (ed.).Formal languages and applications. Studies in Fuzziness and Soft Computing. Vol. 148. Berlin:Springer-Verlag. pp. 183–196.ISBN3-540-20907-7.Zbl1088.68117.
^abcGuterman, Alexander E. (2008). "Rank and determinant functions for matrices over semirings". In Young, Nicholas; Choi, Yemon (eds.).Surveys in Contemporary Mathematics. London Mathematical Society Lecture Note Series. Vol. 347.Cambridge University Press. pp. 1–33.ISBN978-0-521-70564-6.ISSN0076-0552.Zbl1181.16042.
Golan, Jonathan S. (1999)Semirings and their applications. Updated and expanded version ofThe theory of semirings, with applications to mathematics and theoretical computer science (Longman Sci. Tech., Harlow, 1992,MR1163371). Kluwer Academic Publishers, Dordrecht. xii+381 pp.ISBN0-7923-5786-8MR1746739
Berstel, Jean; Perrin, Dominique (1985).Theory of codes. Pure and applied mathematics. Vol. 117. Academic Press.ISBN978-0-12-093420-1.Zbl0587.68066.
Droste, Manfred; Kuich, Werner (2009), "Chapter 1: Semirings and Formal Power Series",Handbook of Weighted Automata, pp. 3–28,doi:10.1007/978-3-642-01492-5_1
Głazek, Kazimierz (2002).A guide to the literature on semirings and their applications in mathematics and information sciences. With complete bibliography. Dordrecht: Kluwer Academic.ISBN1-4020-0717-5.Zbl1072.16040.
Gondran, Michel; Minoux, Michel (2008).Graphs, Dioids and Semirings: New Models and Algorithms. Operations Research/Computer Science Interfaces Series. Vol. 41. Dordrecht: Springer Science & Business Media.ISBN978-0-387-75450-5.Zbl1201.16038.
Pair, Claude (1967), "Sur des algorithmes pour des problèmes de cheminement dans les graphes finis (On algorithms for path problems in finite graphs)", in Rosentiehl (ed.),Théorie des graphes (journées internationales d'études) – Theory of Graphs (international symposium), Rome (Italy), July 1966: Dunod (Paris) et Gordon and Breach (New York){{citation}}: CS1 maint: location (link)