restart:
with(PolynomialIdeals):
# Input: Polynomial Q and positive integer direction vector r with V(Q) smooth
# Output: An ideal I in the variables of Q and two new variables Z and h
# such that there is a stratified point at infinity iff the generators
# of I have a non-zero solution in the variables of Q. The values of
# h at such a solution give the potential heights of stratified points at
# infinity
SPatInfinity := proc(Q,r)
local Qt,CPeqs,CPsub, vars, R, sat:
vars := convert(indets(Q),list):
Qt := numer(subs(seq(k=k/Z,k=vars),Q));
CPeqs := seq(R[j]*vars[1]*diff(Qt,vars[1])-R[1]*vars[j]*diff(Qt,vars[j]),j=2..nops(vars)):
sat := Z * mul(vars):
CPsub := subs(seq(R[j]=r[j],j=1..nops(r)),Saturate(<Qt,CPeqs,h*Z^add(k,k=r)-mul(vars[k]^r[k],k=1..nops(vars))>,sat)):
return Groebner[Basis]([Z,op(Generators(CPsub))],plex(op(vars),Z,h)):
end:################################
# Example 1: QRW
################################
# Stratified points at infinity for the QRW example only occur when c or lambda take boundary values
Q := 1-c*y+c*x*y-x*y^2;
Qt := numer(subs(x=x/t,y=y/t,Q)):
II := <Y2*x*diff(Qt,x)-Y1*y*diff(Qt,y),Qt>:
subs(t=0,Y2=1,Y1=lambda,Generators(Saturate(II,t))):
solve(%);#########################################################
# Example 2: SPAI with height -log|1| = 0
#########################################################
Q := 2-x*y^2-2*x*y-x+y;
factor(SPatInfinity(Q,[1,1]));#########################################################
# Example 3: SPAI dominanated by affine stationary point
#########################################################
Q := 1-x-y-x*y^2;
factor(SPatInfinity(Q,[1,1]));# There are finite critical points, of larger height
# In this case only the finite critical points are minimal (they are smooth and minimal)
# The point at infinity cannot be reached by a limit of minimal points
s1,s2 := solve([diff(Q,x)*x-diff(Q,y)*y,Q],explicit);
evalf(subs(s1,-log(abs(x*y))));#########################################################
# Example 4: SPAI dominanate affine stationary point
#########################################################
Q := -x^2*y - 10*x*y^2 - x^2 - 20*x*y - 9*x + 10*y + 20;
factor(SPatInfinity(Q,[1,1]));#########################################################
# Example 5: No SPAI in three dimensions
#########################################################
Q := 1-x-y-z-x*y;
factor(SPatInfinity(Q,[1,1,1]));# These are the affine critical points, which are minimal and determine asymptotics
solve([diff(Q,x)*x-diff(Q,y)*y,diff(Q,x)*x-diff(Q,z)*z,Q],explicit);#########################################################
# Example 6: GRZ application
#########################################################
Q := 1-x-y-z-w+27*x*y*z*w;
factor(SPatInfinity(Q,[1,1,1,1]));#########################################################
# Example 7: Irrelevent SPAI in 3D
#########################################################
# There are SPAI with height -log(1/2) = log(2)
Q := 1-x+y-z-2*x*y^2*z;
factor(SPatInfinity(Q,[1,1,1]));# There is an affine critical point that will determine asymptotics
s1,s2 := solve([diff(Q,x)*x-diff(Q,y)*y,diff(Q,x)*x-diff(Q,z)*z,Q],explicit);
evalf(subs(s1,-log(abs(x*y*z))));
evalf(subs(s2,-log(abs(x*y*z))));# ACSV techniques give dominant asymptotics as
ASM := evala(subs(s2,1/x/y/z))^n * sqrt(3)/2/n/Pi;# Heuristically guess a recurrence for the diagonal
# This can take up to a minute to run
with(gfun):
LST := [seq(coeff(coeff(coeff(mtaylor(1/Q,[x,y,z],61),x,k),y,k),z,k),k=0..20)]:
PR := rectoproc(listtorec(LST,u(n))[1],u(n)):
# Compare our asymptotic formula to actual sequence terms (ratio goes to 1)
evalf(subs(n=1000,ASM)/PR(1000));