VARIETIES OF UNARY-DETERMINED DISTRIBUTIVE ℓ -MAGMAS AND BUNCHED IMPLICATION ALGEBRAS

. A distributive lattice-ordered magma ( dℓ -magma) ( A, ∧ , ∨ , · ) is a distributive lattice with a binary operation · that preserves joins in both arguments, and when · is associative then ( A, ∨ , · ) is an idempotent semiring. A dℓ -magma with a top ⊤ is unary-determined if x · y = ( x ·⊤∧ y ) ∨ ( x ∧⊤· y ). These algebras are term-equivalent to a subvariety of distributive lattices with ⊤ and two join-preserving unary operations p,q . We obtain simple conditions on p, q such that x · y = ( px ∧ y ) ∨ ( x ∧ qy ) is associative, commutative, idempotent and/or has an identity element. This generalizes previous results on the structure of doubly idempotent semirings and, in the case when the distributive lattice is a Heyting algebra, it provides structural insight into unary-determined algebraic models of bunched implication logic. We also provide Kripke semantics for the algebras under consideration, which leads to more eﬃcient algorithms for constructing ﬁnite models. We ﬁnd all subdirectly irreducible algebras up to cardinality eight in which p = q is a closure operator, as well as all ﬁnite unary-determined bunched implication chains and map out the poset of join-irreducible varieties generated by them.


Introduction
Idempotent semirings (A, ∨, •) play an important role in several areas of computer science, such as network optimization, formal languages, Kleene algebras and program semantics.In this setting they are often assumed to have constants 0, 1 that are the additive and multiplicative identity respectively, with 0 also being an absorbing element.However semirings are usually only assumed to have two binary operations +, • that are associative such that + is also commutative and • distributes over + from the left and right [HW98].A semiring is (additively) idempotent if x + x = x, hence + is a (join) semilattice, and doubly idempotent if x • x = x as well.If • is also commutative, then it defines a meet semilattice.The special case when these two semilattices coincide corresponds exactly to the variety of distributive lattices, which have a well understood structure theory.
In [AJ20] a complete structural description was given for finite commutative doubly idempotent semirings where either the multiplicative semilattice is a chain, or the additive semilattice is a Boolean algebra.Here we show that the second description can be significantly generalized to the setting where the additive semilattice is a distributive lattice, dropping the assumptions of finiteness, multiplicative commutativity and idempotence in favor of the algebraic condition x • y = (px ∧ y) ∨ (x ∧ qy) for two unary join-preserving operations p, q.While this property is quite restrictive in general, it does hold in all idempotent Boolean magmas and expresses a binary operation in terms of two simpler unary operations.A full structural description of all (finite) idempotent semirings is unlikely, but in the setting of unary-determined idempotent semirings progress is possible.
In Section 2 we provide the needed background and prove a term-equivalence between a subvariety of top-bounded dℓ-magmas and a subvariety of top-bounded distributive lattices with two unary operators.This is then specialized to cases where • is associative, commutative, idempotent or has an identity element.In the next section we show that when the distributive lattice is a Brouwerian algebra or Heyting algebra, then • is residuated if and only if both p and q are residuated.This establishes a connection with bunched implication algebras (BI-algebras) that are the algebraic semantics of bunched implication logic [OP99], used in the setting of separation logic for program verification, including reasoning about pointers [Rey02] and concurrent processes [O'H04].Section 4 contains Kripke semantics for dℓ-magmas, called Birkhoff frames, and for the two unary operators p, q.This establishes the connection to the previous results in [AJ20] and leads to the main result (Thm.4.9) that preorder forest P -frames capture a larger class of multiplicatively idempotent BIalgebras and doubly idempotent semirings.Although the heap models of BI-algebras used in applications are not (multiplicatively) idempotent, they contain idempotent subalgebras and homomorphic images, hence a characterization of unary-determined idempotent BI-algebras does provide insight into the general case.In the next section we define weakly conservative ℓ-magmas and their corresponding frames.In Section 6 we apply the results from the previous sections to count the number of preorder forest P -frames up to isomorphism if their partial order is an antichain and also if it is a chain.Finally in Section 7 we calculate all subdirectly irreducible algebras up to cardinality eight in which p and q are the same closure operator, and map out the poset of join-irreducible varieties generated by them.

A term-equivalence between distributive lattices with operators
A distributive lattice-ordered magma, or dℓ-magma, is an algebra A = (A, ∧, ∨, •) such that (A, ∧, ∨) is a distributive lattice and • is a binary operator, which in this case means a binary operation that distributes over ∨, i.e., x • (y ∨ z) = x • y ∨ x • z and (x ∨ y) • z = x • z ∨ y • z for all x, y, z ∈ A. Throughout it is assumed that • binds more strongly than ∧, ∨, and as usual the lattice order ≤ is defined by x ≤ y ⇐⇒ x ∧ y = x ( ⇐⇒ x ∨ y = y).If the distributive lattice has a top element ⊤ or a bottom element ⊥ then it is called ⊤-bounded or ⊥-bounded, or simply bounded if both exist.A dℓ-magma A is normal and Similarly, a unary operation f on A is an operator if it satisfies the identity f (x ∨ y) = f x ∨ f y, and it is normal if f ⊥ = ⊥.For brevity and to reduce the number of nested parentheses, we write function application as f x rather than f (x), with the convention that it has priority over • hence, e.g., f x • y = (f (x)) • y (this convention ensures unique readability).Note that since operators distribute over ∨ in each argument, they are order-preserving in each argument.The operation f is said to be inflationary if x ≤ f x for all x ∈ A.

A binary operation
A semigroup is a set with an associative operation, a monoid is a semigroup with an identity element denoted by 1, a band is a semigroup that is also idempotent, and a semilattice is a commutative band.As usual, a semilattice is partially ordered by x ⊑ y ⇐⇒ x • y = x, and in this case x • y is the meet operation with respect to ⊑.We also use this terminology with the prefix dℓ, in which case the magma operation satisfies the corresponding identities.
A dℓ-magma is called unary-determined if it is ⊤-bounded and satisfies the identity As examples, we mention that all doubly-idempotent semirings with a Boolean join-semilattice are unary-determined (see Lemma 2.3).Complete and atomic versions of such semirings are studied in [AJ20], and the results from that paper are generalized here to unary-determined dℓ-magmas with algebraic proofs that apply to all members of the variety, while the previous results applied only to complete and atomic algebras.
A dℓpq-algebra is a ⊤-bounded distributive lattice with two unary operators p, q that satisfy x ∧ p⊤ ≤ qx, x ∧ q⊤ ≤ px.
We note that throughout p, q denote unary operations, and they bind more strongly than •, ∧, ∨.These two (in)equational axioms are needed for our first result which shows that unary-determined dℓ-magmas and dℓpq-algebras are term-equivalent.This means that although the two varieties are based on different sets of fundamental operations (called the signature of each class), each fundamental operation of an algebra in one variety is identical to a term-operation constructed from fundamental operations of an algebra in the other variety (and vice versa).From the point of view of category theory, term-equivalent varieties are model categories of the same Lawvere theory.Note that the (in)equalities above are satisfied in any ⊤-bounded distributive lattice with inflationary operators p, q since then p⊤ = ⊤ = q⊤.A dℓp-algebra is a dℓpq-algebra that satisfies the identity px = qx.
The preceding theorem shows that unary-determined dℓ-magmas and dℓpq-algebras are "essentially the same", and we can choose to work with the signature that is preferred in a given situation.The unary operators of dℓpq-algebras are simpler to handle, while the binary operator • is familiar in the semiring setting.Next we examine how standard properties of • are captured by identities in the language of dℓpq-algebras.
(1) The operator • is commutative if and only if p = q.
Conversely, assume the two identities hold.Then using distributivity (5) Assume x has an identity 1.Then p1 = 1 Conversely, suppose p1 = ⊤ = q1 and (px (6) This follows from (3) since Note that if A also has a bottom bound ⊥, then p, q are normal if and only if • is normal, hence the term-equivalence preserves normality.
This term-equivalence is useful since distributive lattices with unary operators are considerably simpler than distributive lattices with binary operators.In particular, (2) and (4) show that associativity can be replaced by one or two 2-variable identities in this variety.This provides more efficient ways to construct associative operators from a (pair of) unary operator(s) on a distributive lattice.The variety of ⊤-bounded distributive lattices is obtained as a subvariety of dℓpq-algebras that satisfy px = x = qx, or a subvariety of unary determined dℓ-magmas that satisfy x • y = x ∧ y.
For small cardinalities, Table 1 shows the number of algebras that are unary-determined (shown in the even numbered rows) for several subvarieties of normal dℓ-magmas.As seen from rows 7-10, under the assumption of associativity, commutativity and idempotence of •, the property of being unary-determined is a relatively mild restriction compared to the general case of normal dℓ-magmas.
A Boolean magma is a Boolean algebra with a binary operator.The next lemma shows that if the operator is idempotent, then it is always unary-determined, hence the results in the current paper generalize the theorems about idempotent Boolean nonassociative quantales in [AJ20].operation.The following calculation Using Boolean negation, the opposite inequality is equivalent to By De Morgan's law it suffices to show (x

BI-algebras from Heyting algebras and residuated unary operations
We now recall some basic definitions about residuated operations, adjoints and residuated lattices.For an overview and additional details we refer to [GJKO07].A Brouwerian algebra Since → is the residual of ∧, we have that ∧ is join-preserving, so the lattice is distributive [GJKO07, Lem.4.1].The ⊤-bound is included as a constant since it always exists when a meet-operation has a residual: x ∧ y ≤ x always holds, hence y ≤ (x → x) = ⊤.A Heyting algebra is a bounded Brouwerian algebra with a constant ⊥ denoting the bottom element.
A dual operator is an n-ary operation on a lattice that preserves meets in each argument.A residual or upper adjoint of a unary operation p on a poset A = (A, ≤) is a unary operation p * such that px ≤ y ⇐⇒ x ≤ p * y for all x, y ∈ A. If A is a lattice, then the existence of a residual guarantees that p is an operator and p * is a dual operator [GJKO07, Lem.3.5].Moreover, if A is bounded, then p⊥ = ⊥ and p * ⊤ = ⊤.
A binary operation • on a poset is residuated if there exist a left residual \ and a right residual / such that A residuated ℓ-magma (A, ∧, ∨, •, \, /) is a lattice with a residuated binary operation.In this case • is an operator and \, / are dual operators in the "numerator" argument.The "denominator" arguments of \, / map joins to meets, hence they are order reversing.A residuated Brouwerian-magma is a residuated ℓ-magma expanded with →, ⊤ such that (A, ∧, ∨, →, ⊤) is a Brouwerian algebra.
A residuated lattice is a residuated ℓ-magma with • associative and a constant 1 that is an identity element, i.e., (A, •, 1) is a monoid.A generalized bunched implication algebra, or GBI-algebra, A = (A, ∧, ∨, →, ⊤, •, 1, \, /) is a ⊤-bounded residuated lattice with a residual → for the meet operation, i.e., (A, ∧, ∨, →, ⊤) is a Brouwerian algebra.A GBI-algebra is called a bunched implication algebra (BI-algebra) if • is commutative and A also has a bottom element, denoted by the constant ⊥, hence a BI-algebra has a Heyting algebra reduct.These algebras are the algebraic semantics for bunched implication logic, which is the propositional part of separation logic, a Hoare logic used for reasoning about memory references in computer programs.In this setting the operation • is usually denoted by * , the left residual \ is denoted − * , and / can be omitted since x/y = y − * x.
Note that the property of being a residual can be expressed by inequalities (p * is a residual of p if and only if p(p * x) ≤ x ≤ p * (px) for all x, and p, p * are order preserving), hence the classes of all Brouwerian algebras, Heyting algebras, residuated ℓ-magmas, residuated Brouwerian-magmas, residuated lattices, (G)BI-algebras, and pairs of residuated unary maps on a lattice are varieties (see e.g.[GJKO07, Thm.2.7 and Lem.3.2]).Recall also that a ⊤-bounded magma is unary-determined if it satisfies the identity x • y = (x •⊤ ∧ y) ∨ (x ∧ ⊤• y).
We are now ready to prove a result that upgrades the term-equivalence of Theorem 2.1 to Brouwerian algebras with two pairs of residuated maps and unary-determined residuated Brouwerian-magmas.
(1) The following calculation shows that • is residuated.
x/⊤, and similarly q * (x) = ⊤\x. 12:8 (2) Since • is residuated it follows that p * and q * are the unary residuals of p, q respectively.The remaining parts hold by Theorem 2.1.
Recall that a closure operator p is an order-preserving unary function on a poset such that x ≤ px = ppx.A bounded dℓp-algebra where p is a normal closure operator is called a dℓp-closure algebra.If • is idempotent and associative then x Proof.By Lemma 2.2 • is associative if and only if the identity p((px ∧ y) ∨ (x ∨ py)) = (px ∧ py) ∨ (x ∧ py) holds.This is equivalent to px ∧ py ≤ p((px ∧ y) ∨ (x ∨ py)) since x ∧ py ≤ px ∧ py, p(px ∧ y) ≤ ppx ∧ py = px ∧ py and similarly p(x ∧ py) ≤ px ∧ py.
We note that there exist non-associative dℓp-algebras, as shown (later) by the algebra D 12 in Figure 4.The preceding theorems specialize to a term-equivalence for a subvariety of unary-determined BI-algebras as follows: Heyting algebras with a closure operator provide algebraic semantics for IntS4 ♢ [Doš85], an intuitionistic modal logic with an S4-modality.Hence the result above establishes a connection between certain extensions of bunched implication logic and of intuitionistic modal logic.
By Lemma 2.2(6) unary-determined BI-algebras satisfy x * x = x, which does not hold in BI-algebras that model applications (e.g., heap storage).However, as mentioned in the introduction, they are members of the variety of BI-algebras, and understanding their properties via this term-equivalence is useful for the general theory.E.g., structural results about algebraic objects (such as rings) often start by investigating the idempotent algebras, followed by sets of idempotent elements in more general algebras.Line 10 in Table 1 also shows that finite unary-determined BI-algebras are not rare (algebras with normal join-preserving operators can be uniquely expanded with residuals in the finite case, hence expansions of the algebras counted in Line 10 are indeed term-equivalent to unary-determined BI-algebras).

Relational semantics for dℓ-magmas
We now briefly recall relational semantics for bounded distributive lattices with operators and then apply correspondence theory to derive first-order conditions for the equational properties of the preceding sections.
An element in a lattice is completely join-irreducible if it is not the supremum of all the elements strictly below it.The set of all completely join-irreducible elements of a lattice A is denoted by J(A), and it is partially ordered by restricting the order of A to J(A).For example, if A is a Boolean lattice, then J(A) = At(A) is the antichain of atoms, i.e., all elements immediately above the bottom element.The set M (A) of completely meet-irreducible elements is defined dually.A lattice is perfect if it is complete (i.e., all joins and meets exist) and every element is a join of completely join-irreducibles and a meet of completely meet-irreducibles.For a Boolean algebra, the notion of perfect is equivalent to being complete (i.e., joins and meets of all subsets exist) and atomic (i.e., every non-bottom element has an atom below it).
Recall that for a poset W = (W, ≤), a downset is a subset X such that y ≤ x ∈ X implies y ∈ X.As in modal logic, W is considered a set of "worlds" or states.We let D(W) be the set of all downsets of W, and (D(W), ∩, ∪) the lattice of downsets.The collection D(W) is a perfect distributive lattice with infinitary meet and join given by (arbitrary) intersections and unions.The following result, due to Birkhoff [Bir67, Thm.III.3.3] for lattices of finite height, shows that up to isomorphism all perfect distributive lattices arise in this way.The poset J(D(W)) contains exactly the principal downsets ↓x = {y ∈ W | y ≤ x}.(1) A is distributive and perfect.
(2) A is isomorphic to the lattice of downsets of a partial order.
Note that the set of upsets of a poset is also a perfect distributive lattice, and if it is ordered by reverse inclusion then this lattice is isomorphic to the downset lattice described above.It is also well known that the maps J and D are functors for a categorial duality between the category of posets with order-preserving maps and the category of perfect distributive lattices with complete lattice homomorphisms (i.e., maps that preserve arbitrary joins and meets).
A complete operator on a complete lattice is an operation that, in each argument, is completely join-preserving, while a complete dual operator is completely meet-preserving (in each argument).A lattice-ordered algebra is called perfect if its lattice reduct is perfect and every fundamental operation on it is a complete operator or dual operator.The duality between the category of perfect distributive lattices and posets extends to the category of perfect distributive lattices with (a fixed signature of) complete operators and dual operators.The corresponding poset category has additional relations of arity n + 1 for each (dual) operator of arity n, and the relations have to be upward or downward closed in each argument.For example, a binary relation Q ⊆ W 2 is upward closed in the second argument if xQy ≤ z =⇒ xQz.Here xQy ≤ z is an abbreviation for xQy and y ≤ z.
Perfect distributive lattices with operators, their residuals and dual operators are algebraic models for many logics, including relevance logic, intuitionistic logic, Hájek's basic logic, Lukasiewicz logic and bunched implication logic [GNV05,GJKO07].In such an algebra A, a join-preserving binary operation is determined by a ternary relation R on J(A) given by xRyz ⇐⇒ x ≤ yz.
The notation xRyz is shorthand for (x, y, z) ∈ R. For b, c ∈ A the product bc is recovered as {x ∈ J(A) | xRyz for some y ≤ b and z ≤ c}.
The relational structure (J(A), ≤, R) is an example of a Birkhoff frame.In general, a Birkhoff frame [GJ20] is a triple W = (W, ≤, R) where (W, ≤) is a poset, and R ⊆ W 3 satisfies the following three properties (downward closure in the 1st, and upward closure in the 2nd and 3rd argument):

The property (R1) ensures that Y • Z ∈ D(W).
In relevance logic [DR02] similar ternary frames are known as Routley-Meyer frames.In that setting upsets are used to recover the distributive lattice-ordered relevance algebra, and this choice implies that J(A) with the induced order from A is dually isomorphic to (W, ≤).Another difference is that Routley-Meyer frames have a unary relation and axioms to ensure it is a left identity element of the • operation.
The duality between perfect dℓ-magmas and Birkhoff frames is recalled below.Here we assume that the binary operation on a complete dℓ-magma is a complete operator, i.e., distributes over arbitrary joins in each argument.Such algebras are also known as nonassociative quantales or prequantales [Ros90].From x ∈ ↓x we deduce x ∈ ↓x • ↓x, whence it follows that xRyz for some y ∈ ↓x, z ∈ ↓x.Therefore xRyz for y ≤ x, z ≤ x, which implies xRxx by (R2) and (R3).
Next assume xRyz holds.Then x ∈ ↓{y, z} • ↓{y, z} = ↓{y, z} by idempotence.Hence for some w ∈ {y, z} we have x ≤ w, and it follows that x ≤ y or x ≤ z.
For the converse, assume xRxx and (xRyz =⇒ x ≤ y or x ≤ z) for all x, y, z ∈ W and let X ∈ D(W).From xRxx we obtain X ⊆ X • X.
For the reverse inclusion, let x ∈ X • X.Then xRyz holds for some y, z ∈ X.By The previous two results are examples of correspondence theory, since they show that an equational property on a perfect dℓ-magma corresponds to a first-order condition on its Birkhoff frame.
The relational semantics of a perfect dℓpq-magma is given by a PQ-frame, which is a partially-ordered relational structure (W, ≤, P, Q) such that P, Q are binary relations on W , u ≤ xP y ≤ v =⇒ uP v and u ≤ xQy ≤ v =⇒ uQv.Relations with this property are called weakening relations [KV16,GJ20], and this is what ensures that if we define for a downset Y , then p is a complete normal join-preserving operator that produces a downset, and P is uniquely determined by xP y ⇔ x ∈ p(↓y).Similarly, a normal operator q is defined from Q, and uniquely determines Q.The residual p * of p is a completely meet-preserving operator, defined by p * (Y ) = {x | ∀y(yP x ⇒ y ∈ Y )}, and likewise for q * .If P = Q then we omit Q and refer to (W, ≤, P ) simply as a P -frame.
We now list some correspondence results for dℓpq-magmas.We begin with a theorem that restates the term-equivalence of Theorem 2.1 as a definitional equivalence on frames.A direct proof of this result is straightforward, but it also follows from Theorem 2.1 by correspondence theory.A significant advantage of P Q-frames over Birkhoff frames is that binary relations have a graphical representation in the form of directed graphs (whereas ternary relations are 3-ary hypergraphs that are more complicated to draw).Equational properties from Lemma 2.2, Cor.3.3 correspond to the following first-order properties on P Q-frames.
Lemma 4.6.Assume A is a perfect dℓpq-algebra and W = (W, ≤, P, Q) is its corresponding P Q-frame.The constant 1 ∈ A (when present) is assumed to correspond to a downset E ⊆ W . Then (1) a ≤ pa holds in A if and only if P is reflexive, (2) ppa ≤ pa holds in A if and only if P is transitive, Proof.(1)-(3) These correspondences are well known from modal logic.
(4) For x ∈ W and E = ↓1 we have x ≤ p1 if and only if there exists y ∈ W such that y ≤ 1 and x ≤ py, or equivalently, y ∈ E and xP y.
(5) In the forward direction, let a = ↓y.Then it follows that x ∈ p(↓y) ∩ E implies x ∈ ↓y, and consequently x ∈ E & xP y =⇒ x ≤ y.
In the reverse direction, let Y be a downset of W and assume x ∈ pY ∩ E. Then x ∈ E and xP y for some y ∈ Y .Hence x ≤ y, or equivalently x ∈ ↓y ⊆ Y .Thus, pY ∩ E ⊆ Y , so the algebra A satisfies pa ∧ 1 ≤ a for all a ∈ A.
(6) In the forward direction, let a = ↓x and b = ↓y.Then it follows from the inequality that w ∈ p↓x ∩ ↓y =⇒ w ∈ p((p↓x ∩ ↓y) ∪ (↓x ∩ p↓y)) for all w ∈ W .This in turn implies wP x & wP y =⇒ ∃v(wP v & v ∈ (p↓x ∩ ↓y) ∪ (↓x ∩ p↓y)), which translates to the given first-order condition.
In the reverse direction, let X, Y be downsets of W and assume w ∈ pX ∩ pY .Then wP x and wP y for some x ∈ X and y ∈ Y .It follows that there exists a v ∈ W such that Recall that a ternary relation R is commutative if xRyz ⇔ xRzy for all x, y.From Theorem 4.5 we also obtain the following result.
Corollary 4.7.Let (W, ≤, P, Q) be a P Q-frame and define R as in Thm.4.5(1).Then R is commutative if and only if P = Q.
This corollary shows that in the commutative setting a P Q-frame only needs one of the two binary relations.Hence we define W = (W, ≤, P ) to be a P-frame if P is a weakening relation, i.e., u ≤ xP y ≤ v =⇒ uP v.
We now turn to the problem of ensuring that the binary operation of a dℓ-magma is associative.For Birkhoff frames the following characterization of associativity is well known from relation algebras [Mad82] (in the Boolean case) and from the Routley-Meyer semantics for relevance logic [DR02] in general.This lemma is another correspondence result that follows from translating w ∈ (XY )Z ⇔ w ∈ X(Y Z) for X, Y, Z ∈ D(W).In the commutative case (XY )Z ⊆ X(Y Z) implies the reverse inclusion, hence only one of the implications is needed.We now show that for a large class of P -frames the 6-variable universal-existential formula for associativity can be replaced by simpler universal formulas with only three variables.
A preorder forest P -frame is a P -frame such that P is a preorder (i.e., reflexive and transitive) and satisfies the formula xP y and xP z =⇒ x ≤ y or x ≤ z or yP z or zP y. (Pforest) Note that since P is a weakening relation, reflexivity of P implies that ≤ ⊆ P because xP x and x ≤ y implies xP y.
It is interesting to visualize the properties that define preorder forest P -frames by implications between Hasse diagrams with ≤-edges (solid) and P -edges (dotted) as in Figure 1.However, one needs to keep in mind that dotted lines could be horizontal (if xP y and yP x) and that any line could be a loop if two variables refer to the same element.
We are now ready to state the main result.We use the algebraic characterization of associativity in Lemma 2.2.Theorem 4.9.Let W = (W, ≤, P ) be a preorder forest P -frame and D(W) its corresponding downset algebra.Then the operation x • y = (px ∧ y) ∨ (x ∧ py) is associative in D(W). 2 1 Figure 2: All 40 preorder forest P -frames (W, ≤, P ) with up to 3 elements.Solid lines show (W, ≤), dotted lines show the additional edges of P , and the identity (if it exists) is the set of black dots.The first row shows the lattice of downsets, and the Boolean quantales from [AJ20] appear in the first three columns.
Proof.Let W = (W, ≤, P ) be a preorder forest P -frame and D(W) its dℓp-algebra of downsets with operator p.Since P is a preorder, D(W) is a dℓp-closure algebra.By Lemma 3.2, a dℓp-closure algebra is associative if and only if p(x) ∧ p(y) ≤ p(p(x) ∧ y) ∨ (x ∧ p(y)).By Lemma 4.6 this is equivalent to the frame property We now show that this frame property holds in W. We know that P is reflexive and (Pforest) holds.

12:14
Assume xP y and xP z.By (Pforest) there are four cases: (1) x ≤ y: take w = x.Then xP x, x ≤ y and xP z, hence ( * ) holds.
A dℓ-semilattice is an associative commutative idempotent dℓ-magma.The point of the previous result is that it allows the construction of perfect associative commutative idempotent dℓ-magmas and idempotent bunched implication algebras from preorder forest P -frames.This is much simpler than constructing the ternary relation R of the Birkhoff frame of such algebras.For example the Hasse diagrams for all the preorder forest P -frames with up to 3 elements are shown in Figure 2, with the preorder P given by dotted lines and ovals.The corresponding ternary relations can be calculated from P , but would have been hard to include in each diagram.
We now examine when a P -frame will have an identity element.From pE = W we deduce that xP z for some z, hence x ≤ z and, since E is a downset, x ∈ E. Conversely, by the definition of E, if x ∈ E, then xP y ⇒ x ≤ y holds for all y ∈ W . Hence by Lemma 4.6(5) for all X ∈ D(W) we have pX ∩ E ⊆ X.Since pE = W together with Lemma 2.2(5), it follows that E is an identity element in the downset algebra.

Weakly conservative perfect dℓ-magmas and Birkhoff frames
In this section we explore a special case that arises when the relations P and Q are determined from R by xP y ⇔ xRyx and xQy ⇔ xRxy, i.e., the existential quantifier from the previous section is instantiated by z = x.We first discuss some related algebraic properties.
A binary operation • is called conservative (or quasitrivial ) if the output value is always one of the two inputs, i.e., it satisfies xy = x or xy = y for all x, y ∈ A. Note that this property implies idempotence.
In general a dℓ-magma is idempotent if and only if it satisfies x ∧ y ≤ xy ≤ x ∨ y, since x ∧ y = (x ∧ y)(x ∧ y) ≤ xy ≤ (x ∨ y)(x ∨ y) = x ∨ y, and conversely, identifying x, y we have x ≤ xx ≤ x.
A perfect ℓ-magma A is called weakly conservative if it satisfies the formula xy = x ∧ y or xy = x or xy = y or xy = x ∨ y for all x, y ∈ J(A).Let A be a unary-determined commutative doubly idempotent linear semiring with n elements.Then the P -frame W associated with A has n − 1 elements, is linearly ordered, and P is reflexive and transitive since • is idempotent and associative.Hence there are 2 n−2 such algebras.
By Lemma 2.2 such an algebra A will have an identity 1 if and only if the operator p in the corresponding dℓp-closure algebra satisfies the conditions p1 = ⊤ and px ∧ 1 ≤ x for every x ∈ A. The first condition means that 1 is not closed (unless it is ⊤), and there are no closed elements other than ⊤ above 1.Since the partial order is a linear order and p is inflationary, the second condition is equivalent to px = x or 1 ≤ x.That is to say, 1 is also the minimum non-closed element in A. Hence the n-element unary-determined commutative doubly idempotent linear semirings with identity are the chains with the identity element in the k-th position, where 1 < k ≤ n, with every element below 1 closed and every element ≥ 1 either non-closed or equal to ⊤.Such semirings are uniquely identified by the position of the identity element, which can never be ⊥.There are n − 1 possible positions, and hence n − 1 semirings with an identity element.

Subdirectly irreducible dℓp-algebras and unary-determined BI-chains
Let V be a variety (= equational class) of unary-determined dℓ-magmas.Recall that an algebra A is subdirectly irreducible if its congruence lattice ConA has a unique minimal nontrivial congruence, and A is simple if ConA has exactly two elements.By Birkhoff's subdirect representation theorem every algebra is (subdirectly) embedded in a product of subdirectly irreducible factors, hence V = ISP(SI(V)) where SI(V) is the class of all subdirectly irreducible members of V and I, S, P are the class operators that return all isomorphic copies, all subalgebras and all products of members of their input class.
In [Pet96] and [Pet99] a characterization of the simple and subdirectly irreducible dℓpchains, or totally ordered modal lattices, is given.Recall that a dℓp-chain is an algebra (L, ∧, ∨, ⊥, ⊤, p) that is a linearly ordered bounded distributive lattice with normal unary operator p.We denote the following dℓp-chains by A k , B k , and B ′ k for any integer k ≥ 1: bounded countable decreasing and increasing chains respectively.Then the operator p is defined in each structure as follows: In A k = {⊤, a 1 , . . ., a k−1 , ⊥}, pa i = a i−1 for 1 ≤ i < k, p⊤ = ⊤, and p⊥ = ⊥.In A ∞ = {⊤, a 1 , a 2 , . . ., ⊥}, pa i = a i−1 for 1 ≤ i, p⊤ = ⊤, and p⊥ = ⊥.Proof.Let W be a linearly-ordered preorder-forest P -frame with corresponding linear dℓpclosure algebra D(W).Suppose that D(W) is subdirectly irreducible.Then D(W) is of the form A k , B k , or B ′ k for some k in the natural numbers, or D(W) is of the form A ∞ or B ∞ .By Lemma 4.6, since P is reflexive, X ≤ pX for all X ∈ D(W).But in B ∞ or B k with k ≥ 2, there exists X such that pX < X, so D(W) cannot be of this form.
We also have that p⊤ = ⊤ in all dℓp-closure algebras, so we cannot have Hence the only subdirectly irreducible linear dℓp-closure algebras are A 1 , and A 2 , pictured in Figure 4. Since dℓp-algebras have lattice reducts, the variety of all dℓp-algebras is congruence distributive, and it follows from Jónsson's Lemma [Jón67] that nonisomorphic finite subdirectly irreducible dℓp-algebras generate distinct varieties.Moreover, these varieties are completely join-irreducible elements of the lattice of all varieties.A diagram of the poset of join-irreducible varieties generated by dℓp-chains and the algebras D 1 -D 16 is shown in Figure 5.The variety generated by an algebra A is denoted by A = V(A).Equational bases for the varieties generated by bounded dℓp-chains are given in [Pet96].Varieties of unary-determined bunched implication algebras are obtained from Heyting algebras with a residuated closure operator (Corollary 3.3).For a Heyting algebra, the congruence lattice is isomorphic to the set of filters (ordered by reverse inclusion).Hence the subdirectly irreducible Heyting algebras are characterized by having a unique coatom.In particular, all finite Heyting chains are subdirectly irreducible which leads to the following result.
Theorem 7.3.All finite Heyting chains with additional operations are subdirectly irreducible.This includes all finite bunched implication chains and all finite Heyting chains with residuated closure operators.
According to Theorem 6.2 there are 2 n−2 unary-determined commutative doubly idempotent linear semirings with n elements, and if they are expanded with a Heyting implication (i.e. a residual of the meet operation) they are term-equivalent to 2 n−2 Heyting chains with a residuated closure operator.Bunched implication algebras have an identity element, so in this variety there are n − 1 subdirectly irreducible unary-determined bunched implication (BI) chains with n elements, denoted by C nk for 1 ≤ k < n.The structure of these chains is described in the proof of Theorem 6.2 and illustrated on the left in Figure 6.
The variety generated by linearly ordered Heyting algebras is also known as the variety of Gödel algebras, and it has a countable chain of subvarieties, each generated by a finite Gödel chain.The BI-chains C n,n−1 generate this chain of subvarieties since they satisfy px = x, i.e. all their elements are closed and 1 = ⊤.
From the structure of the subdirectly irreducible BI-chains C nk one can observe the following result.Figure 6.Note that the two-element BI-chain C 2,1 is term-equivalent to the two-element Boolean algebra and generates the smallest nontrivial variety.

Conclusion
We showed that unary-determined dℓ-magmas have a simple algebraic structure given by two unary operators and that their relational frames are definitionally equivalent to frames with two binary relations.The complex algebras of these frames are complete distributive lattices with completely distributive operators, hence they have residuals and can be considered Kripke semantics for unary-determined bunched implication algebras and bunched implication logic.Associativity of the binary operator for idempotent unarydetermined algebras can be checked by an identity with 2 rather than 3 variables, and for the frames by a 3-variable universal formula rather than a 6-variable universal-existential formula.All idempotent Boolean magmas are unary-determined, hence these results significantly extend the structural characterization of idempotent atomic Boolean quantales in [AJ20] and relate them to bunched implication logic.As an application we counted the number of preorder forest P -frames with n elements for which the partial order is an antichain, as well as the number of linearly ordered preorder P -frames.We also found all subdirectly irreducible dℓp-closure algebras up to cardinality 8, as well as all finite subdirectly irreducible unary-determined BI-chains and showed how the varieties they generate are related to each other by subclass inclusion.
Theorem 4.1 [DP02, 10.29].For a lattice A the following are equivalent: Theorem 4.2[GJ20].(1) If A is a perfect dℓ-magma and R ⊆ J(A) 3 is defined by xRyz ⇔x ≤ yz then J(A) = (J(A), ≤, R) is a Birkhoff frame, and A ∼ = D(J(A)).(2)If W is a Birkhoff frame then D(W) is a perfect dℓ-magma, andW ∼ = (J(D(W)), ⊆, R ↓ ),where (↓x, ↓y, ↓z) ∈ R ↓ ⇔ xRyz.A ternary relation R is called commutative if xRyz =⇒ xRzy for all x, y, z.The justification for this terminology is provided by the following result.Lemma 4.3.For any Birkhoff frame W, D(W) is commutative if and only if R is commutative.Lemma 4.4.Let W be a Birkhoff frame.Then D(W) is idempotent if and only if xRxx and (xRyz =⇒ x ≤ y or x ≤ z) for all x, y, z ∈ W . Proof.Assume D(W) is idempotent, and let x ∈ W . Then ↓x • ↓x = ↓x since ↓x ∈ D(W).

Figure 1 :
Figure 1: The (Pforest) axiom.The partial order ≤ and the preorder P are denoted by solid lines and dotted lines respectively.

Lemma 4. 10 .
Let W be a P -frame and E a downset of W . Then the downset algebra D(W) has E as identity element for • if and only if E = {x ∈ W | ∀y(xP y ⇒ x ≤ y)} and pE = W .Proof.In the forward direction assume a downset E is the identity for •, and let y ∈ W .It follows from Lemma 2.2(5) that pE = W since W is the top element in D(W), and moreover, (pE ∩ ↓y) ∪ (E ∩ p(↓y)) = ↓y.Hence E ∩ p(↓y) ⊆ ↓y for all y, which shows that if x ∈ E then ∀y(xP y ⇒ x ≤ y) holds.Now let x ∈ W satisfy ∀y(xP y ⇒ x ≤ y).

Figure 5 :
Figure 5: Some join-irreducible varieties of dℓp-closure algebras and bounded dℓp-chains ordered by inclusion.Lines are thin if A ∈ S(B) and thick if A ∈ HS(B) for generating algebras A, B.

Theorem 7. 4 .
For n > 1 and k ≥ 1, each BI-chain C n,k is embedded in C n+1,k+1 .For n > 2 and k ≥ 1, each BI-chain C n,k is embedded in C n+1,k .For n > 2, each BI-chain C n,n−2 maps homomorphically onto C n−1,n−2 .Based on this result, the poset of join-irreducible varieties of bunched implication algebras that are generated by finite unary-determined BI-chains is shown on the right in 12:21

Figure 6 :
Figure 6: All finite subdirectly irreducible unary-determined BI-chains (black elements are closed) and the poset of join-irreducible varieties they generate.

Table 1 :
holds in all partially ordered algebras where • is an order-preserving binary The number of algebras of cardinality n up to isomorphism.