BOOLEAN

. The author has recently introduced an abstract algebraic framework of analogical proportions within the general setting of universal algebra. This paper studies analogical proportions in the boolean domain consisting of two elements 0 and 1 within his framework. It turns out that our notion of boolean proportions coincides with two prominent models from the literature and has a simple logical characterization which entails appealing mathematical properties. In a broader sense, this paper is a further step towards a mathematical theory of analogical reasoning.

Analogical proportions are expressions of the form 'a is to b what c is to d'-in symbols, a ∶ b ∶ ∶ c ∶ d-and have numerous applications in artificial intelligence such as program synthesis (Antić, 2021a), computational linguistics, image processing, and classification, just to name a few (cf. Prade & Richard, 2021).
The author has recently introduced from first principles an abstract algebraic framework of analogical proportions in the general setting of universal algebra (Antić, 2022). It is a promising novel model of analogical proportions with appealing mathematical properties.
In this paper, we instantiate his model in the boolean domain consisting of the booleans 0 and 1 together with logical functions, and study analogical proportions between booleans called boolean proportions.
The main technical part of the paper is divided into four sections studying concrete boolean domains and a fifth section comparing our model to Klein's (1982) and Miclet and Prade's (2009) prominent frameworks.
In Section 4, we begin by studying boolean proportions in the algebras (B), (B, 0), (B, 1), and (B, 0, 1), consisting only of the underlying boolean universe B = {0, 1} together with a (possibly empty) list of boolean constants and no functions. We prove in Theorem 12 the following simple characterization of boolean proportions in (B): (B) ⊧ a ∶ b ∶ ∶ c ∶ d ⇔ (a = b and c = d) or (a ≠ b and c ≠ d).
Already in this simple case without functions an interesting phenomenon emerges which has been already observed by Antić (2022, Theorem 28): it turns out that boolean proportions are non-monotonic in the sense that, for example, 1 ∶ 0 ∶ ∶ 0 ∶ 1 holds in (B) and fails in the expanded structures (B, 0), (B, 1), and (B, 0, 1) containing constants. This may have interesting connections to non-monotonic reasoning, which itself is crucial for commonsense reasoning and which has been prominently formalized within the field of answer set programming (Gelfond & Lifschitz, 1991) (cf. Brewka, Eiter, & Truszczynski, 2011).
In Section 5, we then study the structure (B, ¬, B) containing negation, where B is any set of constants from B. Surprisingly, we can show in Theorem 13 that (B, ¬, B) is equivalent to (B) with respect to boolean proportions, that is, we derive In Section 6, we study boolean proportions with respect to the exclusive or operation. Interestingly, it turns out that in case the underlying algebra contains the constant 1, the equation z + 1 = ¬z shows that we can represent the negation operation, which then yields In Section 7, we then study the structure (B, ∨, ¬, B), where B is again any set of constants from B. Since disjunction and negation are sufficient to represent all boolean functions, these structures employ full propositional logic. Even more surprisingly than in the case of negation before, we show in Theorem 15 that the structure (B, ∨, ¬, B) containing all boolean functions is again equivalent to the boolean structure (B) with respect to boolean proportions, that is, we derive This has interesting consequences. For example, in Section 8 we show that, somewhat unexpectedly, our notion of boolean proportion coincides with Klein's (1982) characterization in most cases and with Miclet and Prade's (2009) in some cases. This is interesting as our model is an instance of an abstract algebraic model not geared towards the boolean domain. Lepage (2003) proposes four axioms-namely symmetry and strong inner reflexivity a ∶ b ∶ ∶ a ∶ d ⇒ d = b-as a guideline for formal models of analogical proportions. To be more precise, Lepage (2003) introduces his axioms in the linguistic setting of words and although his axioms appear reasonable in the word domain, Antić (2022, Theorem 28) has argued why Lepage's axioms cannot be assumed in general. Antić (2022, §4.3) adapts Lepage's list of axioms by preserving his symmetry axiom from above, and by adding inner symmetry and determinism a ∶ a ∶ ∶ a ∶ d ⇔ a = d and proving that these axioms are always satisfied within his framework. Moreover, he considers the properties of Notice that inner reflexivity and reflexivity are weak forms of Lepage's strong inner reflexivity and strong reflexivity axioms, respectively, whereas inner symmetry is an 'inner' variant of Lepage's symmetry axiom which requires symmetry to hold within the respective structures. In this paper we prove in Theorem 15 that, contrary to the general case (cf. Antić, 2022, Theorem 28), in propositional logic all of the aforementioned axioms-including Lepage's-are satisfied.
In a broader sense, this paper is a further step towards a mathematical theory of analogical reasoning.
For further references on analogical reasoning we refer the interested reader to Hall (1989) and Prade and Richard (2014).

Boolean Domains
We denote the booleans by B ∶= {0, 1} with 0 ∨ 0 ∶= 0 and 1 ∨ 0 ∶= 0 ∨ 1 ∶= 1 ∨ 1 ∶= 1 (disjunction), ¬0 ∶= 1 and ¬1 ∶= 0 (negation), As usual we have defined conjunction, implication, and exclusive or in terms of disjunction and negation. In this paper, a boolean domain is any structure (B, F, B), where where F is a (possibly empty) subset of {∨, ¬} called boolean functions, and B is a (possibly empty) subset of the booleans in B called constants or distinguished elements. It is well-known that every boolean function can be expressed in terms of disjunction and negation, which means that in the structure (B, ∨, ¬) we can employ full propositional logic. We write Notation 1. In the rest of the paper, BOOL denotes a generic 2-element boolean domain (B, F, B).
Given any sequence of objects o = o 1 . . . o n , n ≥ 0, we denote the length n of o by o . Let V ∶= {z 1 , z 2 , . . .} be a denumerable set of variables. Given a boolean domain BOOL = (B, F, B), a formula over BOOL (or BOOL-formula) is any well-formed expression containing boolean operations from F , constants from B, and variables from V , and we denote the set of all such formulas by BOOL [V ]. Logical equivalence between two formulas is defined as usual. We will write s(z) in case s is a formula containing variables among z. Given a sequence of booleans a of same length as z, we denote by s(a) the formula obtained from s(z) by substituting a for z in the obvious way. We call a formula s(z) satisfiable (resp., falsifiable) if there is some asuch that s(a) is logically equivalent to 1 (resp., to 0). Every formula s(z 1 , . . . , z n ) induces a boolean function s BOOL ∶ BOOL n → BOOL in the obvious way by replacing the variables z 1 , . . . , z n by concrete values a 1 , . . . , a n ∈ B. We call s(z) injective in BOOL if s BOOL is an injective function.
Notation 2. Notice that every formula not containing variables is logically equivalent to a boolean, and with a slight abuse of notation we will not distinguish between logically equivalent formulas: for example, z and ¬¬z denote the same formula et cetera.

Boolean Proportions
In this section, we instantiate the author's abstract algebraic framework of analogical proportions recently introduced in Antić (2022) in the concrete boolean domain.
Before we define boolean proportions below, let us first recall Antić's (2022) underlying ideas interpreted in the boolean setting of this paper. We first define arrow equations of the form 'a transforms into b as c transforms into x'-in symbols, a → b c → x-where a, b, and c are fixed booleans, and x is a variable. Solutions to arrow equations will be booleans which are obtained from c as b is obtained from a in a mathematically precise way (Definition 5). Specifically, we want to functionally relate booleans via formula rewrite rules of the form s → t. Let us make this notation official.
Notation 3. We will always write s(z) → t(z) or s → t instead of (s, t), for any pair of BOOL-formulas s and t containing variables among z such that every variable in t occurs in s. We call such expressions BOOL-rewrite rules or BOOL-justifications and we often omit the reference to BOOL. We denote the set of all such BOOL-justifications by J(BOOL, z).
Definition 4. Define the set of justifications of two booleans a, b ∈ B in BOOL by Jus BOOL (a, b) ∶= s → t ∈ J(BOOL, z) a = s(e) and b = t(e), for some e ∈ B z .
Once we have a definition of a → b c → d, we can define a ∶ b c ∶ d and, finally, a ∶ b ∶ ∶ c ∶ d via appropriate symmetries as follows (cf. Antić, 2022, Definition 8).
Definition 5. We define boolean proportions in three steps: (1) An arrow equation in BOOL is an expression of the form 'a transforms into b as c transforms into x'-in symbols, where a, b, c are booleans and x is a variable. Given a boolean d ∈ B, define the set of justifications of an arrow proportion a → b c → d in BOOL by We say that J is a trivial set of justifications in BOOL iff every justification in J justifies every arrow proportion a → b c → d in BOOL, that is, iff In this case, we call every justification in J a trivial justification in BOOL. Now we call d a solution to (1) in BOOL iff either Jus B (a, b) ∪ Jus B (c, d) consists only of trivial justifications, in which case there is neither a non-trivial transformation of a into b nor of c into d; or Jus BOOL (a → b c → d) is maximal with respect to subset inclusion among the sets Jus BOOL (a → b c → d ′ ), d ′ ∈ B, containing at least one non-trivial justification, that is, for any element In this case, we say that a, b, c, d are in arrow proportion in BOOL written We denote the set of all solutions of (1) in BOOL by consists only of trivial justifications.
(2) A directed boolean equation in BOOL is an expression of the form where a, b, c are again booleans and x is a variable. We call d a solution to (2) In this case, we say that a, b, c, d are in directed analogical proportion in BOOL written We denote the set of all solutions to (2) in BOOL by where a, b, c are again booleans and x is a variable. We call d a solution to (3) In this case, we say that a, b, c, d are in analogical proportion in BOOL written We denote the set of all solutions to (3) in BOOL by

Notation 6.
In what follows, we will usually omit trivial justifications from notation. So, for example, we will write has only trivial justifications in BOOL, et cetera. The empty set is always a trivial set of justifications. Every justification is meant to be non-trivial unless stated otherwise. Moreover, we will always write sets of justifications modulo renaming of variables, that is, we will write {z → z} instead of {z → z z ∈ V } et cetera.
Roughly, a boolean d is a solution to a boolean equation of the form a ∶ b ∶ ∶ c ∶ x iff there is no other boolean d ′ whose relation to c is more similar to the relation between a and b expressed in terms of maximal sets of justifications.
Definition 7. We call a BOOL-formula s(z) a generalization of a boolean a in BOOL iff a = s(e), for some e ∈ B z , and we denote the set of all generalizations of a in BOOL by gen BOOL (a). Moreover, we define for any booleans a, c ∈ B: gen BOOL (a, c) ∶= gen BOOL (a) ∩ gen BOOL (c).
In particular, we have s is falsifiable and satisfiable}.
Notation 8. Notice that any justification s(z) → t(z) of a → b c → d in BOOL must satisfy a = s(e 1 ) and b = t(e 1 ) and c = s(e 2 ) and d = t(e 2 ), for some e 1 ∈ B z and e 2 ∈ B z . In particular, this means s ∈ gen BOOL (a, c) and t ∈ gen BOOL (b, d).
We sometimes write s e 1 →e 2 → t to make the witnesses e 1 , e 2 and their transition explicit. This situation can be depicted as follows: The following characterization of solutions to analogical equations in terms of solutions to directed analogical equations is an immediate consequence of Definition 5.
Fact 9. We can visualize the derivation steps for proving a ∶ b ∶ ∶ c ∶ d as follows: This means that in order to prove a ∶ b ∶ ∶ c ∶ d in BOOL, we need to check the four relations in the first line with respect to ⊧ in BOOL.
3.1. Functional Proportion Theorem. The following reasoning pattern-which roughly says that functional dependencies are preserved-will often be used in the rest of the paper; it is a special case of Antić's (2022, Theorem 24).
Functional solutions are plausible since transforming a into t(a) and c into t(c) is a direct implementation of 'transforming a and c in the same way'.
3.2. Axioms. Lepage (2003) introduces the following axioms (cf. Miclet, Bayoudh, and Delhay (2008, pp. 796-797)) in the linguistic context, adapted here to the boolean setting: 1 We will see in the forthcoming sections that all of Lepage's axioms hold in the boolean setting studied here.
Although Lepage's axioms appear reasonable in the boolean domain, in Antić (2022, Theorem 28) provides simple counter-examples to each of his axioms (except for symmetry) in the general case. Antić (2022) therefore considers the following alternative set of axioms as a guideline for formal models of analogical proportions, adapted here to the boolean setting: Moreover, he considers the following properties: The following result is an instance of Antić (2022, Theorem 28).

Constants
In this section, we study boolean proportions in the structures (B), (B, 0), (B, 1), and (B, 0, 1), consisting only of the boolean universe B and constants among 0 and 1 without boolean functions. This special case is interesting as it demonstrates subtle differences between structures containing different constants-i.e., distinguished elements with a 'name' in the language-and here it makes a difference whether an element has a 'name' or not.
Let us first say a few words about justifications in such structures. Recall that justifications are formula rewrite rules of the form s → t. In the structure (B, B), consisting only of the booleans 0 and 1 with no functions and with the distinguished elements in B ⊆ B, each (B, B)formula is either a constant boolean from B or a variable. The justifications in (B, B) can thus have only one of the following forms: (1) The justification z → z justifies only directed variants of inner reflexivity (11) of the form a → a c → c.
(2) The justification z → b justifies directed proportions of the form a → b c → b.
(3) The justification a → b justifies only directed variants of reflexivity (12) of the form a → b a → b.
The first case is the most interesting one as it shows that we can detect equality in (B, B), that is, z → z is a justification of a → b c → d iff a = b and c = d. Inequality, on the other hand, cannot be detected without negation which is not available in (B) (but see Section 5). Interestingly, negation is detected indirectly via Fact 9.
We have the following result.
Theorem 12. The following table of boolean proportions is a consequence of Definition 5: The above table justifies the following relation: This implies that in addition to the axioms of Fact 11, (B)satisfies all the axioms in Section 3.2 except for monotonicity. The same applies to (B, B), for all B ⊆ B.
Proof of Theorem 12. The (B)-column is an instance of Antić (2022, Theorem 33). We proceed with the proof of the (B, 0)-column. Our first observation is: By Notation 8, this means that all non-trivial justifications in (B, 0) have one of the following forms (cf. Notations 3 and 6; recall that 0 → z is not a valid justification since z does not occur in 0): We therefore have (cf. Notation 6): This implies This further implies via Fact 9: We proceed with the proof of the (B, 1)-column, which is analogous to the proof of (B, 0)column. Our first observation is: gen (B,1) (0) = {z} and gen (B,1) (1) = {1, z}.
By Notation 8, this means that all non-trivial justifications in (B, 1) have one of the following forms: We therefore have (cf. Notation 6):

Negation
This section studies boolean proportions in the important case where only the unary negation operation and constants are available. Recall from the previous section that z → z is a justification of a → b c → d iff a = b and c = d, which shows that z → z (or, equivalently, ¬z → ¬z in case negation is available) can detect equality. However, we have also seen that without negation, inequality cannot be analogously explicitly detected (however, we could detect inequality implicitly via symmetries). The situation changes in case negation is available, as z → ¬z (or, equivalently, ¬z → z) is a justification of a → b c → d iff a ≠ b and c ≠ d. Hence, given that negation is part of the structure, we can explicitly detect equality and inequality, which is the essence of the following result.

Theorem 13. The following table of boolean proportions is a consequence of Definition 5, for every non-empty subset B of B:
The above table justifies the following relations, for every subset B of B: This implies that in addition to the axioms in Fact 11, (B, ¬, B)satisfies all the axioms in Section 3.2. 2 Proof of Theorem 13. We begin with the (B, ¬)-column. Since (B, ¬) contains only the unary function ¬ and no constants, our first observation is: By Notation 8, this means that all non-trivial justifications in (B, ¬) have one of the following forms: z → z or z → ¬z or ¬z → z or ¬z → ¬z.
2 Monotonicity will be a consequence of the forthcoming Theorem 15.
This further implies via Fact 9: We proceed with the (B, ¬, B)-column, where B is a non-empty subset of B. Notice that as soon as B contains a boolean a, its complement ¬a has a 'name' in our language-this immediately implies that the structures (B, ¬, 0), (B, ¬, 1), and (B, ¬, 0, 1) entail the same boolean proportions. Without loss of generality, we can therefore assume B = B. Our first observation is: By Notation 8, this means that all non-trivial justifications in (B, ¬, B) have one of the following forms, where (¬)z is an abbreviation for 'z or ¬z': We therefore have (cf. Notation 6): This further implies via Fact 9: As a direct consequence of Theorem 10 with t(z) ∶= ¬z, injective in (B, ¬, B), we have

Exclusive or
In this section, we study boolean proportions with respect to the exclusive or operation. Interestingly, it turns out that in case the underlying algebra contains the constant 1, the equation z + 1 = ¬z shows that we can represent the negation operation, which then yields However, in case 1 is not included, the proportions 1 ∶ 0 ∶ ∶ 1 ∶ 0 and 0 ∶ 1 ∶ ∶ 0 ∶ 1 do not hold (see discussion in Section 8).
The above table justifies the following relations: Proof. Given that we have a single binary function symbol + in our language, terms have the form a 1 z 1 + . . . + a n z n , for some a 1 , . . . , a n ∈ B and n ≥ 1. Since in (B, +) we always have 2z = 0 and 3z = z, terms can always be simplified to the form z 1 +. . .+z n not containing coefficients. Justifications in (B, +) thus have the form z 1 + . . . + z n → z i 1 + . . . + z i k , for some distinct i 1 , . . . , i k ∈ [1, n], k ≤ n. Notice that we can always rearrange the variables in a justification to obtain the form z 1 + . . . + z n → z 1 + . . . + z m , for some 1 ≤ m ≤ n. Moreover, observe that from (41), we can deduce that the only justifications containing a single variable z are The first justification z → z justifies inner reflexive arrow proportions of the form a → a c → c. The second and third justifications z → 2z and 2z → z justify all arrow proportions of the form a → 0 c → 0 and 0 → a 0 → c, where a and c are arbitrary, respectively. Notice that z → 2z is in fact a characteristic justification of a → 0 c → 0 which shows (B, +) ⊧ a → 0 c → 0, for all a, c ∈ B.
Lastly, the fourth justification 2z → 2z justifies only the arrow proportion 0 → 0 0 → 0 and it is therefore a characteristic justification.
In the rest of the proof we always assume that 1 ≤ m ≤ n and n ≥ 2. We now have the following proofs: • We wish to prove By definition of analogical proportions, it suffices to show (B, +) ⊧ 0 → 0 0 → 1.
Since every rule s(z) → t(z) is a justification of 0 → 0 0 → 0 by substituting 0 for all variables in z, we have thus shown proving (45) and thus (44). • Next, we wish to prove By definition of analogical proportions, it suffices to show (B, +) ⊧ 1 → 1 0 → 1.

Propositional Logic
In this section, we study the boolean structures (B, ∨, ¬), (B, ∨, ¬, 0), (B, ∨, ¬, 1), and (B, ∨, ¬, 0, 1), where we can employ full propositional logic. Surprisingly, it turns out that these structures are equivalent with respect to boolean proportions to the structure (B) of Section 4 containing only the boolean universe, and the structures of Section 5 containing only negation. This is the essence of the forthcoming Theorem 15. This is interesting as it shows that boolean proportions using full propositional logic can be reduced to the algebra (B) containing no functions and no constants. The proof of Theorem 15 is, however, different from the proof of Theorem 13 since computing all generalizations of a boolean element in (B, ∨, ¬, B), which amounts to computing all satisfiable or falsifiable propositional formulas (cf. Definition 7), is difficult (cf. Derschowitz & Harris, 2003).
We have the following result.
Theorem 15. The following table of boolean proportions is a consequence of Definition 5, for every subset B of B: This implies that in addition to the axioms in Fact 11, (B, ∨, ¬, B)satisfies all the axioms in Section 3.2.

This shows
Jus (B,∨,¬,B) (1 → 1 1 → 0) ⊊ Jus (B,∨,¬,B) (1 → 1 1 → 1). Now apply Fact 9 to prove (58). An analogous argument proves: 8. Comparison to Miclet and Prade (2009) and Klein (1982) Boolean proportions have been embedded into a logical setting before by Klein (1982) and Miclet and Prade (2009). The most important conceptual difference between our framework and Klein's (1982) and Miclet and Prade's (2009) frameworks is that in our model, we make the underlying structure explicit, which allows us to finer distinguish between boolean structures with different functions and constants. Moreover, in contrast to the aforementioned works which define analogical proportions only in the boolean domain, our framework is an instance of a much more general abstract algebraic model formulated in the generic language of universal algebra (Antić, 2022).
Specifically, Klein (1982) gives the following definition of boolean proportion: Miclet and Prade (2009), on the other hand, define boolean proportions as follows: The following table summarizes the situations in Miclet and Prade's (2009), Klein's (1982), and our framework and it provides arguments for its differences (highlighted lines): a b c d M iclet and P rade (2009) Klein (1982) (B, ¬, B) Klein's (1982) notion of boolean proportions in (60)  In Theorems 13 and 15 we have further derived This is equivalent to Klein's (1982) definition (60). Miclet and Prade (2009), on the other hand, do not consider the proportions 0 ∶ 1 ∶ ∶ 1 ∶ 0 and 1 ∶ 0 ∶ ∶ 0 ∶ 1 to be in boolean proportion, 'justified' on page 642 as follows: The two other cases, namely 0 ∶ 1 ∶ ∶ 1 ∶ 0 and 1 ∶ 0 ∶ ∶ 0 ∶ 1, do not fit the idea that a is to b as c is to d, since the changes from a to b and from c to d are not in the same sense. They in fact correspond to cases of maximal analogical dissimilarity, where 'd is not at all to c what b is to a', but rather 'c is to d what b is to a'. It emphasizes the non symmetry of the relations between b and a, and between d and c. Arguably, this is counter-intuitive as in case negation is available (which it implicitly is in Miclet and Prade's (2009) framework), it is reasonable to conclude that 'a is to its negation ¬a what c is to its negation ¬c', and z → ¬z (or, equivalently, ¬z → z) is therefore a plausible characteristic justification of 0 ∶ 1 ∶ ∶ 1 ∶ 0 and 1 ∶ 0 ∶ ∶ 0 ∶ 1 in our framework.
To summarize, our framework differs substantially from the aforementioned models: (1) Our model is algebraic in nature and it is naturally embedded within a more general model of analogical proportions.
(2) In our model, we make the underlying universe and its functions and constants explicit, which allows us to make fine distinctions between different boolean domains. For example, we can distinguish between (B, ¬)-a structure in which we can detect equality and inequality-and (B) where only equality can be detected. For further references on analogical reasoning we refer the interested reader to Hall (1989) and Prade and Richard (2014).

Future Work
Since sets can be identified via their characteristic functions with boolean vectors, an important line of future work closely related to this paper is to study analogical proportions between sets called set proportions. Although Antić (2022) provides some first elementary results in that direction, a complete understanding of set proportions is missing.
More broadly speaking, it is interesting to study analogical proportions in different kinds of mathematical structures as, for example, semigroups and groups, lattices, et cetera. In the context of artificial intelligence it is particularly interesting to study analogical proportions between more sophisticated objects such as, for example, programs, neural networks, automata, et cetera. A recent paper in that direction is Antić's (2021a) study of (directed) logic program proportions via decompositions of logic programs (Antić, 2021d(Antić, , 2021c(Antić, , 2021b. This line of research is highly non-trivial since computing all generalizations of mathematical objects is difficult in general.
From a mathematical point of view, relating boolean proportions to other concepts of boolean and universal algebra and related subjects is an interesting line of research. For this it will be essential to study the relationship between properties of elements like being 'neutral' or 'absorbing' and their proportional properties. At this point-due to the author's lack of expertise-it is not entirely clear how boolean and analogical proportions fit into the overall landscape of boolean and universal algebra and relating analogical proportions to other concepts of algebra and logic is therefore an important line of future research.

Conclusion
This paper studied boolean proportions of the form a ∶ b ∶ ∶ c ∶ d by instantiating Antić's (2022) abstract algebraic model of analogical proportions in the boolean setting. It turned out that our model has appealing mathematical properties. More precisely, we showed that in every boolean domain studied in this paper all of the axioms in Section 3.2 are satisfied. Surprisingly, we found that our model coincides with Klein's (1982) model in boolean domains containing either negation or no constants. This is interesting as our model is an instance of a much more general model not explicitly geared towards the boolean setting. This provides further evidence for the applicability of Antić's (2022) framework. In a broader sense, this paper is a further step towards a mathematical theory of analogical reasoning.