<p>

<div align="right">
Massimo Nocentini<br>
</div>
</p>
<br>
<div align="center">
<b>Abstract</b><br>
In this document we collect a naive <i>type system</i> based on sets.
</div>


```python
from itertools import repeat
from sympy import *
#from type_system import *
```


```python
%run ../../src/commons.py
```


```python
%run ./type-system.py
```

---


```python
init_printing()
```


```python
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')
```

---


```python
bin_tree_gfs = bin_tree(tyvar(alpha)[z]).gf()
bin_tree_gfs
```


```python
bin_tree_gf = bin_tree_gfs[0]
```


```python
bin_tree_gf.series(z, n=10, kernel='ordinary')
```


```python
bin_tree_gf.series(z, n=10, kernel='catalan')
```


```python
occupancy(bin_tree_gf, syms=[alpha], objects='unlike', boxes='unlike').series(z)
```

---


```python
bin_tree_of_boolean_gfs = bin_tree(maybe(tyvar(alpha))[z]).gf()
bin_tree_of_boolean_gfs
```


```python
bin_tree_of_boolean_gf = bin_tree_of_boolean_gfs[0]
```


```python
occupancy(bin_tree_of_boolean_gf, syms=[alpha], objects='unlike', boxes='unlike').series(z,n=6, kernel='ordinary')
```


```python

```

a54530630243fa03a0bbc99ab46c8bfdf6268746
ipynb
Jupyter Notebook
notes/set-based-type-system/trees-types.ipynb
massimo-nocentini/simulation-methods
f7578a9719b1a22e5a25a8de85cc229aef4c259d
MIT
notes/set-based-type-system/trees-types.ipynb
massimo-nocentini/simulation-methods
f7578a9719b1a22e5a25a8de85cc229aef4c259d
MIT
notes/set-based-type-system/trees-types.ipynb
massimo-nocentini/simulation-methods
f7578a9719b1a22e5a25a8de85cc229aef4c259d
MIT
Qwen/Qwen-72B
1. YES
2. YES