ISSN 2590-9770 The Art of Discrete and Applied Mathematics 2 (2019) #P2.02 https://doi.org/10.26493/2590-9770.1259.9d5 (Also available at http://adam-journal.eu) A graph-theoretic method to define any Boolean operation on partitions David P. Ellerman ∗ Philosophy Department, University of California, Riverside, CA 92521 USA and School of Social Sciences, University of Ljubljana, Slovenia Received 4 August 2018, accepted 23 August 2018, published online 10 June 2019 Abstract The lattice operations of join and meet were defined for set partitions in the nineteenth century, but no new logical operations on partitions were defined and studied during the twentieth century. Yet there is a simple and natural graph-theoretic method presented here to define any n-ary Boolean operation on partitions. An equivalent closure-theoretic method is also defined. In closing, the question is addressed of why it took so long for all Boolean operations to be defined for partitions. Keywords: Set partitions, Boolean operations, graph-theoretic methods, closure-theoretic methods. Math. Subj. Class.: 05A18, 03G10 1 Introduction The lattice operations of join and meet were defined on set partitions during the late nine- teenth century, and the lattice of partitions on a set was used as an example of a non- distributive lattice. But during the entire twentieth century, no new logical operations were defined on partitions. Equivalence relations are so ubiquitous in everyday life that we often for- get about their proactive existence. Much is still unknown about equivalence relations. Were this situation remedied, the theory of equivalence relations could initiate a chain reaction generating new insights and discoveries in many fields dependent upon it. This paper springs from a simple acknowledgement: the only operations on the family of equivalence relations fully studied, understood and deployed are the binary join ∨ and meet ∧ operations. [3, p. 445] ∗ORCID iD: 0000-0002-5718-618X E-mail address: david@ellerman.org (David P. Ellerman) cb This work is licensed under http://creativecommons.org/licenses/by/3.0/ 2 Art Discrete Appl. Math. 2 (2019) #P2.02 Papers on the “logic” of equivalence relations [7] or partitions only involved the join and meet, and not the crucial logical operation of implication. Yet, there is a general graph-theoretic method1 by which any n-ary Boolean (or truth- functional) operation f : {T, F}n → {T, F} can be used to define the corresponding n-ary operation f : ∏ (U) n → ∏ (U) where ∏ (U) is the set of partitions on a set U . A partition π = {B,B′, . . .} on a set U = {u, u′, . . .} is a set of disjoint non-empty subsets B,B′, . . . of U , called blocks, whose union is U . The corresponding equivalence relation, denoted indit (π), is the set of ordered pairs of elements of U that are in the same block of π, and are called the indistinctions or indits of π, i.e., indit (π) = {(u, u′) ∈ U × U : ∃B ∈ π, u, u′ ∈ B}. The complement dit (π) = U × U − indit (π) is the set of distinctions or dits of π, i.e., ordered pairs of elements in different blocks. As binary relations, the sets of distinctions or ditsets dit (π) of some partition π on U are called partition (or apartness) relations. Given partitions π = {B,B′, . . .} and σ = {C,C ′, . . .} on U , the refinement relation is the partial order defined by: σ  π if ∀B ∈ π,∃C ∈ σ,B ⊆ C. At the top of the refinement partial order is the discrete partition 1 = {{u} : u ∈ U} of all singletons and at the bottom is the indiscrete partition 0 = {U} with only one block consisting of U . In terms of binary relations, the refinement partial order is just the inclusion partial order on ditsets, i.e., σ  π iff dit (σ) ⊆ dit (π). It should be noted that most of the previous literature on partitions (e.g., [1]) uses the opposite partial order of ‘unrefinement’ corresponding to the inclusion relation on equivalence relations—which reverses the definitions of the join and meet of partitions. 2 The join operation on partitions The join π ∨ σ of partitions π and σ (least upper bound using the refinement partial order) is the partition whose blocks are the non-empty intersections B ∩ C of the blocks of π and σ (under the unrefinement ordering, it is the meet). In terms of ditsets, dit (π ∨ σ) = dit (π)∪ dit (σ). The general method for defining Boolean operations on partitions will be first illustrated with the join operation whose corresponding Boolean operation is disjunc- tion with the truth table in Table 1. Table 1: Truth table for disjunction. P Q P ∨Q T T T T F T F T T F F F Let K (U) be the complete undirected graph on U . The links u − u′ corresponding to dits, i.e., (u, u′) ∈ dit (π), of a partition are labelled with the ‘truth value’ Tπ and 1The method is, strictly speaking, an algorithm only when U is finite. D. P. Ellerman: A graph-theoretic method to define any Boolean operation on partitions 3 corresponding to indits (u, u′) ∈ indit (π) are labelled with the ‘truth value’ Fπ . Given the two partitions π and σ, each link in the complete graph K (U) is labelled with a pair of truth values. The graph G (π ∨ σ) of the join is obtained by putting a link u− u′ where the truth function applied to the pair of truth values on the link in K (U) gives an F . Thus in the case at hand, the only links in G (π ∨ σ) are for the u− u′ labelled with Fπ and Fσ in K (U). Then the partition π ∨ σ is obtained as the connected components of its graph G (π ∨ σ). Thus u and u′ are in the same block (connected component ofG (π ∨ σ)) if and only if the link u − u′ was labelled Fπ and Fσ , i.e., u and u′ were in the same block of π and in the same block of σ. Thus the graph-theoretic definition of the join reproduces the set-of-blocks definition of the join defined as having its blocks the non-empty intersections of the blocks of π and σ. 3 The meet operation on partitions On the combined set of blocks π ∪ σ of π and σ, define the overlap relation B G C on two blocks if they have a non-empty intersection or overlap (see [8]). The reflexive- symmetric-transitive closure of this relation is an equivalence relation, and the union of the blocks in each equivalence class gives the blocks of the meet π ∧ σ. The corresponding truth-functional operation is conjunction with the truth table in Table 2. Table 2: Truth table for conjunction. P Q P ∧Q T T T T F F F T F F F F The same method is applied except that the links of the graph G (π ∧ σ) are the ones for which the conjunction truth table gives an F when applied to the truth values on each link u−u′. ThusG (π ∧ σ) contains a link u−u′ if (u, u′) ∈ indit (π), (u, u′) ∈ indit (σ), or both. Then the blocks of the partition π ∧ σ are the connected components of the graph G (π ∧ σ). The proof that the graph-theoretic definition of the meet gives the usual set-of-blocks definition of the meet boils down to showing that: B ∈ π and C ∈ σ are contained in the same block of the usual meet π∧σ (i.e., there is a chain of overlaps B G C ′ G · · · G B′ G C connecting B and C) if and only for any u ∈ B and u′ ∈ C, u and u′ are in the same connected component ofG (π ∧ σ). If any two blocksB′ G C ′ overlap in the overlap chain, then there is an element u′′ ∈ B′ ∩C ′ such any u ∈ B′ had a link u−u′′ in G (π ∧ σ) and similarly any u′ ∈ C ′ has a link u′′ − u′ in G (π ∧ σ). Hence the existence of an overlap chain connecting B and C implies that any u ∈ B and u′ ∈ C are in the same connected component of G (π ∧ σ). Conversely, if u ∈ B and u′ ∈ C are in the same connected component ofG (π ∧ σ), then there is some chain of links u = u0−u1−· · ·−un−1−un = u′ where each link ui − ui+1 for i = 0, . . . , n − 1 has either (ui, ui+1) ∈ indit (π), (ui, ui+1) ∈ indit (σ), or both. Every link ui − ui+1 that is in one indit set but not the other, say, (ui, ui+1) ∈ indit (π) and (ui, ui+1) /∈ indit (σ), establishes an overlap between the block of π containing ui, ui+1 and the block of σ containing ui as well as the 4 Art Discrete Appl. Math. 2 (2019) #P2.02 different block of σ containing ui+1. Thus the chain of links connecting u ∈ B and u′ ∈ C establishes a chain of overlapping blocks connecting B and C. 4 The implication operation on partitions The real beginning of the logic of partitions, as opposed to the lattice theory of partitions, was the discovery of the set-of-blocks definition of the implication operation σ ⇒ π for partitions ([5, 6]). The intuitive idea is that σ ⇒ π functions like an indicator or charac- teristic function to indicate which blocks B of π are contained in a block of σ. View the discretized version of B ∈ π, i.e., B replaced by the set of singletons of the elements of B, as the local version 1B of the discrete partition 1, and view the block B remaining whole as the local version 0B of the indiscrete partition 0. Then the partition implication as the inclusion indicator function is: the blocks of σ ⇒ π are for any B ∈ π:{ 1B if ∃C ∈ σ,B ⊆ C 0B = B otherwise. In the case of the Boolean logic of subsets, for any subsets S, T ⊆ U , the conditional S ⊃ T = Sc ∪ T has the property: S ⊃ T = U iff S ⊆ T , i.e., the conditional S ⊃ T equals the top of the lattice of subsets ofU iff the inclusion relation S ⊆ T holds. Similarly, it is immediate that the corresponding relation holds in the partition case: σ ⇒ π = 1 iff σ  π. This set-of-blocks definition of the partition implication operation accounts for the impor- tant new non-lattice-theoretic properties revealed in the algebra of partitions ∏ (U) on U (defined with the join, meet, and implication as partition operations). A logical formula in the language of join, meet, and implication is a subset tautology if for any non-empty universe U and any subsets of U substituted for the variables, the whole formula evaluates by the set-theoretic operations of join, meet, and implication (condi- tional) to the top U . Similarly, a formula in the same language is a partition tautology if for any universe U with |U | > 1 and for any partitions on U substituted for the variables, the whole formula evaluates by the partition operations of join, meet, and implication to the top 1 (the discrete partition). All partition tautologies are subset tautologies but not vice-versa. Modus ponens (σ ∧ (σ ⇒ π))⇒ π is both a subset and partition tautology but Peirce’s law, ((σ ⇒ π)⇒ σ) ⇒ σ, accumulation, σ ⇒ (π ⇒ (σ ∧ π)), and distributiv- ity, ((π ∨ σ) ∧ (π ∨ τ)) ⇒ (π ∨ (σ ∧ τ)), are examples of subset tautologies that are not partition tautologies. The importance of the implication for partition logic is emphasized by the fact that the only partition tautologies using only the lattice operations, e.g., π ∨ 1, correspond to general lattice-theoretic identities, i.e., π ∨ 1 = 1 (see [9]). The graph-theoretic method automatically gives a partition operation corresponding to the Boolean conditional or implication with the truth table in Table 3 and it is not trivial that the two definitions are the same. It may be helpful to restate the truth table in terms of the partitions; see Table 4. For the graph-theoretic definition of σ ⇒ π, we again label the links u − u′ in the complete graph K (U) with Tπ if (u, u′) ∈ dit (π) and Fπ otherwise, and similarly for σ. Then we construct the graph G (σ ⇒ π) by putting in a link u−u′ only in the case the link is labeled Tσ and Fπ , i.e., Fσ⇒π . Then the partition σ ⇒ π is the partition of connected components in the graph G (σ ⇒ π). D. P. Ellerman: A graph-theoretic method to define any Boolean operation on partitions 5 Table 3: Truth table for conditional. P Q P ⊃ Q T T T T F F F T T F F T Table 4: Implication truth table for partition ‘truth values’. σ π σ ⇒ π Tσ Tπ Tσ⇒π Tσ Fπ Fσ⇒π Fσ Tπ Tσ⇒π Fσ Fπ Tσ⇒π To prove the graph-theoretic and set-of-blocks definitions equivalent, we might first note that if (u, u′) ∈ dit (π), then Tπ is assigned to that link in K (U) so there is no link u− u′ in G (σ ⇒ π). And if (u, u′) ∈ indit (π) but also (u, u′) ∈ indit (σ), then Tσ⇒π is assigned to the link in K (U) so again there is no link u− u′ in G (σ ⇒ π). There is a link u − u′ in G (σ ⇒ π) in and only in the following situation where (u, u′) ∈ indit (π) and (u, u′) ∈ dit (σ)—which is exactly the situation when B is not contained in any block C of σ: C C ′ B u u′ Figure 1: Links u− u′ in G (σ ⇒ π). Then for any other element u′′ ∈ B so that (u, u′′) and (u′, u′′) ∈ indit (π), we must have either (u, u′′) ∈ dit (σ) or (u′, u′′) ∈ dit (σ) so u′′ is linked in G (σ ⇒ π) to either u or to u′. Thus all the elements of B are in the same connected component of the graph G (σ ⇒ π) whenever B is not contained in any block of σ. If, on the other hand, B is contained in some block C of σ, then any u ∈ B cannot be linked to any other u′. In order to that Fπ assigned to the link u − u′, the two elements have to both belong to B and thus since B ⊆ C, they both belong to C so Fσ and thus Tσ⇒π is also assigned to that link. Thus when B is contained in a block C ∈ σ, then any point u ∈ B is a disconnected component to itself in G (σ ⇒ π) so B is discretized in the graph-theoretic construction of σ ⇒ π. Thus the graph-theoretic and set-of-blocks definitions of the partition implication are equivalent. Example 4.1. Let U = {a, b, c, d} so that K(U) = K4 is the complete graph on four 6 Art Discrete Appl. Math. 2 (2019) #P2.02 a b d c Tσ, Fπ Fσ, Fπ Tσ, Tπ Fσ, Tπ Fσ, Tπ Tσ, Tπ σ = {{a} , {b, c, d}} π = {{a, b} , {c, d}} σ ⇒ π = {{a, b} , {c} , {d}} Figure 2: Example of graph for partition implication. points. Let σ = {{a} , {b, c, d}} and π = {{a, b} , {c, d}} so we see immediately from the set-of-blocks definition, that the π-block of {c, d} will be discretized while the π-block of {a, b} will remain whole so the partition implication is σ ⇒ π = {{a, b} , {c} , {d}}. After labelling the links in K (U), we see that only the a − b link has the Fσ⇒π ‘truth value’ so the graph G (σ ⇒ π) has only that a − b link (thickened in Figure 2). Then the connected components of G (σ ⇒ π) give the same partition implication σ ⇒ π = {{a, b} , {c} , {d}}. The partition implication is quite rich in defining new structures in the algebra of par- titions (i.e., the lattice of partitions extended with other partition operations such as the implication). For instance, for a fixed partition π on U , all the partitions of the form σ ⇒ π (for any partitions σ on U ) form a Boolean algebra under the partition operations of impli- cation, join, and meet, e.g., (σ ⇒ π) ⇒ π is the negation of σ ⇒ π, called the Boolean core of the upper segment [π,1] in the partition algebra ∏ (U). A relation is a subset of a product, and, dually, a corelation is a partition on a coproduct. Any partition π on U can be canonically represented as a relation: dit (π) ⊆ U×U . Dually any subset S ⊆ U can be canonically represented as a corelation, namely the partition π (S) on the coproduct (disjoint union) U ] U where the only nonsingleton blocks in π (S) are the pairs {u, u∗} of u and its copy u∗ for u /∈ S. Using this corelation construction, any powerset Boolean algebra ℘ (U) can be canonically represented as the Boolean core of the upper segment [π,1] in the partition algebra ∏ (U ] U) where π = π (∅) is the partition on the disjoint union U ]U whose blocks are all the pairs {u, u∗} for each element u ∈ U and its copy u∗. Each partition of the form σ ⇒ π on U ]U is π (S) for some S ⊆ U since σ ⇒ π is essentially the characteristic function of some subset S of U with 1⇒ π = π (∅) playing the role of the empty set ∅ and π ⇒ π = 1U]U playing the role of U . 5 The general graph-theoretic method Let f : {T, F}n → {T, F} be an n-ary Boolean function and let π1, . . . , πn be n partitions on U . In order to define the corresponding n-ary partition operation f (π1, . . . , πn), we again consider the complete graph K (U) and then use each partition πi to label each link u − u′ with Tπi if (u, u′) ∈ dit (πi) and Fπi if (u, u′) ∈ indit (πi). Then on each link we may apply f to the n ‘truth values’ on the link and retain the link in G (f (π1, . . . , πn)) D. P. Ellerman: A graph-theoretic method to define any Boolean operation on partitions 7 if the result was Ff(π1,...,πn). The partition f (π1, . . . , πn) is obtained as the connected components of the graph G (f (π1, . . . , πn)). 6 An equivalent closure-theoretic method Given any subset S ⊆ U × U , the reflexive-symmetric-transitive (RST) closure S is the intersection of all equivalence relations on U containing S. The ‘topological’ terminology of calling a subset closed if S = S is used even though the RST closure operator is not a topological closure operator since the union of two closed sets is not necessarily closed. The closed sets in U ×U are the equivalence relations (or indit sets of partitions), and their complements, the open sets, are the partition relations (or ditsets of partitions). As usual, the interior operator int (S) = ( Sc )c is the complement of the closure of the complement, and the open sets are the ones equalling their interiors. The closure-theoretic method of defining Boolean operations on partitions will be il- lustrated using the symmetric difference or inequivalence operation π ⊕ σ. Every n-ary Boolean operation can be defined by a truth table such as the one for symmetric difference in Table 5. Table 5: Truth table for symmetric difference. P Q P ⊕Q T T F T F T F T T F F F The disjunctive normal form (DNF) for the formula P ⊕Q is given by the rows where the formula evaluates as T , i.e., P ⊕ Q = (P ∧ ¬Q) ∨ (¬P ∧Q), while the DNF for the negation of the formula is given by the other rows where the formula evaluates as F , i.e., ¬ (P ⊕Q) = (P ∧Q) ∨ (¬P ∧ ¬Q). Given two partitions π and σ on U , the closure- theoretic method of obtaining the partition π ⊕ σ is to start with the DNF for the negated Boolean formula and replace each unnegated variable by the corresponding ditset and each negated variable by the corresponding indit set—as well as replacing the disjunctions and conjunctions by the corresponding subset operations of union and intersection. Applied to ¬ (P ⊕Q) = (P ∧Q) ∨ (¬P ∧ ¬Q), this procedure would yield (dit (π) ∩ dit (σ)) ∪ (indit (π) ∩ indit (σ)) ⊆ U × U. Then the indit set of π ⊕ σ is obtained as the RST closure: indit (π ⊕ σ) = (dit (π) ∩ dit (σ)) ∪ (indit (π) ∩ indit (σ)) and the partition π ⊕ σ is the set of equivalence classes of this equivalence relation. The graph-theoretic method of obtaining the partition π⊕σ would label each link u−u′ inK (U) by the two ‘truth values’ given by π and σ, and then retain in the graphG (π ⊕ σ) the links where the truth values evaluated to Fπ⊕σ , namely the ones labelled with Tπ, Tσ and Fπ, Fσ . Then the partition π⊕σ is obtained as the connected components of the graph G (π ⊕ σ). 8 Art Discrete Appl. Math. 2 (2019) #P2.02 To see the equivalence between the two methods, note first that the links retained in G (π ⊕ σ) are precisely the pairs (u, u′) in (dit (π) ∩ dit (σ)) ∪ (indit (π) ∩ indit (σ)) . The equivalence proof is completed by showing that taking connected components in the graph G (π ⊕ σ) is equivalent to taking the RST closure of (dit (π) ∩ dit (σ)) ∪ (indit (π) ∩ indit (σ)) . The elements u and u′ are in the same connected component of G (π ⊕ σ) iff there is a chain of links u = u0 − u1 − . . . − un−1 − un = u′ in the graph G (π ⊕ σ) so each link has to be originally labelled Tπ, Tσ or Fπ, Fσ in the graph on K (U). But the condition for (u, u′) to be included in the RST closure (dit (π) ∩ dit (σ)) ∪ (indit (π) ∩ indit (σ)) is that there is a chain of pairs (u, u1) , (u1, u2) , . . . , (un−1, u′) such that each pair is either in dit (π)∩dit (σ) or in indit (π)∩ indit (σ). Hence the two methods give the same result. The example suffices to illustrate the general closure-theoretic method and its equiva- lence to the graph-theoretic method of defining Boolean operations on partitions. 7 Relationships between Boolean operations on partitions For two subset variables, there are 24 = 16 binary Boolean operations on subsets— corresponding to the sixteen ways to fill in the truth table for a binary Boolean opera- tion. Any compound Boolean function of two variables will be truth-table equivalent to one of the sixteen binary Boolean operations. For instance, the Pierce’s Law formula ((Q⇒ P )⇒ Q) ⇒ Q defines a compound binary operation that is equivalent to the constant function T since it is a subset tautology. Certain subsets of the sixteen binary operations suffice to define all the binary operations, e.g., ¬ and ∨. Matters are rather different for the Boolean operations on partitions. Using the graph- theoretic or the closure-theoretic method, partition versions of sixteen binary Boolean op- erations are easily defined. And certain combinations of the sixteen operations suffice to define all sixteen, e.g., ∨, ∧, ⇒, and ⊕ [5, 309–310 and f.n. 18]. But when the six- teen operations are compounded, still keeping to two variables, then the resulting binary partition operations does not necessarily reduce to one of the sixteen—due to the com- plicated compounding of the closure operations. For instance, the Pierce’s Law formula ((σ ⇒ π)⇒ σ) ⇒ σ for partitions is not equivalent to the constant function 1 since it is not a partition tautology. The topic of the total number of binary operations on parti- tions obtained by compounding the sixteen basic binary Boolean operations is one of many topics in partition logic that awaits future research. 8 Concluding Remarks In conclusion, perhaps some remarks are in order as to why it took so long to extend the Boolean operations to partitions. The Boolean operations are normally associated with subsets of a set or, more specifically, with propositions. Boole originally defined his logic as the logic of subsets [2] of a universe set. It is then a theorem that the same set of D. P. Ellerman: A graph-theoretic method to define any Boolean operation on partitions 9 subset tautologies is obtained as the truth-table tautologies. Perhaps because “logic” has been historically associated with propositions, the texts in mathematical logic throughout the twentieth century (to the author’s knowledge) ignored the Boolean logic of subsets and started with the special case of the logic of propositions and then took the truth-table characterization as the definition of a tautology. By the middle of the twentieth century, category theory was defined [4] and the category- theoretic duality was established between subobjects and quotient objects, e.g., between subsets of U and quotient sets (or equivalently equivalence relations or partitions) of U . The conceptual cost of restricting subset logic to the special case of propositional logic is that subsets have the category-theoretic dual concept of partitions while propositions have no such dual concept. Hence the focus on “propositional logic” did not lead to the search for the dual logic of partitions ([5, 6]) or to the simple and natural application of Boolean operations to partitions as well as subsets—which has been our topic here. References [1] G. Birkhoff, Lattice Theory, volume 25 of American Mathematical Society Colloquium Publi- cations, American Mathematical Society, Providence, Rhode Island, 3rd edition, 1979. [2] G. Boole, An Investigation of the Laws of Thought, on Which Are Founded the Mathematical Theories of Logic and Probabilities, Macmillan and Co., Cambridge, 1854. [3] T. Britz, M. Mainetti and L. Pezzoli, Some operations on the family of equivalence relations, in: H. Crapo and D. Senato (eds.), Algebraic Combinatorics and Computer Science, Springer Italia, Milan, pp. 445–459, 2001, doi:10.1007/978-88-470-2107-5 18, a tribute to Gian-Carlo Rota. [4] S. Eilenberg and S. MacLane, General theory of natural equivalences, Trans. Amer. Math. Soc. 58 (1945), 231–294, doi:10.2307/1990284. [5] D. Ellerman, The logic of partitions: Introduction to the dual of the logic of subsets, Rev. Symb. Log. 3 (2010), 287–350, doi:10.1017/s1755020310000018. [6] D. Ellerman, An introduction to partition logic, Log. J. IGPL 22 (2014), 94–125, doi:10.1093/ jigpal/jzt036. [7] D. Finberg, M. Mainetti and G.-C. Rota, The logic of commuting equivalence relations, in: A. Ursini and P. Aglianò (eds.), Logic and Algebra, Dekker, New York, volume 180 of Lec- ture Notes in Pure and Applied Mathematics, pp. 69–96, 1996, papers from the International Conference in memory of Roberto Magari held in Pontignano, April 26 – 30, 1994. [8] O. Ore, Theory of equivalence relations, Duke Math. J. 9 (1942), 573–627, doi:10.1215/ s0012-7094-42-00942-6. [9] D. Sachs, Identities in finite partition lattices, Proc. Amer. Math. Soc. 12 (1961), 944–945, doi: 10.2307/2034397.