{'fraction_non_alphanumeric': 0.059454257092895584, 'fraction_numerical': 0.008512830244947202, 'mean_word_length': 3.4821678109241145, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 41, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
On implicational bases of closure systems with unique critical sets

We show that every optimum basis of a finite closure system, in D.Maier's sense, is also right-side optimum, which is a parameter of a minimum CNF representation of a Horn Boolean function. New parameters for the size of the binary part are also established. We introduce a K-basis of a general closure system, which is a refinement of the canonical basis of Duquenne and Guigues, and discuss a polynomial algorithm to obtain it. We study closure systems with the unique criticals and some of its subclasses, where the K-basis is unique. A further refinement in the form of the E-basis is possible for closure systems without D-cycles. There is a polynomial algorithm to recognize the D-relation from a K-basis. Thus, closure systems without D-cycles can be effectively recognized. While E-basis achieves an optimum in one of its parts, the optimization of the others is an NP-complete problem.


Introduction
Closure system on a finite set is a unifying concept in logic programming, relational data bases and knowledge systems. Closure systems can be defined by a set of implications (a basis), and in such form they appear as Horn formulas in logic programming, dependencies in relational data bases, CNF representations of Horn Boolean functions and directed hypergraphs in discrete optimization.
Closure systems can also be presented in the terms of finite lattices, and the tools of economic description of a finite lattice have long existed in lattice theory. In this paper we continue the study of economic representation of a closure system based on the structure of its closure lattice, initiated in K. Adaricheva, J.B. Nation and R. Rand [2].
Since the seminal work of D. Maier [19], the main parameters of effective representation of a closure system have been (1) the number of implications in a basis, or (2) the total number of literals in all implications of the basis. It was shown by Maier, in a non-trivial argument, that the set of implications that achieves the minimum in the second parameter (an optimum basis) also achieves the minimum in the first (a minimum basis). The result of V. Duquenne and J.L. Guigues [13] is that every closure system has a canonical minimum basis; moreover, it can be obtained from any given basis in time polynomial in the size of that basis, see A. Day [11]. Quite to the opposite, Maier showed that the problem of finding an optimum basis is NP-complete [19].
On the other hand, in the theory of Horn Boolean functions and directed hypergraphs, other parameters were developed, and no connection with Maier's parameters was so far realized. We establish such a connection in Theorem 10, for the minimum representation of a Horn Boolean function.
Then we introduce a K-basis in general closure systems following the idea of the minimal join representation of elements in finite lattices. This produces a refinement of the canonical basis of V. Duquenne and J.L. Guigues [13]. While the K-basis is not optimum, it does provide a reduction in size of the canonical basis and can be obtained in polynomial time from the canonical basis.
The K-basis allows us to establish an important link between the canonical basis and the D-relation in the closure lattice of a closure system: the latter plays an important role in the lattice theoretical literature, see R. Freese, J. Ježek and J.B. Nation [14]. In particular, the D-relation can be effectively recovered from the canonical basis via its refinement to any K-basis. This allows us to recognize closure systems without D-cycles (Theorem 43), which are generalizations of the quasi-acyclic systems defined in P. Hammer and A. Kogan [16].
We also suggest the general concept of partial optimizations based on the idea that any basis can always be divided into two natural parts: so-called binary and non-binary. Either of those parts can be optimized given various assumptions. Alternatively, a basis can be minimized with respect to the total size of all the premises of implications, which we call left-side optimum, or with respect to the total size of all the conclusions, which is called right-side optimum.
The essential part of the paper is devoted to the study of effective representations of closure systems with unique critical sets, or U C-systems. The definition of this class is based on the notion of essential and critical sets associated with a given closure system. In one important subclass of such systems, the K-basis is unique.
Further refinement in the form of the E-basis is possible in systems without D-cycles, which form a proper subclass of U C-systems. This basis is right-side optimized in its non-binary part. Still, we show that finding an optimum basis for such systems is an NP-complete problem.
The paper is organized as follows. We collect all the required definitions and recall important results in section 2. Then section 3 establishes the relationship between optimum and right-side optimum bases (Theorem 10). Section 4 deals with the problem of optimization of the binary part. It turns out, such optimization is independent of the form and size of the non-binary part (Theorem 20). We also introduce and discuss the concept of a regular basis (Definition 14) that becomes essential in section 6. In section 5 we introduce the K-basis (Definition 27) and describe a polynomial algorithm for retrieving it from the canonical basis (Proposition 24). This will be used in section 7, which discusses the K-basis in systems with unique critical sets. In section 6, a relationship between a canonical basis and the D-relation on the closure lattice is established (Theorem 32), which allows us to investigate, in sections 8 and 9, closure systems without D-cycles. The latter form a proper subclass of the class of U C-systems (Definition 44). In particular, we prove that the E-basis that was introduced in [2] for closure systems without D-cycles, is optimized in one of three essential parts of the basis (Theorem 68).
Nevertheless, two other parts of this basis cannot be effectively optimized, which is shown in section 10 (Corollaries 74 and 76).
It will be convenient for us to refer to the pair S, φ of a set S and a closure operator on it as a closure system.
A subset X ⊆ S is called closed if φ(X) = X. The collection of closed subsets of closure operator φ on S forms a lattice, which is usually called the closure lattice of the closure system and denoted Cl(S, φ).
The lattice operations are denoted ∧, for the meet, and ∨, for the join. Simultaneously, every lattice is a partially ordered set in which every two elements have a least upper bound (which coincides with the join of those elements), and a greatest lower bound (the meet). We will use the notation 0 for the least element of a lattice, and 1 for its greatest element. If a b in lattice L, then we denote by [a, b] the interval in L, consisting of all c satisfying a c b.
For every finite lattice L, let Ji(L) denote the set of join irreducible elements of L. An element j ∈ L is called join irreducible, if j = 0, and j = a ∨ b implies a = j or b = j.
With every finite lattice L, we can associate a particular closure system S, φ in such a way that L is isomorphic to Cl(S, φ). Indeed, define a closure system with S = Ji(L) and the following closure operator: φ(X) = [0, X] ∩ J(L), X ⊆ S.
It is straightforward to check that the closure lattice of φ is isomorphic to L.
There are infinitely many closure systems whose closure lattices are isomorphic to a given lattice L. On the other hand, the closure system just described is the unique one, up to one-to-one mappings of the base sets, that satisfies two additional properties: Condition (2) just says that each φ({i}) is join irreducible. Note that (1) is a special case of (2), and that (2) implies the property We will call a closure system with properties (1), (2) above a standard closure system. It is straightforward to verify that the standard system is characterized by the property that the set S is of the smallest possible size. In other words, one cannot reduce S to define an equivalent closure system. There exists a standard procedure to obtain a standard closure system equivalent to a given one, see [2]. We will assume that the closure systems in this paper are standard.
If y ∈ φ(X), then this relation between an element y ∈ S and a subset X ⊆ S in a closure system can be written in the form of an implication: X → y. Thus, the closure system S, φ can be given by the set of implications: Conversely, any set of implications Σ defines a closure system: the closed sets are exactly those subsets Y ⊆ S that respect the implications from Σ, i.e., if X → x is in Σ, and X ⊆ Y , then x ∈ Y . There are numerous ways to represent the same closure system by sets of implications; those sets of implications with some minimality property are called bases. Thus we can speak of various sorts of bases.
It is convenient to define an implication X → y as any ordered pair (X, y), where X ⊆ S and y ∈ S, especially having in mind its interpretation as a propositional formula, as in the next paragraph below. On the other hand, from the point of view of closure systems, any single implication X → x, with x ∈ X, defines a trivial closure system, where all subsets of S are closed. If such an implication is present in the set of implications Σ, then it can be removed without any change to the family of closed sets that Σ defines. We will assume throughout the paper that implications X → x, where x ∈ X, are not included in the set of implications defining closure systems.
In general, implications X → y, where X ⊆ S and y ∈ S, can be treated as the formulas of propositional logic over the set of variables S, equivalent to y∨ x∈X ¬x. Formulas of this form are also called definite Horn clauses. More generally, Horn clauses are disjunctions of several negative literals and at most one positive literal. The presence of a positive literal makes a Horn clause definite. A Horn formula is a conjunction of Horn clauses.
There is also a direct correspondence between Horn formulas and Horn Boolean functions: a Boolean function f : {0, 1} n → {0, 1} is called a (pure or definite) Horn function, if it has some CNF representation given by a (definite) Horn formula Σ.
Note that, in general, one can consider implications of the form X → Y , where Y is not necessarily a one-element subset of S. The set X is called the premise, and Y the conclusion of an implication X → Y . We will assume that any implication X → Y is an ordered pair of non-empty subsets X, Y ⊆ S, and Y ∩ X = ∅.
The following general observation about the computation of the closure via the basis is part of the folklore, see, for example, [20]. Proposition 1. Let S, φ be a closure system, with a basis Σ. An implication A → b holds in the closure system iff one can find a sequence σ k = A k → B k , k m, of implications from Σ, such that: A sequence σ k , k m, with properties (I)-(III) from Proposition 1 is called a Σ-inference of b from A. Thus, an implication A → b holds in the closure system iff b has Σ-inference from A, for some basis Σ. We could also say that the implication A → b follows from Σ.
Following K. Bertet and B. Monjardet [5], we will call the basis Σ a unit implicational basis, if |Y | = 1 for all implications X → Y in Σ.
Given a unit basis Σ, we can replace all implications X → y with the same premise X by a single implication X → Y , where Y is the union of all singletons y from the conclusions of these unit implications. Such a basis will be called the aggregation of Σ, and denoted by Σ ag . Vice versa, for every basis Σ, we may consider its unit expansion Σ u , where X i → Y i is replaced by {X i → y : y ∈ Y i }. In particular, (Σ u ) ag = Σ, for every aggregated basis Σ.
As in [2], we will call the subset Σ b = {(A → B) ∈ Σ : |A| = 1} of given basis Σ the binary part of the basis. The non-binary part of Σ is Assuming that the closure system S, φ defined by Σ is standard, we can claim that the binary relation ≥ φ on X defined as: is a partial order. This is exactly the partial order on the join irreducible elements in L = Cl(S, φ).
We write |Σ| for the number of implications in Σ. An aggregated basis Σ is called minimum, if |Σ| |Σ * |, for any other aggregated basis Σ * of the same system.
The number s(Σ) = |X 1 | + . . . |X n | + |Y 1 | + · · · + |Y n | is called the size of the basis Σ. A basis Σ is called optimum if s(Σ) s(Σ * ), for any other basis Σ * of the system. Similarly, one can define s L (Σ) = |X 1 | + . . . |X n |, the L-size, and s R (Σ) = |Y 1 | + · · · + |Y n |, the R-size, of a basis Σ. The basis will be called left-optimum , for any other basis Σ * . Finally, the basis is called non-redundant, if removing any implication gives a set of implications that no longer defines the same closure system. Now we recall the major theorem of V. Duquenne and J.L. Guigues [13] about the canonical basis; see also N. Caspard and B. Monjardet [9].
A set Q ⊆ S is called quasi-closed for S, φ , if (1) Q is not closed; (2) Q ∩ X is closed, for every closed set X with Q ⊆ X. In other words, adding Q to the family of φ-closed sets, makes the new family stable under the set intersection; in particular, it is the family of closed sets of some closure operator.
A quasi-closed set C is called critical, if it is minimal, with respect to the containment order, among all quasi-closed sets with the same closure. Equivalently, if Q ⊆ C is another quasi-closed set and φ(Q) = φ(C), then Q = C.
Let Q be the set of all quasi-closed sets and C ⊆ Q be the set of critical sets of the closure system S, φ . Subsets of the form φ(C), where C ∈ C, are called essential. It can be shown that by adding all quasi-closed sets to closed sets of S, φ , one obtains a family of subsets stable under set intersection, thus defining a new closure operator σ. This closure operator σ associated with φ is called the saturation operator. In other words, for every Y ⊆ S, σ(Y ) is the smallest set containing Y which is either quasi-closed or closed.

Then
(1) Σ C is a minimum basis.
(2) For every other basis Σ, for every C ∈ C, there exists (U → V ) in Σ such that σ(U ) = C. The basis Σ C defined in Theorem 2 is called the canonical basis for the system S, φ .
We will make use of the following lemma regarding the saturation operator, due to M. Wild.

Lemma 3. [20]
Let Σ be a basis for the closure system S, φ , and let U → V be an implication in Σ.
A big part of the current paper is devoted to the closure systems that we call U C-systems. In such a system every essential element X has exactly one critical set C ⊆ S with φ(C) = X. The source of inspiration for U C-systems is its proper subclass of closure systems whose closure lattices satisfy the join-semidistributive law.
A lattice is called join-semidistributive if it satisfies the lattice law The join-semidistributive law plays an important role in lattice theory, for example in the study of free lattices, see [14]. An important subclass of finite join-semidistributive lattices are so-called lattices without D-cycles. First, we need to define the D-relation on Ji(L). If x i∈I x i for x, x i ∈ Ji(L), and x x i for all i ∈ I, then X = {x i : i ∈ I} is called a nontrivial cover of x. For any X, Y ⊆ L, we say that Y refines X, and write Y X, if for every y ∈ Y there exists x ∈ X such that y x. The set X ⊆ Ji(L) is called a minimal cover for x, if Y X can be a cover of x, only if X ⊆ Y . In other words, no x i ∈ X can be deleted, or replaced by a set of join irreducibles Z with z < x i for all z ∈ Z, to obtain another cover for x. Finally, a binary relation D is defined on Ji(L): xDy iff y ∈ X for some minimal cover X of x.
We say that a lattice L is without D-cycles if it does not have x 1 , . . . , x n ∈ Ji(L), where n > 2, such that x i Dx i+1 and x 1 = x n . It is well-known that every finite lattice without D-cycles is join-semidistributive. In lattice literature, the lattices without D-cycles are known as lower bounded. In section 10 we will also briefly mention bounded lattices: a lattice L is bounded if both L and the dual lattice L δ are without D-cycles.

Minimum unit basis versus optimum basis
The following result of D. Maier [19] establishes the connections between different types of effective bases. Theorem 4. Every optimum basis is minimum, and every minimum basis is nonredundant.
While the second implication is rather straightforward, the first one requires a non-trivial argument. Moreover, neither of these two statements can be reversed.
Given any basis Σ, we call it a minimum unit basis, if its unit expansion Σ u has the minimum number of (unit) implications among all possible unit bases for this closure system. Being a minimum unit basis is equivalent to having right-side optimization: s R = |Y 1 | + · · · + |Y n | is minimum among all bases for this system. The problem of determining a minimum unit basis is associated with the problem of finding the minimum CNF-representation of Boolean functions, or minimum representation of a directed hypergraph, see E. Boros et al. [6].
It turns out that minimum unit bases and optimum bases of any closure system have an intimate connection. Our goal in this section is to extend Maier's result to include minimum unit bases into a hierarchy: every optimum basis is right-side optimum.
An important part of the statement is that, in every optimum basis, the left side of every implication has a fixed size k C , C ∈ C, that does not depend on the choice of the optimum basis. This makes it into a parameter of the closure system itself.
Theorem 5. Let S, φ be a closure system.
(I) If Σ is a non-redundant basis, then {σ(U ) : (U → V ) ∈ Σ } ⊆ Q. (II) Let Σ O be an optimum basis. For any critical set C, let X C → Y C be an implication from this basis with σ(X) = C. Then |X C | = k C := min{|U | : For the rest of this section we assume that Σ u is a minimum unit basis of the closure system S, φ , and Σ = (Σ u ) ag is the aggregation of Σ u . The following two lemmas borrow from the argument of Theorem 5 in M. Wild [20]. Lemma 6. There exists a minimum basis Σ * such that |Σ * u | = |Σ u |. Proof. We start from Σ. Since Σ u is a minimum basis, Σ is non-redundant.
According to Theorem 2 (2), for each critical set C, we will be able to find an implication (X C → Y C ) ∈ Σ, such that σ(X C ) = C. Suppose Σ has another implication U → V distinct from all X C → Y C , C ∈ C. By Theorem 5 (I) we have σ(U ) ∈ Q, and thus we can find a critical set C 0 ∈ C such that C 0 ⊆ σ(U ) and By Lemma 3, the implication U → σ(U ) follows from the set of implications u | |Σ u |, but due to the minimality of Σ u , we have |Σ • u | = |Σ u |. Repeat this procedure, replacing each implication U → V in Σ • distinct from all X C → Y C , obtaining a basis Σ * . It will have the same number of implications as the canonical basis Σ C , whence it is minimum. Moreover, |Σ * u | = |Σ u |. Lemma 6 suggests the following procedure for dealing with the problem of unit basis minimization.
Corollary 7. Given a unit basis Σ u with the non-redundant aggregation Σ, in time polynomial in s(Σ), one can build a unit basis Σ * u such that |Σ * u | |Σ u |, while the aggregation Σ * of Σ * u is a minimum basis. Indeed, it follows from the proof of Lemma 6 that there exists a partition of Σ = C∈C Σ C into blocks Σ C with respect to critical sets C ∈ C: if (A → B) ∈ Σ C , then C ⊆ σ(A), B ⊆ φ(C). Moreover, there exists at least one implication (D → F ) ∈ Σ C such that C = σ(D). Thus, the whole block can be replaced by D → F , where F is the union of all right side sets of implications in Σ C . Note that it takes polynomial time in s(Σ) to build the partition Σ = C∈C Σ C . In particular, every minimum unit basis Σ u can be turned into a minimum unit Σ * u , whose aggregation is minimum. Lemma 8. There exists a minimum basis Σ * * such that, for every (X C → Y C ) ∈ Σ * * , we have |X C | = k C . Moreover, |Σ * * u | = |Σ u |. Proof. Start with Σ * obtained in Lemma 6. Then σ(X C ) = C, and there exists X * C with σ(X * C ) = C and |X * C | = k C , as defined in Theorem 5 (2). An implication Repeat this procedure for each implication in Σ * , and obtain a new basis Σ * * . Since only the premise of each implication may change, |Σ * * u | = |Σ * u | = |Σ u |. The basis obtained as the result of previous two lemmas has a nice property.
. Both sums represent the number of implications in the unit expansion of each basis. Thus, |Π u | < |Σ * * u | = |Σ u |, which contradicts to the fact that Σ u is a minimum unit basis. Now we can prove the main result of this section.
Theorem 10. There exists a minimum unit basis whose aggregation is an optimum basis. The unit expansion of every optimum basis is a minimum unit basis.
Proof. According to Lemma 9, the unit expansion of the basis Σ * * = {X C → Y C : C ∈ C} has the same number of implications as Σ u , hence, Σ * * u is also a minimum unit basis. Besides, (Σ * * u ) ag = Σ * * , which is optimum. This proves the first statement. Take another optimum basis . The latter equality means that the unit expansions of both bases have the same number of implications. Hence, Π u is also a minimum unit basis, and the second statement is also proved.

Corollary 11.
A basis Σ is optimum if and only if it is left-side optimum and right-side optimum.
Proof. It follows from Theorem 5 (II) that every optimum basis is left-side optimum. It was shown in Theorem 10 that every optimum basis is a minimum unit basis, equivalently, it is right-side optimum.
Vice versa, let Σ be both left-optimum and right-optimum and let Σ O be any optimum basis. Recall that s( It was proved in D. Maier [19] that finding an optimum basis of a given closure system is an NP-complete problem. A similar result about the minimum unit basis in the form of minimal directed hyper-graph representation was established later in G. Ausiello et al. [4]. It follows from Theorem 10 that the Maier's result can be obtained for free from the latter. In [21], M.Wild proved that, given any basis Σ of a closure system whose lattice of closed sets is modular, one can obtain an optimum basis of this system in time O(s(Σ) 2 ). Moreover, it was shown in C. Herrmann and M. Wild [15] that the test for the modularity of the closure system can also be achieved in polynomial time. This has the following consequence.
Corollary 12. Let S, φ be a finite closure system, whose lattice of closed sets is modular. Then there is a polynomial time algorithm to obtain a minimum unit basis for this system.
Indeed, according to Theorem 10, this basis is the unit expansion of the optimum basis built in Wild [21].

Optimizing binary part of a basis
In this section we touch upon the issue of optimization of the binary part of any basis. It turns out that the binary part is independent of the non-binary part, in the sense that there are parameters of optimization for the binary part pertinent to a closure system itself, and independent of the basis that is considered. These parameters are similar to the parameters k C of left-side optimization considered in Theorem 5 (II).
For this section in particular, it is important that we consider a standard closure system S, φ , where it is assumed that φ({a}) \ {a} is a closed set, for every a ∈ S. This set will be denoted A * .
First, we observe that singletons from S that are not closed are always represented in the binary part of any basis.
Lemma 13. Let Σ be any aggregated basis of a standard closure system S, φ .
Secondly, we would like to introduce the bases with properly distinguished binary and non-binary parts. Some bases may have implications in Σ nb that should truly belong to Σ b . Definition 14. Let X, φ be a closure system. An aggregated basis Σ is called In other words, in a regular basis Σ, no implication A → B ∈ Σ nb is equivalent to a → B, for any a ∈ A.
It is easy to observe that both the aggregated the canonical basis and the Dbasis of [2] are regular by the definition. The concept of the regular basis is highly important in the key Definition 31 of section 6.
Consider any c ∈ A * . Since c ∈ φ({a}), by Proposition 1, there should be a sequence of implications σ 1 , . . . , σ k ∈ Σ, say σ The next lemma shows that any basis can be modified to become regular, without increasing its size. Lemma 16. If Σ is any aggregated basis of a standard closure system, then one can find a new basis Σ r that is regular, |Σ r | |Σ| and . If both subsets in the union are non-empty, then one can replace this implication by a → D \ φ(F ) and F → (D ∩ φ(F )) without changing s L and s R . If either of two subsets is empty, then the original implication can be replaced by one of the two new implications, correspondingly. Then a → B can be aggregated with a → D \ φ(F ), reducing s L and, possibly, s R as well. Observe that this procedure will not increase the number of implications.

Corollary 17. Every optimum basis is regular.
We note that the procedure in Lemma 16 does modify the non-binary part of a given basis Σ.
Example 18. Consider a closure system be given by the basis Σ = {a → b, ab → c, bc → d}. The second implication has the premise ab ⊆ φ({a}), and it follows from a → c. Hence, the regular basis obtained via procedure of Lemma 16 is The binary part Σ b of some standard basis will also be called regular, if it satisfies the condition of Proposition 15: for every implication a The next statement shows that the binary part of any basis can be replaced by any regular binary part without any modification to the non-binary part.
Lemma 19. Let Σ = Σ b ∪ Σ nb be any basis of a standard closure system. One can replace any (a → D) ∈ Σ b by arbitrary a → B, with φ(B) = φ({a}) \ {a}, to obtain a new basis Σ * that preserves the non-binary part: Σ nb * = Σ nb . Proof. The argument proceeds by induction on the height of the element a in the partially ordered set (S, ≥ φ ). By the height of an element x in a partial ordered set (S, ≥), we mean the length k of the longest chain x = x 0 > x 1 · · · > x k in (S, ≥).
The argument for k = 1 and the induction step are similar, so we combine both where either a is of height 1, or of height n + 1, and it is already proved that any implication (b → F ) ∈ Σ b with height at most n follows from Σ * . If a is of the height 1, then every c ∈ φ({a}) is an atom, i.e., {c} = φ({c}). In particular, c cannot be a premise of any binary implication.
We want to show that a → D follows from Σ * . Let use again the notation If a is of height 1, then none of these implications is binary, since all elements in A * are atoms. If a is of height n + 1, then all binary implications are of the form n, and such implications follow from Σ * by the inductive hypothesis. Place σ 0 = a → B prior to the first implication in inference σ 1 , . . . , σ k , and replace each binary implication among σ i by its inference from Σ * . This will give the inference of a → d from Σ * .
We note that similar statement is proved in Corollary 5.7 of E. Boros et al. [7], where an exclusive set of implications may, in particular, be any subset of the basis, whose left and right sides are contained in some φ(Y ). In our case, it is φ({a}).
The consequence of two lemmas is the following statement about the right-side optimization of the binary part.
Theorem 20. Let Σ C be the canonical basis of a standard closure system S, φ , and let x C → Y C be any binary implication from Σ C . Every (regular right-side) optimum basis Σ will contain an implication Proof. Suppose we are given a (regular right-side) optimum basis Σ. For each Then, by Lemma 19, it would be possible to replace x C → D by x C → B, without changing other implications of the basis. This would reduce s R , a contradiction with the right-side optimality of Σ. Hence, |D| is minimal among subsets whose closure is We will call a basis B-optimum, if the size of its binary part is minimum among all possible regular bases of the closure system S, φ .
Corollary 21. Every optimum basis is B-optimum. Moreover, every B-optimum basis Σ has the size of its binary part s( According to Theorem 20, every optimum basis has the smallest right size of its binary part, among the same measurement of all other regular bases. The premises in the binary parts are just singletons, so the total size of the premises in every aggregated basis Σ b is |Σ b |. We can point some easy computable lower bound for parameters b C . Recall that by an extreme point of a closed set X one calls an element x ∈ X such that x ∈ φ(X \ {x}). The set of extreme points of X is denoted by Ex(X).
Corollary 22. Let x C → B be an implication from any optimum basis of a closure system S, φ , and let Proof. Since an optimum basis is regular, In general, it is not true that φ(Ex(Y )) = Y , for any Y ⊆ S. Thus, it is possible that b C > |Ex(X * )|. It is easy to observe that this lower bound is attained in closure systems called convex geometries, so that the optimum binary part is tractable in such closure systems. This is treated with more detail in K. Adaricheva [1].
One natural choice for the binary implications in a basis Σ is the cover relation Hence, such a binary part can be included into any basis, irrelevant to its non-binary part. It is algorithmically easy to compute A , see [2,Proposition 16]. Also, the advantage of this choice is that every binary implication a → b that follows from Σ, follows from binary part only. Of course, it is by no means guaranteed that A has the minimal cardinality required in an optimum basis. It can even be reducible, i.e., some proper subset of A can still have the same closure as A .
Example 23. Consider the closure system given by the canonical basis Σ C = {a → bcd, bcdy → a, bc → d}. Apparently, the only binary implication a → bcd is presented by φ , i.e., A = {b, c, d}. On the other hand, we can reduce this implication to a → bc, We will consider in section 7 another form of the basis, for the U C-closure systems, whose binary part will be non-redundant.

K-basis in general closure systems
As follows from the results of sections 3 and 4, an optimum basis is the most desirable among all bases of the closure system, since it implies other forms of minimality.
On the other hand, finding an optimum basis is generally a computationally hard problem. In this section we describe a new notion of a K-basis which can be computed from the canonical basis in polynomial time and provides reduction in size, while maintaining the minimum number of implications.
Let Σ C = {C → Y C : C ∈ C} be a canonical basis. We will call any basis Every refinement is a minimum basis, while s(Σ * ) s(Σ C ).
According to Theorem 2 (2) and Theorem 5 (II), every optimum basis is a refinement of the canonical. Besides, for every critical set C, an optimum basis would have an implication X * → Y * with |X * | = k C , the minimum cardinality of a subset X ⊆ C for which φ(X) = φ(C) (equivalently, σ(X) = C). Such set X is called a minimal generator for the critical set C.
The K-basis is built on the idea of minimizing the left side of implications of the canonical basis with respect to all special order ideals contained in critical sets. Thus, the left sides of the K-basis are not necessarily of the smallest cardinality. On the other hand, the algorithm producing a K-basis is fast and easy.
We observe that, according to the definition of a critical set, every C is an ≥ φorder ideal, i.e., if a ∈ C and a ≥ φ b, then b ∈ C. Among all order ideals Y ⊆ C with the property φ(Y ) = φ(C), we can find a minimal one with respect to containment. Finally, for every order ideal Y , it is clear that We will call a set X * a minimal order generator of the critical set C if X * = max(X) for some minimal (with respect to containment) order ideal X ⊆ C such that φ(X) = φ(C).
Proposition 24. Let C be a critical set for the closure system S, φ . Build a sequence X 0 = C, X 1 , . . . , X n of subsets of C as follows: (1) X k+1 = X k \ {x k }, where x k is any ≥ φ -maximal element of X k ; (2) φ(X k ) = φ(C); (3) none of the maximal elements of X n can be removed to obtain a set with the same closure as C.
Then C K := max(X n ), the set of ≥ φ -maximal elements of X n , is a minimal order generator, and every minimal order generator may be obtained via such a sequence.
Proof. One can reach any minimal order ideal X n contained in C and with φ(X n ) = φ(C), through the series of steps, when a maximal element of an order ideal is removed, producing another order ideal with the same closure, which is exactly the procedure described in the proposition.
To align the notion of a minimal order generator with existing lattice terminology we include the following tautological statement.
Proposition 25. Every minimal order generator C K ⊆ C is a -minimal join representation of the element φ(C) in the closure lattice of S, φ .
A critical set might have several minimal order generators, and the procedure described in Proposition 24 may lead to any of them, depending on the order in which the maximal elements are removed. See Example 29 for an illustration.
Example 26. Not every minimal generator for a critical set C will be simultaneously a minimal order generator. Both are sets satisfying φ(X) = φ(C), but the former type is minimal with respect to ⊆, while the latter is minimal with respect to . A concrete example is the lattice in Example 72.
We summarize easy facts about K-bases.
Lemma 28. Let Σ K be a K-basis for S, φ .
Proof. First, note that if x ≥ φ y and y = x, then (x → Y ) ∈ Σ C and y ∈ Y , due to definition of Σ C . Secondly, {x} will be a minimal order generator for itself and Y comprises all elements y ∈ S with x ≥ φ y. Choosing only ≥ φ -maximal elements Y K ⊆ Y will give exactly the lower covers of x, which proves (1).
Since every a ≥ φ b is in the transitive closure of cover sub-relation of ≥ φ , every Vice versa, C K → Y C follows from Σ C , due to the definition of C K . Moreover, which finishes the proof of (2). Part (3) easily follows from the definition of Σ K , since C K ⊆ C and Y K ⊆ Y C .
The following example demonstrates the advantage of considering K-bases due to possible size reduction of the canonical basis, while preserving its property of the minimality. The other purpose of this example is to show that there are possibly several K-bases associated with a closure system.
Example 29. Consider the standard closure system on S = {x, y, z, e, d, u} given by its closure lattice in Figure 1. Consider the critical set C = S \ {e}, for which φ(C) = S. Following procedure in Proposition 24, we would have two maximal elements x, y ∈ C that can be removed: Thus, (C → e) ∈ Σ C can be refined to either yd → e (max X 1 = {y, d}) or xd → e ((max X 2 = {x, d}), and this system has two K-bases.
In the second one, the implication yd → e is replaced by xd → e, which does not change the size of the basis.
x y u z d e Figure 1. Example 29 While searching for a minimal order generator of smallest cardinality, for each critical set C, could be a long process, finding some minimal order generator is a fast quadratic algorithm.
Let Σ C be a canonical basis of a standard closure system S, φ . Assume that |X| = n, |Σ C | = m, s(Σ C ) = k and s(Σ b C ) = k b . It was shown in Theorem 11.3 of [14] that it will take time O(nk b + n 2 ) to produce the cover relation of the partially ordered set (S, ≥ φ ). Moreover, an upper bound for the number of pairs in the cover relation is k b .
Proposition 30. Given the canonical basis Σ C of a standard closure system with s(Σ C ) = k, it will take time O(k 2 ) to produce one minimal order generator for each C ∈ C. Thus, it requires time O(k 2 ) to produce a K-basis.
Proof. For each critical set C, one would need at maximum k b steps to recognize a maximal element x ∈ C. Then, the time O(k) is needed to check whether φ(C \ {x}) = φ(C) (using the forward chaining procedure, for example). If this is true, then X 1 = C \ {x}, and one proceeds with X 1 in place of C. Otherwise, we would search during time O(k b ) for another maximal element of C. The number of maximal elements checked overall cannot be more than |C|, and the time spent on each of them is O(k). The overall time is the summation over all critical sets, i.e., O(k 2 ).

D-relation from the canonical basis
The goal of this section is to show that the D-relation defined on S, for the standard closure system S, φ , via the concept of minimal covers, can be recovered from the canonical basis. The main result is achieved in Theorem 32 by the series of Lemmas 33-40. This allows us to recognize effectively the systems without D-cycles that will be treated further in section 8.
Recall that bDa, for a, b ∈ S in a standard closure system S, φ , iff there is a -minimal cover A for b such that a ∈ A. In particular, the closure system satisfies the implication A → b. We note that such an implication belongs to the non-binary part of the D-basis of S, φ , see [2]. Vice versa, if A → b is a non-binary implication of the D-basis, then A ∪ {b} ⊆ Ji L and A is a minimal cover for b. The binary part of Σ D can be given by φ .
We will denote D δ the dual of D, i.e., (a, b) ∈ D δ iff (b, a) ∈ D. Thus, a is the first entry in the pair (a, b) ∈ D δ iff a ∈ A appears on the left in a non-binary implication A → b from the D-basis.
Recall that in the standard closure system S, φ , the binary relation ≥ φ on S defined as: is a partial order. A subset J ⊆ S will be called a ≥ φ -ideal, if a ∈ J and a ≥ φ b imply b ∈ J. We will denote by Id φ (A) an ≥ φ -ideal generated by A ⊆ S.
Definition 31. Given any regular basis Σ, we define a binary relation ∆ Σ on S as follows: (a, b) ∈ ∆ Σ iff there is (A → B) ∈ Σ nb such that a ∈ A, b ∈ B. By ∆ tr Σ we will denote the transitive closure of the relation ∆ Σ .
Finally, we introduce an important modification of the canonical basis Σ C that will prove useful. For each A C → B C in Σ nb C let A K → B K be a corresponding implication from any K-basis of the closure system. Replace each implication A C → B C in Σ nb C by A K → B C . Denote by Σ * this new set of implications which, apparently, also forms a basis. Note that Σ * is a refinement of the canonical basis, with no change to the right sides of implications.
We note that although Σ C is uniquely defined for a closure system, Σ * is not, reflected in the fact that there might be several K-bases for the closure system.
Our main goal now is to prove the following statement.
The meaning of Theorem 32 is that the basis Σ * recovers an important subrelation ∆ Σ * of the D-relation, so that any pair in the D-relation can be obtained via transitive closure of this sub-relation.
The theorem directly follows from Lemmas 33 and 40.
Proof. We need to show that, for any A C → B C from the canonical basis, if A K ⊆ A C is a -minimal representation of U = φ(A C ), then (a, b) ∈ D δ , for every a ∈ A K and b ∈ B C . Apparently, A K is a non-trivial cover of b, for every b ∈ B C . Suppose that A K can be properly refined to another cover A of b, i.e. A A K , A is a cover for b and A K ⊆ A . Since A K is a -minimal representation for U = φ(A C ), we cannot have φ(A ) = U . Hence, φ(A ) ⊂ φ(A K ) = U . Then, since A C is a quasi-closed set and A ⊆ A C , we should have b ∈ φ(A ) ⊆ A C , a contradiction. Hence, A K is a minimal cover for b ∈ B C and (a, b) ∈ D δ follows, for every a ∈ A K .
This lemma allows us to establish a connection between any K-basis and the D-basis Σ D .
Corollary 34. For any K-basis Σ K , its unit expansion Σ u K is contained in Σ D . In particular, |Σ u K | |Σ D |. Proof. Indeed, as shown in Lemma 33, if A K → B C is in Σ * , then A K is a minimal cover for every b ∈ B C . Recall that A K is taken from implication A K → B K of some K-basis, and We observe that Theorem 32 does not hold when Σ * is replaced by Σ C . This is due to the fact that an even weaker form of Lemma 33 fails for Σ C .
We will call a basis Σ round, if A ∪ B = φ(A) for every (A → B) ∈ Σ nb . In particular, due to the definition, the canonical basis is round.
Lemma 36. Let Σ be any round basis of a closure system S, φ . If an element b ∈ S has a Σ-inference from A ⊆ S, then it has a Σ nb -inference from Id φ A. The converse statement is also true for an arbitrary basis Σ.
We want to show that one can remove binary implications from this sequence at the cost of replacing A in properties (I) and (III) of Proposition 1 by Id φ A.
For this we show by induction on k that set X k = (Id φ A) ∪ B 1 ∪ · · · ∪ B k−1 is an ≥ φ -ideal. X 1 = Id φ A is and ideal by the definition. Suppose X k−1 is an ideal and σ k ∈ Σ nb . Recall that A k ∪ B k = φ(A k ), a closed set in S, φ , in particular, it is an ≥ φ -ideal. As A k ⊆ X k−1 , it follows that X k = X k−1 ∪ B k is an ≥ φ -ideal as well.
If σ k ∈ Σ b , then A k = {a} and a ∈ X k−1 , but then B k ⊆ X k−1 by the induction hypothesis. In particular, we see from the above argument that X k−1 = X k , when σ k ∈ Σ b , and any such σ k can be removed from the sequence.
The converse statement follows from the observation that A → Id φ A holds in the closure system, whence by Proposition 1, there exists a Σ-inference of every element of Id φ A from A. One can append an Σ nb -inference of b from Id φ A, to obtain an inference of b from A.
Lemma 37. Let Σ be any basis of a closure system S, φ . Consider aD δ b, and let A → b be the corresponding implication, where A is a -minimal cover for b and a ∈ A. If σ 1 , . . . , σ n is a Σ nb -inference of b from Id φ A, then a ∈ A k for some k n.
Proof. Since A is a -minimal cover for b, every a ∈ A is a maximal element in Id φ A. Therefore, J a = Id φ A \ {a} is also an ≥ φ -ideal. If some a ∈ A does not appear in any A k , k n, then sequence of σ k , k n, is, in fact, a Σ nb -inference of b from J a . Let A be the set of maximal elements of J a . Then A A and J a = Id φ A . By Lemma 36, there exists a Σ-inference of b from A , and thus A → b holds in the system. Since A ⊆ A , this contradicts the -minimality of cover A for b.
Lemma 38. For any regular basis Σ, let σ k ∈ Σ nb , k n, be a non-redundant inference of b from Id φ A. Let a ∈ A s , for some s n. Then (a, b) ∈ ∆ tr Σ . Proof. Proceed by induction on t = n − k. If t = 0, i.e., k = n, then a ∈ A n , b ∈ B n , whence (a , b) ∈ ∆ Σ . Suppose we have shown this for all t < n − k, and consider σ k = A k → B k and some a ∈ A k . If none of elements in B k belongs to any A s , s > k, then this implication could be removed from the sequence, contradicting the assumption that the sequence is non-redundant. Hence, there is b ∈ B k ∩ A s , s > k. Since n − s < n − k, by the inductive assumption, (b , b) ∈ ∆ tr Σ . Besides, (a , b ) ∈ ∆ Σ . Hence, (a , b) ∈ ∆ tr Σ . Note that the following statement now follows from Lemmas 36-38.
Corollary 39. Let Σ be any regular round basis of a closure system S, φ . Then D δ ⊆ ∆ tr Σ . In particular, this holds for Σ = Σ C .
It remains to show that the containment of Corollary 39 will still hold when we replace basis Σ C by Σ * defined prior to Theorem 32.
and conclusions of all implications are still the same, the sequence σ * 1 , . . . , σ * n is an Σ * nb -inference of b from Id φ A. Remove unnecessary implications, if needed, making it non-redundant. By Lemma 37, a ∈ A k for some k n, and by Lemma 38, (a, b) ∈ ∆ tr Σ * . Note that Lemma 40 does not hold when ∆ tr Σ * is replaced by ∆ Σ * . Example 41. In the closure system of Example 35, we have (4, 6) ∈ D δ , but (4, 6) ∈ ∆ Σ * .
The consequence is that the D-relation can be fully recovered from the transitive closure of the modified canonical basis Σ * , whose premises are taken from any Kbasis.
Corollary 42. A closure system is without D-cycles iff ∆ tr Σ * does not have cycles. This follows from Theorem 32.
Theorem 43. There exists a polynomial algorithm, in the size of s(Σ C ), to recognize a closure system without D-cycles.
Proof. By Proposition 30, it takes polynomial time to recover ∆ Σ * . Then it takes polynomial time to check whether this relation contains cycles.
Note that the systems without D-cycles include, as a subclass, so-called quasiacyclic closure systems that are studied in the form of Horn Boolean functions in P. Hammer and A. Kogan [16]. For every basis Σ one can define binary relation The difference is that ∆ Σ is built only on the non-binary part of (regular) Σ. A quasi-acyclic closure system can be defined as a closure system for which there exists a basis Σ such that tr Σ does not have cycles, unless a cycle is fully within the binary part tr Σ b . The latter cycles never occur in the standard closure systems considered in the current paper. In particular, if a closure system is quasi-acyclic, then it does not have D-cycles. See K. Adaricheva [1] for further discussion and examples.

K-basis in closure systems with unique criticals
Starting with this section, we will consider the closure systems which we call U C-systems.
Definition 44. A closure system S, φ is called a system with unique criticals, or U C-system, if, for any critical sets C 1 , C 2 ∈ C, φ(C 1 ) = φ(C 2 ) implies C 1 = C 2 .
An immediate consequence of this definition is that, for every essential element Y = φ(Y ), there exists a unique implication C → φ(C) \ C in the canonical basis, for which φ(C) = Y .
Proposition 45. For every closure system S, φ given by some basis Σ, it requires time O(s(Σ) 2 · |Σ|) to determine whether it is a U C-system.
Proof. Indeed, it will require O(s(Σ) 2 ) time to build the canonical basis. With Σ C available, one needs to check whether φ(C 1 ) = φ(C 2 ), for any two premises C 1 , C 2 of the canonical basis. It takes time O(s(Σ C )) to find the closure of any given set, so verifying all the pairs requires time O(s(Σ C ) · n 2 ). Thus, overall time should not exceed O(s(Σ) 2 · |Σ|).
One important advantage of U C-closure systems is that one can establish a lower bound for s R (Σ nb ), among all minimum bases Σ.
Let C >1 ⊆ C be the subset of all critical sets with more than one element. For Recall from Theorem 2 (2) that any minimum basis of a closure system has the form Σ = {X C → Y C : C ∈ C, σ(X C ) = C}.
Lemma 46. Let S, φ be a U C-closure system, and Σ be any minimum basis. If Proof. We have y m ∈ φ(X C ), so the implication X C → y m follows from Σ. Let . Thus, y m is also the maximal in φ(C ) \ C , which is not possible by assumption. Hence, φ(A k ) = φ(X C ) = φ(C). But in closure systems without D-cycles, there exists only one critical set for an essential element φ(C), i.e., X C = A k and y m ∈ Y C .
We will see in section 9 that this lower bound can be attained in the E-basis of a closure system without D-cycles.
One important subclass of U C-systems is the class of closure systems whose closure lattice satifies (SD ∨ ). We will call an element t ∈ Cl(S, φ) join-semidistributive, if (SD ∨ ) holds at t: t = x ∨ y = x ∨ z → t = x ∨ (y ∧ z). We first recall a well-known theorem of B. Jónsson and J.E. Kiefer.
Theorem 48. [17] An element t of a finite lattice is join-semidistributive iff t has a unique -minimal representation.
We will call closure system S, φ join-semidistributive if all elements of Cl(S, φ) are such. As was pointed in section 5, the premises of implications in K-basis, in its non-binary part, are associated with the -minimal join-representation of essential elements in the closure lattice.
(1) Fix any essential set Y , and let C be any critical subset with φ(C) = Y . Then C should contain some minimal order generator C K , and σ(C K ) = C. On the other hand, C K gives a -minimal representation of φ(C) = Y , and this representation is unique in closure systems with (SD ∨ ). Hence, C = σ(C K ) is unique critical set associated with the essential element Y .
(2) Since, by Theorem 48, every element of Cl(S, φ) has a unique -minimal join representation, apply Proposition 25 to conclude that the K-basis of the associated standard closure system must be unique.
For both statements in Proposition 49, (SD ∨ ) is a sufficient condition. It is easy to show that it is not necessary. Example 29 provides an U C-system which has two K-bases, and hence is not join-semidistributive. Even if the closure system is both U C and has a unique K-basis, which guarantees that (SD ∨ ) holds at all essential elements, it does not imply that (SD ∨ ) holds at non-essential elements.

This leaves us with the following open questions.
Problem 51.
(A) Is there an algorithm that allows us to recognize in polynomial time whether the system has a unique K-basis? (B) Is there an effective algorithm that allows us to recognize whether a closure system S, φ is join-semidistributive, given its canonical basis?
A positive answer to question (A), even in U C-system, does not automatically imply the positive answer to (B), as Example 50 demonstrates. We will address lattice theoretical aspects of U C-systems in a separate paper [3].
At the end of this section, we discuss a new binary part for join-semidistributive closure systems.
Recall from Lemma 19 that any implication (x → A) ∈ Σ b can be replaced by In the most closure systems we treated so far, the binary part was built out of the cover relation of the order ≥ φ . Precisely, In join-semidistributive closure systems, there is another natural choice for B.
Definition 52. We will call set of implications Σ F the F -basis of a join-semidistributive standard closure system, if B is a minimal order generator of φ({x}) \ {x}}. We note that F -basis of any join-semidistributive closure system is unique. We saw in Example 23 that binary part based on the cover relation φ might be redundant. The advantage of the binary part of the F -basis is that it possesses a weak form of minimality. Recall that Σ b u denotes the unit expansion of the implications Σ b .
Proposition 53. Σ b u of the F -basis Σ F for a join-semidistributive closure system S, φ is non-redundant.
Proof. We need to show that none of the implications in Σ b u of the F -basis can be removed.
Suppose that a → B is a binary implication in Σ F , where B = {b 0 , . . . , b n } is a minimal order generator of φ({a})\{a}}. Consider a closure system Σ = Σ F \{a → b 0 }. Let φ Σ be an associated closure operator.
It immediately follows from the Claim that We note that there is no guarantee that |B| in an implication (a → B) ∈ Σ F for some join-semidistributive closure system is minimal with the property φ(B) = φ({a}) \ {a}}. Examples of such systems will be shown in section 10.

E-basis and its connection to the canonical basis
We introduced the E-basis in [2] as a finer version of the D-basis for closure systems without D-cycles. In section 6 we showed that one can recognize whether a closure system is without D-cycles from its canonical basis, in time polynomial of the size of that basis.
In this section, we will establish the connection between the E-basis and the canonical basis. Since every finite lattice without D-cycles is join-semidistributive, the results of section 7 are applicable here. In particular, the K-basis is unique for closure systems without D-cycles.
We will proceed as follows. First, we prove that the E-basis in its aggregated form is a refinement of the canonical basis. Secondly, we establish that the left sides of the E-basis and the K-basis are the same. Thirdly, we will analyze possible differences in the right sides of the non-binary parts of the K-basis and the E-basis. This will allow us to create a blend of the two, which we will call the optimized E-basis. There is an effective algorithm to produce the optimized E-basis from the canonical basis.
First, recall the definition of the E-basis from [2]. Let S, φ be a standard closure system without D-cycles. For every x ∈ S, let M (x) = {Y ⊆ S : Y is a minimal cover of x}. The family φ(M (x)) = {φ(Y ) : Y ∈ M (x)} is ordered by set containment, so we can consider its ⊆-minimal elements.
The set of implications is called the E-basis of the closure system. Recalling the definition of the D-basis given in section 6, we note that Σ E ⊆ Σ D . It was noted in [2] that Σ E might not form a basis of a closure system in general, so the requirement of no D-cycles is essential.
Example 54. Consider a closure system given by the basis Σ = {ac → b, bd → c, ad → bc}, which is the canonical basis, at the same time the K-basis of the system. It is easy to check that this system is join-semidistributive, but it has the D-cycle bDcDb. We have {a, c}, {a, d} ∈ M (b), and φ({a, c}) ⊂ φ({a, d}), so that only {a, c} belongs to M * (b). Symmetrically, only {b, d} belongs to M * (c). Hence, the set of implications Σ E for this system is {ac → b, bd → c}, which is not a basis, since {a, d} would be a closed set with respect to Σ E .
Let Σ ag E be the aggregated E-basis and Σ C be the canonical basis of S, φ . As usual, σ denotes the saturation operator associated with the closure operator φ.
Theorem 55. Let S, φ be a standard closure system without D-cycles. Then there is a one-to-one mapping f : Σ ag In particular, the aggregated E-basis is a refinement of Σ C : s(Σ ag E ) s(Σ).
In fact, the result follows, if we argue over Σ E in its original unit form, and the unit expansion Σ u of Σ C , and show that there is one-to-one mapping f * : We now describe a well-known algorithm of producing the canonical basis due to A. Day [11].
Given any basis Σ = {A i → B i : i k} of a closure system S, φ , the procedure of obtaining the canonical basis Σ C consists of two steps: (2) if there are two implications C → F and D → F obtained in the first step, and C ⊆ D, then remove D → F ; also, remove all implications of the form F → F . The unit expansion Σ u of Σ C can now be written from all remaining implications and will consists of σ(A i ) → x, where A i is some premise in the original basis and In the proof of Theorem 55 below, we will apply this algorithm to a given basis Σ E of some closure system without D-cycles. First, we prove several auxiliary statements. We need to recall that the saturation operator σ associated with a closure operator φ is defined as . Indeed, otherwise, Y would be a cover for x, so we would be able to find a minimal cover Y with Y Y , hence, φ(Y ) ⊂ φ(A). This implies that A ∈ M * (x), hence, A → x cannot be included in E-basis. Thus, x ∈ q(A). Apparently, x ∈ q(A) with φ(q(A)) = φ(A), so we can apply the same argument, replacing A by q(A), to show that x ∈ q 2 (A). Proceeding with this inductive argument, we conclude that x ∈ q k (A), for all x ≥ 1.
Lemma 57. If (A → x) ∈ Σ E , then A is a -minimal join representation of φ(A).
Proof. We may assume that |A| > 1, since for binary implication the statement is trivial.
According to the definition of the E-basis, A is a minimal cover of x. If there is a set F A such that φ(F ) = φ(A) and A ⊆ F , then F will also be a cover of x, which contradicts the -minimality of the cover A.
Proof of Theorem. Apply the algorithm for obtaining the canonical basis to Σ E . Apparently, Σ b E ⊆ Σ b u . So we need to make sure the one-to-one mapping f * exists for non-binary implications.
According to Lemma 57, if (A → x), (B → y) ∈ Σ E and A = B, then φ(A) = φ(B). Thus, after applying the first step of the algorithm, we will not obtain any two implications C → F , D → F , with C = D. Moreover, by Lemma 56, we will not have implications of the form F → F after the first step. Hence, the second step of the algorithm may be applied only to remove repeating implications, and they may occur here only when A = B. In this case x = y, and x, y ∈ φ(A) \ σ(A) by Lemma 56. Therefore, σ(A) → x and σ(A) → y are in the unit expansion of the implication σ(A) → φ(A) from the canonical basis. Hence, the mapping Now we show that the premises of implications in the E-basis and K-basis for a closure system without D-cycles are the same.
Lemma 58. Let S, φ be a standard closure system without D-cycles with Ebasis Σ E and K-basis Proof. According to Proposition 25, C K is a -minimal join representation of φ(C), which is unique is join-semidistributive closure systems. Due to Lemma 57, The following examples show that the conclusions of non-binary parts of the E-basis and K-basis might be different.
Example 59. The K-basis may have smaller size than the E-basis. Consider the closure system on S = {a, b, c, d} given by its canonical basis Σ C = {d → cb, c → b, ab → dc}. This is also the E-basis. On the other hand, the K-basis optimizes the last implication to ab → d, since d is the maximal element of {d, c} with respect to the ≥ φ -order.
Example 60. The E-basis may have smaller size than the K-basis. Consider the closure system on S = {2, 3, 4, 5} defined by its canonical basis Σ C = {2 → 5, 45 → 23, 35 → 2}. This is also the K-basis of the system. On the other hand, 2 appears on the right side of two non-binary implications, in particular, both {4, 5} and {3, 5} are the minimal covers for 2. Since φ(45) > φ(35), only 35 → 2 appears in the E-basis. Thus, the E-basis has smaller size than the K-basis: Definition 61. We call Σ OE an optimized E-basis if every implication A E → B E from the non-binary part of E-basis is replaced by Note that the E-basis is ordered direct, as was shown in Theorem 23 [2]. The optimized E-basis might not longer have this property. On the other hand, applying the ordered sequence of the E-basis to the optimized E-basis and concatenating the binary part again at the end will produce an ordered sequence. See the definition of the ordered sequence and further details in section 8 of [2].
Let us demonstrate this on Example 59. The optimized E-basis is the same as the K-basis: Σ OE = {d → c, c → b, ab → d}. Σ OE is no longer direct, with this order of implications that is inherited from the order of the E-basis, since ρ(ab) = abd = abcd = φ(ab). If we concatenate the binary part at the end, we obtain the following sequence: It is easy to verify that it is an ordered direct sequence.
Lemma 62. Given a closure system without D-cycles, it will take time O(s 2 (Σ C )) to obtain optimized E-basis from the canonical basis.
Proof. Given the canonical basis, it takes time O(s 2 (Σ C )) to verify that there is no D-cycles and to obtain the unique K-basis Σ K . For each x ∈ S, choose all non-binary implications (X K → Y K ) ∈ Σ K such that x ∈ Y K . We know that X K is a -minimal cover for x. Compute φ(X K ) for all such implications and choose minimal ones, with the respect to the containment order. Keep x in Y K only if φ(X K ) is ⊆-minimal; otherwise, remove x from Y K . There are no more than |X| elements to check, and each may appear in no more than |Σ C | implications. Computation of φ(X K ) takes time O(s(Σ C )). Assuming that |X| · |Σ C | ≈ s(Σ C ), it will take time O(s 2 (Σ C )) to build the optimized E-basis.

Aspects of optimality of the E-basis and its further modifications
As was discussed in sections 3 and 4, every optimum basis of a standard closure system has parameters fully determined by the closure operator: the right size of each binary implication (associated with one-element critical sets) and the left size of each non-binary implication (associated with critical sets of more than one element).
In section 10 we will show that finding any of those optimal parts in closure systems without D-cycles is an NP-complete problem. On the other hand, the optimum right size of the non-binary part can be achieved.
First, we summarize from the previous results.
Proposition 63. Let S, φ be a standard closure system. There exists a constant s nb R (S, φ) such that s R (Σ nb ) = s nb R (S, φ) for every optimum basis Σ. Proof. Indeed, s(Σ) = s L (Σ b )+s R (Σ b )+s L (Σ nb )+s R (Σ nb ), for every basis Σ. Now assume that Σ is optimum. The number of implications in Σ b is fully determined by the number of one-element critical sets, so that s L (Σ b ) is the same for all optimum bases. By Theorem 20, s R (Σ b ) is the sum of parameters b C , where C runs over all singletons in C, and s L (Σ n ) is the sum of parameters k C , where C runs over all non-singletons in C, as shown in Theorem 2 (2). Therefore, the last components in the sum, s R (Σ nb ), must be the same for all optimum bases.
Corollary 64. The inequality s nb R (S, φ) s R (Σ nb * ) holds for any basis Σ * of a standard closure system S, φ .
Proof. By Lemma 19 we may assume that the binary part of Σ * matches the binary part of some optimum basis Σ. Now Σ is right-side optimum, due to Corollary 11, whence s R (Σ) s R (Σ * ). Since these bases have identical binary parts, we also have s nb R (S, φ) = s R (Σ nb ) s R (Σ nb * ). Remark 65. Unlike the parameters b C and k C of parts of optimum basis used in argument of Proposition 63, there is no fixed value for the size of the conclusion in the non-binary implication A C → B C of any optimum basis.
Example 66. Let the closure system on S = {a, b, c, z} be given by the canonical basis Σ C = {z → a, ab → cz, ac → bz}. There are two optimum bases: Σ 1 = {z → a, ab → c, ac → bz} and Σ 2 = {z → a, ab → cz, ac → b}. While s R (Σ nb 1 ) = s R (Σ nb 2 ) = 3, implications in Σ 1 and Σ 2 with premise ab have conclusions of different sizes, and the same holds for implications with ac in the premise.
On the other hand, we notice that the closure system in Example 66 is not U C, since essential element φ(ab) = φ(ac) contains two critical subsets.
Conjecture 67. If A 1 → B 1 , . . . , A k → B k are all implications of any optimum basis, corresponding to critical sets with the same closure, i.e., φ(A 1 ) = · · · = φ(A k ), then s = |B 1 | + · · · + |B k | does not depend on the choice of the optimum basis. In particular, in U C-closure systems, for every critical set C, and corresponding implication A C → B C in any optimum basis, |B C | does not depend on the choice of the optimum basis.
The main statement of this section is that the optimized E-basis of any closure system without D-cycles has the optimum right size in its non-binary part. For this, we recall that every closure system without D-cycles is join-semidistributive, and thus it is also a U C-system.
Theorem 68. Let S, φ be any closure system without D-cycles. Then s R (Σ nb OE ) = s nb R (S, φ). Proof. Consider any optimum basis Σ. Since it is minimum, Lemma 46 is applicable to Σ. Take any (X C → Y C ) ∈ Σ nb and corresponding (A C → B C ) ∈ Σ nb OE , C ∈ C. By the definition of Σ OE , B C consists of maximal elements y m in φ(A C ) \ σ(A C ) = φ(C) \ C such that y m ∈ φ(C ) \ C , for every C ∈ C with φ(C ) ⊂ φ(C). According to Lemma 46, this implies B C ⊆ Y C , hence, s R (Σ nb OE ) s R (Σ nb ). On the other hand, s R (Σ nb OE ) ≥ s nb R (S, φ) = s R (Σ nb ), by Corollary 64. Thus, s R (Σ nb OE ) = s nb R (S, φ). Remark 69. We note that the result of Theorem 68 cannot be extended to joinsemidistributive closure systems, when replacing the E-basis by a K-basis. We saw in Example 54 that the conclusions of non-binary implications in a K-basis cannot be reduced by taking away some y m ∈ φ(C) \ C, even if y m ∈ φ(C ) \ C , for some critical sets C, C , φ(C ) ⊂ φ(C). The same example shows that a K-basis may not reach s nb R (S, φ) in the size of its non-binary right side. Indeed, the implication ad → bc can be reduced to either ad → b or ad → c, to obtain a right-side optimum basis.
At the end of this section we mention the binary modification for basis Σ OE that is available for all join-semidistributive closure systems discussed in section 7. It combines the binary part of the F -basis and non-binary part of the optimized E-basis.
Indeed, this follows from Theorem 68 and Proposition 53. 10. Finding optimum or minimum unit basis for bounded lattices is NP-complete As was noted in section 3, finding an optimum basis for an arbitrary closure system is an NP-complete problem, while it could be done effectively in closure systems with modular closure lattices.
The effective procedure that allows us to build the optimized E-basis for systems without D-cycles and reaches the optimum in its non-binary right side, could suggest that such systems also have an effective procedure for finding an optimum basis. The goal of this section is to show, that, to the contrary, finding an optimum basis even in the strict subclass of systems without D-cycles (closure systems with bounded closure lattices) is NP-complete.
In this section we show that each of the problems is NP-complete, for the closure systems without D-cycles: (1) find a basis Σ that reaches the minimum in s L (Σ nb ); (2) find a basis Σ that reaches the minimum in s R (Σ b ). For this aim, we need to identify a known NP-complete problem that can be reduced to either of the problems above.
The following problem known as the set cover problem is included into original "Karp's21", the list of 21 NP-complete problems in Karp [18].
Given a finite set Q and a family of its subsets Q = {Q i : i k} that covers Q, i.e., Q ⊆ Q i , the set cover problem is to identify the smallest subfamily of Q that still covers Q. Now we will develop the path to reduce the set cover problem to the problem of finding a minimal generator for some critical set in closure system without D-cycles (see section 5 to recall definitions). This is equivalent to identifying a premise for one non-binary implication in an optimum basis. First, we illustrate it on a simple example.
We will construct a closure system without D-cycles on an extension S of Q so that Q will be the minimal order generator for some critical set. At the same time, Q will not be a minimal generator, and the latter will be rather associated with the subfamily B.
The procedure will use a lattice theoretical construction to build L = Cl(S, φ), for a standard system S, φ . For every subset Y of family Q which is a not a singleton, add a new element z(Y ) to Q, also add another element w. Thus, with notation z = z({q 1 q 2 }), we have in our case S = {q 1 , q 2 , q 3 , q 4 , z, w}.
Start from L 0 = 2 Q . Then use the doubling construction introduced in A. Day [10] to double the element b = {q 1 , q 2 } ∈ L 0 . This will replace b by a 2-element interval [b, z] and extend lattice operations so that b ∨ x = z ∨ x, for every x b, and b ∧ x = z ∧ x, for every x ≥ b, x ∈ L 0 . Let L 1 be the lattice after this doubling. Then z is a join irreducible element in L 1 ; moreover, z ≥ q 1 , q 2 .
Finally, for w, choose any maximal proper subset in Q, say, {q 1 , q 2 , q 3 }, and let t ∈ L 1 be the element inherited from {q 1 , q 2 , q 3 } ∈ L 0 . Apply the doubling construction to t to obtain a 2-element interval [t, w], so a new lattice L 2 after this second doubling will have w as a new join irreducible element.
Let S, φ be a closure system with Cl(S, φ) = L 2 . It is known that every lattice obtained from a Boolean lattice by the series of doublings of intervals is a bounded lattice, so that in particular, S, φ is without D-cycles, see A. Day [10].
It is straightforward to check that C = {q 1 , q 2 , q 3 , q 4 , z} is a critical set in this closure system with φ(C) = S. Indeed, z ∈ φ(q 1 , q 2 , q 3 ) ⊂ φ(C) and φ(C) = C. Besides, Q is a minimal order generator for C.
In particular, the implication Q → w is in the E-basis (and K-basis). Nevertheless, one can find a generator B = {z, q 3 , q 4 } of smaller size. Indeed, since z → q 1 , z → q 2 must be in the binary part of any basis for S, φ , we have σ(B) = C. Thus, an optimum basis for S, φ will have B → w, not Q → w.
Note that every element in B corresponds to an element of the family B that solves the original set cover problem.
This example should clarify the general procedure described in the next statement. We note that the set cover problem has an effective solution when Q contains Q, because the minimal cover will be just a single set. Similarly, it has an effective solution, if Q does not have Q, but contains the set Q 1 = Q \ q, for one of q ∈ Q. In this case the solution is two-element family Q 1 , Q 2 , where q ∈ Q 2 . These instances of set cover problem will be considered trivial.
Lemma 73. Suppose (Q, Q) is a non-trivial instance of the set cover problem. One can effectively find a closure system, whose closure lattice is bounded, such that a particular non-binary implication U → V in its optimum basis translates into the solution of this set cover problem.
Proof. Due to assumption, Q does not have Q or any Q \ {q}. Suppose Q = {q 1 , . . . , q n } and Q has k elements of cardinality > 1.
First, we make a slight modification to the instance of the set cover problem. Extend the family Q to Q * = Q ∪ {{q i } : i n}. A solution to the instance (Q, Q * ) should be of cardinality at most as large as the solution to original instance (Q, Q), simply because we might have more available covering subfamilies in second instance. On the other hand, if the solution to the second instance contains any one-element subsets which are not in Q, we can replace them by subsets in Q that contain those singletons, obtaining the solution at most as large as the solution to the second instance.
Thus, we may replace original instance by the instance (Q, Q * ).
To build a finite bounded lattice L, start from L 0 = 2 Q , then double every element b i ∈ 2 Q that corresponds to Q i ∈ Q, |Q i | > 1, i k. This will add new join-irreducible elements z i , i k. It implies, in particular, that z i ≥ q, for every q ∈ Q i . Also, choose an arbitrary element t corresponding to some Q \ {q} ∈ L 0 , and also double it, adding a new join-irreducible element w. The resulting lattice L is the closure lattice of a standard closure system on its set of join-irreducible elements S = {q 1 , . . . , q n , z 1 , . . . , z k , w}. Due to the nature of the construction, L is a bounded lattice, in particular, the standard closure system S, φ corresponding to L is without D-cycles.
It is straightforward to verify that C = {q 1 , . . . , q n , z 1 , . . . , z k } is a (unique) critical set of this closure system with φ(C) = S. Hence, every optimum basis for S, φ should have an implication U → w, where U ⊆ C is a minimal generator for C.
Also, Q is a unique -minimal representation of S. Hence, every W ⊆ S with φ(W ) = S should satisfy Q W . Since it should hold for U , we should have for every q ∈ Q some u ∈ U such that u ≥ φ q, or simply u ≥ q in L.
Every element in U can be interpreted as an element of family Q * : if u = q i , then it is {q i }, and if u = z i , then it is Q i = φ(z i ) ∩ Q. Thus, U can be interpreted as a covering subfamily of Q * .
If we find a minimal generator U for C, then it will serve as a solution to the instance (Q, Q * ) of the set cover problem.
Corollary 74. The problem of finding a basis Σ, for a closure system without D-cycles (and even closure systems with bounded closure lattice), which reaches minimum in s L (Σ nb ), is NP-complete.
Proof. Suppose, we can find a polynomial algorithm of finding such a basis for a closure systems without D-cycles, given its E-basis. Then the the set cover problem can be effectively solved as well. Indeed, start from any instance (Q, Q) of the set cover problem. If it is trivial, then it is solved effectively. If it is not trivial, then we can effectively write the E-basis of a bounded lattice constructed in Lemma 73 from (Q, Q). Since, according to assumption, this allows us to write effectively an optimum basis for this closure system, the solution to the given set cover problem can be recovered from one of its implications in polynomial time. This contradicts the NP-completeness of the set cover problem. Now we turn to second problem on our list.
Lemma 75. Suppose (Q, Q) is a non-trivial instance of the set cover problem. One can effectively find a closure system, whose closure lattice is bounded, such that a particular binary implication w → B of its optimum basis translates into a solution of this set cover problem.
Proof. As in the proof of Lemma 73, we assume that Q = {q 1 , . . . , q n }, Q = {Q i : i ∈ I} is some set cover of Q, and Q has k elements of cardinality > 1. We also can replace the instance of set cover problem by (Q, Q * ) with Q * = Q ∪ {{q i } : i n}.
We start from L 0 = 2 Q ∪ {w}, where w > x, for all x ∈ 2 Q . For each Q i ∈ Q, |Q i | > 1, double element b i = Q i ∈ L 0 , i k, adding new join-irreducible elements z i . The resulting bounded lattice L is built on the set of join-irreducible elements S = {q 1 , . . . q n , z 1 , . . . , z k , w}. Let S, φ be a closure system with L = Cl(S, φ).
According to Theorem 20, every (right-side) optimum basis should have an implication w 0 → B, where φ(B) = S \ {w 0 } = φ({w 0 }) \ {w 0 } and |B| is minimal among subsets of S \ {w 0 } with this property. Recall that Q is a unique -minimal representation of S \ {w 0 }. Hence, Q B. This means that for every q ∈ Q there exists b ∈ B such that b ≥ φ q, or simply b ≥ q in L. Thus, B can be interpreted as a set cover for Q, where each b ∈ B is thought as a an element of covering family Q * . The rest of the argument is similar to the proof of Lemma 73.
Corollary 76. The problem of finding a basis Σ, for systems without D-cycles (and even in closure systems with bounded closure lattices), that reaches minimum in s R (Σ b ), is NP-complete. In particular, the problem of finding an optimum basis for such systems in NP-complete.
Proof. Indeed, starting from an instance of the cover set problem, build a finite bounded lattice L from Lemma 75. If the (right side) optimum basis for L can be effectively found, then taking a binary implication corresponding to the top element of L, we would get a solution to the set cover problem. The last sentence follows from Corollaries 11 and 21.