""" verify_family.py -- ancillary file of the note "A residue obstruction for the whole family F_2: the degree pairs (25m, 25(2m-1)) 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, with n = 2m-1: (1) the bracket formula of Lemma 2.1(a); (2) for 2 <= m <= 12: the solution of the terminal bracket equation at a double root, the value -1/n, the residue sums 0 and 2m/n, and the formulas for G and G^3 [Lemma 4.3, Section 6]; (3) the same closed formulas for symbolic m (coefficient identities); (4) the arithmetic facts used in Lemmas 4.1 and 4.3, by exhaustive search for 2 <= m <= 12, and the identity gcd(5m-3, 2m-1) = 1; (5) the elimination giving c1^2 - 3 c1 c2 + c2^2 = 0 from 5u psi' - 4u' psi = u [Lemma 5.1], and, for 2 <= m <= 6, its agreement with the equation for phi. 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_family.py (needs SymPy; a few minutes) 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) R=sp.Rational MR=range(2,13) # ---- (1) bracket formula ----------------------------------------------------------------- s,a,b,W,tau,N=sp.symbols('s a b W tau N',positive=True) F=sp.Function('F'); G=sp.Function('G'); x=sp.symbols('x') 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)) expected=W**(N-a-b-s-1)*(a*F(x)*sp.diff(G(x),x)-b*sp.diff(F(x),x)*G(x)).subs(x,tau*W**(-s)) check("bracket formula for homogeneous elements", sp.simplify((br-expected).doit())==0) # ---- (2) terminal edge, m = 2..12 --------------------------------------------------------- sig,A,B,Gc,E,D,J,mu,U=sp.symbols('sigma A B G E D J mu U') good=True for m in MR: n=2*m-1 FP=B*sig+A*sig**(2*m); FQ=Gc+E*sig**n+D*sig**(2*n) ex=sp.expand(R(m,n)*FP*sp.diff(FQ,sig)-sp.diff(FP,sig)*FQ) co=sp.Poly(ex,sig).all_coeffs()[::-1] sol=sp.solve([co[n],co[2*n]],[E,D],dict=True)[0] c1_=sp.simplify(sol[E]-2*m*A*Gc/((m-1)*B))==0 c2_=sp.simplify(sol[D]-2*m**2*A**2*Gc/((m-1)*n*B**2))==0 c3_=sp.expand(ex.subs(sol)+B*Gc)==0 v=1-R(2*m,m-1)+R(2*m**2,(m-1)*n) c4_=(v==R(-1,n)) and (n*v+1==0) and (n*v**2+1==R(2*m,n)) good=good and c1_ and c2_ and c3_ and c4_ check("m=2..12: E = 2m A G/((m-1)B), D = 2m^2 A^2 G/((m-1) n B^2), constant term -BG, no other term", good) check("m=2..12: value -1/n; residue sums n(-1/n)+1 = 0 and n(1/n^2)+1 = 2m/n", good) # ---- (3) symbolic m ---------------------------------------------------------------------- m=sp.symbols('m',positive=True); n=2*m-1 Es=2*m*A*Gc/((m-1)*B); Ds=2*m**2*A**2*Gc/((m-1)*n*B**2) # coefficients of sigma^n, sigma^(2n), sigma^(3n) in (m/n) F_P F_Q' - F_P' F_Q (using 2m-1 = n) cn =(m/n)*B*n*Es-(B*Es+2*m*A*Gc) c2n=(m/n)*(B*2*n*Ds+A*n*Es)-(B*Ds+2*m*A*Es) c3n=(m/n)*A*2*n*Ds-2*m*A*Ds check("symbolic m: the three higher coefficients of the bracket equation vanish", all(sp.simplify(c)==0 for c in (cn,c2n,c3n))) check("symbolic m: 1 - 2m/(m-1) + 2m^2/((m-1)(2m-1)) = -1/(2m-1)", sp.simplify(1-2*m/(m-1)+2*m**2/((m-1)*n)+1/n)==0) Dcoef=(Ds/Gc).subs(A,U**m) # D = Dcoef * G Gs=sp.simplify(mu*U**n/Dcoef) # from D = mu U^n check("symbolic m: D = mu U^n gives G = mu (m-1) n B^2/(2 m^2 U)", sp.simplify(Gs-mu*(m-1)*n*B**2/(2*m**2*U))==0) B3=-2*m**2*J*U/((m-1)*n*mu) check("symbolic m: BG = -J gives B^3 = -2 m^2 J U/((m-1) n mu)", sp.simplify((Gs/B**2)*B3+J)==0) check("symbolic m: G^3 = -J^3/B^3 = (m-1) n mu J^2/(2 m^2 U)", sp.simplify(-J**3/B3-(m-1)*n*mu*J**2/(2*m**2*U))==0) check("symbolic m: 2(5m-3) - 5(2m-1) = -1, hence gcd(5m-3, 2m-1) = 1", sp.expand(2*(5*m-3)-5*(2*m-1))==-1) check("symbolic m: (3m-1)(5-2s)+s-4 = (6m-3)(s*-s) with s* = (5m-3)/(2m-1)", sp.simplify((3*m-1)*(5-2*s)+s-4-(6*m-3)*((5*m-3)/(2*m-1)-s))==0) # ---- (4) arithmetic facts, exhaustive for m = 2..12 --------------------------------------- def bad_simple(mm,N_,delta): # Lemma 4.1, second case: Sigma=0, b >= (n/m) a, a = m(delta-s) > 0, and a in Z or a+s in Z nn=2*mm-1; out=[] den=2*mm*(mm-1)*nn*(3*mm-2)*6 for k in range(1,delta*den): s0=R(k,den); a_=mm*(delta-s0); b_=N_-1-s0-a_ if b_>0 and b_>=R(nn,mm)*a_ and (a_.is_integer or (a_+s0).is_integer): out.append(s0) return out good=all(bad_simple(mm,N_,d_)==[] for mm in range(2,8) for (N_,d_) in ((5,5),(5,4),(5,3),(9,9),(9,7))) check("m=2..7: no admissible slope in the second case of Lemma 4.1 for the five pairs (N,delta)", good) def edge_points(mm): nn=2*mm-1; ss=R(5*mm-3,nn) return [(a_,5*mm-(2*mm-a_)*ss) for a_ in range(0,2*mm) if (5*mm-(2*mm-a_)*ss).is_integer] check("m=2..12: the only lattice point on the edge of slope s* is (1,3)", all(edge_points(mm)==[(1,3)] for mm in MR)) def bad_double(mm): nn=2*mm-1; ss=R(5*mm-3,nn); out=[] den=2*nn*mm*12 for k in range(1,3*den): s0=R(k,den) if not (ss=1 and all(only_rel(e) for e in elim)) r=sp.symbols('r') check("r^2 - 3r + 1 = 0 and r^2 = -1 have no common root", sp.gcd(sp.Poly(r**2-3*r+1,r),sp.Poly(r**2+1,r)).degree()==0) # psi vanishes at 0, c1, c2 and has degree <= 4, so phi = (a0+a1 t)/(t^(m-1)(t-c1)^(2m-1)(t-c2)^(2m-1)) a0,a1=sp.symbols('a0 a1'); good=True for mm in range(2,7): phi=(a0+a1*t)/(t**(mm-1)*(t-c1)**(2*mm-1)*(t-c2)**(2*mm-1)) num=sp.numer(sp.together(5*u*sp.diff(phi,t)+(5*mm-4)*sp.diff(u,t)*phi-1/(mm*u**(mm-1)))) e2=[sp.expand(c) for c in sp.Poly(sp.expand(num),t).all_coeffs() if c!=0] G2=sp.groebner(e2,a0,a1,c1,c2,order='lex') el=[g_ for g_ in G2.exprs if not g_.has(a0) and not g_.has(a1)] good=good and len(el)==1 and sp.expand(el[0]-rel)==0 check("m=2..6: the equation for phi gives the same relation", good) print("ALL CHECKS PASSED" if ok else "SOME CHECK FAILED")