A Question of Logic

Introducing Extended Additive Logic: 2-bit Case

Basics

So, once again, we're working with binary vectors. I will notate them as 00, 01, 10, 11. 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:

  1. Addition: this is simply the exclusive-or operation applied bitwise. In C-like pseudocode it looks like a ^ b. I will notate it as ab.
  2. 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 ab. In the 2-dimensional case it is non-commutative. It is also no longer distributive in general. However left-distributivity a(bc)=(ab)(ac) still holds. In fact, left-distributivity holds in every model of EAL.

000110110000000000010000010110000010101100011011

To make it easier to see I highlighted in orange the non-zero nilpotent element 01, and highlighted in blue the non-identity idempotent element 10. As you can see, the table is not commutative, but commutativity fails only for a single product, specifically:

00=10010110=01.

It should be easy to see, just from looking at the diagonal of this Cayley table, that 10 is idempotent while 01 is nilpotent, since it squares to 00.

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 00 is an absorbing nilpotent, while the maximal element 11 is an identity, hence idempotent. This, together with the requirement of total ordering, already puts some constraints on what the table might look like.

00011011000000000001000?0?0110000???101100011011

We can rule out 1010=00 since this would imply, by total order, that all other products of non-identity elements collapse to 00, which leads to further collapses such as

10=1011=10(1001)=(1010)(1001)=0000=00.

A similar argument rules out 1010=01.

Once 10 is established to be an idempotent, the rest of the table can be filled in easily, for example:

1001=10(1110)=1010=00.

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.

000110110011111111010111111110010111111100011011000110110011111111011011111110000111111100011011

Simple Properties

Observe that there exists a multiplicative endomorphism S(a)=a2. 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 00, 10, and 11. We will assign them letters, with x=11,y=10,z=00.

Now, consider the subsets of {x,y}: there's the empty subset , the subset {x}, the subset {y}, and the subset {x,y}. This results in four subsets, and each of these subsets has a unique sum, since 00= and 01=x+y. 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 xy to represent the element 01=x+y. 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.