Preliminaries
Definition 2.1: A Ternary semiring is a nonempty set S together with the binary operation addition and ternary operation multiplication denoted by +,· respectively, satisfying the following conditions:

(S,+) is a commutative semigroup.

(S,·) is ternary semigroup.

Distributive laws holds, i.e., a·b(c+d)=a·b.c+a·b.d a(b+c)d=a·b·d+a.c.d and (a+b)·c·d=a·c·d+b.c·d

Definition 2.2: An element a of a ternary semiring S is said to be additive idempotent element provided a+a=a .

Note: The set of all additive idempotent elements in a ternary semiring S is denoted by E+(S) .

That is E+(S)={a∈S/a+a=a}.

Definition 2.3: A ternary semiring S is called E-inverse, if for every a∈S , there exists x∈S such that a+x∈E+(S) .

Note : Let S be a ternary semi ring, then E+(S) is an ideal of S.

Definition 2.4: A subset I of a ternary semiring S is called a left (resp. a right, lateral) ideal of S if

a+b∈I for all a,b∈I

for any a∈I, and b,c∈S, bca∈I( resp. abc∈I,bac∈I)

A subset I is called an ideal if I is left, lateral and right ideal.

Note:

If A,B are any two ideals of a ternary semiring S, then A∩B is an ideal.

Let A,B be two ideals of a ternary semiring S, then the sum of A,B denoted by A+B is an ideal of S where A+B={x=a+b∣a∈A,b∈B}

Definition 2.5: An ideal I of a ternary semiring S is called full if E+(S)⊆I

Example: In any ternary ring R, the set E+(R)={0} , and so every ideal of R is a full ideal.

Definition 2.6. An ideal I of a ternary semiring S is called k-ideal or subtractive if for any two elements a∈I and x∈S such that a+x∈I , then x∈I .

Example. In any ternary ring R, every ideal I is k-ideal, since for any a∈I,x∈R such that a+x∈I then a+x+(-a)∈I so x∈I

Definition 2.7. A k-ideal I of a ternary semiring S is called full k-ideal if the set of all additive idempotents of S, E+(S) is contained in I.

Example 1: In any ternary ring R every ideal I is a full k-ideal. Since 0 is the only additive idempotent element in R which belongs to any ideal I of R. So I is full k-ideal.

Example 2: In a distributive lattice L with more than two elements, a proper ideal I is k-ideal but not full k-ideal. Let a∈I,x∈L such that a∨x∈I, then x≤a∨x . But I is an ideal so x=x∧(a∨x)∈I . Hence I is k-ideal. Moreover, the set of all additive idempotents of L is L itself, since a∨a=a for all a∈L . So I is not full k-ideal.

Example 3: In Z×Z+={(a,b):a,b are integers and b>0} we define (a,b)+(c,d)=(a+c,lcm(b,d)) and (a,b)·(c,d)·(e,f)=(a.c.e,gcd(b,d,f)), then Z×Z+ is an additive inversive ternary semiring.

Solution: Let (a,b),(c,d),(e,f)∈Z×Z+

Additive commutative:

(a,b)+(c,d)=(a+c,lcm(b,d))=(c+a,lcm(b,d))=(c,a)+(a,b)
Additive associative:

((a,b)+(c,d))+(e,f)=((a+c,lcm(b,d))+(e,f) =(((a+c)+e,lcm(lcm(b,d),f)) =((a+(c+e),lcm(b,lcm(d,f))) =(a,b)+((c+e),lcm(d,f)) =(a,b)+((c,d)+(e,f)).
Multiplicative associative: Similarly as additive associative Distributive:

(a,b)·(c,d)((e,f))+(g,h))=(a,b)·(c,d)(e+g,lcm(f,h)) =(a·c(e+g),gcd(b,d,lcm(f,h))) =(a·c.e+a·c.g, lcm(gcd(b,d,f),gcd(b,d,h))) =(a·c.e,gcd(b,d,f))+(a·c.e,gcd(b,d,h)) =((a,b)·(c,d)(e,f)+(a,b)·(c,d)(g,h))
Similarly, ((e,f))+(g,h))(a,b)·(c,d)=((e,f)(a,b)·(c,d)+(g,h)(a,b)·(c,d))

Additive inverse: For any (a,b)∈Z×Z+ there exists a unique (-a,b)∈Z×Z+ such that

(a,b)+(-a,b)+(a,b)=(a+-a+a,lcm(b,b,b))=(a,b),(-a,b)+(a,b)+(-a,b)=(-a+a+-a,lcm(b,b,b))=(-a,b)
Moreover, the set A=(a,b)∈Z×Z+-a=0,b∈Z+ is full k-ideal of Z∈Z+ .

Since E+Z×Z+={0}×Z+⊆A and for any (0,b)∈A,(c,d)∈Z×Z+ such that (0,b)+(c,d)=(c,lcm(b,d))∈A, then c=0, so (c,d)∈A .

Definition 2.8: Let A be an ideal of an additive inversive ternary semiring S. We define the k-closure of A, denoted by A by:

A¯={a∈S·a+x∈A for some x∈A}
Definition 2.9: A lattice L is called a modular lattice simply modular, if for a,b,c∈L,a≤b a∧c=b∧c a∨c=b∨c implies a=b .

Main Results
Theorem 3.1. Let A and B be two full k-ideal of a ternary semiring S. then A∩B is full k-ideal.

Proof. Let A and B be two full k-ideal of S, then A∩B is an k ideal which is full as E+(S)⊆A and E+(S)⊆B

Let x∈S such that a+x∈A∩B for some a∈A∩B . Then a+x∈A,a∈A and a+x∈B,a∈B which implies that x∈A and x∈B .

Hence, x∈A∩B

Therefore, A∩B is full k-ideal.

Theorem 3.2. Every k-ideal of ternary semiring S is an inversive sub semiring of S.

Proof. Clearly that every ideal of S is sub semiring of S. Let a∈I, then a∈S , so there exist a'∈S such that a=a+a'+a=a+a'+a∈I.

But I is a k-ideal and a∈I, so a'+a∈I . Again I is a k-ideal and a∈I, so a'∈I .

Hence I is an inversive sub semiring of S.

Theorem 3.3. Let A be an ideal of ternary semirin S. Then A is a k -ideal of S. Moreover A⊆A¯ .

Proof. Let a,b∈A¯, then a+x,b+y∈A for some x,y∈A .

Now (a+b)+(x+y)=(a+x)+(b+y)∈A .

But x+y∈A, so a+b∈A¯ . Next let p,r∈S, then pra + prx =pr(a+x)∈A .

But prx ∈A, so, pra∈A¯. Similarly, apr∈A .

Since A¯ is an ideal of S.

To show that A¯is k-ideal.

Let c,c+d∈A¯ , then there exist x and y in A such that c+x∈A and c+d+y∈A .

Now d+(c+x+y)=(c+d+y)+x∈A and c+x+y∈A .

Hence d∈A¯ and so A¯ is a k-ideal of S.

Finally, since a+a∈A for all a∈A , it follows that A⊆A¯ .

Corollary 3.1 Let A be an ideal of ternary semiring S. Then A¯=A if and only if A¯is a k-ideal.

Proof. Suppose A¯=A, then by theorem 3.3 A¯is k-ideal, and so A is k-ideal.

Conversely, assume that A is a k-ideal. Again by theorem 3.3 A⊆A¯.

On the other hand, let a∈A¯ then a+x∈A for some x∈A . But A is a k-ideal and x∈A, implies a∈A , so A¯ ⊆A . Therefore A=A¯.

Corollary 3.2: Let A and B be two ideals of a ternary semiring S such that A⊆B , Then A¯⊆B¯ .

Proof. Let A and B be two ideals of S such that A⊆B, let a∈A¯, then a+x∈A for some x∈A, but A⊆B, so a+x∈B for some x∈B .

Hence a∈B¯ , Therefore A¯⊆B¯ .

Corollary 3.3: Let A be an ideal of ternary semiring S. Then A¯ is the smallest k-ideal containing A.

Proof. Let B be a k-ideal of S such that A⊆B, let x∈A¯ . Then x+a1=a2 for some a1,a2∈A .

Since A⊆B and B is a k-ideal, then x∈B .

This implies that A¯⊆B .

Therefore A¯ is the smallest k-ideal containing A.

Theorem 3.4: Let A and B be two full k-ideals of ternary semiring S. then A+B¯ is a full k-ideal of S such that A⊆A+B¯ and B⊆A+B¯ .

Proof. Let A and B be two full k-ideals of ternary semiring S. Then A+B is an ideal of S.

Then by theorem 3.3 A+B¯ is a k-ideal and A+B⊆A+B¯ .

Now E+(S)⊆A and E+(S)⊆B . So for any e∈E+(S),e=e+e.

Hence E+(S)⊆A+B⊆A+B¯ . Which implies that A+B¯ is a full k-ideal.

Finally let a∈A , Then a=a+a'+a=a+a'+a∈A+B as a'+a∈E+(S)⊆B

Hence A⊆A+B¯ and similarly B⊆A+B¯ .

Theorem 3.5: The set of all full k-ideals of ternary semi ring S. denoted by I(S), is a complete lattice which is also modular.

Proof. Firstly we note that I(S) is a partially ordered set with respect to usual set inclusion. Let A,B∈I(S). Then by Theorem 3.1 A∩B∈I(S) , and by Theorem 3.4, A+B¯∈I(S) .

Define A∧B=A∩B and A∨B=A+B¯ .

It is clearly that A∩B=inf{A,B} , let C∈I(S) such that A,B⊆C .

Then A+B⊆C and A+B¯⊆C. But C=C¯ .

Which implies that A+B¯⊆C .

Hence A+B¯=sup{A,B}. Thus we find that I(S) is a lattice.

If S be a ternary semiring, then E+(S) is an ideal of S.

Thus E+(S) is an ideal of S, which contained in every ideal in I(S).

Hence E+(S)¯ is the smallest full k-ideal in I(S), and also S∈I(S).

Consequently I(S) is a complete lattice.

Finally to show that I(S) is modular.

Suppose that A,B,C∈I(S) such that A∧B=A∧C and A∨B=A∨C and B⊆C .

Let x∈C . we have C⊆A+C¯=A∨C, so x∈A∨C=A+B¯ .

Hence there exists a+b∈A+B such that x+a+b=a1+b1 for some a1∈A,b1∈B .

Then x+a+a'+b=a1+b1+a' .

But x∈C,a+a'∈E+(S)⊆C

Since C is full ideal and b∈B⊆C, then a1+b1+a'∈C. But b1∈B⊆C , which is k-ideal.

So a1+a'∈C, also a1+a'∈A which implies that a1+a'∈C∩A=A∩B .

Hence a1+a'∈B .

So from (1), We find that x+a+a'+b=a1+a'+b∈B . But a+a'+b∈B , which is a k-ideal.

Which implies that x∈B .

Hence B=C.

Therefore I(S) is a modular lattice.