is there a way to compute the residue of a meromorphic function f(z) at z=z0 in sage?
if so, I'd like to nest such method to compute residue at a flag,
$$ \operatorname{Res}_F f(x_1,\ldots,x_n) := \operatorname{Res}_{x_1=x_1^,\ldots,x_n=x_n^}\cdots\operatorname{Res}_{x_2=x_2^, x_1=x_1^} \operatorname{Res}_{x_1=x_1^} f(x_1,\ldots,x_n)wherestarredvaluesdenoteanumericalvalue(sameas$z0$before)andtheflagisF =([x_1=x_1^,\ldots,x_n=x_n^] \supset \cdots \supset [x_2=x_2^, x_1=x_1^] \supset [x_1=x_1^])Noticethechoiceofordermatters.Forexample,let$f=1(1−x1)(1−x1x2)$and$F=([x1=1]⊂[x2=1,x1=1])$.Then \operatorname{Res}_F f(x_1,x_2) = 1$$
if that works, I'd like to build a function that takes as input the point (x1,…,xn)∗, for various values of n, builds f in a certain way, and gives back the residue as a function of the input: is this achievable?