In[]:=
Get["~/git/PostTagSystem/Kernel/init.m"];
In[]:=
states = With[{ system = PostTagSystem[{0, {1, 0, 1, 1, 0}}]}, system["State", #] & /@ Range[system["StateCount"]]]
Out[]=
{{0,{1,0,1,1,0}},{1,{0,1,1,0,1,1}},{0,{1,1,0,1,1}},{1,{1,0,1,1,1,1}},{2,{0,1,1,1,1,0}},{1,{1,1,1,1,0,0}},{2,{1,1,1,0,0,0}},{0,{1,1,0,0,0,1}},{1,{1,0,0,0,1,1,1}},{2,{0,0,0,1,1,1,0}},{1,{0,0,1,1,1,0,0}},{0,{0,1,1,1,0,0}}}
In[]:=
Needs["GeneralUtilities`"];Needs["SetReplace`"];TagSystemCausalGraph[stateList_, opts : OptionsPattern[]] := ModuleScope[ phasePassingRelations = PathGraph[Range[Length[stateList] - 1], DirectedEdges True]; createdTokensRelations = Catenate[ MapIndexed[Thread[#2[[1]] #2[[1]] + Range[Length[#[[1, 2]]], Length[#[[2, 2]]]]] &, Partition[stateList, 2, 1]]]; withFutureEvents = GraphUnion[phasePassingRelations, createdTokensRelations]; Subgraph[ withFutureEvents, Range[Length[stateList] - 1], opts, WolframPhysicsProjectStyleData["CausalGraph", "Options"]]];
In[]:=
TagSystemCausalGraph[states, VertexLabels Automatic]
Out[]=
In[]:=
Graph3D @ TagSystemCausalGraph @ With[{ system = PostTagSystem[{0, {1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0}}]}, system["State", #] & /@ Range[system["StateCount"]]]
Out[]=
SW stuff
SW stuff
First long case...
In[]:=
{Length[Last[#]],First[#]}&[ToModForm[#]]&/@TSDirectEvolveList[{1,0,0,1,0,0,1,0,0,0,0,0},450]
In[]:=
ggg=TagSystemCausalGraph@With[{system=PostTagSystem[{0,{1,1,1,0}}]},system["State",#]&/@Range[system["StateCount"]]]
Out[]=
Should label with which rewrite was used....
In[]:=
Graph[ggg,VertexStyle(MapIndexed[First[#2]If[#1,Red,Blue]&,First/@TSDirectEvolveList[{1,0,0,1,0,0,1,0,0,0,0,0},450]]),VertexSize5]
Out[]=
In[]:=
Graph3D[%]
Out[]=
In[]:=
TagSystemCausalGraph@With[{system=PostTagSystem[{0,{0,1,0,1,0,1,0,1,0,1}}]},system["State",#]&/@Range[system["StateCount"]]]
Out[]=
In[]:=
TagSystemCausalGraph@With[{system=PostTagSystem[{0,{0,1,0,1,1,1,0,0,1,1,0,0,1,1,0,0,0,1,0,1}}]},system["State",#]&/@Range[system["StateCount"]]]