Rank 0 DT invariants from PT/GV

Determination of PT and DT invariants from GV invariants

ClearAll[pmax,lmax,lmax2,h1,GVTab,PTTabnew,DTTabnew,PTTabGv,DTTabGv];
SetDirectory[NotebookDirectory[]];
(* choose your favorite CICY *)
<<X42.m
{CY,chi,kappa,c2}

(* can be OMMITTED to not delay the calculation *)
(* extending the table of GV invariants by unknown entries *)
 Nadd=3;
GVtemp=Array[Gv[#1-1,#2] &, {Length[GVTab]+2Nadd,Length[Transpose[GVTab]]+Nadd}];
GVtemp[[1;;Length[GVTab],1;;Length[Transpose[GVTab]]]]=GVTab;
GVTab=GVtemp;

(* maximal genus and degree in the table of GV invariants *)
gmaxGV=Length[GVTab]-1;
QmaxGV=Length[Transpose[GVTab]];
(* the maximal degree which gives rise to the genus satisfying the Castelnuovo bound *)
QmaxGVg=Floor[Q/. Solve[((Q^2)/(2 kappa))+(Q/2)+1==gmaxGV,Q][[2]]];
(* choose the minimal of the two bound on the degree to avoid appearance of unknow GV invariants *)
Qmax=Min[QmaxGV,QmaxGVg];
{gmaxGV,QmaxGV,QmaxGVg}

NMax=20;
(* Castelnuovo bound on the D0-charge for PT invariants *)
MMin[Q_]:=Ceiling[-((Q^2)/(2kappa))-(Q/2)];
(* Castelnovo bound on the genus of GV invariants *)
gMax[Q_]:=Floor[((Q^2)/(2 kappa))+(Q/2)+1];
(* generating function of PT invariants *)
ZPTnew[QMax_,q_,y_]:=Exp[Sum[Sum[(((-1))^(g+1))GVTab[[g+1,Q]]Sum[(1/k)(q^((1-g)k)) (y^(Q k))(((1-(q^k)))^(2g-2)),{k,1,QMax}],{g,0,gMax[Q]}],{Q,1,QMax}]]/.q->-q;
(* y-expand the generating function of PT invariants *)
ZPTexpy=Simplify[Series[ZPTnew[Qmax,q,y],{y,0,Qmax}]];

(* q-expand each coefficient in y, after multiplying by the power of q corresponding to the Castelnuovo bound *)
ZPTexp=Table[Series[(q^(-MMin[i-1]))ZPTexpy[[3,i]],{q,0,NMax}],{i,1,Length[ZPTexpy[[3]]]}];
(* extract the coefficients of the expansion *)
PTTabsh=CoefficientList[ZPTexp,q];
(* add zeros to the first row to complete to a square table *)
PTTabsh[[1]]=Join[PTTabsh[[1]],Array[0 &,NMax]];
(* adds the first column encoding the shifts of the D0-charge *)
PTTabnew=Transpose[Join[{Table[-MMin[mu],{mu,0,Qmax}]},Transpose[PTTabsh]]];
MatrixForm[PTTabnew]

(* same for DT invariants *)
MacMahon[NMax_,q_]:=Product[1/(1-q^k)^k,{k,NMax}];
ZDTexp=Table[Series[MacMahon[NMax,-q]^chi (q^(-MMin[i-1]))ZPTexpy[[3,i]],{q,0,NMax}],{i,1,Length[ZPTexpy[[3]]]}];
(* extract the coefficients of the expansion *)
DTTabsh=CoefficientList[ZDTexp,q];
(* adds the first column encoding the shifts of the D0-charge *)
DTTabnew=Transpose[Join[{Table[-MMin[mu],{mu,0,Qmax}]},Transpose[DTTabsh]]];
MatrixForm[DTTabnew]

Determination of J invariants from modular generating functions at rank 1

ClearAll[pmax,lmax,lmax2,h1,GVTab,PTTabnew,DTTabnew,PTTabGv,DTTabGv,h1fun,h1int,h1ser];
SetDirectory[NotebookDirectory[]];
(* choose your favorite CICY *)
<<X66.m
{CY,chi,kappa,c2}

(* definition of modular functions *)
NMax=100;
E2[q_]:=1-24 Sum[n q^n/(1-q^n),{n,NMax}];
E4[q_]:=1+240 Sum[n^3 q^n/(1-q^n),{n,NMax}];
E6[q_]:=1-504 Sum[n^5q^n/(1-q^n),{n,NMax}];
eta[q_]:=q^(1/24)*(1+Sum[(((-1))^n)(q^(n(3n-1)/2)+q^(n(3n+1)/2)),{n,1,NMax}]);
Th[r_,kappa_,mu_,q_]:=Sum[(-1)^(kappa r^2n)q^(kappa r n^2/2),{n,-NMax-1+r/2+mu/(kappa r),NMax+r/2+mu/(kappa r)}];
dTh[r_,kappa_,mu_,q_]:=Sum[(kappa n/I) (-1)^(kappa r^2n)q^(kappa r n^2/2),{n,-NMax-1+r/2+mu/(kappa r),NMax+r/2+mu/(kappa r)}];
DThTab={Table[Series[If[EvenQ[kappa],Th[1,kappa,k,q],dTh[1,kappa,k,q]],{q,0,NMax}],{k,0, kappa-1}]};
wTheta=If[EvenQ[kappa],1/2,3/2];
Do[
AppendTo[DThTab,Series[q D[Last[DThTab],q]-wTheta/12 E2[q]Last[DThTab],{q,0,NMax}]];
wTheta+=2,{l,lmax}];

(* expansion of the generating function *)
h1fun
h1ser=Series[ReplaceAll[h1fun,{Eta->eta[q],e4->E4[q],e6->E6[q],DdTh[p_]->DThTab[[p+1]],DTh[p_]->DThTab[[p+1]]}],{q,0,NMax}];

(* removing fractional part of the powers of q *)
h1int=If[kappa==1,{q^((kappa +c2 )/24) h1ser},Array[q^((kappa +c2 )/24-FractionalPart[(#-1)^2/(2kappa )+(#-1) /2]) h1ser[[#]] &,kappa]]

J invariants at rank 1

ClearAll[pmax,lmax,lmax2,h1,GVTab,PTTabnew,DTTabnew,PTTabGv,h1fun,h1int,h1ser];
SetDirectory[NotebookDirectory[]];
(* choose your favorite CICY *)
<<X42.m
{CY,chi,kappa,c2}

(* Castelnuovo bound on the D0-charge for PT invariants *)
MMin[Q_]:=Ceiling[-((Q^2)/(2kappa))-(Q/2)];
(* Castelnovo bound on the genus of GV invariants *)
gMax[Q_]:=Floor[((Q^2)/(2 kappa))+(Q/2)+1];
(* action of the spectral flow *)
mun[mu_,n_]:=mu+n kappa;
mn[mu_,M_,n_]:=M-n mu-(kappa/2)((n^2)+n);
(* spectral flow transformation bringing D2 brane charge to the interval [0,κ/2] *)
SFmu[κ_,μ_]:=Module[{x= Round[μ/κ]},If[κ x > μ,κ x-μ ,μ-κ x]];
SFM[κ_,μ_,M_]:=Module[{x= Round[μ/κ]},If[κ x > μ,M+μ x+(κ/2)x(1-x)-(κ x-μ),M+μ x+(κ/2)x(1-x)]];

ChiO1[mu_,M_,n_]:=(kappa/2)n(n-1)+(n-1) mu-M+(kappa/6)+(c2/12);

(* rules for substitution of invariants *)
repGV={Gv[g_,m_]:>If[g>gMax[m]||m==0,0,If[g+1<=Length[GVTab],If[m<=Length[GVTab[[g+1]]],GVTab[[g+1,m]],Gv[g,m]],Gv[g,m]]]};
repPT={PT[mu_,n_]:>If[n<MMin[mu],0,If[mu+1<=Length[PTTabnew],If[n-MMin[mu]+2<=Length[PTTabnew[[mu+1]]],PTTabnew[[mu+1,n-MMin[mu]+2]],PT[mu,n]],PT[mu,n]]]};repDT={DT[mu_,n_]:>If[n<MMin[mu],0,If[mu+1<=Length[DTTabnew],If[n-MMin[mu]+2<=Length[DTTabnew[[mu+1]]],DTTabnew[[mu+1,n-MMin[mu]+2]],DT[mu,n]],DT[mu,n]]]};

repPTGv={PT[mu_,n_]:>If[n<MMin[mu],0,If[mu+1<=Length[PTTabGv],If[n-MMin[mu]+2<=Length[PTTabGv[[mu+1]]],PTTabGv[[mu+1,n-MMin[mu]+2]],PT[mu,n]],PT[mu,n]]]};

JTab=CoefficientList[h1int,q];
repJ={J[mu_,n_]:>If[n<MMin[mu],0,If[mu+1<=Length[JTab]&& n+1<=Length[JTab[[mu+1]]]+MMin[mu],JTab[[mu+1,n-MMin[mu]+1]],J[mu,n]]]};

(* valid only for m close to Castelnuovo bound *)
repPTApprox={PT[b_,m_]:>Sum[Binomial[2g-2,g-1-m]Gv[g,b],{g,1,Floor[b^2/(2kappa)+b/2+1]}]/.repGV};
(* same but do not evaluate GV invariants *)
repPTApprox0={PT[b_,m_]:>Sum[Binomial[2g-2,g-1-m]Gv[g,b],{g,1,Floor[b^2/(2kappa)+b/2+1]}]};

(* SIMPLIFIED VERSION OF THEOREM *)
(* Determination of the minimal value of the spectral flow parameter n *)
Con1[beta_,m_]:=(beta^2)+((8 (beta^3))/kappa)-9 (m^2);
Con2[beta_,m_]:=((beta^2)/(3 kappa))+((2 beta)/3)+m;
Con3[beta_,m_]:=((beta^2)/(2 kappa))+beta((1/2)-(1/kappa))+m+(1/kappa)+1;
Con4[beta_,m_]:=((beta^2)/(2 kappa))+2beta+(3/4)kappa+(9/4)(((m^2)kappa)/(beta^2))+((3m kappa)/beta)+(5/2)m;
nMin [mu_,M_]:=Module[{n},n=1;
While[Con1[mun[mu,n],mn[mu,M,n]]>=0||Con2[mun[mu,n],mn[mu,M,n]]>=0 ||Con3[mun[mu,n],mn[mu,M,n]]>=0 || Con4[mun[mu,n],mn[mu,M,n]]>=0,n++];
n
];
NTab=Array[nMin [#1-1,#2-1+MMin[#1-1]]&,{IntegerPart[kappa/2]+1,10}];
(* adds the first column encoding the shifts of the D0-charge *)
 NTab=Transpose[Join[{Table[-MMin[mu],{mu,0,IntegerPart[kappa/2]}]},Transpose[NTab]]];
MatrixForm[NTab]

(* answer from Soheyla's Thm 1.2, for r=1 *)
S1[mu_,M_,n_]:=((((-1))^(ChiO1[mu,M,n]+1))/(ChiO1[mu,M,n]))PT[mun[mu,n],mn[mu,M,n]];
(* check if coefficients stabilize *)
Table[Table[Table[S1[mu,M,n],{n,1,nMin[mu,M]+1}],{M,MMin[mu],3+MMin[mu]}],{mu,0,kappa/2}]/.repPTGv
(* coefficients for the minimal value of n *)
Table[Table[S1[mu,M,nMin[mu,M]],{M,MMin[mu],4+MMin[mu]}],{mu,0,kappa/2}]/.repPT//MatrixForm
(* try if n-1 already produces the correct result *)
Table[Table[S1[mu,M,nMin[mu,M]-1],{M,MMin[mu],4+MMin[mu]}],{mu,0,kappa/2}]/.repPT//MatrixForm
(* try if n-2 already produces the correct result *)
Table[Table[S1[mu,M,nMin[mu,M]-2],{M,MMin[mu],4+MMin[mu]}],{mu,0,kappa/2}]/.repPT//MatrixForm

(* FULL VERSION OF THEOREM *)
(* Determination of the minimal value of the spectral flow parameter n *)
Con1[beta_,m_]:=(beta^2)+((8 (beta^3))/kappa)-9 (m^2);
Con2[beta_,m_]:=((beta^2)/(3 kappa))+((2 beta)/3)+m;
nMin2 [mu_,M_]:=Module[{n},n=1;
While[Con1[mun[mu,n],mn[mu,M,n]]>=0||Con2[mun[mu,n],mn[mu,M,n]]>=0 ,n++];
n
];
NTab2=Array[nMin2 [#1-1,#2-1+MMin[#1-1]]&,{IntegerPart[kappa/2]+1,10}];
(* adds the first column encoding the shifts of the D0-charge *)
 NTab2=Transpose[Join[{Table[-MMin[mu],{mu,0,IntegerPart[kappa/2]}]},Transpose[NTab2]]];
MatrixForm[NTab2]

(* limits of summation *)
ULbeta[beta_,m_]:=beta+((3 kappa m)/(2 beta))+(kappa/2);
ULm[beta_,m_,betap_]:=((((beta-betap))^2)/(2 kappa))+(1/2)(beta+betap)+m;
LLm[betap_]:=-((((betap))^2)/(2 kappa))-(1/2)betap;
(* answer from Soheyla's Thm 2 *)
S2[mu_,M_,n_]:=Module[{Mun,Mn},Mun=mun[mu,n];Mn=mn[mu,M,n];((((-1))^(ChiO1[mu,M,n]+1))/(ChiO1[mu,M,n]))(PT[Mun,Mn]-Sum[Sum[(((-1))^(ChiO1[mu,M,n]-mup+mp+1))(ChiO1[mu,M,n]-mup+mp)PT[mup,mp] J[SFmu[kappa,Mun-mup],SFM[kappa,Mun-mup,Mn-mp+mup]],{mp,Ceiling[LLm[mup]],Floor[ULm[Mun,Mn,mup]]}],{mup,1,IntegerPart[ULbeta[Mun,Mn]]}])
];
(* coefficients for the minimal value of n *)
DTs=Table[Table[S2[mu,M,nMin2[mu,M]],{M,MMin[mu],4+MMin[mu]}],{mu,0,kappa/2}]/.repPT;
DTs//MatrixForm
DTs/.repJ//MatrixForm

(* try if n-1 already produces the correct result *)
DTs=Table[Table[S2[mu,M,nMin2[mu,M]-1],{M,MMin[mu],4+MMin[mu]}],{mu,0,kappa/2}]/.repPT;
DTs//MatrixForm
DTs/.repJ//MatrixForm

J invariants at rank 2

ClearAll[pmax,lmax,lmax2,h1,GVTab,PTTabnew,DTTabnew,PTTabGv,h1fun,h1int,h1ser,JTab];
SetDirectory[NotebookDirectory[]];
(* choose your favorite CICY *)
<<X6.m
{CY,chi,kappa,c2}

(* constructing the table of coefficients *)
JTab=CoefficientList[h1int,q];

(* Castelnuovo bound on the D0-charge for PT invariants *)
MMin[Q_]:=Ceiling[-((Q^2)/(2kappa))-(Q/2)];
(* spectral flow transformation bringing D2 brane charge to the interval [0,κ/2] *)
SFmu[κ_,μ_]:=Module[{x= Round[μ/κ]},If[κ x > μ,κ x-μ ,μ-κ x]];
SFM[κ_,μ_,M_]:=Module[{x= Round[μ/κ]},If[κ x > μ,M+μ x+(κ/2)x(1-x)-(κ x-μ),M+μ x+(κ/2)x(1-x)]];
(* spectral flow transformation bringing D2 brane charge to the interval [0,κ-1] *)
(* SFmu[κ_,μ_]:=Module[{x= Floor[μ/κ]},μ-κ x];
SFM[κ_,μ_,M_]:=Module[{x= Floor[μ/κ]},M+μ x+(κ/2)x(1-x)]; *)

(* PT from J invariants using Soheyla's formula for r=1 *)
(* Conditions for application of Soheyla's Theorem *)
Con1[beta_,m_]:=(beta^2)+((8 (beta^3))/kappa)-9 (m^2);
Con2[beta_,m_]:=((beta^2)/(3 kappa))+((2 beta)/3)+m;
(* limits of summation *)
ULbeta[beta_,m_]:=beta+((3 kappa m)/(2 beta))+(kappa/2);
ULm[beta_,m_,betap_]:=((((beta-betap))^2)/(2 kappa))+(1/2)(beta+betap)+m;
LLm[betap_]:=-((((betap))^2)/(2 kappa))-(1/2)betap;
ChiJ[beta_,m_]:=- beta-m+(kappa/6)+(c2/12);
(* answer from Soheyla's Thm 2 *)
SJ[mu_,M_]:=Sum[Sum[(((-1))^(ChiJ[mu,M]-mup+mp+1))(ChiJ[mu,M]-mup+mp)PT[mup,mp] J[SFmu[kappa,mu-mup],SFM[kappa,mu-mup,M-mp+mup]],{mp,Ceiling[LLm[mup]],Floor[ULm[mu,M,mup]]}],{mup,0,IntegerPart[ULbeta[mu,M]]}];

PTfromJ={PT[mu_,n_]:>If[n<MMin[mu],0,If[mu+1<=Length[PTTabnew]&& n-MMin[mu]+2<=Length[PTTabnew[[mu+1]]],PTTabnew[[mu+1,n-MMin[mu]+2]],If[Con1[mu,n]<0 && Con2[mu,n]<0 , SJ[mu,n],PT[mu,n]]]]};
repJ={J[mu_,n_]:>If[n<MMin[mu],0,If[mu+1<=Length[JTab]&& n+1<=Length[JTab[[mu+1]]]+MMin[mu],JTab[[mu+1,n-MMin[mu]+1]],J[mu,n]]]};

(* various definitions *)
(* low limit for D2-brane charge of the constituents *)
LBmu[κ_,μ_,M_,n_]:=((κ((n+1)μ-3M+κ(4- (n^2))))/(2(μ+2κ(n+2))));
(* χ((Subscript[O, X])(-n),v) *)
ChiO[κ_,c_,μ_,M_,n_]:=κ n(n+2)+n μ-M+(4/3)κ+(c/6);
(* prefactor *)
Fac[κ_,c_,μ_,M_,n_]:=((((-1))^(ChiO[κ,c,μ,M,n]+1))/(ChiO[κ,c,μ,M,n]));
(* coefficients in the sum *)
Chi[κ_,c_,μ_,μ2_,M2_,n_]:=(n+2)μ2-μ-M2+(c/12)+((κ )/6)+(κ/2)(n-1)(n+2);
(* spectral flow transformation bringing D2 brane charge to the interval [0,κ-1] *)
(* SFmu[κ_,μ_]:=Module[{x= IntegerPart[μ/κ]},If[FractionalPart[μ/κ]>1/2,x=x+1]; μ-κ x];
SFM[κ_,μ_,M_]:=Module[{x= IntegerPart[μ/κ]},If[FractionalPart[μ/κ]>1/2, x=x+1] ;M+μ x+(κ/2)x(1-x)]; *)

(* different contributions from Soheyla's Thm 1.2 for r=2 corresponding to 0≤(∑_(i=1)^N)(Subscript[k, i])≤2 *)
(* contribution with N=0 *)
SPT0[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]PT[μ+2κ(n+2),M-(n+2)μ-κ(n+2)(n+4)];

(* contribution with N=1 and (Subscript[k, 1])=1 *)
(* upper bound on D0-brane charge *)
UBm1[κ_,μ_,M_,μ2_,n_]:=M+(1/(2κ))(((μ-μ2))^2)+(3/2)(μ-μ2);
(* the contribution *)
SPT1[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]Sum[Sum[(((-1))^(Chi[κ,c,μ,μ2,M2,n]))Chi[κ,c,μ,μ2,M2,n] J[μ2,M2]PT[μ-μ2+κ(n+2),M-M2-(n+1)(μ-μ2)-(κ/2)(n+2)(n+3)],{M2,Ceiling[(κ/8)],Floor[UBm1[κ,μ,M,μ2,n]]}],{μ2,Ceiling[LBmu[κ,μ,M,n]],Floor[μ+κ(n+2)]}];
(* the contribution after spectral flow *)
SPT1sf[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]Sum[Sum[(((-1))^(Chi[κ,c,μ,μ2,M2,n]))Chi[κ,c,μ,μ2,M2,n] J[SFmu[κ,μ2],SFM [κ,μ2,M2]]PT[μ-μ2+κ(n+2),M-M2-(n+1)(μ-μ2)-(κ/2)(n+2)(n+3)],{M2,Ceiling[(κ/8)],Floor[UBm1[κ,μ,M,μ2,n]]}],{μ2,Ceiling[LBmu[κ,μ,M,n]],Floor[μ+κ(n+2)]}];

(* contribution with N=1 and (Subscript[k, 1])=2 *)
(* upper bound on D0-brane charge *)
UBm2[κ_,μ_,M_,μ2_,n_]:=(1/2)M+(1/(4κ))(((μ-2μ2))^2)+((3-2n)/4)(μ-2μ2)-((κ n)/2);
(* the contribution *)
SPT2[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]Sum[Sum[(((Chi[κ,c,μ,μ2,M2,n] J[μ2,M2]))^2)PT[μ-2μ2+κ,M-2M2-n(μ-2μ2)-κ(n+1)],{M2,Ceiling[(κ/8)],Floor[UBm2[κ,μ,M,μ2,n]]}],{μ2,Ceiling[LBmu[κ,μ,M,n]],Floor[(μ/2)+(κ/2)]}];
(* the contribution after spectral flow *)
SPT2sf[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]Sum[Sum[(((Chi[κ,c,μ,μ2,M2,n] J[SFmu[κ,μ2],SFM [κ,μ2,M2]]))^2)PT[μ-2μ2+κ,M-2M2-n(μ-2μ2)-κ(n+1)],{M2,Ceiling[(κ/8)],Floor[UBm2[κ,μ,M,μ2,n]]}],{μ2,Ceiling[LBmu[κ,μ,M,n]],Floor[(μ/2)+(κ/2)]}];

(* contribution with N=2 and (Subscript[k, 1])=(Subscript[k, 2])=1 *)
(* the coefficients in the sum *)
Chi1[κ_,c_,μ_,μ2_,M2_,μ3_,n_]:=If[μ2≤μ3,(n+2)μ2-μ-M2+(c/12)+((κ )/6)+(κ/2)(n-1)(n+2),(n+1)μ2+μ3-μ-M2+(c/12)+((κ )/6)+(κ/2)(n-1)(n+2)];
Chi2[κ_,c_,μ_,μ2_,μ3_,M3_,n_]:=If[μ2≤μ3,(n+2)μ3-μ-M3+(c/12)+((κ )/6)+(κ/2)(n-1)(n+2),(n+1)μ3+μ2-μ-M3+(c/12)+((κ )/6)+(κ/2)(n-1)(n+2)];
(* upper bound on D0-brane charge *)
UBm11[κ_,μ_,M_,μ2_,μ3_,n_]:=M+(1/κ)(((μ-μ2-μ3))^2)+((3-2n)/2)(μ-μ2-μ3)-κ n;
(* the contribution -- WHAT IS β ? *)
SPT11[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]Sum[Sum[Sum[Sum[(((-1))^(Chi1[κ,c,μ,μ2,M2,μ3,n]+Chi2[κ,c,μ,μ2,μ3,M3,n]))Chi1[κ,c,μ,μ2,M2,μ3,n]Chi2[κ,c,μ,μ2,μ3,M3,n]J[μ2,M2]J[μ3,M3]PT[μ-μ2-μ3+κ,M-M2-M3-n(μ-μ2-μ3)-κ(n+1)],{M2,Ceiling[(κ/8)],Floor[UBm11[κ,μ,M,μ2,μ3,n]]-M3}],{M3,Ceiling[(κ/8)],Floor[UBm11[κ,μ,M,μ2,μ3,n]]-Ceiling[(κ/8)]}],{μ2,Ceiling[LBmu[κ,μ,M,n]],Floor[μ+κ]-μ3}],{μ3,Ceiling[LBmu[κ,μ,M,n]],Floor[μ+κ]-Ceiling[LBmu[κ,μ,M,n]]}];
(* the contribution after spectral flow *)
SPT11sf[κ_,c_,μ_,M_,n_]:=Fac[κ,c,μ,M,n]Sum[Sum[Sum[Sum[(((-1))^(Chi1[κ,c,μ,μ2,M2,μ3,n]+Chi2[κ,c,μ,μ2,μ3,M3,n]))Chi1[κ,c,μ,μ2,M2,μ3,n]Chi2[κ,c,μ,μ2,μ3,M3,n]J[SFmu[κ,μ2],SFM [κ,μ2,M2]]J[SFmu[κ,μ3],SFM [κ,μ3,M3]]PT[μ-μ2-μ3+κ,M-M2-M3-n(μ-μ2-μ3)-κ(n+1)],{M2,Ceiling[(κ/8)],Floor[UBm11[κ,μ,M,μ2,μ3,n]]-M3}],{M3,Ceiling[(κ/8)],Floor[UBm11[κ,μ,M,μ2,μ3,n]]-Ceiling[(κ/8)]}],{μ2,Ceiling[LBmu[κ,μ,M,n]],Floor[μ+κ]-μ3}],{μ3,Ceiling[LBmu[κ,μ,M,n]],Floor[μ+κ]-Ceiling[LBmu[κ,μ,M,n]]}];

(* evalutation of DT invariant *)
DTr2=With[{mu=0,M=1,n=3},
SPT0[kappa,c2,mu,M,n]+SPT1sf[kappa,c2,mu,M,n]+SPT2sf[kappa,c2,mu,M,n]+SPT11sf[kappa,c2,mu,M,n]]
DTr2J=DTr2/.PTfromJ/.PTfromJ
DTr2J/.repJ