YAGBA — Yet Another Generalization of Boolean Algebra.
Version of 13 January 2009.
Dave Barber's other pages.

Introduction. A yagba is an ordered triplet of real numbers where each number is between negative one and positive one, and the sum of all three numbers is zero.

One way to write a yagba is to list its components, separated by commas, between shallow angle brackets. Examples are ⟨ −0.3, +0.5, −0.2 ⟩, ⟨ 0.0, 0.0, 0.0 ⟩ and ⟨ 0.0, +1.0, −1.0 ⟩. The three components can be denoted by the subscripts a, b and c respectively, so that if Y is a yagba, Y ≡ ⟨ Ya, Yb, Yc ⟩. In the ensuing discussion, yagbas will frequently be denoted by majuscules from the latter part of the Roman alphabet.

For the yagba Y, the essential constraints can now be listed this way:

−1 ≤ Ya ≤ +1
−1 ≤ Yb ≤ +1
−1 ≤ Yc ≤ +1
Ya + Yb + Yc = 0

Immediate consequences are:

−1 ≤ (Ya + Yb) ≤ +1
−1 ≤ (Yb + Yc) ≤ +1
−1 ≤ (Yc + Ya) ≤ +1

The sum-equals-zero constraint means that while the triple has three numbers, it has only two degrees of freedom; this redundancy is worthwhile because it effects a useful symmetry of notation which will be revealed as the discussion continues. Since any two components are sufficient to determine the yagba, we sometimes for convenience write in lieu of one component the Greek minuscule rho (ρ), which has the mnenomic remainder. The ρ represents whatever value is required to make the sum of the components equal to zero, and this symbol is used very casually: if ρ appears in each of several yagbas within one expression, it might stand for a different value in each.

As is customary with ordered n-tuples, two yagbas are equal if and only if their respective components are equal.

Six yagbas, representing extreme values, deserve their own names:

PNZ = ⟨ +1, −1, 0 ⟩
PZN = ⟨ +1, 0, −1 ⟩
ZPN = ⟨ 0, +1, −1 ⟩
NPZ = ⟨ −1, +1, 0 ⟩
NZP = ⟨ −1, 0, +1 ⟩
ZNP = ⟨ 0, −1, +1 ⟩

Mnemonics are P for positive, N for negative and Z for zero. These yagbas are called corner constants because if their components are regarded as (x, y, z) coordinates in cartesian 3-space, the constants form the corners of a regular hexagon with an edge of √2. All other yagbas are on the boundary or in the interior of this hexagon, which lies in a plane oblique to the coordinate axes. That plane can be rotated into the (x, y) plane by this transformation:

x2D = x3D ∗ (sqrt (1/12) + 1/2) + y3D ∗ (sqrt (1/12) − 1/2) − z3D ∗ sqrt (1/3)

y2D = x3D ∗ (sqrt (1/12) − 1/2) + y3D ∗ (sqrt (1/12) + 1/2) − z3D ∗ sqrt (1/3)


Unary operators. We use a prefix notation, and omit writing parentheses around the operand if no confusion will result.

Negation is unsurprising:

Y = ⟨ − Ya, − Yb, − Yc

Patently,

PNZ = − NPZ
PZN = − NZP
ZPN = − ZNP

Each of six permutative operators has a three-letter name:

ABC Y = ⟨ Ya, Yb, Yc
ACB Y = ⟨ Ya, Yc, Yb
CAB Y = ⟨ Yc, Ya, Yb
BAC Y = ⟨ Yb, Ya, Yc
BCA Y = ⟨ Yb, Yc, Ya
CBA Y = ⟨ Yc, Yb, Ya

It is often convenient to write P, Q and R as "variables" denoting permutation operators.

The negation operator commutes with any permutation operator, so for instance − (CAB Y) = CAB (− Y) and more generally, − (P Y) = P (− Y). By contrast, the permutation operators are noncommutative among themselves. For example, the following are unequal:

CAB (ACBd, e, f ⟩) = CABd, f, e ⟩ = ⟨ e, d, f
ACB (CABd, e, f ⟩) = ACBf, d, e ⟩ = ⟨ f, e, d

One might apply one permutation operator to another, as given in the following table. Relative to each other, P is the operator, and Q is the operand:

P(Q)Q = Informal description
of how to change Q
ABCACB CABBAC BCACBA
P = ABC ABCACBCAB BACBCACBA change nothing
ACB ACBABCCBA BCABACCAB exchange the last two letters
CAB CABBACBCA CBAABCACB move the last letter to the beginning
BAC BACCABACB ABCCBABCA exchange the first two letters
BCA BCACBAABC ACBCABBAC move the first letter to the end
CBA CBABCABAC CABACBABC exhange the first and last letters

This manner of combining operators is also noncommutative; for example:

(CAB (ACB)) ⟨ d, e, f ⟩ = BACd, e, f ⟩ = ⟨ e, d, f
(ACB (CAB)) ⟨ d, e, f ⟩ = CBAd, e, f ⟩ = ⟨ f, e, d

Even without a yagba as operand, ACB (CAB) is a legitimate standalone expression, denoting the operator CBA.

The permutative operators do exhibit associativity, in two senses:


Binary operators. Related by permutation are six important binary operators, whose names are built from the mnemonics G for greater (hence maximum), L for lesser (hence minimum), and R for remainder. Either prefix or infix notation is possible:

GLR (Y, Z) = Y GLR Z = ⟨ max (Ya, Za), min (Yb, Zb), ρ ⟩
GRL (Y, Z) = Y GRL Z = ⟨ max (Ya, Za), ρ, min (Yc, Zc) ⟩
RGL (Y, Z) = Y RGL Z = ⟨ ρ, max (Yb, Zb), min (Yc, Zc) ⟩
LGR (Y, Z) = Y LGR Z = ⟨ min (Ya, Za), max (Yb, Zb), ρ ⟩
LRG (Y, Z) = Y LRG Z = ⟨ min (Ya, Za), ρ, max (Yc, Zc) ⟩
RLG (Y, Z) = Y RLG Z = ⟨ ρ, min (Yb, Zb), max (Yc, Zc) ⟩

For these operators, D and E are the typical "variable" names.

We need to prove that GLR (Y, Z) is in fact a yagba. Although the appearance of ρ in its definition ensures that the sum of the components will be zero, yet unestablished is that ρ has a magnitude that is not greater than unity. This can be resolved by examining four partially overlapping cases:

Since the yagbas are closed under GLR, they will by symmetry be closed under the other five binary operators.


The six binary operators are commutative and associative because min and max are:

Y D Z = Z D Y
(X D Y) D Z = X D (Y D Z)

Not always satisfied, however, are the distributive and absorptive laws:

X D (Y E Z) = (X D Y) E (X D Z) ?
Y D (Y E Z) = Y ?

but if one is satisfied so is the other, as detailed in this table:

Distributive?
Absorptive?
L =
GLRGRL RGLLGR LRGRLG
K = GLRYesNoNoYesNoNo
GRLNoYesNoNoYesNo
RGLNoNoYesNoNoYes
LGRYesNoNoYesNoNo
LRGNoYesNoNoYesNo
RLGNoNoYesNoNoYes

These binary operators can be permuted, according to this table:

P(J)J =
GLRGRL RGLLGR LRGRLG
P = ABC GLRGRLRGL LGRLRGRLG
ACB GRLGLRRLG LRGLGRRGL
CAB RGLLGRLRG RLGGLRGRL
BAC LGRRGLGRL GLRRLGLRG
BCA LRGRLGGLR GRLRGLLGR
CBA RLGLRGLGR RGLGRLGLR

The permutative operators are distributive over an operator invocation. For instance,

BAC (GLR (Y, Z)) = (BAC (GLR)) (BAC (Y), BAC (Z)) = LGR (BAC (Y), BAC (Z))

What happened is that BAC was applied to the operator GLR and each of the operands Y and Z, and then BAC (GLR) was simplified.


Some identities. The next table justifies calling yagba algebra a generalization of boolean. These yagba formulas can be extended by permutation to other operators:

YagbasBoolean counterparts
Idempotence

Y GLR Y = Y

BB = B BB = B
Annihilation Y GLR PNZ = PNZ B ∧ 0 = 0 B ∨ 1 = 1
Identity Y GLR NPZ = Y B ∧ 1 = B B ∨ 0 = B
Absorption Y GLR (Y LGR Z) = Y B ∧ (BC) = B B ∨ (BC) = B
Commutative law Y GLR Z = Z GLR Y BC = CB BC = CB
Associative law (X GLR Y) GLR Z =
X GLR (Y GLR Z)
(BC) ∧ D =
B ∧ (CD)
(BC) ∨ D =
B ∨ (CD)
Distributive law X GLR (Y LGR Z) =
(X GLR Y) LGR (X GLR Z)
B ∧ (CD) =
(BC) ∨ (BC)
B ∨ (CD) =
(BC) ∧ (BC)

Legend: