#C13.txt: Jacobian conjecture, March 3, 2016 (ExpMath Spring 2016) Help:=proc(): print(` Chop1(P,x,i) , Inv1(P,x,N) ,Chop2(P,x,y,i), Inv2(P,x,y,N`): print(`Comp(P,Q,x)`): end: #Chop1(P,x,i): inputs a polynomial P in x and outputs #the first terms up to x^i Chop1:=proc(P,x,i) local j: add(coeff(P,x,j)*x^j,j=0..i): end: #Inv1(P,x,N): inputs a polynomial P in the single variable x #outputs the beginning (until x^N) of the formal power #series that inverts P #X=P1+ P2 (where P2 has degree at least two) #x=(X-P2)/c1: #x(X)= (X- P2(x))/c1 Inv1:=proc(P,x,N) local c1, P2,andrew,X,i: if coeff(P,x,0)<>0 then RETURN(FAIL): fi: c1:=coeff(P,x,1): P2:=P-c1*x: andrew:=0: for i from 1 to N do andrew:= Chop1((X-subs(x=andrew,P2))/c1,X,i) : od: subs(X=x,andrew): end: #Chop2(P,x,y,i): inputs a polynomial P in x and y and outputs #the all the terms of total degree <=i Chop2:=proc(P,x,y,i) local j1,j2: add( add( coeff(coeff(P,x,j1),y,j2) *x^j1*y^j2,j2=0..i-j1), j1=0..i): end: #Inv2(P,x,y,N): inputs a pair of polynomials P=[f(x,y),g(x,y)] #in the variables x and y, and a pos. integer N, outputs #the beginning (up to degree N) of the inverse transformation #We want to find formal power series x(X), y(Y) #such that f(x(X),y(Y))=x and g(x(X),y(Y))=y #We want to express it as #x(X,Y)= LinearCombinationOf(X,Y)+ QUAD(x(X),y(Y)) #y(X,Y)=LinearCombinationOf(X,Y)+ QUAD(x(X),y(Y)) Inv2:=proc(P,x,y,N) local L1,L2,Q1,Q2,f,g,Q1a,Q2a,X,Y ,var,A,keith,i : f:=P[1]: g:=P[2]: if Chop2(f,x,y,0)<>0 or Chop2(g,x,y,0)<>0 then RETURN(FAIL): fi: L1:=Chop2(f,x,y,1): L2:=Chop2(g,x,y,1): Q1:=f-L1: Q2:=g-L2: var:=solve({X=L1+Q1a, Y=L2+Q2a},{x,y}): var:=subs({Q1a=Q1,Q2a=Q2},var): A:=[subs(var,x), subs(var,y)]: keith:=[0,0]: for i from 1 to N do keith:=subs({x=keith[1],y=keith[2]},A): keith:=[Chop2(keith[1],X,Y,i), Chop2(keith[2],X,Y,i)]: od: subs({X=x,Y=y},keith): end: #Comp(P,Q,x): Inputs polynomial transformations #P and Q in the list of variables x=[x1,...,xn] #outputs its composition P(Q(x)) Comp:=proc(P,Q,x) local i,n: n:=nops(x): if nops(Q)<>n then RETURN(FAIL): fi: expand(subs({seq(x[i]=Q[i],i=1..n)},P)): end: