Introducing Extended Additive Logic: 2-bit Case
Basics
So, once again, we're working with binary vectors. I will notate them as , , , . These are totally ordered under the lexicographic order, which, of course, is the same as the standard ordering of integers.
We will be using the following basic operations on these bit vectors:
- Addition: this is simply the exclusive-or operation applied bitwise. In C-like pseudocode it looks like
a ^ b. I will notate it as . - Minimum / Maximum: these are simply the minimum and the maximum of the two vectors with respect to the lexicographic (or integer) ordering, which should be self-explanatory.
EAL Product
The main operation we're concerned with is the multiplication In the 2-dimensional case it is non-commutative. It is also no longer distributive in general. However left-distributivity still holds. In fact, left-distributivity holds in every model of EAL.
To make it easier to see I highlighted in orange the non-zero nilpotent element , and highlighted in blue the non-identity idempotent element . As you can see, the table is not commutative, but commutativity fails only for a single product, specifically:
It should be easy to see, just from looking at the diagonal of this Cayley table, that is idempotent while is nilpotent, since it squares to
Construction
In a later writeup I will provide more details on how EAL is defined in any dimension. Here I wish to share a sketch that should help see the reason behind using this specific Cayley table.
As before, the minimal element is an absorbing nilpotent, while the maximal element is an identity, hence idempotent. This, together with the requirement of total ordering, already puts some constraints on what the table might look like.
We can rule out since this would imply, by total order, that all other products of non-identity elements collapse to which leads to further collapses such as
A similar argument rules out
Once is established to be an idempotent, the rest of the table can be filled in easily, for example:
Implications
It is possible to figure out the strong and weak implications (which are now distinct!) just the table alone. It is easiest to describe how this can be done with an algorithm.
#define MAX(a,b) ((a) > (b) ? (a) : (b))
#define MIN(a,b) ((a) < (b) ? (a) : (b))
int mult(int a, int b){
if ((a | b) & ~3) return -1;
/* A shortcut, valid only in 2-bit EAL */
return a & MAX(b >> 1, b * (a >> 1));
}
int simpl(int a, int b){
int i, prod, res = -1;
if ((a | b) & ~3) return -1;
for (i = 0; i <= 3; i ++){
prod = mult(a, i);
if (prod < 0) return prod;
if (prod <= b && res < i) res = i;
}
return res;
}
int wimpl(int a, int b){
int i, prod, res = -1;
if ((a | b) & ~3) return -1;
for (i = 0; i <= 3; i ++){
prod = mult(i, a); /* The ONLY change from `simpl.' */
if (prod < 0) return prod;
if (prod <= b && res < i) res = i;
}
return res;
}
The truth tables for these operators are as follows.
Simple Properties
Observe that there exists a multiplicative endomorphism It is easy to check that it indeed preserves products by consulting the table. In fact, this holds in every model of EAL, which I will demonstrate in due course. It does not preserve sums, however.
I will now introduce a slightly more algebraic way to talk about elements of EAL. It is clear that, in two dimensions, the model of EAL has three idempotents, namely and We will assign them letters, with
Now, consider the subsets of : there's the empty subset , the subset the subset and the subset This results in four subsets, and each of these subsets has a unique sum, since and This gives us the idempotent basis of EAL, which exists in every model. It is very handy for proving certain theorems.
To avoid visual noise, I write to represent the element This does not introduce ambiguity, since juxtaposition is not used otherwise.
Conclusion
By now, we have seen some genuinely new features of EAL that set it apart from many other logics. I have omitted some details in order to keep this tour from becoming disorienting and to be able to complete my writing within a reasonable time. Much more will be covered in the near future, including the role of nilpotents, real-life applications of this logic, as well as some puzzles I have developed over the years to highlight the best features of EAL.
- R.