Function Repository Resource:

CausallyInvariantQ

Source Notebook

Determine whether a given multiway system evolution is causally invariant

Contributed by: Jonathan Gorard

ResourceFunction["CausallyInvariantQ"][rules,init,n]

yields True if the evolution of the multiway system with the specified rules starting from initial condition init is causally invariant after n steps, and False otherwise.

Details and Options

A multiway system is causally invariant if the causal networks yielded by each branch of the multiway system are isomorphic as acyclic graphs.
Causal invariance is equivalent to the confluence (or Church–Rosser) property of rewrite systems.
ResourceFunction["CausallyInvariantQ"] determines whether all critical pairs in the multiway system eventually converge back to a common state.
Multiway systems operate on strings, lists and WolframModel systems.
When rules are specified by an explicit association, the following elements can be included:
"StateEvolutionFunction"the list of successors for a given state
"StateEquivalenceFunction"whether two states should be considered equivalent
"StateEventFunction"the list of events obtained from a given state
"SystemType"system type name
"EventSelectionFunction"which events from a given state should be included
The initial condition can consist of a single state or a list of states.

Examples

Basic Examples (5) 

Determine that a multiway system evolution is causally invariant:

In[1]:=
ResourceFunction[
 "CausallyInvariantQ"][{"A" -> "AA", "B" -> "AB"}, {"ABA"}, 3]
Out[1]=
In[2]:=
ResourceFunction[
 "CausallyInvariantQ"][{{0} -> {0, 0}, {1} -> {0, 1}}, {{0, 1, 0}}, 3]
Out[2]=

Determine that a multiway system evolution is not causally invariant:

In[3]:=
ResourceFunction[
 "CausallyInvariantQ"][{"A" -> "AB", "AA" -> "BA"}, {"AAB"}, 3]
Out[3]=
In[4]:=
ResourceFunction[
 "CausallyInvariantQ"][{{0} -> {0, 1}, {0, 0} -> {1, 0}}, {{0, 0, 1}},
  3]
Out[4]=

Determine that a more complicated multiway system is not causally invariant:

In[5]:=
ResourceFunction[
 "CausallyInvariantQ"][{"AA" -> "AAB", "AAA" -> "BAAB"}, {"AAA"}, 3]
Out[5]=
In[6]:=
ResourceFunction[
 "CausallyInvariantQ"][{{0, 0} -> {0, 0, 1}, {0, 0, 0} -> {1, 0, 0, 1}}, {{0, 0, 0}}, 3]
Out[6]=

By picking a specific updating order, we can force this multiway system to be causally invariant:

In[7]:=
ResourceFunction[
 "CausallyInvariantQ"][{"AA" -> "AAB", "AAA" -> "BAAB"} -> ({First[#]} &), {"AAA"}, 3]
Out[7]=
In[8]:=
ResourceFunction[
 "CausallyInvariantQ"][{{0, 0} -> {0, 0, 1}, {0, 0, 0} -> {1, 0, 0, 1}} -> ({First[#]} &), {{0, 0, 0}}, 3]
Out[8]=

CausallyInvariantQ can also determine causal invariance in WolframModel systems:

In[9]:=
ResourceFunction["CausallyInvariantQ"][
 "WolframModel" -> {{{1, 2}, {1, 3}, {1, 4}} -> {{1, 2}, {1, 3}, {1, 4}, {2, 3}}}, {{{1, 2}, {1, 3}, {1, 4}}}, 5]
Out[9]=
In[10]:=
ResourceFunction["CausallyInvariantQ"][
 "WolframModel" -> {{{2, 2, 1}, {2, 2, 2}} -> {{1, 1, 3}, {1, 1, 1}, {2, 1, 2}, {3, 3, 2}}}, {{{0, 0, 0}, {0, 0, 0}, {0, 0, 0}}},
  1]
Out[10]=

Scope (1) 

CausallyInvariantQ returns True if and only if the multiway system yields no unresolved critical pairs:

In[11]:=
ResourceFunction[
 "CausallyInvariantQ"][{"A" -> "AB", "B" -> "A"}, {"A"}, 3]
Out[11]=
In[12]:=
ResourceFunction[
 "CausallyInvariantQ"][{{0} -> {0, 1}, {1} -> {0}}, {{0}}, 3]
Out[12]=

Publisher

Jonathan Gorard

Version History

  • 1.0.0 – 19 November 2019

Source Metadata

Related Resources

License Information