""" verify_residue.py -- ancillary file of the note "A residue obstruction for the family F_2 with (m,n)=(3,5): the degree pair (75,125) in the plane Jacobian problem" Author : David Niedbala Giraudin (Independent researcher, France) ORCID : 0009-0009-1526-1178 Prepared with AI assistance (Claude, Anthropic). What this script does: it reproduces, in exact arithmetic (SymPy), the computations quoted in the note: (0) the end point conditions of Case I at the corners (1+k/5,k), k=2,3,4 [item (D2)]; (1) the bracket formula of Lemma 2.1(a); (2) the solution of the terminal bracket equation at a double root, the value -1/5, the two residue sums 0 and 6/5, and the formula G^6 = 25 J^4 mu^2/(81 U^2) [Lemma 4.3, Section 6]; (3) the arithmetic exclusions used in Lemmas 4.1 and 4.3; (4) the elimination giving c1^2 - 3 c1 c2 + c2^2 = 0 [Lemma 5.1]; (5) a complete residue count on the quasi-homogeneous model of the terminal edge. What it does not do: it does not prove the lemmas of the note, and it does not check the results quoted from the literature. Run: python3 verify_residue.py (needs SymPy; about one minute) It prints one PASS/FAIL line per check and ends with "ALL CHECKS PASSED". """ import sympy as sp ok=True def check(name,cond): global ok print(("PASS " if cond else "FAIL ")+name, flush=True); ok = ok and bool(cond) # ---- (0) end point conditions of Case I at the corner (1+k/5, k), (m,n)=(3,5) [item (D2)] ---- def caseI(k,m=3,n=5): A=(sp.Rational(5+k,5),sp.Integer(k)); out=[] P0=(m*A[0],m*A[1]); Q0=(n*A[0],n*A[1]) kk=sp.symbols('kk') # (b) non-aligned starting points {(k'/5,0),(1-k'/5,1)}, k' a positive integer for (sP,sQ) in (((kk/5,0),(1-kk/5,1)),((1-kk/5,1),(kk/5,0))): eq=sp.Eq((P0[0]-sP[0])*(Q0[1]-sQ[1]),(Q0[0]-sQ[0])*(P0[1]-sP[1])) for r_ in sp.solve(eq,kk): if r_.is_integer and r_>0: out.append(('b',r_)) # (a) aligned starting points m(al/5,0), n(al/5,0), al integer, with v(P)+v(Q)=rho+sigma rho,sg,al_=sp.symbols('rho sg al_') sol=sp.solve([rho*(A[0]-al_/5)+sg*A[1], (m+n)*rho*al_/5-(rho+sg)],[sg,al_],dict=True) for d_ in sol: v=sp.simplify(d_[al_]) if v.is_integer: out.append(('a',v)) return out check("Case I impossible at the corners (8/5,3) and (9/5,4)", caseI(3)==[] and caseI(4)==[]) check("Case I at the corner (7/5,2): only the non-aligned pair {(4/5,1),(1/5,0)}", caseI(2)==[('b',1)]) # ---- (1) bracket of homogeneous elements (Lemma 2.1) ------------------------------------ s,a,b,W,tau,sig,N=sp.symbols('s a b W tau sigma N',positive=True) F=sp.Function('F'); G=sp.Function('G') f=W**(-a)*F(tau*W**(-s)); g=W**(-b)*G(tau*W**(-s)) br=W**N*(sp.diff(f,tau)*sp.diff(g,W)-sp.diff(f,W)*sp.diff(g,tau)) x=sp.symbols('x') expected=W**(N-a-b-s-1)*(-b*sp.diff(F(x),x)*G(x)+a*F(x)*sp.diff(G(x),x)).subs(x,tau*W**(-s)) check("bracket formula for homogeneous elements", sp.simplify((br-expected).doit())==0) # ---- (2) the final edge at a double root (Lemma 4.2) ------------------------------------- A,B,Gc,E,D,J,mu,U=sp.symbols('A B G E D J mu U') FP=B*sig+A*sig**6; FQ=Gc+E*sig**5+D*sig**10 expr=sp.expand(-1*sp.diff(FP,sig)*FQ+sp.Rational(3,5)*FP*sp.diff(FQ,sig)) co=sp.Poly(expr,sig).all_coeffs()[::-1] sol=sp.solve([co[5],co[10]],[E,D],dict=True)[0] check("E = 3AG/B and D = 9A^2G/(5B^2)", sp.simplify(sol[E]-3*A*Gc/B)==0 and sp.simplify(sol[D]-9*A**2*Gc/(5*B**2))==0) check("constant term of the bracket is -BG and sigma^15 term cancels", co[0]==-B*Gc and sp.expand(expr.subs(sol)-(-B*Gc))==0) val=sp.simplify((FQ.subs(sol)/Gc).subs(sig,sp.symbols('z_')).subs(sp.symbols('z_')**10,B**2/A**2).subs(sp.symbols('z_')**5,-B/A)) check("F_Q(sigma_0)/G = -1/5 on the branch sigma^5 = -B/A", val==sp.Rational(-1,5)) check("first residue sum 5*(-1/5) + 1 = 0", 5*val+1==0) check("second residue sum 5*(1/25) + 1 = 6/5", 5*val**2+1==sp.Rational(6,5)) # G^6 in terms of U: A=U^3, D=mu U^5, BG=-J Bs=sp.symbols('Bs') Gs=sp.solve(sp.Eq(mu*U**5,9*U**6*Gc/(5*Bs**2)),Gc)[0] # G = 5 mu Bs^2/(9U) check("B^3 = -9JU/(5mu)", sp.simplify((Bs*Gs+J).subs(Bs**3,-9*J*U/(5*mu)))==0) G6=sp.simplify((J/Bs)**6) # G = -J/B check("G^6 = 25 J^4 mu^2/(81 U^2)", sp.simplify(G6.subs(Bs**6,(9*J*U/(5*mu))**2)-25*J**4*mu**2/(81*U**2))==0) # ---- (3) arithmetic exclusions used in Lemma 4.1 and Lemma 4.2 --------------------------- def typeI_possible(N,D): # Setting of Lemma 4.1: leading vertices tau^3 w^-D (P) and tau^5 w^-(5D/3) (Q), bracket {.,.}_N. # A nonzero bracket of leading forms at a slope s= (5/3) nuP > 0, # and a pair of monomials (tau^1 in P, tau^0 in Q) or (tau^0 in P, tau^1 in Q) with integer exponents. res=[] for num in range(1,60*D): s0=sp.Rational(num,180) if s0>=sp.Rational(D,3): break nuP=D-3*s0; nuQ=N-1-s0-nuP if not (nuQ>0 and nuQ>=sp.Rational(5,3)*nuP): continue pair10=(nuP+s0).is_integer and nuQ.is_integer # tau^1 w^-(nuP+s0), w^-nuQ pair01=nuP.is_integer and (nuQ+s0).is_integer # w^-nuP, tau^1 w^-(nuQ+s0) if pair10 or pair01: res.append(s0) return res for (N,D) in ((5,15),(5,12),(5,9),(9,27),(9,21)): check("no nonzero-bracket edge below finiteness for (N,D)=(%d,%d)"%(N,D), typeI_possible(N,D)==[]) check("D>=3N holds exactly for (5,15) and (9,27)", [(N,D) for (N,D) in ((5,15),(5,12),(5,9),(9,27),(9,21)) if D>=3*N]==[(5,15),(9,27)]) # double root: slopes in (12/5,5/2) carrying a lattice point of the edge from (6,15) pts=[(a_,d_) for a_ in range(0,6) for d_ in range(0,15) if sp.Rational(12,5)(5/3)nuP is impossible bad=[] for num in range(1,180*3): s0=sp.Rational(num,180) if s0>sp.Rational(5,2): break nuP=15-6*s0; nuQ=4-s0-nuP if nuP>0 and nuQ>sp.Rational(5,3)*nuP and (((nuP+s0).is_integer and nuQ.is_integer) or (nuP.is_integer and (nuQ+s0).is_integer)): bad.append(s0) check("double root: no nonzero-bracket edge with nuQ > (5/3) nuP", bad==[]) # ---- (4) the carrier equation with two double roots (Lemma 5.1) -------------------------- t,c1,c2,a0,a1=sp.symbols('t c1 c2 a0 a1') u=t*(t-c1)**2*(t-c2)**2 phi=(a0+a1*t)/(t**2*(t-c1)**5*(t-c2)**5) num=sp.numer(sp.together(5*u*sp.diff(phi,t)+11*sp.diff(u,t)*phi-1/(3*u**2))) eqs=[sp.expand(cf) for cf in sp.Poly(sp.expand(num),t).all_coeffs() if cf!=0] Gb=sp.groebner(eqs,a0,a1,c1,c2,order='lex') elim=[sp.factor(g_) for g_ in Gb.exprs if not g_.has(a0) and not g_.has(a1)] print(" elimination ideal in (c1,c2):",elim, flush=True) rel=c1**2-3*c1*c2+c2**2 check("two double roots force c1^2 - 3 c1 c2 + c2^2 = 0", len(elim)==1 and sp.expand(elim[0]-rel)==0) r=sp.symbols('r'); roots=sp.solve(r**2-3*r+1,r) check("then (c1/c2)^2 is real positive, hence different from -1", all(sp.simplify(x_**2).is_positive for x_ in roots)) # ---- (5) the quasi-homogeneous model: all residues of W^2 Q dQ on {P_I = p} ------------- # P_I = tau W^-3 (1+z), Q_I = W^-1 N(z), z = tau^5 W^-12, N = 1+3z+(9/5)z^2 (A=B=G=1). # On P_I = p one has W^3 = z(1+z)^5/p^5, and W^2 Q dQ = [N N' - (N^2/3)(1/z + 5/(1+z))] dz. z_=sp.symbols('z_') Nz=1+3*z_+sp.Rational(9,5)*z_**2 form=Nz*sp.diff(Nz,z_)-(Nz**2/3)*(1/z_+5/(1+z_)) r0=sp.residue(form,z_,0); r1=sp.residue(form,z_,-1) w_=sp.symbols('w_'); rinf=sp.residue(-form.subs(z_,1/w_)/w_**2,w_,0) check("model: place over z=0 (ramification 3) has residue -1", 3*r0==-1) check("model: place over z=-1 (ramification 3) has residue -1/5", 3*r1==sp.Rational(-1,5)) check("model: the three places over z=infinity carry +6/5 in total", 3*rinf==sp.Rational(6,5)) print("ALL CHECKS PASSED" if ok else "SOME CHECK FAILED")