FusionAtlasPaths={"~/projects/fusionatlas/code/package/","~/Documents/research/fusionatlas/code/package/"};
$Path=$Path~Join~FusionAtlasPaths;
<<FusionAtlas`

badSeeds={{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{0,1},{0,1}},{{1,0,0},{0,0,1}},{{1,1},{0,1}},{{0,1}}],DualData[{1},{1},{1,2},{2,1,3},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{0,1}},{{1},{1}},{{0,1},{0,1}},{{0,1}}],DualData[{1},{1},{1,2},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{0,1},{0,1}},{{1,0,0},{0,0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,1,0,0},{0,0,0,1}}],DualData[{1},{1},{1,2},{2,1,3},{1,3,2,4}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{0,1}},{{1},{1}},{{0,1}},{{1},{1}}],DualData[{1},{1},{1,2},{1},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,1,0,0},{0,0,1,0}},{{1,0},{0,1}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{1,3,2,4},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{0,1},{1,0}},{{1,0},{0,1}},{{0,1},{1,0}}],DualData[{1},{1},{1,2},{1,2},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,1,0,0},{0,0,1,0},{0,0,0,1}},{{1,0,0},{1,0,0},{0,1,0},{0,0,1}},{{1,0,0,0},{0,0,1,0},{0,0,0,1}}],DualData[{1},{1},{1,2},{1,3,2,4},{1,4,3,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{0,1},{1,0},{0,1}},{{1,0,0},{0,1,0}},{{0,1},{1,0},{0,1}}],DualData[{1},{1},{1,2},{1,2},{2,1}]]}}

Map[DisplayBigraph,badSeeds,{2}]

RelativeBranchFactor[badSeeds[[1,1]],badSeeds[[1,2]],n,d,q,1]

RelativeBranchFactor[badSeeds[[2,1]],badSeeds[[2,2]],n,d,q,1]

RelativeBranchFactor[badSeeds[[3,1]],badSeeds[[3,2]],n,d,q,1]

RelativeBranchFactor[badSeeds[[4,1]],badSeeds[[4,2]],n,d,q,1]

DepthOfBranchPoint[HaagerupBigraph]

Clear[OmegaPlusOmegaInverse]

OmegaPlusOmegaInverse[g1_BigraphWithDuals,g2_BigraphWithDuals,n_,d_,q_,t:(0|1)] :=qi[n+DepthOfBranchPoint[g1]+1,q]qi[n+DepthOfBranchPoint[g1]+3,q](RelativeBranchFactor[g1,g2,n,d,q,t][[1]]+(RelativeBranchFactor[g1,g2,n,d,q,t][[1]])^(-1)-2)-2

PositiveOmegaInequality[g1_BigraphWithDuals,g2_BigraphWithDuals,n_,d_,q_,t:(0|1)] :=Together[OmegaPlusOmegaInverse[g1,g2,n,d,q,t] -2]

OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],n,d,q]

PositiveOmegaInequality[badSeeds[[1,1]],badSeeds[[1,2]],n,d,q,1]

target[badSeeds[[1]]]=Numerator[PositiveOmegaInequality[badSeeds[[1,1]],badSeeds[[1,2]],n,d,q,1]]

target[badSeeds[[1]]]/.q->1.577

PositiveOmegaInequality[badSeeds[[4,1]],badSeeds[[4,2]],n,d,q,1]

target[badSeeds[[4]]]=Numerator[PositiveOmegaInequality[badSeeds[[4,1]],badSeeds[[4,2]],n,d,q,1]]

OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],0,d,q,1]

OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],2,d,q,1]

Limit[%,q->1]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[1,1,1]],0]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],0,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[1,1,1]],2]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],2,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[1,1,1]],4]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],4,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[1,1,1]],6]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[1,1]],badSeeds[[1,2]],6,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[2,1,1]],0]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[2,1]],badSeeds[[2,2]],0,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[2,1,1]],2]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[2,1]],badSeeds[[2,2]],2,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[2,1,1]],4]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[2,1]],badSeeds[[2,2]],4,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[2,1,1]],6]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[2,1]],badSeeds[[2,2]],6,d,q,1]],{q,1,1.6}]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[4,1,1]],0]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[4,1]],badSeeds[[4,2]],0,d,q,1]],{q,1,2.4},PlotRange->All]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[4,1,1]],2]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[4,1]],badSeeds[[4,2]],2,d,q,1]],{q,1,1.7},PlotRange->All]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[4,1,1]],4]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[4,1]],badSeeds[[4,2]],4,d,q,1]],{q,1,1.7},PlotRange->All]

N[qFromd[DimensionOfGenerator[Translate[badSeeds[[4,1,1]],6]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[badSeeds[[4,1]],badSeeds[[4,2]],6,d,q,1]],{q,1,1.7},PlotRange->All]

OmegaPlusOmegaInverse[Truncate[HaagerupAsaedaWithDuals,8],Truncate[DualHaagerupAsaedaWithDuals,8],0,d,q]

N[qFromd[DimensionOfGenerator[Translate[Truncate[HaagerupAsaedaWithDuals[[1]],8],0]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[Truncate[HaagerupAsaedaWithDuals,8],Truncate[DualHaagerupAsaedaWithDuals,8],0,d,q,1]],{q,1,1.44},PlotRange->All]

N[qFromd[DimensionOfGenerator[Translate[Truncate[HaagerupAsaedaWithDuals[[1]],8],2]]]]

Plot[Evaluate[OmegaPlusOmegaInverse[Truncate[HaagerupAsaedaWithDuals,8],Truncate[DualHaagerupAsaedaWithDuals,8],2,d,q,1]],{q,1.428,1.44},PlotRange->All]

Plot[Evaluate[OmegaPlusOmegaInverse[Truncate[HaagerupAsaedaWithDuals,8],Truncate[DualHaagerupAsaedaWithDuals,8],2,d,q,1]],{q,1,1.44},PlotRange->All]

Plot[Evaluate[OmegaPlusOmegaInverse[Truncate[HaagerupAsaedaWithDuals,8],Truncate[DualHaagerupAsaedaWithDuals,8],4,d,q,1]],{q,1,1.44},PlotRange->All]