## Gleason’s theorem

Gleason’s theorem

State is determined by a collection of bits that represent results of yes-no orthogonal projections

ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraph"]

In[]:=

Out[]=

〈|

|〉

Add completion AAAAABA

ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA","AAA""AABA"},{"A"},3,"StatesGraph"]

In[]:=

Out[]=

ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA","AAA""AABA"},{"A"},4,"StatesGraph"]

In[]:=

Out[]=

ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},"CanonicalKnuthBendixCompletion"]

In[]:=

{AAABA,ABAAA}

Out[]=

ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA","AA""ABA","ABA""AA"},{"A"},3,"StatesGraph"]

In[]:=

Out[]=

Measuring expectation value of the operator which projects AA onto ABA (and in this case, vice-versa)

VertexOutComponent[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA","AA""ABA","ABA""AA"},{"A"},3,"StatesGraph"],{"AA","ABA"},1]

In[]:=

{AA,AAA,AABA,ABA,ABAA,ABABA}

Out[]=

VertexOutComponent[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA","AA""ABA","ABA""AA"},{"A"},3,"StatesGraph"],{"AA","ABA"},2]

In[]:=

{AA,AAA,AABA,ABA,ABAA,AAAA,AAABA,AABAA,ABAAA,AABABA,ABAABA,ABABA,ABABAA,ABABABA}

Out[]=

VertexOutComponent[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraph"],{"AA","ABA"},1]

In[]:=

{AA,AAA,AABA,ABAA,ABA,ABABA}

Out[]=

VertexOutComponent[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraph"],{"AA","ABA"},2]

In[]:=

{AA,AAA,AABA,ABAA,AAAA,AAABA,AABAA,ABAAA,AABABA,ABAABA,ABABAA,ABA,ABABA,ABABABA}

Out[]=

### Projections

Projections

Graphics[{Line[{{0,0},{1,2}}],Line[{{0,0},{3,2}}]}]

In[]:=

Out[]=

gg=UndirectedGraph[Rule@@@ResourceFunction["WolframModel"][{{x,y},{x,z}}{{x,z},{x,w},{y,w},{z,w}},{{1,2},{2,3},{3,4},{2,4}},8,"FinalState"]]

In[]:=

Out[]=

HighlightGraph[gg,PathGraph[FindShortestPath[gg,1,20]]]

In[]:=

Out[]=

HighlightGraph[gg,{Style[PathGraph[FindShortestPath[gg,1,20]],Red],Style[PathGraph[FindShortestPath[gg,1,30]],Green]}]

In[]:=

Out[]=

HighlightGraph[gg,{Style[PathGraph[FindShortestPath[gg,10,20]],Red],Style[PathGraph[FindShortestPath[gg,10,30]],Green]}]

In[]:=

Out[]=

HighlightGraph[gg,{Style[PathGraph[FindShortestPath[gg,10,20]],Red],Style[PathGraph[FindShortestPath[gg,10,30]],Green]}]

FindShortestPath[gg,10,30]

In[]:=

{10,90,29,94,53,30}

Out[]=

FindShortestPath[gg,20,#]&/@%

In[]:=

{{20,63,34,81,45,146,10},{20,63,34,81,45,146,10,90},{20,61,175,30,53,94,29},{20,61,175,30,53,94},{20,61,175,30,53},{20,61,175,30}}

Out[]=

HighlightGraph[gg,{Style[PathGraph[FindShortestPath[gg,20,40]],Red],Style[PathGraph[FindShortestPath[gg,20,30]],Green]}]

In[]:=

Out[]=

FindShortestPath[gg,20,40]

In[]:=

{20,35,98,19,32,101,8,126,40}

Out[]=

FindShortestPath[gg,30,#]&/@%

In[]:=

{{30,175,61,20},{30,11,34,63,35},{30,11,34,63,35,98},{30,11,34,63,35,98,19},{30,11,34,63,35,98,19,32},{30,11,34,63,35,98,19,32,101},{30,92,7,89,164,71,40,126,8},{30,92,7,89,164,71,40,126},{30,92,7,89,164,71,40}}

Out[]=

Length/@%166

In[]:=

{4,5,6,7,8,9,9,8,7}

Out[]=

One difference between this and ordinary vectors is that here the geodesics are joined at their end, rather than intersecting in the middle.

ggm=ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraph"]

In[]:=

Out[]=

FindShortestPath[ggm,"A","AAA"]

In[]:=

{A,AA,AAA}

Out[]=

HighlightGraph[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraphStructure"],PathGraph[FindShortestPath[ggm,"A","AAA"]],VertexLabelsAutomatic]

In[]:=

Out[]=

HighlightGraph[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraphStructure"],{Style[PathGraph[FindShortestPath[ggm,"A","AAA"]],Red],Style[PathGraph[FindShortestPath[ggm,"A","ABAA"]],Green]},VertexLabelsAutomatic]

In[]:=

Out[]=

HighlightGraph[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraphStructure"],{Style[PathGraph[FindShortestPath[ggm,"A","AAA"]],Red],Style[PathGraph[FindShortestPath[ggm,"A","ABABABA"]],Green]},VertexLabelsAutomatic]

In[]:=

Out[]=

ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},"CanonicalKnuthBendixCompletion"]

In[]:=

{AAABA,ABAAA}

Out[]=

In a causal invariant system, all geodesics eventually meet in the future

## Kochen-Specker

Kochen-Specker

ggm=ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"StatesGraph"]

In[]:=

Out[]=

ggm=ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"CausalGraph"]

In[]:=

Out[]=

Graph[ResourceFunction["MultiwaySystem"][{"A""ABA","A""AA"},{"A"},3,"EvolutionCausalGraph"],AspectRatio1/2]

In[]:=

Out[]=

Possible version: there is no string rewriting system that gives you a certain sequence of strings and nothing but those strings. Does there exist a finite local rule that gives you a particular sequence?

### Consider all simple multiway systems

Consider all simple multiway systems

ResourceFunction["EnumerateSubstitutionSystemRules"][{23},2]

In[]:=

{{AAAAA},{AAAAB},{AAABA},{AAABB},{AABAB},{AABBB},{ABAAA},{ABAAB},{ABABA},{ABBAA}}

Out[]=

ResourceFunction["MultiwaySystem"][#,{#[[1,1]]},5]&/@%

In[]:=

Out[]=

ResourceFunction["MultiwaySystem"][#,{"AABAA"},5]&/@ResourceFunction["EnumerateSubstitutionSystemRules"][{23},2]

In[]:=

Out[]=

For what sequences can one have a rule with a finite number of cases, and limited size strings?

Given that you observe a sequence, what substitution systems are consistent with that sequence?

allrules=ResourceFunction["EnumerateSubstitutionSystemRules"][{23,32},2];

In[]:=

(#(Length/@ResourceFunction["MultiwaySystem"][#,{"AAB"},5]))&/@allrules

In[]:=

Out[]=

ResourceFunction["MultiwaySystem"][{"AA""AAA","AAA""AB"},{"AAB"},5]

In[]:=

{{AAB},{AAAB},{AAAAB,ABB},{AAAAAB,AABB,ABAB},{AAAAAAB,AAABB,AABAB,ABAAB},{AAAAAAAB,AAAABB,AAABAB,AABAAB,ABAAAB,ABBB}}

Out[]=

ResourceFunction["MultiwaySystem"][{"AA""AAA","AAA""AB"},{"AAB"},5,"EvolutionGraph"]

In[]:=

Out[]=

ResourceFunction["StringTuples"]["AB",4]

In[]:=

{AAAA,AAAB,AABA,AABB,ABAA,ABAB,ABBA,ABBB,BAAA,BAAB,BABA,BABB,BBAA,BBAB,BBBA,BBBB}

Out[]=

Rule@@@Partition[%,2,1]

In[]:=

{AAAAAAAB,AAABAABA,AABAAABB,AABBABAA,ABAAABAB,ABABABBA,ABBAABBB,ABBBBAAA,BAAABAAB,BAABBABA,BABABABB,BABBBBAA,BBAABBAB,BBABBBBA,BBBABBBB}

Out[]=

ResourceFunction["MultiwaySystem"][{"AAAA""AAAB","AAAB""AABA","AABA""AABB","AABB""ABAA","ABAA""ABAB","ABAB""ABBA","ABBA""ABBB","ABBB""BAAA","BAAA""BAAB","BAAB""BABA","BABA""BABB","BABB""BBAA","BBAA""BBAB","BBAB""BBBA","BBBA""BBBB"},{"AAAA"},20]

In[]:=

{{AAAA},{AAAB},{AABA},{AABB},{ABAA},{ABAB},{ABBA},{ABBB},{BAAA},{BAAB},{BABA},{BABB},{BBAA},{BBAB},{BBBA},{BBBB},{},{},{},{},{}}

Out[]=

observed={"AA","AB","AAA","ABA"}

In[]:=

{AA,AB,AAA,ABA}

Out[]=

ResourceFunction["MultiwaySystem"][Rule@@@Partition[observed,2,1],{First[observed]},6]

In[]:=

{{AA},{AB},{AAA},{AAB,ABA},{AAAA,ABB},{AAAB,AABA,ABAA},{AAAAA,AABB,ABAB,ABBA}}

Out[]=

For what observed sequences does there exist a rule that doesn’t lead to branching?

ResourceFunction["MultiwaySystem"][{"A""AA"},{"A"},8]

In[]:=

{{A},{AA},{AAA},{AAAA},{AAAAA},{AAAAAA},{AAAAAAA},{AAAAAAAA},{AAAAAAAAA}}

Out[]=

Single threadedness is possible when:

There is no overlap between strings except for last element

ResourceFunction["StringTuples"]["AB",3]

In[]:=

{AAA,AAB,ABA,ABB,BAA,BAB,BBA,BBB}

Out[]=

{"AAA","AAB","ABA","ABB","BAA","BAB","BBA","BBB","BAA","BAB","BBA"}

For ST (= Single threadedness) you must have no duplicates unless the tail of the sequence is periodic.

"AB"<>#&/@Table[StringRepeat["A",n],{n,0,10}]

In[]:=

{AB,ABA,ABAA,ABAAA,ABAAAA,ABAAAAA,ABAAAAAA,ABAAAAAAA,ABAAAAAAAA,ABAAAAAAAAA,ABAAAAAAAAAA}

Out[]=

In this case, there is an ST rule:

ResourceFunction["MultiwaySystem"][{"B""BA"},{"AB"},8]

In[]:=

{{AB},{ABA},{ABAA},{ABAAA},{ABAAAA},{ABAAAAA},{ABAAAAAA},{ABAAAAAAA},{ABAAAAAAAA}}

Out[]=

Is the following an ST rule?

"AB"<>#<>"BA"&/@Table[StringRepeat["A",n],{n,0,10}]

In[]:=

{ABBA,ABABA,ABAABA,ABAAABA,ABAAAABA,ABAAAAABA,ABAAAAAABA,ABAAAAAAABA,ABAAAAAAAABA,ABAAAAAAAAABA,ABAAAAAAAAAABA}

Out[]=

[[ Partly related to unambiguity of CFGs ]]

https://www.wolframscience.com/nks/notes-5-6--formal-languages-and-multiway-systems/

<< If the sequence is as generated in a regular language, then there exists a DFA that will generate that sequence >>

What are the subrules that lead to:

"ABABA"->"ABAABA"

{"""A","A""AA","ABABA"->"ABAABA"}

ResourceFunction["MultiwaySystem"][{"""A","""B"},{""},4]

In[]:=

{{},{A,B},{AA,AB,BA,BB},{AAA,AAB,ABA,ABB,BAA,BAB,BBA,BBB},{AAAA,AAAB,AABA,AABB,ABAA,ABAB,ABBA,ABBB,BAAA,BAAB,BABA,BABB,BBAA,BBAB,BBBA,BBBB}}

Out[]=

ResourceFunction["MultiwaySystem"][{"""A","""B","A""","B"""},{""},4]

In[]:=

{{},{A,B},{,AA,AB,BA,BB},{A,AAA,AAB,ABA,ABB,B,BAA,BAB,BBA,BBB},{,AA,AAAA,AAAB,AABA,AABB,AB,ABAA,ABAB,ABBA,ABBB,BA,BAAA,BAAB,BABA,BABB,BB,BBAA,BBAB,BBBA,BBBB}}

Out[]=

Is there an easily recognizable regularity of any string sequence that is “ST explainable”

## Causal graph case

Causal graph case

What structures of causal graphs can be generated in ST systems vs. can be generated as part of multiway causal graphs?

How does this work when there is causal invariance?

## What is wrong with single-threaded physics?

What is wrong with single-threaded physics?

Branchial space is trivial

It is possible to have nontrivial dynamics and be single-threaded: e.g. TM emulator

CloudGet["https://wolfr.am/KVCBnkcw"];ResourceFunction["WolframModel"][encodeTMRule[{596440,2,3},0],encodeTMState[{1,1},{0}],500,"CausalGraph"]

In[]:=

Out[]=

[ Causal non-invariance is impossible in single-threaded physics ]

## Non-locality / Contexuality

Non-locality / Contexuality

Non-locality for strings would be a rule that picks up from multiple parts of the string and/or that allows a LHS of arbitrarily great length

?? Contextuality is the use of a limitingly infinite of LHS strings

## Bell’s case

Bell’s case

Do you have to have a branching/merging MW system for your different outcomes, or can you have a “pure octopus” ... i.e. something where each outcome is just a separate branch