In[]:=
CombinatorStep[{s[x_][y_][z_]x[z][y[z]],k[x_][y_]x},s[s[x][y][s[x][y][z]]][y][z][k[x][y][z]],{"Rightmost","Outermost",1}]
Out[]=
s[s[x][y][s[x][y][z]]][y][z][x[z]]
In[]:=
CombinatorMatches[s[s[x][y][s[x][y][z]]][y][z][x[z]]]
Out[]=
{0}1,{0,0,0,1}1,{0,0,0,1,1}1
In[]:=
CombinatorTree[s[s[x][y][s[x][y][z]]][y][z][x[z]]]
Out[]=
In[]:=
CombinatorFixedPointList[s[s][s][s[s[s]]][k][s]]//Column
Out[]=
In[]:=
Length[CombinatorFixedPointList[s[s][s][s[s[s]]][k][s]]]
Out[]=
89
In[]:=
ListLinePlot[LeafCount/@CombinatorFixedPointList[s[s][s][s[s[s]]][k][s]]]
Out[]=
In[]:=
Position[s[s][s][s[s[s]]][k][s],s[_][_][_]|k[_][_]]
Out[]=
{{0,0}}
In[]:=
Position[CombinatorFixedPointList[s[s][s][s[s[s]]][k][s]][[40]],s[_][_][_]|k[_][_]]
Out[]=
{{0,1,1,1,0,0},{0,1,1,1,1,0,1},{0,1,1,1,1,0},{1,0,1,0},{1,1,0,0},{1,1,1,1,0},{1}}
In[]:=
EvaluationOrderSort[%95,{"Leftmost","Outermost"}]
Out[]=
{{0,1,1,1,0,0},{0,1,1,1,1,0},{0,1,1,1,1,0,1},{1},{1,0,1,0},{1,1,0,0},{1,1,1,1,0}}
In[]:=
EvaluationOrderSort[%95,{"Outermost","Leftmost"}]
Out[]=
{{1},{1,0,1,0},{1,1,0,0},{1,1,1,1,0},{0,1,1,1,0,0},{0,1,1,1,1,0},{0,1,1,1,1,0,1}}
In[]:=
EvaluationOrderSort[%95,{"Innermost","Leftmost"}]
Out[]=
{{0,1,1,1,1,0,1},{0,1,1,1,0,0},{0,1,1,1,1,0},{1,1,1,1,0},{1,0,1,0},{1,1,0,0},{1}}
In[]:=
EvaluationOrderSort[%95,{"Leftmost","Innermost"}]
Out[]=
{{0,1,1,1,0,0},{0,1,1,1,1,0,1},{0,1,1,1,1,0},{1,0,1,0},{1,1,0,0},{1,1,1,1,0},{1}}
In[]:=
RelationGraph[ListStrictPrefixQ,{{0,1,1,1,0,0},{0,1,1,1,1,0,1},{0,1,1,1,1,0},{1,0,1,0},{1,1,0,0},{1,1,1,1,0},{1}},VertexLabelsAutomatic]
Out[]=
In[]:=
CombinatorFixedPointList[s[s][s][s[s[s]]][k][s]][[40]]
Out[]=
s[s[s[s[s[s[s[s]]][k]][k[s[s[s[s[s]]][k]]]]][s[s[s[s[s]]][k]]]][k[k[s[s[s[s]]][k]][k[k[s[s[s[s]]][k]]]][s][k[k[s[s[s[s]]][k]]][k[s[s[s[s]]][k]][k[k[s[s[s[s]]][k]]]]][s]]]]][k[s[s[s[s]]][k][k[s[s[s[s]]][k]]][s]][s[s[s[s]]][k][k[s[s[s[s]]][k]]][s][k[s[s[s[s]]][k][k[s[s[s[s]]][k]]][s]]]]]
In[]:=
Column[Extract[%100,#]&/@%95,FrameAll]
Out[]=
k[s[s[s[s]]][k]][k[k[s[s[s[s]]][k]]]] |
k[s[s[s[s]]][k]][k[k[s[s[s[s]]][k]]]] |
k[k[s[s[s[s]]][k]]][k[s[s[s[s]]][k]][k[k[s[s[s[s]]][k]]]]] |
s[s[s[s]]][k][k[s[s[s[s]]][k]]] |
s[s[s[s]]][k][k[s[s[s[s]]][k]]] |
s[s[s[s]]][k][k[s[s[s[s]]][k]]] |
k[s[s[s[s]]][k][k[s[s[s[s]]][k]]][s]][s[s[s[s]]][k][k[s[s[s[s]]][k]]][s][k[s[s[s[s]]][k][k[s[s[s[s]]][k]]][s]]]] |
CombinatorFixedPointList[s[s][s][s[s[s]]][k][s]]
In[]:=
f[g[x],h[y]][[0]]
Out[]=
f
In[]:=
f[g[x],h[y]][[1]]
Out[]=
g[x]
In[]:=
f[g[x],h[y]][[1,1]]
Out[]=
x
In[]:=
f[g[x],h[y]][[1,0]]
Out[]=
g
f[g[x],h[y]]
In[]:=
Total[{Total[{2,3}],Total[{a,b}]}]
Out[]=
5+a+b
Total[{5,a+b}]
In[]:=
x=.
In[]:=
Clear[f]
Set[x,6]
Set[5,6]
In[]:=
Attributes[Set]
Out[]=
{HoldFirst,Protected,SequenceHold}
In[]:=
f[x_Integer,y_Integer]:=x+y
f[f[4,2],f[7,8]]
In[]:=
Clear[f]
Times[Plus[2,3],Plus[4,6]]
Times[5,10]
In[]:=
{Echo[a],Echo[b],Echo[c]}
»
a
»
b
»
c
Out[]=
{a,b,c}
In[]:=
Table[Echo[i],{i,100}]
In[]:=
ParallelTable[Echo[i],{i,100}]
In[]:=
LeafCount/@CombinatorEvolveList[s[s][s][s[s]][s][s],20]
Out[]=
{7,8,8,11,11,11,12,17,25,33,41,50,59,87,115,149,187,215,243,272,301}
In[]:=
ListStepPlot[Depth/@CombinatorEvolveList[s[s][s][s[s]][s][s],200]]
Out[]=
Ed’s version
Ed’s version
Ed’s formula:
Ed’s formula: