Computational Equivalence:
Form 110

Michael Schreiber

Version 0.2, Vienna, Saturday, April 24, 2004

Computational Equivalence: Form 110

SPENCER-BROWN form 110 and WOLFRAM rule 110 are equivalent.

Proof by demonstration:

Form term {{bc}{{a}{b}{c}}} handles bits as form or empty. It returns one form output for three form inputs. All eight possible inputs return like rule 110.

Consequences:

A kind of form is all you need to compute. A system can emulate rule 110 if it can distinguish: More than one is one but one inside one is none. This is equivalent to DiscreteDelta in Mathematica. A Form Principle of Computational Equivalence could thus be stated like: Simple distinctions can be configured into forms which are able to perform universal computions.

Observations:

(1) Conventions for form bits and reordering of inputs can be acommodated by composing permutation of inputs with elementary form wrappers for 26 forms. The letters for the WOLFRAM rules of the 256 elementary cellular automata spell a palindrome.

(2) According to SPENCER-BROWN a form may recycle output as input. The original bracket free vinculum notation for the form can be represented by PEIRCE/CROSKIN brackets but a form reentry notation has to match brackets and variables of recursion.  Symbolic expressions for form reentry and a bit  notation are introduced.

(3) An example shows how to carry out addition of long synchronized signals by form reentry. The system entangles elementary rules 150 and 232 through shared variables of reentry.  The form reentry example is used to compile addition modulo eight in plain forms without reentry.

New science

The new paradigm of the new science might be stated like:

What is computes.
This talk relaunches a minimalist example for universal computation and shares some observations.

Form

SPENCER-BROWN introduces the form 0 by two axioms which define two rules of evaluation.

Variables represent the form 0 or 0 alias nothing alias the empty context alias space alias .

SPENCER-BROWN  reduced his bracket-free notation to (1) the vinculum 0 and (2) letters for variables.

Below is a function which draws the traditional vinculum.

vincular[formterm__:  StyleBox["0", ShowContents -> False]] := 
        FrameBox[RowBox[{formterm}], 
          BoxFrame -> {{0, 1}, {0, 1}}];

CROSKIN re-introduced the PEIRCE notation which replaces each vinculum by a pair of brackets. 
MEGUIRE (2003) surveys the literature and offers an interpretation which uses  additional symbols for nothing and equality . The proposed minimal  implementation uses only brackets and evaluates them by replacing each pair with DiscreteDelta.

Simple implementation

The form can be implemented by DiscreteDelta: More than one is one but one inside one is none.

?DiscreteDelta

formevaluation[formterm_, model_, 
          convention_] := 
formterm /. # /. 
              List -> model & /@ convention;

SPENCER-BROWN knew how to test all possible values for all variables but he defined no convention to understand the results as a kind of WOLFRAM rulenumber.

forminput[n_, 
          names_] := Thread[
              Rule[names, # /. {
0 ->  {{}}, 
1 -> {}
}]] & /@ (IntegerDigits[#, 2, n] & /@ 
              Reverse[Range[0, -1 + 2^n]]);

FrameBox[GridBox[Join[{Flatten[{"Name","Form",(#[[1]] /. List -> vincular  // 
                                DisplayForm) &/@forminput[1,"a"]}]},Transpose[Join[{\({"Identity", "Form", "Identity", "Form"}\),(# /. List -> vincular  // 
                                  DisplayForm) &/@{"a",{"a"},{{"a"}},{{{"a"}}}}},
\(Transpose[
\(formevaluation[#, DiscreteDelta, 
                              forminput[
                                1, "a"]] &\) /@ {"a", {"a"}, {{"a"}}, {{{"a"}}}}]\)]]],ColumnLines -> {0, 1},RowLines -> {1, 0, 1, 0}]]//DisplayForm

Re-interpretation of the form algebra for integers

SPENCER-BROWN proposed an interpretation of the form algebra for the natural numbers which modified the axioms to use an unary notation: 3 ->  000 
The intermediate interpretation proposed here needs no modification of the axioms and enjoys benefits of positional numeration.

fromrule[r_, 
          varord_List] := {With[{rulelength = Length[r]}, 
              With[{dim = 
                    Log[2, rulelength]}, 
((varord (1 + IntegerDigits[rulelength - #[[1]], 2, dim])) & /@ 
                    Position[r, 1])]]} /. {2  
                  var : _ -> {var}};

The function above generates the disjunctive normal form for a binary number. Every Boolean function of degree n can be written using only the form operator and n variables.

The names according to http://mathworld.wolfram.com/BooleanFunction.html are used in WOLFRAM rule encoding order here.

booleannames={"FALSE","AND","a AND NOT b","a","NOT a AND b","b","XOR","OR","NOR","XNOR","NOT b","a OR NOT b","NOT a","NOT a OR b","NAND","TRUE"}[[FromDigits[Reverse[IntegerDigits[#, 2, 4]], 2] + 1 & /@ 
              Range[0, 15]]];

FrameBox[GridBox[Join[{Flatten[{"\nName","\nForm",ColumnForm[{(#[[1, All]] /. 
                                      List -> vincular  // 
                                    DisplayForm), #[[2, All]] /. 
                                    List -> vincular  // 
                                  DisplayForm}] &/@forminput[2,{"a","b"}]}]},Transpose[Join[{booleannames,(# /. List -> vincular  // 
                                  DisplayForm) &/@(fromrule[IntegerDigits[#, 2, 4],{"a","b"}]&/@Range[0, 15])},
Transpose[
formevaluation[#,DiscreteDelta,forminput[2,{"a","b"}]]&/@(fromrule[IntegerDigits[#, 2, 4],{"a","b"}]&/@Range[0, 15])]]]],ColumnLines -> {1},RowLines -> {1}]]//DisplayForm

Venn Diagram Illustration

lem = {-1/2, 0}; rim = {1/2, 0}; 
    dom = {0, -((Sqrt[3])/2)};
resmid[r_, m_, st_, en_] := 
      Table[{Cos[p], Sin[p]} + m, {p, st, en, Pi/r}]; 
core[r_] := 
      Polygon[Join[resmid[r, dom, 1/3 Pi, 2/3  Pi], 
          resmid[r, rim,  Pi, 4/3  Pi], 
          resmid[r, lem, 5/3  Pi, 2  Pi]]]; 
topcore[r_] := 
      Polygon[Join[resmid[r, dom, 1/3 Pi, 2/3  Pi], 
          resmid[r, lem,  0, 1/3  Pi], 
          resmid[r, rim,  2 Pi/3, Pi]]]; 
lecore[r_] := 
      Polygon[Join[resmid[r, dom, 2/3 Pi, Pi], 
          resmid[r, lem,  4/3 Pi, 5/3  Pi], 
          Reverse[resmid[r, rim,  Pi, 4/3  Pi]]]]; 
ricore[r_] := 
      Polygon[Join[resmid[r, rim, 4/3 Pi, 5/3  Pi], 
          resmid[r, dom,  0, Pi/3], 
          Reverse[resmid[r, lem, 5 Pi/3, 2  Pi]]]]; 
riout[r_] := 
      Polygon[Join[resmid[r, rim, -1/3 Pi, 2/3  Pi], 
          resmid[r, lem,  0, 1/3  Pi], 
          Reverse[resmid[r, dom,  0, Pi/3]]]]; 
leout[r_] := 
      Polygon[Join[resmid[r, lem, 1/3 Pi, 4/3  Pi], 
          Reverse[resmid[r, dom,  2  Pi/3, Pi]], 
          Reverse[resmid[r, rim,  2  Pi/3, Pi]]]]; 
doout[r_] := 
      Polygon[Join[resmid[r, lem, 4/3 Pi, 5/3  Pi], 
          resmid[r, rim,  4  Pi/3, Pi 5/3 ], 
          Reverse[resmid[r, dom,  Pi, 2  Pi]]]]; 
backall[r_] := 
      Polygon[ {{-3/2, 1}, {3/2, 1}, {3/2, -1} + 
            dom, {-3/2, -1} + dom, {-3/2, 1}}]; 
backall[3] = 
      Polygon[ {{-3/2, -dom[[2]]}, {3/
              2, -dom[[2]]}, {3/2, dom[[2]]} + 
            dom, {-3/2, dom[[2]]} + 
            dom, {-3/2, -dom[[2]]}}]; 
stand[res_] := {
RGBColor[0, 0, 0], 
        backall[res], 
RGBColor[1, 0, 0], 
        leout[res], 
RGBColor[0, 1, 0], 
        riout[res], 
RGBColor[1, 1, 0], 
        topcore[res], 
RGBColor[0, 1, 0], 
        ricore[res], 
RGBColor[1, 0, 0], lecore[res], 
        RGBColor[1, 1, 0], core[res]}; 
retruli[
          cores_] := {{RGBColor[1, 1, 1], core[cores]}, {RGBColor[0, 1, 1], 
            lecore[cores]}, 
{RGBColor[1, 0, 1], 
            ricore[cores]}, {RGBColor[0, 0, 1], doout[cores]}};
\(\(\(Show[
            Graphics[
              With[{res = 360}, {EdgeForm[], 
stand[
                    res], \(retruli[
                      res]\)[\([\)\(\ \)\(#[\([\)\(2\)\(]\)]\)\(]\)], 
                  RGBColor[ .5,  .5,  .5], 
                  Text[StyleForm["F " <> 
                        ToString[#[\([\)\(1\)\(]\)]], "Title"], {0, \(-dom[\([\)\(2\)\(]\)]\)/2}], 
                  Text[StyleForm[
                      booleannames[\([\)\(1 + #[\([\)\(1\)\(]\)]\)\(]\)], "Subtitle"], {0, \(-dom[\([\)\(2\)\(]\)]\)/4}], 
                  Text[StyleForm[
                      DisplayForm[
                        GridBox[
                          Partition[
                            Flatten[{{"A", 1, 1, 0, 0, ""}, {"", 
                                  1, 0, 1, 0, "B"}, "", 
                                IntegerDigits[#[\([\)\(1\)\(]\)], 2, 
                                  4], ""}], 6], 
                          RowLines -> {0, 1, 
                              0}]], "Subsubtitle"], {0, \(-3\)/
                        2}], 
Text[
                    StyleForm[
                      DisplayForm[
                        Reverse[
                            Flatten[
                              fromrule[
                                IntegerDigits[#[\([\)\(1\)\(]\)], 2, 
                                  4], {"A", "B"}], 1]] /. 
                          List -> vincular], "Title"], {0, 
                      dom[\([\)\(2\)\(]\)]/2}]
}], 
              AspectRatio -> Automatic]] &\) /@ 
        Table[{ru, 
            DeleteCases[{1, 2, 3, 4}\ IntegerDigits[ru, 2, 4], 0]}, {ru, 0, 
            15}];\)\)

Equivalence of rules and forms shown for 110

fromrule[IntegerDigits[110, 2, 8],{"a","b","c"}]/.List -> vincular//DisplayForm

{{"b","c"},{{"a"},{"b"},{"c"}}}/.List -> vincular//DisplayForm

Both of the above form terms are equivalent to rule number 110. The demonstration uses the simple representation and DiscreteDelta to evaluate each pair of  brackets as a form.

\(formevaluation[
{{"b", "c"}, {{"a"}, {"b"}, {"c"}}}
, DiscreteDelta, 
      forminput[3, CharacterRange["a", "c"]]]\)

FromDigits[%, 2]

Consequences

DiscreteDelta is a  model for the SPENCER-BROWN form.

A conventional ordering of form evaluations can be interpreted as a WOLFRAM rule numbers.

The SPENCER-BROWN form is functionally complete in the Boolean algebras of all degrees .

SPENCER-BROWN form  {{b,c},{{a},{b},{c}}} emulates the universal elementary cellular automaton rule number 110 and might be a useful minimal example for interpretations of the new kind of scientific principle introduced by WOLFRAM: 
"There are various ways to state the Principle of Computational Equivalence, but probably the most general is just to say that almost all processes that are not obviously simple can be viewed as computations of equivalent sophistication." NKS 716-717.

Observation I: 26 letters for form relations between 256 rules

The WOLFRAM Axiom is equivalent to the axioms of Boolean algebra (http://mathworld.wolfram.com/WolframAxiom.html).

Nand[
Nand[Nand[p, q], q], 
          Nand[Nand[p, Nand[p, r]], p]
] == r // 
      TraditionalForm

This equation can be interpreted as a rule by accepting p, q, and r as input.

FromDigits[FullSimplify[((
(Nand[
Nand[Nand[p, q], q], 
                            Nand[Nand[p, Nand[p, r]], 
                              p]
] == r) /. 
                      Flatten[Thread[Rule[{p, q, r}, #]]]) /. {0 -> False, 
                    1 -> True})] & /@ (IntegerDigits[#, 2, 
                  3] & /@ Reverse[Range[0, 7]]) /. {False -> 0, 
          True -> 1}, 2]

The WOLFRAM axiom does not specify the order of inputs. WOLFRAM studied relations between elementary cellular automaton rules generated by (1) reversing left and right neighbours and (2) simultaneously switching the meaning of 0 and 1 for inputs and outputs (NKS page 883).

blackwhite[ruledigits_] := 
        1 - Reverse[ruledigits];
leftright[ruledigits_] := 
        ruledigits[[{1, 5, 3, 7, 2, 6, 4, 
              8}]];
TableForm[{IntegerDigits[#, 2, 3] & /@ Reverse[Range[0, 7]]}, 
      TableSpacing ->  .1]
TableForm[{IntegerDigits[#, 2, 3] & /@ Reverse[
              Range[0, 7]][[{1, 5, 3, 7, 2, 6, 4, 8}]]}, 
      TableSpacing ->  .1]

The following observation (a) permits permutations of input variables beyond (1)  leftright too; and (b) distinguishes form operations on inputs and output hidden by (2) the interchange of 0 and 1.

Print[
            FrameBox[
                TableForm[(Transpose[IntegerDigits[#, 2, 3] & /@ 
                          Reverse[Range[0, 7]]][[#]])]] // 
              DisplayForm] & /@ Permutations[{1, 2, 3}];

TableForm[{IntegerDigits[#, 2, 3] & /@ Reverse[Range[0, 7]]}, 
      TableSpacing ->  .1]

Palindromes of invariants

The proposed interpretation of form for numbers seems to entail adoption of conventions but such conventions can be customized. This is done by embracing input or output variables. Composition of those simple form operations with permutation of inputs derive all elementary rules from 26 forms which can by named by letters. These root forms are not given by their full term but as short terms found by exhaustive search.

\(\(formwitnesses = {"{}", "{a,b,c}", "{a,{b},{c}}", "{a,b}", "{{c},{a,b},{{a},{b},{c}}}", "{{b},{a,c,{b}}}", "{a,{b,{c}},{c,{b}}}", "{{b},{{c},{b}}}", "{{b},{a,{c},{b}}}", "{a,{b,c}}", "{b}", "{{{b},{c}},{{a,{b,c}},{b,c,{a}}}}", "{{b,c},{{b,c},{{a,b},{a,c}}}}", "{{b,c},{{a,b},{b,c},{c,{a},{b}}}}", "{{b,c},{a,{b},{c}}}", "{{b,c},{{b},{a,c,{b}}}}", "{{b,c},{{b},{{a},{b}}}}", "{{{c},{a,b}},{a,b,c}}", "{{b,c},{{a},{{b},{c}}},{a,{b},{c}}}", "{{a,{c,{b}}},{b,{c}}}", "{{b,c},{{c},{a,b},{{a},{b}}}}", "{{b,c},{{b},{a,{b}}}}", "{{b,c},{{b},{c,{b}}}}", "{{b,c},{{a},{b},{c}}}", "{{a,{b,c},{{b},{c}}},{{a},{b,{c}},{c,{b}}}}", "{{b,{c}},{{a,b},{{a},{c}}}}"};\)\)

\(FrameBox[
        TableForm[
          Partition[
            Range[0, 255] /. 
              Flatten[With[{conv = 
                      forminput[3, CharacterRange["a", "c"]]}, 
                  Table[Thread[
                      Rule[
Union[
                          Flatten[\({
FromDigits[
                                    formevaluation[#, DiscreteDelta, conv], 
                                    2], 
FromDigits[
                                    formevaluation[{#}, DiscreteDelta, conv], 
                                    2]
} &\) /@ \((\(ToExpression[formwitnesses[\([f]\)]] /. Thread[Rule[{a, b, c}, #]] &\) /@ 
                                  Join[
Permutations[{"a", "b", "c"}], 
Permutations[{{"a"}, {"b"}, {"c"}}]
])\)]], 
                        StyleForm[\(CharacterRange["A", "Z"]\)[\([f]\)], FontSize -> 26]]], {f, 1, 26}]]], 16], 
          TableSpacing -> { .2,  .3}], 
        BoxFrame -> {{0, 20}, {0, 20}}] // DisplayForm\)

TableForm[Flatten[#] & /@ 
        Transpose@
          Partition[
            Transpose@{CharacterRange["A", "Z"], DisplayForm[
                      ToExpression[#] /. List -> vincular] & /@ 
                  formwitnesses}, 13]]

Group approach?

I guess there should be a simple combinatoric group approach which handles the general pattern behind this observation. Yet at least the sequence giving the number of distinct characters needed to label the distinct roots invariant under permutation of inputs composed with reversal of bit code and inversion of inputs seems unknown.

grouproot[n_] := 
        Length[Union[
            With[{bitlevels = 
                  Transpose[
                    Map[IntegerDigits[#, 2, n] &, 
                      Reverse[Range[0, -1 + 2^n]]]]}, 
              Table[Union[
                  Flatten[{FromDigits[IntegerDigits[r, 2, 
                                2^n][[#]], 2], 
                          FromDigits[
                            1 - IntegerDigits[r, 2, 2^n][[#]], 
                            2]} & /@ 
                      Flatten[{#, Reverse[#]} & /@ (Map[
                              FromDigits[#, 2] + 
                                  1 &, Transpose[bitlevels[[#]]] & /@ 
                                Permutations[Range[n]], {2}]), 1]]], {r, 
                  0, -1 + 2^2^n}]]]];

{2, 5, 26, 1072}

grouproot[#] & /@ Range[4]

grouprootall[n_] := 
        Union[With[{bitlevels = 
                Transpose[
                  Map[IntegerDigits[#, 2, n] &, 
                    Reverse[Range[0, -1 + 2^n]]]]}, 
            Table[Union[
                Flatten[{FromDigits[IntegerDigits[r, 2, 2^n][[#]], 
                          2], FromDigits[
                          1 - IntegerDigits[r, 2, 2^n][[#]], 2]} & /@ 
                    Flatten[{#, Reverse[#]} & /@ (Map[
                            FromDigits[#, 2] + 
                                1 &, Transpose[bitlevels[[#]]] & /@ 
                              Permutations[Range[n]], {2}]), 1]]], {r, 
                0, -1 + 2^2^n}]]];

grouprootall[1]

grouprootall[2]

grouprootall[3]

Observation II: Notations for form reentry

According to SPENCER-BROWN a form may recycle output as input. The original bracket free vinculum notation for the form can be represented by PEIRCE/CROSKIN brackets but a form reentry notation has to match brackets and variables of recursion.

Symbolic form reentry

reentryvincular[
          formterm__:  StyleBox["0", ShowContents -> False]] := 
        FrameBox[RowBox[{formterm}], 
          BoxFrame -> {{0, 1}, {1, 1}}];

SPENCER-BROWN added a hook to his vinculum which indicates reentry of a variable.

{a} /. List -> reentryvincular // DisplayForm

Neither explicit notation nor implementation can go to infinity so we arrive at a particular level of nesting which returns a particular result.

Nest[{#} &, a, 100] /. List -> vincular // DisplayForm

NestList[DiscreteDelta, DiscreteDelta[], 3]

Both proposed notations for form reentry accept synchronized arbitrary length signals and can be used to formulate statements about computations involving infinite signals.

The example A a A generates what SPENCER-BROWN called an oscillating or imaginary truth value if we insist on a a particular output for infinite evaluation..

The proposed symbolic notation replaces ordinary brackets by uppercase letters or uses subscripts to match brackets with variables presenting their output inside the corresponding bracket or in another synchronized form.

Bit codes for form reentry

Subscripted or superscripted brackets offer further options for symbolic form reentry notations.  Userinterfaces of implementations might find other intuitive representations. The bit form might help to build a direct interface to Turing machines or other kinds of universal machines.

Observation III: Addition by form reentry

The code below implements a kind of form reentry kernel which draws a distinction between variables for input signals and variables of reentry . The reentry variables are results remembered from the previous computation. The form folds synchronized signals of arbitrary length by using the generic kernel. Latency of response depends on the delays caused by keeping old values of input variables as values of reentry variables.

reenterkernel[reterms_, revar_, var_, old_, 
          new_] := 
(# /. 
                Flatten[{
List -> 
                      DiscreteDelta, 
Thread[
                      Rule[revar, old]], 
Thread[
                      Rule[var, new]]
}]) & /@ 
          reterms;
reenterfold[reterms_, revar_, var_, init_, 
          data_] := 
FoldList[
reenterkernel[reterms, revar, 
              var, #1, #2] &, 
reenterkernel[reterms, 
            revar, var, init, First[data]], 
Rest[
            data]
];

Form reentry including rule numbers

The application example generates forms for rules given as WOLFRAM numbers for subscripted labels of variables which can be linked to named form reentry brackets or input signals. The example system uses forms for rules 150 and 232 to add bitstreams of arbitrary length.

Note the post processing of results by form reentry.

reformadd[toadd1_, toadd2_] := 
        reenterfold[{
{{b}}
}, {a}, {b, 
            c}, {0}, 
          reenterfold[{
fromrule[
                IntegerDigits[150, 2, 8], {b, c, 
                  d}], 
fromrule[
                IntegerDigits[232, 2, 8], {b, c, d}]
}, {a, 
              b}, {c, d}, {0, 0}, Transpose[{toadd1, toadd2}]]];
reconvadd[a_, b_, m_] := 
        FromDigits[
          Flatten[Reverse[
              reformadd[Reverse[IntegerDigits[a, 2, m]], 
                Reverse[IntegerDigits[b, 2, m]]]]], 2];

\(\(reformadd[toadd1_, 
          toadd2_] := 
reenterfold[{
{{"b"}}\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \  (*\ 
              postprocessing\ *) 
}, {"a"}, {"b", "c"}, {0}, \ 
reenterfold[{
fromrule[
                IntegerDigits[150, 2, 
                  8], {"b", "c", "d"}], 
fromrule[
                IntegerDigits[232, 2, 
                  8], {"b", "c", "d"}]
}, {"a", "b"}, {"c", "d"}, {0, 0}, 
            Transpose[{toadd1, toadd2}]]];\)\)
reconvadd[a_, b_, m_] := 
        FromDigits[
          Flatten[Reverse[
              reformadd[Reverse[IntegerDigits[a, 2, m]], 
                Reverse[IntegerDigits[b, 2, m]]]]], 2];

Union[
      Flatten[Table[
          reconvadd[x, y, 5] - x - y, {x, 0, 15}, {y, 0, 15}]]]

Plain form terms for addition compiled by form reentry terms

Form reentry can be used as compilation procedure which returns plain form expressions which unroll reentry for signals of expected length. The fragments implement a minimum of simplification according to the original axioms.

SetAttributes[fofo, Orderless];
fofo[fofo[b__]] := b;
fofo[a___, b__, b__] := fofo[a, b];
z[k___] := List[List[k]];
z[List[k___]] := List[k];

The following example traces addition of two signals of two bits returning two bits and thus suppressing potential overflow.

ColumnForm[DisplayForm[# /. DiscreteDelta -> term] & /@ 
        DeleteCases[Flatten[reformadd[{a1, a2}, {b1, b2}]], 
          0, {-1}]]

DisplayForm[# /. DiscreteDelta -> vincular] & /@ 
      DeleteCases[Flatten[reformadd[{a1, a2}, {b1, b2}]], 
        0, {-1}]

ColumnForm[DisplayForm[# /. DiscreteDelta -> vincular] & /@ 
        DeleteCases[Flatten[reformadd[{a1, a2}, {b1, b2}]], 
          0, {-1}]]

ColumnForm[DisplayForm[z[# /. DiscreteDelta -> fofo] /. 
                fofo -> List /. List -> vincular] & /@ 
        DeleteCases[Flatten[reformadd[{a1, a2}, {b1, b2}]], 
          0, {-1}]]

ColumnForm[DisplayForm[z[# /. DiscreteDelta -> fofo] /. 
                fofo -> List /. List -> vincular] & /@ 
        DeleteCases[Flatten[reformadd[{a1, a2, a3}, {b1, b2, b3}]], 
          0, {-1}]]

DeleteCases[reformadd[{a1, a2}, {b1, b2}], 0, -1]

Testing compiled forms for addition modulo 8 over domains 0 to -1+ 2^3

addtest = 
DeleteCases[
            reformadd[{a1, a2, a3}, {b1, b2, b3}], 0, -1] /. 
          DiscreteDelta -> 
            fofo /. fofo->List

Note the braces around the terms obtained from the simplified form representing the compiled form reentry.

Table[-a - b + 
          FromDigits[
            Reverse[(({#} /. 
                          Join[Thread[
                              Rule[{a1, a2, a3}, 
                                Reverse[IntegerDigits[a, 2, 3]]]], 
                            Thread[
                              Rule[{b1, b2, b3}, 
                                Reverse[IntegerDigits[b, 2, 3]]]]]) /. 
                      List -> DiscreteDelta) & /@ addtest], 2], {a, 
          0, 7}, {b, 0, 7}] // TableForm

Table[
        Mod[-a - b + 
            FromDigits[
              Reverse[(({#} /. 
                            Join[Thread[
                                Rule[{a1, a2, a3}, 
                                  Reverse[IntegerDigits[a, 2, 3]]]], 
                              Thread[
                                Rule[{b1, b2, b3}, 
                                  Reverse[IntegerDigits[b, 2, 3]]]]]) /. 
                        List -> DiscreteDelta) & /@ addtest], 2], 
          8], {a, 0, 7}, {b, 0, 7}] // TableForm

Literature

Used Peirce brackets again.

Covers current interpretations of plain SPENCER-BROWN forms.

The original interpretation of the form algebra for numbers included as a reprint..