# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

List all possible unary and binary combinations for a chosen set of functions and symbols

Contributed by:
Bradley Klee

ResourceFunction["UpToBinaryCompositions"][ returns all possible compositions of symbols listed in |

Arguments *unaries** *and *binaries** *are lists, which should contain unary and binary functions, respectively.

Exactly one unary function from *unaries** *is applied around each leaf and around each branch point, including the root, so *unaries* must usually contain Identity.

Binary functions are applied similarly to Groupings, but to all possible orderings of atomistic symbols listed in *sym*.

Mimic the functionality of the resource function BinaryCompositions:

In[1]:= |

Out[1]= |

Compare UpToBinaryCompositions with Groupings by treating outputs as sets (A and B respectively):

In[2]:= |

Out[2]= |

Test the Catalan counting property:

In[3]:= |

Out[3]= |

In[4]:= |

Out[4]= |

Without specifying at least one unary operator, no combinations are possible:

In[5]:= |

Out[5]= |

Count Boolean tautologies out of a finite set of compositions:

In[6]:= |

Out[6]= |

Generate a complicated polynomial data structure:

In[7]:= |

Count degeneracies and put them in a table:

In[8]:= |

Out[8]= |

Compare row lengths with OEIS core sequence A002572:

In[9]:= |

Out[9]= |

Compare last term of each row with relatively new OEIS sequence A345135:

In[10]:= |

Out[10]= |

Compare row weights with OEIS core sequence A000984:

In[11]:= |

Out[11]= |

Explore the effects of perturbing the unary function away from identity:

In[12]:= |

Out[12]= |

Test a possible identity relating row weights:

In[13]:= |

Out[13]= |

- 1.0.0 – 23 February 2022

This work is licensed under a Creative Commons Attribution 4.0 International License