import sympy as sp
from sympy import stats
y,a1,a0,v=sp.symbols('y a1 a0 v',positive=True,real=True)
Y1=stats.Gamma('Y1',a1,v)
Y0=stats.Gamma('Y0',a0,v)
stats.density(sp.Min(Y1,Y0))
stats.density(Y1/Y0)
RuntimeError: maximum recursion depth exceeded
The same for other operations between random variates and for other distributions.
Why is sympy failing? As far as I'm aware these are problems with straightforward solution.