# 6.3 Causal Invariance

Like string substitution systems, our models can have the important feature of causal invariance [1:9.9]. In analogy with neighbor-independent string substitution systems, causal invariance is guaranteed if there is just a single relation on the left-hand side of a rule.

Consider for example the rule:

{{x, y}} -> {{x, y}, {y, z}}

Starting from a single self-loop, this gives the multiway system:

CloudGet["https://wolfr.am/LmHho8Tr"]; newgraph[ Graph[ResourceFunction["MultiwaySystem"][ "WolframModel" -> {{{x, y}} -> {{x, y}, {y, z}}}, {{{0, 0}}}, 4, "StatesGraph"], VertexSize -> 1, PerformanceGoal -> "Quality"]]

As implied by causal invariance, every pair of paths that diverge must reconverge. And looking at a few more steps, we can see that in fact with this particular rule, branches always recombine after just one step:

LayeredGraphPlot[ ResourceFunction["MultiwaySystem"][ "WolframModel" -> {{{x, y}} -> {{x, y}, {y, z}}}, {{{0, 0}}}, 6, "StatesGraphStructure"], AspectRatio -> 1/2]

The different paths here lead to hypergraphs that look fairly different. But causal invariance implies that every time there is divergence, there must always eventually be reconvergence.

And for some rules, different paths give hypergraphs that do look very similar. An example is the rule

{{x, y}} -> {{y, z}, {z, x}}

where the hypergraphs produced on different paths differ only by the directions of their hyperedges:

CloudGet["https://wolfr.am/LmHho8Tr"]; newgraph[ Graph[ResourceFunction["MultiwaySystem"][ "WolframModel" -> {{{x, y}} -> {{y, z}, {z, x}}}, {{{0, 0}}}, 6, "StatesGraph"], VertexSize -> 1], {1, .4}]

For rules that depend on more than one relation, causal invariance is not guaranteed, and in fact is fairly rare. Of the 4702 inequivalent 22 32 rules, perhaps 5% are causal invariant.

In some cases, the causal invariance is rather trivial. For example, the rule

{{x, y}, {x, y}} -> {{z, z}, {z, z}, {y, z}}

leads to a multiway graph that only allows one path of evolution:

Graph[ResourceFunction["MultiwaySystem"][ "WolframModel" -> {{{x, y}, {x, y}} -> {{z, z}, {z, z}, {y, z}}}, {{{0, 0}, {0, 0}}}, 4, "StatesGraph"], VertexSize -> 1]

A less trivial example is the rule

{{x, y}, {z, y}} -> {{x, w}, {y, w}, {z, w}}

which yields the multiway system:

CloudGet["https://wolfr.am/LmHho8Tr"]; newgraph[ Graph[ResourceFunction["MultiwaySystem"][ "WolframModel" -> { {{x, y}, {z, y}} -> {{x, w}, {y, w}, {z, w}}}, {{{0, 0}, {0, 0}}}, 6, "StatesGraph"], VertexSize -> 1], {1, 0.4}]

With our standard updating order, this rule eventually produces forms like

ResourceFunction[ "WolframModel"][ {{x, y}, {z, y}} -> {{x, w}, {y, w}, {z, w}}, {{0, 0}, {0, 0}}, 20, "FinalStatePlot"]

but the multiway system shows that other structures are also possible.

As another example, consider the rule

{{x, y}, {z, y}} -> {{x, z}, {y, z}, {w, z}}

which with our standard updating order gives:

ResourceFunction[ "WolframModel"][ {{x, y}, {z, y}} -> {{x, z}, {y, z}, {w, z}}, {{0, 0}, {0, 0}}, 10]["StatesPlotsList", "MaxImageSize" -> 100]

The multiway system for this rule branches rapidly

CloudGet["https://wolfr.am/LmHho8Tr"]; newgraph[ Graph[ResourceFunction["MultiwaySystem"][ "WolframModel" -> { {{x, y}, {z, y}} -> {{x, z}, {y, z}, {w, z}}}, {{{0, 0}, {0, 0}}}, 4, "StatesGraph"], VertexSize -> 1.7, AspectRatio -> 1/2], {1, .6}]

but every pair of branches still reconverges in one step.

{{x, y}, {x, z}} -> {{y, w}, {y, z}, {w, x}}

provides an example of causal invariance in which branches can take 3 steps to converge:

Graph[ResourceFunction["MultiwaySystem"][ "WolframModel" -> {{{x, y}, {x, z}} -> {{y, w}, {y, z}, {w, x}}}, {{{0, 0}, {0, 0}}}, 7, "StatesGraph"], VertexSize -> 1]

Among all possible rules, causal invariance is much more common for rules that generate disconnected hypergraphs. It is also perhaps slightly less common for rules with ternary relations instead of binary ones.