Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute successive leaf counts during leftmost-outermost evolution of an SK combinator expression
ResourceFunction["SKCombinatorLeftmostOutermostLeafCounts"][cmb, t] computes leaf counts of successive expressions during leftmost-outermost evolution of cmb over t steps. |
"SKGlyphs" | {CombinatorS,CombinatorK} | symbols used to specify S, K combinator transformation rules |
Compute leaf counts associated with states of a leftmost-outermost SK combinator evolution:
In[1]:= |
|
Out[1]= |
|
Compare the previous result with the leaf counts found by explicitly generating the combinator evolution:
In[2]:= |
|
Out[2]= |
|
In[3]:= |
|
Out[3]= |
|
The function does not return leaf counts for time steps after the fixed point of the evolution (at which point the combinator will no longer change):
In[4]:= |
|
Out[4]= |
|
In[5]:= |
|
Out[5]= |
|
Compare the time efficiency of SKCombinatorLeftmostOutermostLeafCounts to that of taking the leaf counts from the explicit evolution generated by CombinatorEvolveList:
In[6]:= |
|
Out[6]= |
|
In[7]:= |
|
Out[7]= |
|
Specify the S and K combinator glyphs used in the argument cmb:
In[8]:= |
|
Out[8]= |
|
Plot the time evolution of a combinator expression by leaf count:
In[9]:= |
|
Out[9]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License