In[]:=
NestGraph[Catenate@Values@ResourceFunction["MultiReplace"][#,{x_[x_]:>x,x_:>x[x]}]&,a,2,VertexLabels->"Name"]
Out[]=
ResourceFunction["MultiwayCombinator"][ToMathHackRules[xx[x]],xx[x],2,"StatesGraphStructure"]
In[]:=
NestGraph[Values@substitutionLemmas[#,a_a_[a_],"Canonicalize"->True]&,a_a_[a_],1,VertexLabelsPlaced["Name",Tooltip],GraphLayout"LayeredDigraphEmbedding"]
Out[]=
In[]:=
NestGraph[Values@coSubstitutionLemmas[#,a_a_[a_],"Canonicalize"->True]&,a_a_[a_],3,VertexLabelsPlaced["Name",Tooltip],GraphLayout"LayeredDigraphEmbedding",AspectRatio1/2]
Out[]=
In[]:=
NestGraph[Values@*coSubstitutionLemmas[xx[x]],xx[x],6,VertexLabelsNone]
Out[]=
Labeled[Graph[ResourceFunction["MultiwayCombinator"][ToMathHackRules[#],#,2,"StatesGraphStructure"],GraphLayout->"SpringElectricalEmbedding"],#]&/@TwoWayRule@@@Tuples[Catenate[Table[Groupings[Table[x,n],Construct->2],{n,3}]],2]
In[]:=
Labeled[Graph[NestGraph[Values@*coSubstitutionLemmas[#],#,3,VertexLabelsNone],GraphLayout->"SpringElectricalEmbedding"],#]&/@TwoWayRule@@@Tuples[Catenate[Table[Groupings[Table[x,n],Construct->2],{n,3}]],2]
Out[]=
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
xx |
xx[x] |
xx[x][x] |
xx[x[x]] |
x[x]x |
x[x]x[x] |
x[x]x[x][x] |
x[x]x[x[x]] |
x[x][x]x |
x[x][x]x[x] |
x[x][x]x[x][x] |
x[x][x]x[x[x]] |
x[x[x]]x |
x[x[x]]x[x] |
x[x[x]]x[x][x] |
x[x[x]]x[x[x]] |