SetDirectory["c:/diskE/job2008/Zurich"];

<<MB/MB.m

SortByDimension[l_List]:=Sort[l,Length[#1[[2,2]]]>Length[#2[[2,2]]]&];
CoeffEps[X_,n_]:=(X /.X[[1]]-> Simplify[Coefficient[X[[1]],ep,n]]);
MBDimension[int_MBint]:=Length[int[[2,2]]];

(*   a 4fold MB representation for the on-shell 2loop 
non-planar vertex diagram derived loop by loop;
  sg=-1    *)

V2=((sg^z4) Gamma[-1-ep-z1-z2] Gamma[-z2] Gamma[1+z1+z2] Gamma[-1-ep-z1-z3] Gamma[-z3] Gamma[1+z1+z3] Gamma[-1-2 ep-z2-z4] Gamma[-1-2 ep-z3-z4] Gamma[-z4] Gamma[2+2 ep+z4] Gamma[-z1+z4] Gamma[2+ep+z1+z2+z3+z4])/(Gamma[-3 ep] Gamma[-2 ep] Gamma[1-z2] Gamma[1-z3]) ;

V2rules=MBoptimizedRules[V2,ep->0,{},{ep}]

V2cont=MBcontinue[V2,ep->0,V2rules];

(*    no    1/ep^4 poles???        *)

V2select4=MBpreselect[MBmerge[V2cont],{ep,0,-4}]

V2select0=MBpreselect[MBmerge[V2cont],{ep,0,0}]

V2select0S=Simplify[SortByDimension[V2select0]]

MBDimension /@ V2select0S

(*    One-dimensional contribution V2select0S[[4]]     *)

V2select0S[[4]]

(*            a piece of this:              *)

V20=(2 (sg^z1) Gamma[-2 ep] ((Gamma[-ep])^2) Gamma[ep] Gamma[-z1] Gamma[1+ep+z1] Gamma[1+2 ep+z1])/(Gamma[-3 ep] Gamma[2+ep+z1]);

(*    no 1/ep^4 poles here???  *)

Series[V20 E^(2EulerGamma ep),{ep,0,-4}]

V20/. (sg^z1)-> E^(I Pi z1)

%/. Gamma[2+ep+z1]-> Gamma[1+ep+z1](1+ep+z1)

(%/. Gamma[-z1] ->(-1)^n/n!)/.z1->n

%/. (E^(I n π))-> (((-1))^n)

%/. (((-1))^(2 n))->1

Sum[%,{n,0,Infinity}]

Simplify[Normal[Series[%E^(2EulerGamma ep),{ep,0,-4}]]]

(*    a singularity in epsilon arises when integrating over large values of z *)

(*    do not use the loop-by-loop strategy of 
deriving MB representations for nonplanar diagrams  *)