23
arXiv:1603.03201v1 [math.AC] 10 Mar 2016 FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS PEYMAN NASEHPOUR AND AMIRHOSSEIN PARVARDI ABSTRACT. In this paper, we define finitely additive, probability and modular functions over semiring-like structures. We investigate finitely additive functions with the help of complemented elements of a semiring. Then with the help of those observations, we also generalize some classical results in probability theory such as Boole’s Inequality, the Law of Total Probability, Bayes’ Theorem, the Equality of Parallel Systems, and Poincar´ e’s Inclusion-Exclusion Theorem. While we prove that modular functions over a couple of celebrated semirings are almost constant, we show it is possible to define many different modular functions over some semirings such as bottleneck algebras and the semiring (Id(D), +, ·), where D is a Dedekind domain. Finally, we prove that under suitable conditions a function f is finitely additive iff it is modular and f (0)= 0. 0. I NTRODUCTION Semirings and other semiring-like algebraic structures such as pre-semirings, hemir- ings and near-rings have so many applications in engineering, specially in computer sci- ence and of course in applied mathematics (Cf. [11], [13], [17] and [22]). Finitely ad- ditive and modular functions appear in measure and probability theory (Cf. [4] and [8]), lattice and boolean algebra theory (Cf. [14]), module theory (Cf. [2]) and a couple of other branches of mathematics as we will mention in different parts of the paper. Since semiring-like algebraic structures are interesting generalizations of distributive lattices and rings, it is quite natural to ask if finitely additive and modular functions can be de- fined and investigated in “pre-semiring” theory. On the other hand, probability functions, as special cases for finitely additive functions, play an important role in probability theory. Therefore it seems quite interesting to see if the classical results of probability theory can be stated and proved in this context as well. In the present paper, we define finitely additive, modular, and probability functions over semirings and semiring-like algebraic structures and investigate them over those algebraic structures. Since different authors give different definitions for semirings and similar algebraic structures, it is crucial to clarify what we mean by these structures. In this paper, by a “pre-semiring”, we understand an algebraic structure, consisting of a nonempty set S with two operations of addition and multiplication such that the following conditions are satisfied: (1) (S, +) and (S, ·) are commutative semigroups; 2010 Mathematics Subject Classification: 16Y60, 20M14. Keywords: Semiring, Hemiring, Pre-semiring, Finitely additive functions, Modular functions, Probabil- ity functions The authors were partly supported by University of Tehran. 1

Finitely Additive, Modular and Probability Functions on Pre-semirings

  • Upload
    gut-ir

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

arX

iv:1

603.

0320

1v1

[mat

h.A

C]

10 M

ar 2

016 FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON

PRE-SEMIRINGS

PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

ABSTRACT. In this paper, we define finitely additive, probability and modular functionsover semiring-like structures. We investigate finitely additive functions with the help ofcomplemented elements of a semiring. Then with the help of those observations, wealso generalize some classical results in probability theory such as Boole’s Inequality,the Law of Total Probability, Bayes’ Theorem, the Equality of Parallel Systems, andPoincare’s Inclusion-Exclusion Theorem. While we prove that modular functions overa couple of celebrated semirings are almost constant, we show it is possible to definemany different modular functions over some semirings such as bottleneck algebras andthe semiring(Id(D),+, ·), whereD is a Dedekind domain. Finally, we prove that undersuitable conditions a functionf is finitely additive iff it is modular andf (0) = 0.

0. INTRODUCTION

Semirings and other semiring-like algebraic structures such as pre-semirings, hemir-ings and near-rings have so many applications in engineering, specially in computer sci-ence and of course in applied mathematics (Cf. [11], [13], [17] and [22]). Finitely ad-ditive and modular functions appear in measure and probability theory (Cf. [4] and [8]),lattice and boolean algebra theory (Cf. [14]), module theory (Cf. [2]) and a couple ofother branches of mathematics as we will mention in different parts of the paper. Sincesemiring-like algebraic structures are interesting generalizations of distributive latticesand rings, it is quite natural to ask if finitely additive and modular functions can be de-fined and investigated in “pre-semiring” theory. On the other hand, probability functions,as special cases for finitely additive functions, play an important role in probability theory.Therefore it seems quite interesting to see if the classicalresults of probability theory canbe stated and proved in this context as well.

In the present paper, we define finitely additive, modular, and probability functions oversemirings and semiring-like algebraic structures and investigate them over those algebraicstructures. Since different authors give different definitions for semirings and similaralgebraic structures, it is crucial to clarify what we mean by these structures. In this paper,by a “pre-semiring”, we understand an algebraic structure,consisting of a nonempty setSwith two operations of addition and multiplication such that the following conditions aresatisfied:

(1) (S,+) and(S, ·) are commutative semigroups;

2010 Mathematics Subject Classification: 16Y60, 20M14.Keywords: Semiring, Hemiring, Pre-semiring, Finitely additive functions, Modular functions, Probabil-

ity functionsThe authors were partly supported by University of Tehran.

1

2 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

(2) Distributive law:a · (b+c) = a ·b+a ·c for all a,b,c∈ S.

The definition of pre-semirings is borrowed from the book [13] and for more on pre-semirings, one may refer to that.

An algebraic structure, that is a pre-semiring and it possesses an element that is a neu-tral element for its addition and an absorbing element for its multiplication, is called ahemiring. Usually the neutral element of a hermring is denoted by 0. Any hemiring witha multiplicative identity 16= 0 is called a semiring. For more on semirings and hemirings,one may refer to [11].

Let us recall that ifB is a boolean algebra, a real-valued functionµ on B is calledfinitely additive, ifµ(p∨q) = µ(p)+µ(q), wheneverp andq are disjoint elements ofB([16, Chap. 15]). In the first section of this paper, we define afunction f from a hemir-ing S into a commutative semigroupT to be finitely additive ifst = 0 for anys, t ∈ Simplies that f (s+ t) = f (s)+ f (t) and investigate finitely additive functions over com-plemented elements of semirings and show that ifS is a zerosumfree semiring,T is a ringand f : S−→ T is a finitely additive and normalized function (i.e.,f (1) = 1), then forcomplemented elementss, t ∈ S, the following statements hold:

(1) f (t) = f (ts)+ f (ts⊥).(2) f (st)+2 f (st) = f (s)+ f (t), wherest = s⊥t +st⊥.(3) f (s)+ f (s⊥) = 1.(4) f (s⊥t⊥) = 1− f (s)− f (t)+ f (st).

Though we bring the definition of complemented elements of a semiring in this paper,but for more on these elements, one may refer to [11, Chap. 5].

Similar to the concept of independent events in probabilitytheory, we define someelementss1, . . . ,sn of a pre-semiringS to be independent, iff (∏x∈X x) = ∏x∈X f (x), forany nonempty subsetX of s1, . . . ,sn, where f is a function fromS into a commutativesemigroupT. After that we prove that ifS is a semiring,R a ring and f : S−→ R afinitely additive and normalized function, then the following statements for complementedelementss1,s2, . . . ,sn ∈ Sare equivalent:

(1) The elementss1,s2, . . . ,sn ∈ Sare independent,(2) The 2n sets of elements of the formt1, t2, . . . , tn with ti = si or ti = s⊥i are indepen-

dent,(3) The 2n equalitiesf (t1 · · · tn) = f (t1) · · · f (tn) with ti = si or ti = s⊥i hold.

In the second section of the present paper, we define probability functions over semir-ings inspired from the definition of probability functions in probability theory ([18, Chap.I]). For defining probability functions, we put an order on the co-domains of those func-tions and define them as follows:

Let Sbe a semiring andT an ordered semiring. We define a functionp : S−→ T to bea probability function, if the following properties are satisfied:

(1) p(s)≥ 0, for anys∈ S.(2) p(1) = 1.(3) If s, t ∈ Sandst= 0, thenp(s+ t) = p(s)+ p(t).

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 3

In this section, we get a couple of nice results for probability functions over semiringssimilar to probability theory and generalize some of the classical results of probabilitytheory such as Boole’s Inequality, the Law of Total Probability and Bayes’ Theorem.

Modular functions appear in different branches of mathematics. A modular function isusually a real-valued functionmover some objects that two operations “+ ” and “ · ” havemeaning for those objects and ifs, t are of those objects, we have the following “modular”equality:

m(s+ t)+m(st) = m(s)+m(t).

For example ifL is a lattice of finite length. ThenL is a modular lattice if and only if thefunction height :L −→ N0 is modular, i.e.,

height(a∨b)+height(a∧b) = height(a)+height(b),

for all a,b∈ L ([14, Corollary 376]).In the third section of the present paper, we define modular functions over pre-semirings

and examine those functions over different pre-semirings such as Tropical, Max-plus,Truncation, Arctic andB(n, i) algebras / semirings and show that modular functions overthese semirings are almost constant, i.e., they are constant functions over their domainsexcept a finite number of elements in them.

We also show that ifD is a Dedekind domain, one can define many different modularfunctions over the semiring(Id(D),+, ·). More precisely we prove that if(G,+) is anAbelian group andD is a Dedekind domain, a modular functionf : Id(D) −→ G can becharacterized by the values off at (0), D and all maximal ideals ofD.

After giving some important examples for modular functions, we show that Poincare’sinclusion-exclusion theorem in probability theory holds for arbitrary modular functionsover pre-semirings. More precisely, we prove that ifS is a multiplicatively idempotentpre-semiring andT a commutative semigroup andm : S−→ T is a modular function, thenfor any elementss1, . . . ,sn ∈ S, the following equality holds:

m(n

∑i=1

si)+∑i< j

m(sisj)+ ∑i< j<k<l

m(sisjsksl )+ · · ·=

n

∑i=1

m(si)+ ∑i< j<k

m(sisjsk)+ · · · (Poincare’s Formula),

where the number of multiplicative factors in the sums of theboth sides of the equality isat mostn.

As a result of Poincare’s formula, we prove that ifS is a multiplicatively idempotentpre-semiring,Ra ring andf : S−→Ra modular function, then for anyn>1, if s1, . . . ,sn∈Sare independent, thens1+ · · ·+sn−1 andsn are also independent.

We also prove that over complemented elements of a semiring,finitely additive func-tions are modular. In fact, we show that ifS is a zerosumfree semiring such that 1+1 is acomplemented element ofS, T is a commutative semigroup, andf : S−→ T a finitely ad-ditive function, thenf |comp(S): comp(S) −→ T is modular, where by comp(S), we meanthe set of complemented elements of the semiringS.

4 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

We emphasize that in this paper, the multiplication of all rings, semirings, hemirings,and pre-semirings are commutative, unless otherwise is stated. Also note that by “iff”,we always mean “if and only if”.

1. FINITELY ADDITIVE FUNCTIONS ON HEMIRINGS

Let us recall that ifX is a fixed set, then an algebra of setsA is a class of subsets ofXsuch that /0,X ∈A and ifA,B∈A , thenA∪B∈A , A∩B∈A , andA′ ∈A . In measuretheory, a real-valued functionµ on an algebraA is called a finitely additive function if fordisjoint subsetsA,B of X, we haveµ(A∪B) = µ(A)+µ(B) ([4]). From this definition,we are inspired to define finitely additive functions over hemirings as follows:

Definition 1. Let Sbe a hemiring ands, t,s1, . . . ,sn ∈ S.(1) The two elementss andt are said to be disjoint, ifst= 0.(2) Then elementss1, . . . ,sn (n> 1) are said to be mutually disjoint, ifsisj = 0 for all

1≤ i < j ≤ n.(3) LetT be a commutative semigroup. We define a functionf : S−→ T to be finitely

additive if for any disjoint elementss, t ∈ S, we havef (s+ t) = f (s)+ f (t).

Let us mention that there are plenty of examples for finitely additive functions on dif-ferent algebraic structures defined in different branches of mathematics. Since a modularfunctionmwith m(0) = 0 is also a finitely additive function (Refer to Theorem 48), thoseexamples given in Example 45 are finitely additive functionsas well. Probability func-tions are also finitely additive. Therefore the functions given in Example 13 are also in-teresting finitely additive functions. By the way, we give a couple of interesting examplesfor finitely additive functions over hemirings in the following:

Example 2. Examples of finitely additive functions over hemirings:(1) Let I be the collection of finite unions of all intervals of the form[c,d], [c,d),

(c,d], and(c,d) wherec,d ∈ R. It is easy to see that(I ,∪,∩, /0) is a hermiring.For any intervalJ of the form[c,d], [c,d), (c,d], and(c,d), setµ(J) = |d−c| andfor a finite union of disjoint intervalsJ1, . . . ,Jn, setµ(

⋃ni=1Ji) = ∑n

i=1 µ(Ji). Thenone can easily check thatµ is a finitely additive function on the hemiringI ([4,Chap. 1]).

(2) Let X be an infinite set andA be the algebra of setsB ⊆ X such that eitherBor Bc is finite (in some references, whenBc is finite, B is called co-finite). Forfinite B, define f (B) = 0, and for co-finiteB, define f (B) = 1. It is easy to seethat(A ,∪,∩, /0,X) is a boolean algebra and therefore a hermiring andf a finitelyadditive function ([3, Problem 2.13]).

(3) LetT be a commutative semigroup andE an entire hemiring, that isab= 0 impliesthat eithera = 0 or b = 0 for anya,b ∈ E. Any function f : E −→ T with thisproperty thatf (0) = 0 is finitely additive and the reason is as follows: Ifa,b∈ Eandab= 0, then eithera= 0 orb= 0 and in each case,f (a+b) = f (a)+ f (b).

Proposition 3. Let S be a hemiring, T a commutative semigroup and f: S−→ T finitelyadditive. Then for any disjoint elements s1, . . . ,sn ∈ S, we have

f (s1+ · · ·+sn) = f (s1)+ · · ·+ f (sn).

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 5

Proof. By Definition 1, the statement holds forn = 2. Now letn > 2 and suppose thats1, . . . ,sn are elements ofSsuch thatsisj = 0 for all 1≤ i < j ≤ n. It is clear that

(s1+ · · ·+sn−1) ·sn = 0

and therefore

f ((s1+ · · ·+sn−1)+sn) = f (s1+ · · ·+sn−1)+ f (sn).

But by induction’s hypothesis,

f (s1+ · · ·+sn−1) = f (s1)+ · · ·+ f (sn−1),

and the proof is complete.

Example 2 shows that a finitely additive functionf : S−→ T over a hemiringS willbe more interesting ifS is not an entire hemiring, i.e., a hemiring with nontrivial zero-divisors. Semiring with nontrivial complemented elementsare interesting examples ofsemirings with nontrivial zero-divisors and suitable for our purpose in this paper. Letus recall that an elements of a semiringS is said to be complemented if there exists anelementcs ∈ Ssatisfyingscs = 0 ands+cs = 1. The mentioned elementcs ∈ S is calledthe complement ofs∈ S. One can easily check that ifs∈ Shas a complement, then it isunique. The complement ofs∈ S, if it exists, is denoted bys⊥. Also note that the set ofall complemented elements of a semiringS is denoted by comp(S). The set comp(S) isalways nonempty since 0∈ comp(S). It is clear that ifs∈ comp(S), thens⊥ ∈ comp(S)and(s⊥)⊥ = s. Finally if s, t ∈ Sare complemented, the symmetric difference ofs andtis defined to best = s⊥t +st⊥ (Cf. to [11, Chap. 5]).

Proposition 4. Let S be a semiring, T a commutative semigroup and f: S−→ T a finitelyadditive function. If s∈ S is complemented, then the following statements hold:

(1) f (t) = f (ts)+ f (ts⊥), for any t∈ S.(2) If, in addition, t∈S is also complemented, we have f(st)+2 f (st)= f (s)+ f (t).

Proof. (1): Since(ts)(ts⊥) = 0, we have

f (t) = f (t(s+s⊥)) = f (ts+ ts⊥) = f (ts)+ f (ts⊥).

(2): Since(s⊥t)(st⊥) = 0, we have the following:

f (st)+2 f (st)= f (s⊥t+st⊥)+2 f (st)= f (s⊥t)+ f (st)+ f (st⊥)+ f (st)= f (t)+ f (s),

and the proof is complete.

A normalized measure in measure theory is a measureµ with µ(1) = 1 ([16, p. 65]).Now it is natural to give the following definition. In this andnext section, we are speciallyinterested in finitely additive normalized functions.

Definition 5. Let SandRbe semirings. We define a functionf : S−→ R to be normalizedif f (1S) = 1R.

Proposition 6. Let S and T be semirings and f: S−→ T a finitely additive function suchthat f(0) = 0. Then the following statements are equivalent:

(1) The function f is normalized.

6 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

(2) For any complemented element s∈ S, f(s)+ f (s⊥) = 1.

Proof. (1) ⇒ (2): Sinces∈ S is complemented,ss⊥ = 0. Obviously this implies thatf (s)+ f (s⊥) = f (s+s⊥) = f (1) = 1.(2) ⇒ (1): Since 0∈ comp(S), by assumptionf (0)+ f (0⊥) = 1. But f (0) = 0 and

0⊥ = 1. Thereforef (1) = 1.

Note that in Proposition 6, it is possible to assume thatT is a ring instead of assumingthat f (0) = 0, since cancellation law of addition in rings implies thatf (0) = 0 automati-cally (Refer to Remark 26).

Proposition 7. Let S be a zerosumfree semiring, R a ring, and f: S−→ R a finitelyadditive and normalized function. If s, t are complemented elements of S, then

f (s⊥t⊥) = 1− f (s)− f (t)+ f (st).

Proof. (5): Let Sbe a zerosumfree semiring ands, t ∈ comp(S). According to the proof ofProposition 5.6 in [11], we haves⊥t⊥ = (s⊔ t)⊥ ands⊔ t ∈ comp(S). So by Proposition4, we have: f (s⊥t⊥) = 1− f (s⊔ t) = 1− f (s+ s⊥t) = 1− f (s)− f (s⊥t) = 1− f (s)−f (t)+ f (st).

Now we give the following definition inspired from the concept of independent eventsin probability theory ([8, p. 115]).

Definition 8. Let S and R be pre-semirings andf : S−→ R a function. We defines1, . . . ,sn ∈ Sto be independent, iff (∏x∈X x) = ∏x∈X f (x), for any nonempty subsetX ofs1, . . . ,sn.

Theorem 9. Let S be a semiring, R a ring, and f: S−→ R a finitely additive and normal-ized function. Then the following statements for complemented elements s1,s2, . . . ,sn of Sare equivalent:

(1) The elements s1,s2, . . . ,sn ∈ S are independent,(2) The2n sets of elements of the form t1, t2, . . . , tn with ti = si or ti = s⊥i are indepen-

dent,(3) The2n equalities f(t1 · · · tn) = f (t1) · · · f (tn) with ti = si or ti = s⊥i hold.

Proof. (1)⇒ (2): Let t1, . . . , tm ⊆ s2, . . . ,sn. By Proposition 4, we have

f (t1 · · · tm) = f (t1 · · · tms1)+ f (t1 · · · tms⊥1 ).

But s1, t1, . . . , tm are independent. So we have

f (t1) · · · f (tm) = f (s1) f (t1) · · · f (tm)+ f (t1 · · · tms⊥1 ).

This implies that

f (t1 · · · tms⊥1 ) = f (t1) · · · f (tm)− f (s1) f (t1) · · · f (tm) =

(1− f (s1)) f (t1) · · · f (tm) = f (s⊥1 ) f (t1) · · · f (tm).

This means thats⊥1 ands2, . . . ,sn are independent. Now it is clear that by mathematicalinduction, we can prove thats⊥1 , . . . ,s

⊥i ,si+1, . . . ,sn are also independent.

(2)⇒ (3): Obvious.

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 7

(3)⇒ (1): Note that sincef (s)+ f (s⊥) = 1 for any complemented element ofs∈ S,

f (s1) f (s2) · · · f (sm) = f (s1) f (s2) · · · f (sm)( f (sm+1)+ f (s⊥m+1)) · · ·( f (sn)+ f (s⊥n )).

From the 2n equalitiesf (t1 · · · tn) = f (t1) · · · f (tn) with ti = si or ti = s⊥i , we get that

f (s1) f (s2) · · · f (sm) =

f (s1 · · ·smsm+1 · · ·sn)+ f (s1 · · ·sms⊥m+1 · · ·sn)+ · · ·+ f (s1 · · ·sms⊥m+1 · · ·s⊥n ).

But the elementss1 · · ·smsm+1 · · ·sn, s1 · · ·sms⊥m+1 · · ·sn, . . . ands1 · · ·sms⊥m+1 · · ·s⊥n are mu-

tually disjoint, so by using Proposition 3, we have:

f (s1) f (s2) · · · f (sm) =

f (s1 · · ·smsm+1 · · ·sn+s1 · · ·sms⊥m+1 · · ·sn+ · · ·+s1 · · ·sms⊥m+1 · · ·s⊥n ) =

f (s1 · · ·sm(sm+1+s⊥m+1) · · ·(sn+s⊥n )) = f (s1 · · ·sm).

The thing we wished to show.

Let us remind that a functiond : X×X −→ R+ ∪+∞ is defined to be semi-metric,if it satisfies all properties of a metric function except therequirement thatd(x,y) = 0impliesx= y. In other words, it is allowed that distinct points may have azero distance([5, Definition 1.4.4.]). We give a similar definition forG-semi-metric functions, whereG is an ordered Abelian group.

Definition 10. Let X be an arbitrary set and(G,+,≤) be an ordered Abelian group.(1) A function f : X −→ G is defined to be non-negative iff (x) ≥ 0 for anyx ∈ X.

If (X,+,0) is a monoid, then the functionf is defined to be positive iff is non-negative andf (x) = 0 iff x= 0, for anyx∈ X.

(2) A functiond : X×X −→ G defines aG-semi-metric onX, if d has the followingproperties:(a) Non-negativeness:d(x,y)≥ 0 andd(x,x) = 0, for anyx,y∈ X.(b) Symmetry:d(x,y) = d(y,x), for anyx,y∈ X.(c) Triangle inequality:d(x,z)≤ d(x,y)+d(y,z), for anyx,y,z∈ X.

Also d : X×X −→ G defines aG-metric onX, if d defines aG-semi-metric onX andd(x,y) = 0 implies thatx= y, for anyx,y∈ X (Positiveness).

Theorem 11. Let S be a zerosumfree semiring, G an ordered Abelian group, and f :S−→ G a non-negative and finitely additive function. Then the function d(s, t) = f (st)defines a G-semi-metric oncomp(S). Moreover, if the function f: S−→ G is positive,then d defines a G-metric oncomp(S).

Proof. Let s, t,u∈ comp(S). It is clear thatd(s, t)≥ 0 andd(s,s) = f (ss) = f (0) = 0.Also the symmetric property can be shown easily:d(s, t) = f (st) = f (ts) = d(t,s).Now we show the triangle inequality holds, that is,d(s, t)+d(t,u)≥ d(s,u).

d(s, t)+d(t,u)−d(s,u)= f (st)+ f (tu)− f (su)= f (s⊥t)+ f (st⊥)+ f (t⊥u)+ f (tu⊥)− f (s⊥u)− f (su⊥)= f (s⊥tu)+ f (s⊥tu⊥)+ f (st⊥u)+ f (st⊥u⊥)+ f (st⊥u)+ f (s⊥t⊥u)+ f (stu⊥)+ f (s⊥tu⊥)− f (s⊥tu)− f (s⊥t⊥u)− f (stu⊥)− f (st⊥u⊥)= 2[ f (st⊥u)+ f (s⊥tu⊥)]≥ 0.

8 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

Finally let the function f : S−→ G be positive and assume thatd(s, t) = 0. Thenf (s⊥t)+ f (st⊥) = 0. From this we get thatf (s⊥t) = f (st⊥) = 0, which in turn impliesthats⊥t = st⊥ = 0.

Now s= s·1= s(t⊥+ t) = st⊥+ st = st. In a similar way,t = ts and therefores= tand this completes the proof.

2. PROBABILITY FUNCTIONS ON SEMIRINGS

Let us remind that ifA is an algebra of sets over a fixed setX, by a probability function,it is meant a non-negative, normalized, and finitely additive function ([18, Chap. I]).Inspired from this, we define probability functions over semirings similarly. Note that byan ordered semiring, we mean a semiring(S,+, ·) with a partial order≤ on S such thatthe following statements hold:

(1) If s≤ t, thens+u≤ t+u for anys, t,u∈ S;(2) If s≤ t and 0≤ u, thensu≤ tu for anys, t,u∈ S.

For more on ordered semirings, one may refer to [10, Chap. 2].

Definition 12. Let S be a semiring andT an ordered semiring. We define a functionp : S−→ T to be a probability function, if the following properties are satisfied:

(1) p(s)≥ 0, for anys∈ S.(2) p(1) = 1.(3) If s, t ∈ Sandst= 0, thenp(s+ t) = p(s)+ p(t).

Example 13. Here are a couple of examples for probability functions:

(1) Let X be a nonempty finite or countable set. It is clear that the boolean algebra(P(X),∪,∩) has a semiring structure. Letpxx∈X be a stochastic sequence, thatis, px are non-negative real numbers with∑x px = 1. One may define a functionp : P(X)−→R with p(A) = ∑k∈A pk. It is a well-known fact in probability theorythat p defines a probability function on the semiringP(X) ([15]).

(2) Leta< b be two real numbers andIab= [a,b] the closed interval of real numbers.A setY ⊆ Iab is called to be a subinterval ofIab if Y is in one of the forms[c,d],[c,d), (c,d], or (c,d), wherea≤ c≤ d ≤ b. One may defineSto be the collectionof all possible finite unions of subintervals ofIab. It is, then, easy to check that(S,∪,∩) is a semiring. Now we definep : S−→ R in the following way:

(a) p(I) =d−cb−a

, if I is one of the subintervals[c,d], [c,d), (c,d], or (c,d) of Iab,

wherea≤ c≤ d ≤ b.(b) p(J) = p(I1)+ · · ·+ p(Im), whereJ = I1∪ · · ·∪ Im andI1, . . . , Im are distinct

subintervals ofIab such thatIα ∩ Iβ is either the empty set or a singleton forany 1≤ α < β ≤ m.

It is, then, easy to see thatp defines a probability function on the semiring(S,∪,∩) ([8]).

Proposition 14. Let S be a semiring, T an ordered ring, and p: S−→ T a probabilityfunction. If s∈ S is complemented, then the following statements hold:

(1) 0≤ p(s)≤ 1.

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 9

(2) p(ts)≤ p(t), for any t∈ S.Moreover, if S is a zerosumfree semiring and s, t ∈ S are both complemented, then we

have the following:(3) p(st)≥ p(s)+ p(t)−1.

Proof. (1): 0≤ p(s)≤ p(s)+ p(s⊥) = 1.(2): Sincep(t) = p(ts)+ p(ts⊥), we have thatp(t)− p(ts) = p(ts⊥)≥ 0, which means

that p(ts)≤ p(t).(3) By Proposition 7, we havep(s⊥t⊥) = 1− p(s)− p(t)+ p(st). Sincep(s⊥t⊥) ≥ 0,

p(st)≥ p(s)+ p(t)−1.

Let us remind that ifs∈ S is complemented, then⊔ is defined ass⊔ t = s+s⊥t. Nowwe prove the following theorem related to complemented elements of a semiring ([11,Chap. 5]).

Theorem 15. Let S be a zerosumfree semiring. Then the following statements are equiv-alent:

(1) If s, t ∈ comp(S), then s+ t ∈ comp(S), for any s, t ∈ S,(2) 1+1∈ comp(S),(3) If s, t ∈ comp(S), then s+ t = s⊔ t, for any s, t ∈ S,(4) (comp(S),+, ·) is a boolean algebra.

Proof. The assertion(1)⇔ (2)⇔ (3) holds by [11, Proposition 5.7].(3)⇒ (4): By Corollary 5.9 in [11], ifSis a zerosumfree semiring, then(comp(S),⊔, ·)

is a boolean algebra. But by assumptions+ t = s⊔ t, for anys, t ∈ comp(S). Therefore(comp(S),+, ·) is a boolean algebra.

(4)⇒ (3): Straightforward.

Theorem 16(Equality of Parallel Systems). Let S be a zerosumfree semiring such that1+1∈ comp(S), T a ring, and f: S−→ T a finitely additive and normalized function. Ifs1, . . . ,sn ∈ S are complemented and independent, then

f (n

∑i=1

si) = 1−n

∏i=1

(1− f (si)).

Proof. SinceS is a zerosumfree semiring such that 1+ 1 ∈ comp(S), by Theorem 15,(comp(S),+, ·) is a boolean algebra. Buts1, . . . ,sn ∈ S are complemented, so it is clearthat the complement of∑n

i=1si is ∏ni=1s⊥i and we haven

∑i=1

si +n

∏i=1

s⊥i = 1.

Since f is a finitely additive and normalized function, we have

f (n

∑i=1

si)+ f (n

∏i=1

s⊥i ) = 1.

On the other hand,s1, . . . ,sn ∈ Sare independent, so by Theorem 9,

f (n

∏i=1

s⊥i ) =n

∏i=1

f (s⊥i ).

10 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

But f (s⊥i ) = 1− f (si) and this finishes the proof.

Theorem 17 (Boole’s Inequality). Let S be a zerosumfree semiring such that1+ 1 ∈comp(S), T an ordered ring, and p: S−→ T a probability function. If s1, . . . ,sn ∈ S arecomplemented, then p(s1+ · · ·+sn)≤ p(s1)+ · · ·+ p(sn).

Proof. By Theorem 15,(comp(S),+, ·) is a boolean algebra. Lets1, . . .sn ∈ comp(S) anddefinet1 = s1 andtk = sks⊥1 · · ·s⊥k−1 for any 1< k≤ n. It is easy to check thatt1, . . . , tn aremutually disjoint elements of comp(S) andt1+ · · ·+ tn = s1+ · · ·+sn. But by Proposition14, p(tk)≤ p(sk). So

p(s1+ · · ·+sn) = p(t1+ · · ·+ tn) = p(t1)+ · · ·+ p(tn)≤ p(s1)+ · · ·+ p(sn),

and the proof is complete.

Definition 18. Let Sbe a semiring,T an ordered semiring, andp : S−→ T a probabilityfunction. If for t ∈ S, p(t) is an invertible element of the semiringT, the “conditionalprobability ofs givent”, denoted byp(s|t), is defined to bep(s|t) = p(st)p(t)−1.

The proof of the following proposition is straightforward.

Proposition 19. Let S be a semiring, T an ordered semiring, and p: S−→ T a probabilityfunction. If for the elements s, t ∈ S, p(s) and p(t) are multiplicatively invertible elementsof the semiring T , then the following statements are equivalent:

(1) p(s|t) = p(s),(2) p(t|s) = p(t),(3) The elements s and t are independent, i.e., p(st) = p(s)p(t).

Proposition 20. Let S be a semiring, T an ordered semiring, and p: S−→ T a proba-bility function. If for an element t∈ S, p(t) is a multiplicatively invertible element of thesemiring T , then pt : S−→ T defined by pt(s) = p(s|t) is a probability function, i.e., thefollowing statements hold:

(1) pt(s)≥ 0 for any s∈ S.(2) pt(1) = 1.(3) If s1s2 = 0, for s1,s2 ∈ S then pt(s1+s2) = pt(s1)+ pt(s2).

Proof. For example consider thatpt(1) = p(1|t) = p(1 · t)p(t)−1 = 1.

Proposition 21 (Law of Total Probability). Let S be a semiring, T an ordered semiring,and p: S−→ T a probability function. If t1, . . . , tn are elements of S such that tit j = 0 forany1≤ i < j ≤ n, t1+ · · ·+ tn = 1, and p(ti) is an invertible element of the semiring Tfor any1≤ i ≤ n, then p(s) = p(s|t1)p(t1)+ · · ·+ p(s|tn)p(tn).

Proof. It is clear thats= st1+ · · ·+ stn and(sti)(stj) = 0 for any 1≤ i < j ≤ n. So byProposition 3, we have thatp(s) = p(st1)+ · · ·+ p(stn). But p(sti) = p(s|ti)p(ti) for any1 ≤ i ≤ n. So p(s) = p(s|t1)p(t1)+ · · ·+ p(s|tn)p(tn), the thing it was required to haveshown.

Corollary 22 (Law of Total Probability). Let S be a semiring, T an ordered semiring,and p: S−→ T a probability function. If t∈ S is a complemented element of S suchthat p(t) and p(t⊥) are invertible elements of the semiring T , then p(s) = p(s|t)p(t)+p(s|t⊥)p(t⊥).

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 11

Proposition 23. Let S be a semiring, T an ordered semiring, and p: S−→ T a probabilityfunction. If for the elements s∈ S, t∈ comp(S), p(s), p(t), and p(t⊥) are multiplicativelyinvertible elements of the semiring T , then the following statements are equivalent:

(1) p(s|t) = p(s|t⊥),(2) The elements s and t are independent.

Proof. (1)⇒ (2): By the Law of Total Probability, we have

p(s) = p(s|t)p(t)+ p(s|t⊥)p(t⊥) =

p(s|t)p(t)+ p(s|t)p(t⊥) = p(s|t)(p(t)+ p(t⊥)) = p(s|t).

(2)⇒ (1): Since the elementssandt are independent, by Proposition 19, we have thatp(s) = p(s|t) andp(s) = p(s|t⊥).

One of the purposes of Bayes’ formula in probability theory is to computeP(B|A)in terms ofP(A|B). We prove a semiring version of Bayes’ Theorem for probabilityfunctions as follows:

Theorem 24 (Bayes’ Theorem). Let S be a semiring, K an ordered semifield, and p:S−→ K a probability function. If t1, . . . , tn are elements of S such that tit j = 0 for any1≤ i < j ≤ n, t1+ · · ·+ tn = 1, p(ti)> 0 for any1≤ i ≤ n, and s∈ S such that p(s)> 0,then

p(tk|s) =p(s|tk)p(tk)

p(s|t1)p(t1)+ · · ·+ p(s|tn)p(tn).

Proof. By definition, we know thatp(tk|s) =p(tks)p(s)

. But p(tks) = p(stk) = p(s|tk)p(tk).

On the other hand, by the Law of Total Probability (Proposition 21), we have

p(s) = p(s|t1)p(t1)+ · · ·+ p(s|tn)p(tn).

Therefore

p(tk|s) =p(s|tk)p(tk)

p(s|t1)p(t1)+ · · ·+ p(s|tn)p(tn),

and the proof is complete.

3. MODULAR FUNCTIONS ON PRE-SEMIRINGS

Modular functions appear in different branches of mathematics. A modular function isusually a real-valued functionmover some objects that two operations “+ ” and “ · ” havemeaning for those objects and ifs, t are of those objects, we have the following equality:

m(s+ t)+m(st) = m(s)+m(t).

In this section, first we define modular functions on pre-semirings and examine modularfunctions over different celebrated pre-semirings and show that modular functions overthese pre-semirings are almost constant, i.e., they are constant over their domains excepta finite number of elements in them. We also prove that there are many modular functionsover the semiring(Id(D),+, ·), whereD is a Dedekind domain. After that we give a cou-ple of nontrivial examples for modular functions in Remark 26 and Example 45. Then weprove Poincare’s Inclusion-Exclusion Theorem for modular functions over pre-semirings.

12 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

We also prove that over complemented elements of a semiring,finitely additive functionsare modular.

Definition 25. Let S be a pre-semiring andT a commutative semigroup. We define afunctionm : S−→ T to be modular ifm(s+ t)+m(st) = m(s)+m(t) for all s, t ∈ S.

Remark 26. (1) If S is a pre-semiring such that 0 and 1 are the additive and multi-plicative neutral elements ofS respectively andT is a commutative and cancella-tive monoid, andf : S−→ T is a modular function, then by choosingt = 1, fromthe following modular equality

f (s+ t)+ f (st) = f (s)+ f (t),

we get thatf (s+1) = f (1). This means thatf is constant on the basic sub-pre-semiring1, 1+1, 1+1+1,. . . of S.

(2) Let S be a hemiring,T a commutative monoid andm : S−→ T a function. It isclear that ifm is modular andm(0) = 0, thenm is finitely additive. The questionarises when the inverse is correct. Note that ifT is a cancellative monoid andfis finitely additive thenf (0) = 0 and the proof is as follows: Since 0·0= 0, thenf (0+0) = f (0)+ f (0) and sinceT is cancellative,f (0) = 0. In Theorem 48, weshow that in boolean algebras modularity of a functionf is caused by its finitelyadditive property.

(3) Let Sbe a totally ordered set. It is easy to check that(S,⊕,⊙) is a pre-semiring(known as bottleneck pre-semiring), wherea⊕b=maxa,b anda⊙b=mina,bfor all a,b∈ S. Now let (T,+) be a commutative semigroup. Obviously for anyfunctionm : S−→ T, we have

m(x⊕y)+m(x⊙y) = m(x)+m(y).

Now we start examining modular functions over different pre-semirings. LetN0 denotethe set0,1,2, . . . ,k,k+1, . . ., i.e., the set of all nonnegative integers. One may defineaddition and multiplication overS= N0 ∪ −∞ as “max” and “+ ” respectively byconsidering that−∞ < n < n+ 1 for all n ∈ N0 and−∞+ s= −∞ for all s∈ S. It iseasily checked that(N0∪−∞,max,+,−∞,0) is a semiring and in some references, itis known as the Arctic semiring.

Proposition 27. Let f : N0∪−∞ −→ G be a function from the Arctic semiring(N0∪−∞,max,+,−∞,0) to the Abelian group G. Then f is a modular function iff it is aconstant function overN0.

Proof. ⇒: By modularity of the functionf , we have:

f (maxx,y)+ f (x+y) = f (x)+ f (y).

If we suppose thatx≥ 0 andy= 0, we get thatf (x)+ f (x) = f (x)+ f (0) and this meansthat f is constant overN0.

⇐: On the other hand, iff is constant overN0, then f is modular over the Arcticsemiring.

Let us recall that the semiring(Tk,max,mina+b,k,−∞,0), where 1≤ k andTk =−∞,0,1, . . . ,k is called the Truncation semiring.

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 13

Proposition 28. Let G be an Abelian group. Then f: Tk −→G is modular iff f is constantover Tk−−∞, where by Tk, we mean the Truncation semiring.

Proof. ⇒: Let Tk be the Truncation semiring,G an Abelian group, andf : Tk −→ G amodular function. So by definition, we have

f (maxx,y)+ f (minx+y,k) = f (x)+ f (y),

for all x,y∈ Tk and if we lety= k, we have the following:

f (k)+ f (minx+k,k) = f (x)+ f (k).

This implies thatf (minx+k,k)= f (x). But minx+k,k= k, if x≥ 0. So f is constantoverTk−−∞.

⇐: Straightforward.

Another important family of finite semirings is mentioned in[11, Example 1.8] andwe bring it here for the convenience of the reader. Let us recall that if i < n are positiveintegers. The addition and multiplication of the finite semiring

(B(n, i) = 0,1, . . . ,n−1,⊕,⊙,0,1)

is defined as follows:The addition⊕ is defined asx⊕y= x+y if x+y≤ n−1 andx⊕y= l if x+y> n−1

wherel is the unique number satisfying the conditionsi ≤ l ≤ n−1 andl ≡ mod(n−i) x+yand multiplication⊙ is defined similarly. Now we prove the following interestingresult:

Proposition 29. Let G be an Abelian group, i< n be positive integers. Then a functionf : B(n, i)−→ G is modular iff it is constant over B(n, i)−0.

Proof. ⇒: Let y= 1. It is clear that ifx< n−2, thenx+y, xy< n−1. Sox⊕1= x+1,andx⊙1= x1= x.

Puttingy= 1 andx< n−2 in the modular equation, we have

f (x+1)+ f (x) = f (x)+ f (1),

which impliesf (x+1) = f (1),

for x = 0,1, . . . ,n− 2. Thus f (x) = f (1) for x = 1,2, . . . ,n− 1. This means thatf isconstant overB(n, i)−0.

⇐: Obvious.

Proposition 30. Let (G,+,≤) be a totally ordered Abelian group and T a commutativeand cancellative monoid. Then(G,min,+) is a pre-semirng and the only modular func-tion, m: G−→ T , over the pre-semiring G is a constant function.

Proof. It is straightforward to check that(G,min,+) is a pre-semiring. Note that byassumption, the following equality holds for allx,y∈ G:

m(minx,y)+m(x+y) = m(x)+m(y).

Now let x ≥ 0. It is, then, clear thatx ≥ −x and minx,−x = −x. So by modularityof m over the pre-semiringG, we havem(−x) + m(0) = m(x) +m(−x) and thereforem(x) = m(0). On the other hand, if we letx< 0, then minx,0= x and it is clear that the

14 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

modularity ofm implies thatm(x)+m(x) = m(x)+m(0) and again we havem(x) =m(0).This means that for anyx∈ G, we havem(x) = m(0) andm is a constant function and theproof is complete.

Proposition 31. Let S be a pre-semiring such that0 and1 are the additive and multiplica-tive neutral elements of S respectively. If1 has an additive inverse, T is a commutativeand cancellative monoid, and a function f: S−→ T is modular, then f is a constantfunction.

Proof. Let x∈ Sbe arbitrary and sety= 1. So by modularity, we have:

f (x+1)+ f (x·1) = f (x)+ f (1).

SinceT is a cancellative monoid, we havef (x+1) = f (1). Now since 1 has additiveinverse, we can replacex by x−1 and we havef (x) = f (1), which means that the functionf is constant onSand this finishes the proof.

Corollary 32. If R is a commutative ring with identity and T a commutative and can-cellative monoid, and a function f: S−→ T is modular, then f is a constant function.

Remark 33. Note that if the multiplicative neutral element 1 of a semiring R has anadditive inverse, i.e., 1+(−1) = 0, then by distributive law, we haver +(−1)r = 0 foranyr ∈Rand this means thatR is a ring. Therefore, in order to show that Proposition 31 isreally a generalization of Corollary 32, it is important to give an example of a pre-semiringSsuch that 0 and 1 are the additive and multiplicative neutralelements ofS respectivelyand 1 has an additive inverse, whileS is not a semiring. In fact, the interesting examplegiven in [13, Example 5.3.1] fulfills our purpose and inspires us to give the followingresult:

Proposition 34. Let (H,+,0,−,≤) be a nontrivial totally ordered Abelian group andimagine E is the set of all closed intervals[a,b]⊆ H such that a≤ 0 and b≥ 0. Define⊕and⊗ on E by

[a1,b1]⊕ [a2,b2] = [mina1,a2,maxa2,b2],

[a1,b1]⊗ [a2,b2] = [a1+a2,a2+b2],

for all a1,a2 ≤ 0 and b1,b2 ≥ 0. Then the following statements hold:

(1) (E,⊕,⊗) is a pre-semiring and[0,0] is the neutral element for the both operations⊕ and⊗.

(2) The neural element for multiplication⊗ in E has additive inverse.(3) The neutral element[0,0] of addition⊕ is not an absorbing element of E and so

E is not a semiring.(4) If G is an Abelian group, then f: E −→ G is modular iff f is constant.

Proof. (1) and(2): Straightforward.(3): [a,b]⊗ [0,0] = [a,b] for all [a,b] ∈ E.(4): This holds by Proposition 31.

Proposition 35. Let G be an Abelian group and R= (R×R)∪−∞. Define operationsof R as follows:

(1) (a,b)⊕ (a′,b′) = (maxa,a′,maxb,b′) for all a,b,a′,b′ ∈ R;

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 15

(2) (a,b)⊙ (a′,b′) = (a+a′,b+b′) for all a,b,a′,b′ ∈ R;(3) (−∞)⊕ r = r ⊕ (−∞) = r for all r ∈ R;(4) (−∞)⊙ r = r ⊙ (−∞) =−∞ for all r ∈ R.

Then(R,⊕,⊙) is a semiring and any modular function f: R−→ G is constant.

Proof. According to [11, Example 1.25],R is a semiring and it is clear that1 = (0,0) isthe identity element of the multiplication ofR. Let x,y∈ R. By modularity of f , we have

f ((x,y)⊕ (0,0))+ f ((x,y)⊙ (0,0)) = f (x,y)+ f (0,0),

which means thatf (maxx,0,maxy,0) = f (0,0),

and clearly this implies that ifx,y≥ 0, then

f (x,y) = (0,0).

On the other hand, since(x,y)⊕ (−x,−y) = (|x|, |y|) and (x,y)⊙ (−x,−y) = (0,0),modularity of f implies that

f (|x|, |y|)+ f (0,0) = f (x,y)+ f (−x,−y).

Therefore if we letx,y≥ 0, we have

f (−x,−y) = f (0,0).

Now let x,y ≥ 0. Then it is clear that(x,y)⊕ (x,−y) = (x,y) and (x,y)⊙ (x,−y) =(2x,0) and again by modularity off , we have

f (x,y)+ f (2x,0) = f (x,y)+ f (x,−y).

But f (2x,0) = f (0,0). So f (x,−y) = f (0,0). Similarly one can see thatf (−x,y) =f (0,0) and the proof is complete.

Proposition 36. Let (G,+) be an Abelian group. Then the following statements for afunction f : N0∪+∞ −→ G are equivalent:

(1) The function f:N0∪+∞ −→ G is a modular function from the tropical algebra(N0∪+∞,min,+) to the Abelian group G,

(2) The function f is constant overN.

Proof. (1)⇒ (2): Let y= 1 andx∈ N and rewrite the modular equality for the tropicalalgebra:

f (minx,1)+ f (x+1) = f (x)+ f (1).

Sincex∈ N, minx,1= 1, we havef (minx,1) = f (1), which gives

f (1)+ f (x+1) = f (x)+ f (1).

Cancelingf (1) from both sides, we havef (x+1) = f (x) for all x∈ N, which meansf isconstant overN.

(2)⇒ (1): Since f is constant overN, we may choose constantsk,c, l ∈ G such that

f (x) =

k if x= 0

c if x∈ N

l if x=+∞

16 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

It is straightforward to see that the functionf satisfies the modular equality and this fin-ishes the proof.

Theorem 37. Let G be an Abelian group and(K,+, ·,≤) a totally ordered positive semi-field with this property that for y≥ 1, there is an x≥ 0 such that y= x+1 for all x,y∈ K.Then the following statements for the function f: K −→ G are equivalent:

(1) The function f is modular,(2) The function f is constant over the set of positive elements X= x> 0 : x∈ K of

K.

Proof. (2)⇒ (1): Straightforward.(1)⇒ (2): Since f is a modular function, it satisfies the following equation:

f (x+y)+ f (xy) = f (x)+ f (y).

Let y= 1 and rewrite the functional equation:

f (x+1)+ f (x) = f (x)+ f (1),

which implies thatf (x+1) = f (1) for all x≥ 0. Since for ally≥ 1, there is anx≥ 0 suchthaty= x+1, we have that

f (x) = f (1) ∀x≥ 1. (1)

Now replacey=1x

in the original equation to obtain

f

(

x+1x

)

+ f (1) = f (x)+ f

(

1x

)

. (2)

Assume 0< x≤ 1, then1x≥ 1 and from equation (1), we havef

(

1x

)

= f (1). Replacing

this in equation (2), we getf

(

x+1x

)

+ f (1) = f (x)+ f (1). Removingf (1) from both

sides, we have

f

(

x+1x

)

= f (x) ∀ 0< x≤ 1.

Sincex+1x≥ 1, we havef

(

x+1x

)

= f (1). Therefore, f (x) = f (1) for all 0 < x ≤

1. Finally, f (x) = f (1) = c for some constantc ∈ T and all x ∈ X and the proof iscomplete.

Example 38. In order to show the importance of Theorem 37, let us give a couple of niceexamples for semifields satisfying the conditions of Theorem 37.

(1) It is clear that(R≥0,+, ·,≤) and(Q≥0,+, ·,≤) are totally ordered positive semi-fields with this property that fory≥ 1, there is anx≥ 0 such thaty= x+1 for allx,y.

(2) It is easy to check that if(K,+, ·,≤) is a totally ordered positive semifield, then thesemifield(K,max, ·,≤) is a totally ordered positive semifield with this propertythat fory≥ 1, there is anx≥ 0 such thaty= maxx,1 for all x,y∈ K.

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 17

(3) If (G,+,≤) is a totally ordered Abelian group, then(G∪−∞,max,+,≤), knownasG-max-plus algebra, is a totally ordered positive semifield with this propertythat for ally≥ 0, there is anx≥−∞ such thaty= maxx,0.

(4) For nonnegative real numbersa,b, definea⊕h b = (a1/h+ b1/h)h, whereh is afixed positive real number. It is easy to see thatSh = (R≥0,⊕h, ·) is a totallyordered positive semifield with this property that fory≥ 1, there is anx≥ 0 suchthaty= x⊕h 1 for all x,y. For more on the semiringSh, one can refer to [21].

Remark 39. Let N be the set of natural numbers (positive integers) anda,b∈ N. Thenit is easy to check that if lcma,b and gcda,b denote the least common multiple andgreatest common divisor of the natural numbersa,b, then(N, lcm,gcd) is a pre-semiring([13, Example 6.5.8]) and lcma,b ·gcda,b= a ·b ([20, Theorem 6.4]). This leads usto define a nontrivial modular function as follows:

Proposition 40. Define operations⊕ and ⊙ on N as a⊕ b = lcma,b and a⊙ b =gcda,b. Then the function f: N−→ R defined as f(x) = logx is modular, i.e.,

f (a⊕b)+ f (a⊙b) = f (a)+ f (b).

Let us recall that a semiringS is called simple ifs+1= 1 for anys∈ S. First we provethe following lemma for modular functions over simple semirings. After that we are ableto give another interesting nontrivial modular function.

Lemma 41. Let S be a simple semiring and G be an Abelian group and f: S−→ G be amodular function. Then f(xmyn) = f (xy) for any x,y∈ S and m,n∈ N.

Proof. Let x,y∈ Sand apply modular equality for the elementsy,yx. So we have

f (y+yx)+ f (y·yx) = f (y)+ f (yx).

But y+ yx= y(x+1) = y. So we havef (xy2) = f (xy). Now by induction onm,n, it iseasy to prove thatf (xmyn) = f (xy).

Theorem 42. Let (G,+) be an Abelian group and D a Dedekind domain. Then the fol-lowing statements hold:

(1) The semiring(Id(D),+, ·) is a simple semidomain.(2) If n ≥ 2 andp1, . . . ,pn are distinct maximal ideals of S, thenp1+p2 · · ·pn = D.(3) A modular function f: Id(D) −→ G can be characterized by the values of f at

(0), D and all maximal ideals of D.

Proof. Let D be a Dedekind domain anda a nonzero and proper ideal ofD. Thena =p

α11 p

α22 · · ·pαk

k , wherepi are maximal ideals ofD, andαi > 0,k≥ 2 are integers. Then byLemma 41, we have

f (a) = f (pα11 p

α22 · · ·p

αkk ) = f (p1p2 · · ·pk).

Now sincepi are maximal, modularity off gives the following equality:

f (D)+ f (p1p2 · · ·pk) = f (p1)+ f (p2p3 · · ·pk).

18 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

Applying modular property for the idealsp2 andp3p4 · · ·pk, we get

2 f (D)+ f (p1p2 · · ·pk) = f (p1)+( f (D)+ f (p2p3 · · ·pk))

= f (p1)+ f (p2)+ f (p3 · · ·pk).

Continuing this process, we can write

f (a) = f (p1p2 · · ·pk) = f (p1)+ f (p2)+ · · ·+ f (pk)− (k−1) f (D). (3)

Our claim is that if the values off at (0), D, and all maximal ideals ofD are given, wecan definef for an arbitrary nonzero proper ideala= p

α11 p

α22 · · ·pαk

k (αi > 0 andk≥ 1) ofD as follows:

f (a) = f (p1)+ f (p2)+ · · ·+ f (pk)− (k−1) f (D). (4)

and thenf becomes modular.In order to show the trueness of our claim, we distinguish four cases for the following

formula:

f (a+b)+ f (a ·b) = f (a)+ f (b). (5)

(1) If one the idealsa andb is the zero ideal, then it is straightforward that equality(5) holds.

(2) Also if one of the idealsa andb is the whole domainD, again it is straightforwardthat equality (5) holds.

(3) If the idealsa = pα11 p

α22 · · ·pαk

k andb = qβ11 q

β22 · · ·q

βll have no common maximal

factor in their decompositions, then the idealsa andb are comaximal, i.e.,

a+b= D,

and we have the following equalities:

f (a+b) = f (D),

f (a) = f (p1)+ f (p2)+ · · ·+ f (pk)− (k−1) f (D),

f (b) = f (q1)+ f (q2)+ · · ·+ f (ql )− (l −1) f (D),

f (ab) = f (p1)+ f (p2)+ · · ·+ f (pk)+ f (q1)+ f (q2)+ · · ·+ f (ql )− (k+ l −1) f (D),

which show that equality (5) holds in this case as well.(4) If the idealsa = p

α11 p

α22 · · ·pαk

k andb = qβ11 q

β22 · · ·q

βll have common maximal fac-

tors in their decompositions and those common maximal factors are the idealsr1,r2, . . . ,rt , thena+b= r

γ11 r

γ22 · · ·r

γtt and the following equalities satisfy:

f (a+b) = f (r1)+ f (r2)+ · · ·+ f (rt)− (t−1) f (D),

f (a) = f (p1)+ f (p2)+ · · ·+ f (pk)− (k−1) f (D),

f (b) = f (q1)+ f (q2)+ · · ·+ f (ql )− (l −1) f (D),

f (ab) = [k

∑i=1

f (pi)+l

∑j=1

f (q j)−t

∑s=1

f (rt)]− (k+ l − t −1) f (D),

and the proof is complete.

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 19

Corollary 43. Let (G,+) be an Abelian group and f be a function fromN0 into G withthe following property:

f (lcma,b)+ f (ab) = f (a)+ f (b).

Then f can be characterized by the values of f at numbers0, 1, and all prime numbers ofN.

Proof. The semiring(N0, lcm, ·) is isomorph to the semiring(Id(Z),+, ·) and Z is aDedekind domain.

Example 44. Let D be a Dedekind domain. Define a functionf : D −→ Z as follows:(1) f ((0)) = f (D) = 0.(2) If a=m

α11 · · ·m

αkk , wherem1, . . . ,mk are distinct maximal ideals ofD, then f (a) =

k.By Theorem 42,f is modular and one can interpretf as a function that counts the

number of maximal factors in the decomposition of an arbitrary ideal ofD.

Now we go further to give other important examples for nontrivial modular functionsin different branches of mathematics:

Example 45.Some examples for modular functions in different branches of mathematics:(1) Let Ω be a finite set and 2Ω the set of all subsets ofΩ. The size function| · | :

2Ω −→N0 is obviously a modular function. On the other hand, according to clas-sical probability, the probability of an eventA⊆ Ω is defined byP(A) = |A|/|Ω|.So P(A∪B)+P(A∩B) = P(A)+P(B) for any A,B ⊆ Ω. This means thatP :2Ω −→ [0,+∞) is also a modular function ([24]). It is clear that(2Ω,∪,∩, /0,Ω,′ )is a boolean algebra and therefore a semiring.

(2) LetV be a finite dimensional inner-product vector space. If we denote the set ofall subspaces ofV by Sub(V), then the function dim : Sub(V) −→ N0 is a mod-ular function, since dim(W1+W2) +dim(W1∩W2) = dim(W1)+ dim(W2) ([12,Proposition 5.16]). It is clear that(Sub(V),+,∩,(0),V,⊥ ) is a boolean algebraand therefore a semiring.

(3) Let M be anR-module of finite length and letK andN be R-submodules ofM.Thenc(K+N)+c(K∩N) = c(K)+c(N), wherec(L) is the composition length ofa module ([2, Corollary 11.5]). Now if we considerM to be a distributive module([6]) of finite length, then Sub(M) is a bounded distributive lattice and therefore asemiring. For an example of a distributive module of finite length, refer to [7].

(4) LetD be an integral domain. ThenD is a Prufer domain iff(I +J)(I ∩J) = IJ forall idealsI ,J of D. On the other hand, ifD is a Prufer domain, then(Id(D),+,∩)is a semiring ([19, Theorem 6.6]), where by Id(D), we mean the set of all idealsof D. Now it is clear that the functionf from the semiring(Id(D),+,∩) to thecommutative semigroup(Id(D), ·) defined byf (I) = I is a modular function.

(5) Let (G,+) be a partially-ordered Abelian group. It is easy to see thata∨b existsiff a∧b exists inG and in this casea∨b+a∧b= a+b ([9, Theorem 15.2]) andtherefore the functionf : (G,∨,∧) −→ (G,+) defined byf (x) = x is a modularfunction. Now if (G,∨,∧) is also a distributive lattice,f is a modular functionover the pre-semiringG.

20 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

(6) Let L be a bounded distributive lattice of finite length. Then the function height :L −→N0 is a modular function, since height(a∨b)+height(a∧b) = height(a)+height(b) for all a,b∈ L ([14, Corollary 376]).

(7) Consider the Peano-Jordan contentc (volume, area or length) over an EuclidianspaceEn. DefineFC(En) to be the set of all subsetsA⊆ En such thatc(A) < ∞.Then (FC(En),∪,∩, /0) is a hemiring andc is a modular function overFC(En)([23, Theorem 22]).

Now we give a pre-semiring version of the so-called inclusion-exclusion theorem inprobability theory. Note that the set theoretic version of the following theorem is due toPoincare ([4, Exercise 1.12.52.]). It is also a good point to mention that one can see thenumber theory version of inclusion-exclusion theorem in Theorems 7.3 and 7.4 in [20].Also for multiplicative ideal theory version of this theorem refer to the recent paper [1] byD. D. Anderson et al. on GCD and LCM-like identities for ideals in commutative rings.

Theorem 46(Inclusion-Exclusion Theorem). Let S be a multiplicatively idempotent pre-semiring and T a commutative semigroup. If m: S−→ T is a modular function, then forany elements s1, . . . ,sn ∈ S the following equality holds:

m(n

∑i=1

si)+∑i< j

m(sisj)+ ∑i< j<k<l

m(sisjsksl )+ · · ·=

n

∑i=1

m(si)+ ∑i< j<k

m(sisjsk)+ · · · (Poincare’s Formula),

where the number of multiplicative factors in the sums of theboth sides of the equality isat most n.

Proof. The proof is by mathematical induction. Sincem is modular, the Poincare’s For-mula holds fork= 2. Now let Poincare’s Formula hold fork= n and takes1, . . . ,sn,sn+1∈S. Sincem is modular, we have

m(n

∑i=1

si +sn+1)+m((n

∑i=1

si) ·sn+1) =n

∑i=1

m(si)+m(sn+1).

Now by applying Poincare’s Formula for then elementss1sn+1, . . . ,snsn+1, we have

m(n

∑i=1

sisn+1)+∑i< j

m(sisn+1sjsn+1)+ ∑i< j<k<l

m(sisn+1sjsn+1sksn+1slsn+1)+ · · ·=

n

∑i=1

m(sisn+1)+ ∑i< j<k

m(sisn+1sjsn+1sksn+1)+ · · · .

So by considering this point thatS is multiplicatively idempotent, the above equality canbe written as follows:

m(n

∑i=1

sisn+1)+∑i< j

m(sisjsn+1)+ ∑i< j<k<l

m(sisjsksl sn+1)+ · · ·=

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 21

n

∑i=1

m(sisn+1)+ ∑i< j<k

m(sisjsksn+1)+ · · · .

Finally, by addingm(∑ni=1si + sn+1) to the both sides of the recent equality, we get the

Poincare’s Formula for then+1 elementss1, . . . ,sn+1 and the proof is complete.

Proposition 47. Let S be a multiplicatively idempotent pre-semiring, R a ring, and f :S−→ R a modular function. For any n> 1, if s1, . . . ,sn ∈ S are independent, then s1+· · ·+sn−1 and sn are also independent.

Proof. SinceS is multiplicatively idempotent, by Theorem 46, we have:

f ((s1+ · · ·+sn−1)sn) = f (s1sn+ · · ·+sn−1sn) =

n−1

∑i=1

f (sisn)− ∑1≤i< j<n

f (sisjsn)+ ∑1≤i< j<k<n

f (sisjsksn)−·· ·+(−1)n f (s1s2 · · ·sn) =

[n−1

∑i=1

f (si)− ∑1≤i< j<n

f (sisj)+ ∑1≤i< j<k<n

f (sisjsk)−·· ·+(−1)n f (s1s2 · · ·sn−1)] f (sn) =

f (s1+ · · ·+sn−1) f (sn),

and the proof is complete.

In the following theorem and its corollaries, we show when a finitely additive functionbecomes modular:

Theorem 48. Let S be a zerosumfree semiring such that1+1∈ comp(S), T a commuta-tive semigroup, and f: S−→ T a finitely additive function. Then f|comp(S): comp(S)−→T is modular.

Proof. Let s, t ∈ comp(S). Therefore by Proposition 4 and Theorem 15, we havef (s+t) = f (s⊔ t) = f (s+s⊥t) = f (s)+ f (s⊥t). Finally, by Proposition 4,f (s+ t)+ f (st) =f (s)+ f (s⊥t)+ f (st) = f (s)+ f (t) and the proof is complete.

By Theorem 15, it is clear that if each element of a semiringS is complemented, thenS is a boolean algebra. Therefore it is obvious that we have thefollowing result:

Corollary 49. Let S be a boolean algebra and T a commutative and cancellative monoid.Then the following statements for a function f: S−→ T are equivalent:

(1) f is finitely additive,(2) f is modular and f(0) = 0.

Note that ifL is a Stone algebra, then Skel(L) is a boolean algebra ([14, Theorem 214]).Therefore we have the following:

Corollary 50. Let L be a Stone algebra and T a commutative and cancelation monoid. Iff : L −→ T is finitely additive, then f|Skel(S): Skel(S)−→ T is modular.

22 PEYMAN NASEHPOUR AND AMIR HOSSEIN PARVARDI

Proposition 51. Let S be a zerosumfree semiring such that1+1 ∈ comp(S), T a com-mutative semigroup, and f: S−→ T a finitely additive function. For any s1, . . . ,sn ∈comp(S), we have the following:

m(n

∑i=1

si)+∑i< j

m(sisj)+ ∑i< j<k<l

m(sisjsksl )+ · · ·=

n

∑i=1

m(si)+ ∑i< j<k

m(sisjsk)+ · · · (Poincare’s Formula),

where the number of multiplicative factors in the sums of theboth sides of the equality isat most n.

Proof. Let S be a zerosumfree semiring such that 1+1∈ comp(S). So by Theorem 15,comp(S) is a boolean algebra. This means that comp(S) is a multiplicatively idempotentsemiring. On the other hand, by Theorem 48,m |comp(S): comp(S) −→ T is a modularfunction. Hence, by Theorem 46, Poincare’s Formula holds for complemented elementsof Sand this completes the proof.

ACKNOWLEDGMENT

The authors are supported in part by the University of Tehranand wish to thank SepantaAsadi for telling them a point related to Proposition 31.

REFERENCES

[1] D. D. Anderson, S. Izumi, Y. Ohno, and M. Ozaki,GCD and LCM-like identities for ideals in com-mutative rings, J. Algebra Appl.,15 (2016), no. 01, (12 pages).

[2] F. W. Anderson and K. R. Fuller,Rings and Categories of Modules, 2nd edn., Springer, New York,1992.

[3] P. Billingsley,Probability and Measure, 3rd edn., New York, Wiley-Interscience Publication, 1995.[4] V. I. Bogachev,Measure Theory, Vol. I, Springer, Berlin, 2007.[5] D. Burago, Y. Burago and S. Ivanov,A Course in Metric Geometry, Graduate Studies in Mathematics

33, Amer. Math. Soc., Providence, RI, 2001.[6] V. Camillo, Distributive modules, J. Algebra,36 (1975), no. 1, 16–25.[7] V. Dlab and C. M. Ringel,On a class of balanced nonuniserial rings, Math. Ann.,195(1972), 279–

281.[8] S. Ghahramani,Fundamentals of Probability with Stochastic Processes, 3rd edn., Prentice Hall, Upper

Saddle River, 2005.[9] R. Gilmer,Multiplicative Ideal Theory, Marcel Dekker, New York, 1972.

[10] J. S. Golan,Semirings and Affine Equations over Them: Theory and Applications, Kluwer, Dordrecht,2003.

[11] J. S. Golan,Semirings and Their Applications, Kluwer Academic Publishers, Dordrecht, 1999.[12] J. S. Golan,The Linear Algebra a Beginning Graduate Student Ought to Know, 2nd edn., Springer,

Dordrecht, 2007.[13] M. Gondran, M. Minoux,Graphs, Dioids and Semirings, Springer, New York, 2008.[14] G. Gratzer,Lattice Theory: Foundation, Springer, Basel, 2011.[15] A. Grigoryan,Probability Theory, Winter Semester 2010/2011 Lecture Notes, Preprint, Bielefeld,

2010.[16] P. R. Halmos,Lecture Notes on Boolean Algebras, D. Van Nostrand, Princeton, 1963.[17] U. Hebisch and H. J. Weinert,Semirings, Algebraic Theory and Applications in Computer Science,

World Scientific, Singapore, 1998.

FINITELY ADDITIVE, MODULAR AND PROBABILITY FUNCTIONS ON PRE-SEMIRINGS 23

[18] A. N. Kolmogorov,Foundations of the Theory of Probability, Chelsea Pub. Co., New York, 1956.[19] M. D. Larsen and P. J. McCarthy,Multiplicative Theory of Ideals, Academic Press, New York, 1971.[20] H. Loo-Keng,Introduction to Number Theory, Springer, Berlin, 1982.[21] V. Maslov, New superposition principle for optimization problems, Sem. sur les Equations avec

Derivees Partielles 1985/6, Centre Mathematique de l’Ecole Polytechnique Palaiseau, 1986, esp. 24.[22] G. Pilz,Near-rings: the theory and its applications, Vol. 23, Elsevier, 2011.[23] W. W. Rogosinski,Volume and Integral, Oliver and Boyd, Edinburgh and London, Interscience Pub-

lishers, New York, 1952.[24] D. Stirzaker,Elementary Probability, 2nd edn., Cambridge University Press, Cambridge, 2003.

PEYMAN NASEHPOUR, DEPARTMENT OF ENGINEERING SCIENCE, FACULTY OF ENGINEERING,UNIVERSITY OF TEHRAN, TEHRAN, IRAN

E-mail address: [email protected]

AMIR HOSSEIN PARVARDI , DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, FAC-ULTY OF ENGINEERING, UNIVERSITY OF TEHRAN, TEHRAN, IRAN

E-mail address: [email protected], [email protected]