Workbook for “Completing the enumeration of inversion sequences avoiding triples of relations”

Class 1176 (>,≤,≠) aka (100,102,201)

Clear all variables:

Clear["Global`*"]

The generating function A is known:

AA[z_,x_]:=((1-2x+(Sqrt[1-4z x]))/(2(1-x-z)))

Use this to solve for B, then C, then D:

Clear[BB]
z BB[z,x]+(z/((1-x)))(z D[AA[z,x],z]-x D[AA[z,x],x]+(x/(1-x))(AA[z x,1]-AA[z,x]));
Solve[BB[z,x]==%,BB[z,x]];
BB[z,x]/.%[[1]]
BB[z_,x_]:=((-1+2 z+2 x z-2 (z^2)+(Sqrt[1-4 x z])-2 z (Sqrt[1-4 x z]))/(2 (-1+z) (((-1+x+z))^2)))

CC[z_,x_]:=z BB[z,x]

DD[z_,x_]:=(z/(1-z))CC[z,x]

We then use the kernel method to solve for E:

Clear[EE]
eqnE=-EE[z,x]+(z/(1-x))(EE[z,1]-EE[z,x]+AA[z,1]-AA[z,x]+DD[z,1]-DD[z,x]);
Collect[%,EE[__],Factor]
Solve[Coefficient[eqnE,EE[z,x]]==0,x]
eqnE/.%[[1]];
EE[z,1]/.Solve[%==0,EE[z,1]][[1]]//Simplify
EE[z_,1]:=((-2+4 (Sqrt[1-4 z])+(2-4 (Sqrt[1-4 z])) (z^2)-4 (z^3)-2 (Sqrt[1-4 z-4 (z^2)])+z (5-4 (Sqrt[1-4 z])+3 (Sqrt[1-4 z-4 (z^2)])))/(8 (((-1+z))^2) z))

Then we combine A(z,1), D(z,1) and E(z,1) to get F(z):

FF[z_]:=AA[z,1]+DD[z,1]+EE[z,1]

FF[z]//Simplify
Series[FF[z],{z,0,20}]

Class 1253 (>,≠,≠) aka (102,201,210)

Clear all variables:

Clear["Global`*"]

A and B are as in Class 1176:

AA[z_,x_]:=((1-2x+(Sqrt[1-4z x]))/(2(1-x-z)))
BB[z_,x_]:=((-1+2 z+2 x z-2 (z^2)+(Sqrt[1-4 x z])-2 z (Sqrt[1-4 x z]))/(2 (-1+z) (((-1+x+z))^2)))

Then (SuperDagger[C]), (SuperDagger[D]) and (SuperDagger[E]) follow:

CCdag[z_,x_]:=(z/(1-z))BB[z,x]
DDdag[z_,x_]:=(z/(1-2z))CCdag[z,x]
EEdag[z_,x_]:=(z/((1-x)(1-z)))(AA[z,1]-AA[z,x])

(SuperDagger[F]) then follows from these:

FFdag[z_]:=AA[z,1]+DDdag[z,1]+Limit[EEdag[z,x],x->1]

FFdag[z]//Simplify
Series[%,{z,0,20}]

Class 1016 (>,-,≠) aka (100,102,201,210)

Clear all variables:

Clear["Global`*"]

A, B, C and D are as for Class 1176:

AA[z_,x_]:=((1-2x+(Sqrt[1-4z x]))/(2(1-x-z)))
BB[z_,x_]:=((-1+2 z+2 x z-2 (z^2)+(Sqrt[1-4 x z])-2 z (Sqrt[1-4 x z]))/(2 (-1+z) (((-1+x+z))^2)))
CC[z_,x_]:=z BB[z,x]
DD[z_,x_]:=(z/(1-z))CC[z,x]

(SuperStar[E]) follows immediately:

EEstar[z_,x_]:=(z/(1-x))(AA[z,1]-AA[z,x])

Then so does (SuperStar[F]):

FFstar[z_]:=AA[z,1]+DD[z,1]+Limit[EEstar[z,x],x->1]

FFstar[z]//Simplify
Series[%,{z,0,20}]

Class 663A (-,≠,≥) aka (010,101,110,120,201,210)

Clear all variables:

Clear["Global`*"]

Set up the two equations:

Clear[AA,BB]
eqnA=-AA[z,x]+1+ ((z x)/(1-x))(AA[z,1]-x AA[z,x])+z x BB[z,x];
eqnB=-BB[z,x]+(z/(1-x))(x AA[z,1]-AA[z,x])+z+z x BB[z,x];

Eliminate B between them:

Solve[eqnB==0,BB[z,x]]
eqnA/.%[[1]];
eqnA2=Collect[%,AA[__],Factor]

The kernel:

KK[z_,x_]:=(-1+x+x z-2 (x^2) z-x (z^2)+(x^3) (z^2))

Extract the power series root:

Table[Root[-1+#1+#1 z-2 ((#1)^2) z-#1 (z^2)+((#1)^3) (z^2)&,k],{k,1,3}];
Select[%,Limit[#,z->0,Direction->"FromAbove"]==1&][[1]]
XX[zz_]=(%/.z->zz);

Substitute this back into the equation to obtain A:

Clear[AA]
eqnA2/.AA[z,x]->0
AA[z,1]/.Solve[%==0,AA[z,1]][[1]]/.x->XX[z];
AA[zz_,1]=(%/.z->zz)

Series[AA[z,1],{z,0,20}]

Class 1420 (-,-,>) aka (100,110,120,201,210)

Clear all variables:

Clear["Global`*"]

Set up the two equations:

Clear[AA,BB]
eqnA=-AA[z,x]+1+((z x)/(1-x))(AA[z,1]-x AA[z,x])+((z x)/(1-x)) (BB[z,1]-x BB[z,x]);
eqnB=-BB[z,x]+(z/(1-x))(x AA[z,1]-AA[z,x])+z+(z/(1-x)) (x BB[z,1]-BB[z,x])+z x BB[z,x];

Eliminate B between them:

Solve[eqnB==0,BB[z,x]]
eqnA/.%[[1]];
eqnA2=Collect[%,{AA[__],BB[__]},Factor]

The kernel:

KK[z_,x_]:=(-1+x-z+x z-2 (x^2) z+(x^3) (z^2))

Extract the power series root:

Table[Root[-1+#1-z+#1 z-2 ((#1)^2) z+((#1)^3) (z^2)&,k],{k,1,3}];
Select[%,Limit[#,z->0,Direction->"FromAbove"]==1&][[1]]
XX[zz_]=(%/.z->zz);

Substitute this back into the equation, and use the fact that F(z) = A(z,1) + B(z,1):

Clear[AA,FF]
eqnA2/.AA[z,x]->0;
%/.AA[z,1]->FF[z]-BB[z,1];
FF[z]/.Solve[%==0,FF[z]][[1]]
FF[z_]=(%/.x->XX[z]);

Series[FF[z],{z,0,20}]

Class 1833A (-,≠,>) aka (110,120,201,210)

Clear all variables:

Clear["Global`*"]

The main equation:

Clear[AA]
eqnA=-AA[z,x,y]+1+z x AA[z,x,y]+z x(AA[z,x,1]-AA[z,x,0])+((z (x^2))/((y-x)(1-x)))AA[z,x,1]+((z x)/((1-y)(1-x)))AA[z,1,1]-((z y x)/((y-x)(1-y)))AA[z,y,1]

Set y=0 and substitute back in to eliminate A(z,x,0)

Clear[AA]
eqnA/.y->0;
Solve[%==0,AA[z,x,0]];
eqnA/.%[[1]];
eqnA2=Collect[%,AA[__],Factor]

Now set y=0 and x=y and use this to eliminate A(z,y,1)

Clear[AA]
eqnA2/.y->0/.x->y;
Solve[%==0,AA[z,y,1]];
eqnA2/.%[[1]];
eqnA3=Collect[%,AA[__],Factor]

Finally set y=1:

Clear[AA]
eqnA3/.y->1;
eqnA4=Collect[%,AA[__],Factor]

The kernel:

KK[x_,y_]:=(1-2 x+(x^2)-2 x z+3 (x^2) z-2 (x^3) z-(x^3) (z^2)+(x^4) (z^2))

Find the two roots which are Puiseux series in z:

Table[Root[1-2 #1+((#1)^2)-2 #1 z+3 ((#1)^2) z-2 ((#1)^3) z-((#1)^3) (z^2)+((#1)^4) (z^2)&,k],{k,1,4}];
Select[%,Limit[#,z->0,Direction->"FromAbove"]==1&]
{XX1[zz_],XX2[zz_]}=(%/.z->zz);

Use these to get two equations, with which to solve A(z,1,0) and A(z,1,1):

Clear[AA,FF]
eqnA4/.AA[z,x,1]->0;
Solve[{%/.x->x1,%/.x->x2}=={0,0},{AA[z,1,0],AA[z,1,1]}];
AA[z,1,1]/.%[[1]]//Factor
FF[zz_]=(%/.{x1->XX1[z],x2->XX2[z]}/.z->zz);

Series[FF[z],{z,0,20}]

Class 733 (≠,≠,≥) aka (010,101,120,201,210)

Clear all variables:

Clear["Global`*"]

The main equation:

Clear[BB]
eqnB=-BB[z,x,y]+1+z x BB[z,x,y]+z x(BB[z,x,1]-BB[z,x,0])+((z (x^2))/((1-x)(y-x)))BB[z,x,0]+((z x)/((1-y)(1-x)))BB[z,1,0]-((z x y)/((1-y)(y-x)))BB[z,y,0]

Set y=0 and use this to eliminate B(z,x,0)

Clear[BB]
eqnB/.y->0;
Solve[%==0,BB[z,x,0]];
eqnB/.%[[1]];
eqnB2=Collect[%,BB[__],Factor]

Then set y=0 and x=y and eliminate B(z,y,0)

Clear[BB]
eqnB2/.y->0/.x->y;
Solve[%==0,BB[z,y,0]];
eqnB2/.%[[1]];
eqnB3=Collect[%,BB[__],Factor]

Then set y=1

Clear[BB]
eqnB3/.y->1;
eqnB4=Collect[%,BB[__],Factor]

The kernel:

KK[z_,x_]:=(1-2 x+(x^2)-x z+3 (x^2) z-2 (x^3) z-(x^2) (z^2)-(x^3) (z^2)+(x^4) (z^2))

Find the two roots which are power series in z:

Table[Root[1-2 #1+((#1)^2)-#1 z+3 ((#1)^2) z-2 ((#1)^3) z-((#1)^2) (z^2)-((#1)^3) (z^2)+((#1)^4) (z^2)&,k],{k,1,4}];
Select[%,Limit[#,z->0,Direction->"FromAbove"]==1&]
{XX1[zz_],XX2[zz_]}=(%/.z->zz);

Clear[BB,FF]
eqnB4/.BB[z,x,1]->0;
Solve[{%/.x->x1,%/.x->x2}=={0,0},{BB[z,1,0],BB[z,1,1]}];
BB[z,1,0]/.%[[1]]//Factor
FF[zz_]=(%/.{x1->XX1[z],x2->XX2[z]}/.z->zz);

Series[FF[z],{z,0,20}]//Simplify