In [1]:
from itertools import repeat
from sympy import *
#from type_system import *
In [2]:
%run ../../src/commons.py
In [3]:
%run ./type-system.py
In [4]:
init_printing()
In [5]:
x,y,m,n,t,z = symbols('x y m n t z', commutative=True)
alpha, beta, gamma, eta = symbols(r'\alpha \beta \gamma \eta', commutative=True)
f,g = Function('f'), Function('g')
In [7]:
bin_tree_gfs = bin_tree(tyvar(alpha)[z]).gf()
bin_tree_gfs
Out[7]:
In [8]:
bin_tree_gf = bin_tree_gfs[0]
In [10]:
bin_tree_gf.series(z, n=10, kernel='ordinary')
Out[10]:
In [9]:
bin_tree_gf.series(z, n=10, kernel='catalan')
Out[9]:
In [11]:
occupancy(bin_tree_gf, syms=[alpha], objects='unlike', boxes='unlike').series(z)
Out[11]:
In [13]:
bin_tree_of_boolean_gfs = bin_tree(maybe(tyvar(alpha))[z]).gf()
bin_tree_of_boolean_gfs
Out[13]:
In [21]:
bin_tree_of_boolean_gf = bin_tree_of_boolean_gfs[0]
In [23]:
occupancy(bin_tree_of_boolean_gf, syms=[alpha], objects='unlike', boxes='unlike').series(z,n=6, kernel='ordinary')
Out[23]:
In [ ]: