vinelistwithduals={{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}}],DualData[{1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}}],DualData[{1},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}}],DualData[{1},{1},{1,2,3}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}}],DualData[{1},{1},{1,2,3}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}}],DualData[{1},{1},{3,2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}}],DualData[{1},{1},{3,2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{0,1},{0,1}}],DualData[{1},{1},{4,2,3,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}}],DualData[{1},{1},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}}],DualData[{1},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}}],DualData[{1},{1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}}],DualData[{1},{1},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{1,0,0}}],DualData[{1},{1},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{1,0,0}}],DualData[{1},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{1,0,0}}],DualData[{1},{1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{1,0,0}}],DualData[{1},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{1,0,0}}],DualData[{1},{1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{1,0,0}}],DualData[{1},{1},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,1}}],DualData[{1},{1},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,0,1}}],DualData[{1},{1},{3,2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,0,1}}],DualData[{1},{1},{3,2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}}],DualData[{1},{1},{1,2,3}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}}],DualData[{1},{1},{1,2,3}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}},{{1,0},{0,1}}],DualData[{1},{1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}},{{1,0},{0,1}}],DualData[{1},{1},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}}],DualData[{1},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,1}}],DualData[{1},{1},{1,2},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0},{0,1}}],DualData[{1},{1},{1,2},{1,2,3}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,1},{1,0}}],DualData[{1},{1},{1,2},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0},{0,1}}],DualData[{1},{1},{1,2},{2,1,3}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,1},{1,0}}],DualData[{1},{1},{1,2},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{0,1}},{{1,0,0},{0,1,0},{0,0,1},{0,0,1}}],DualData[{1},{1},{1,2},{4,3,2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{1,0}}],DualData[{1},{1},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{0,1}},{{0,1,0},{0,0,1}},{{0,1}}],DualData[{1},{1},{3,2,1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{0,1}},{{0,0,1},{0,1,0}},{{1,0}}],DualData[{1},{1},{3,2,1},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}},{{1,0},{0,1}},{{1,0},{0,1}}],DualData[{1},{1},{2,1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1},{1},{1}},{{1,0,0},{0,1,0}},{{1,0},{0,1}},{{1,0},{0,1}}],DualData[{1},{1},{2,1},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0},{0,1}},{{1,0,0}}],DualData[{1},{1},{1,2},{1,2,3}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,1},{1,0}},{{0,1}}],DualData[{1},{1},{1,2},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{0,1}},{{1,0,0},{0,0,1}},{{0,1}}],DualData[{1},{1},{1,2},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1},{1,0}},{{1,0,0},{0,1,0}},{{0,1}}],DualData[{1},{1},{1,2},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,1}},{{1}},{{1}}],DualData[{1},{1},{1,2},{1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,1}}],DualData[{1},{1},{1,2},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1}},{{0,0,1}},{{1}}],DualData[{1},{1},{1,2},{3,2,1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0}},{{1}}],DualData[{1},{1},{1,2},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1}},{{0,1,0},{0,1,0},{0,0,1}},{{1,0,0},{0,1,0},{0,0,1},{0,0,1},{0,0,1}}],DualData[{1},{1},{1,2},{3,2,1},{5,4,3,2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0}},{{1},{1},{1}}],DualData[{1},{1},{1,2},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{1,0},{0,1}},{{0,0,0,1},{0,0,0,1}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{4,2,3,1},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{1,0},{0,1}},{{0,0,0,1},{0,0,0,1}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{4,2,3,1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{1,0},{0,1}},{{0,0,0,1},{0,0,0,1}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{4,3,2,1},{1,2}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{1,2}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{1,0},{0,1}},{{0,0,0,1},{0,0,0,1}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{4,3,2,1},{2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{1,0}},{{1,0},{0,1}}],DualData[{1},{1},{1,2},{2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,0},{0,1}},{{1,1}}],DualData[{1},{1},{1,2},{1,2},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,0,0,1},{1,0,0,0}},{{1,0},{1,0},{0,1},{0,1}}],DualData[{1},{1},{1,2},{4,2,3,1},{1,2,3,4}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,0},{0,1}},{{1,1}}],DualData[{1},{1},{1,2},{1,2},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,0,0,1},{1,0,0,0}},{{1,0},{1,0},{0,1},{0,1}}],DualData[{1},{1},{1,2},{4,2,3,1},{2,1,3,4}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,0},{0,1}},{{1,1}}],DualData[{1},{1},{1,2},{1,2},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,0,0,1},{1,0,0,0}},{{1,0},{1,0},{0,1},{0,1}}],DualData[{1},{1},{1,2},{4,2,3,1},{2,1,4,3}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}}],DualData[{1},{1},{1,2},{1,2},{4,3,2,1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,0,0,1},{1,0,0,0}},{{1,1}}],DualData[{1},{1},{1,2},{4,2,3,1},{1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,0,0,1},{1,0,0,0}},{{1,1}},{{1}},{{1}}],DualData[{1},{1},{1,2},{4,2,3,1},{1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{1,0,0,1}}],DualData[{1},{1},{1,2},{1,2},{4,3,2,1}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0}},{{1,0},{0,1}},{{1,0},{0,1}},{{1,1}},{{1}},{{1}}],DualData[{1},{1},{1,2},{1,2},{1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1}},{{1,0},{1,0},{0,1},{0,1}},{{0,0,0,1},{1,0,0,0}},{{1,0},{1,0},{0,1},{0,1}},{{1,0,1,0}}],DualData[{1},{1},{1,2},{4,2,3,1},{1,2,3,4}]]},{BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{1,0},{0,1}},{{1,0,0},{0,1,0},{0,0,1}},{{0,1,0},{0,0,1}},{{1,0},{0,1}},{{0,1}},{{1}}],DualData[{1},{1},{1,2},{3,2,1},{2,1},{1}]],BigraphWithDuals[GradedBigraph[{{1}},{{1}},{{1}},{{1},{1}},{{1,0},{0,1},{1,0}},{{1,0,0},{0,1,0},{0,1,0}},{{1,0,0},{0,0,1}},{{1,0}},{{1}}],DualData[{1},{1},{1,2},{3,2,1},{1}]]}};

Map[DisplayBigraph,vinelistwithduals]

vinelist=Union[CanonicalizeBigraph/@Flatten[vinelistwithduals][[All,1]]];

Map[DisplayBigraph,vinelist]

Length[vinelist]

Alist=FindA[#,q]&/@vinelist;

TestAForm[A_,q_]:=Module[{poly=Expand[q (A/.q->q^(-1))]},
And[Exponent[A,q]==1,Coefficient[A,q]==1,Select[CoefficientList[poly-1,q],#≤0&]==CoefficientList[poly-1,q]]];

Length[Select[Alist,Not[TestAForm[#,q]]&]]

{goodAlist,badAlist}=GatherBy[vinelist,TestAForm[FindA[#,q],q]&];

DisplayBigraph/@badAlist

DisplayBigraph/@goodAlist

FindN/@goodAlist

listofN={76,76,75,94,119,94,75,87,49,70,65,67,87,70,70,89,69,79,139,96,121,104,148,131,79,83,134,104,87,117,150,152}

Length[listofN]

GoodVinesWithBounds=Table[{goodAlist[[i]],listofN[[i]]},{i,1,32}]

CyclotomicToBound[g_GradedBigraph,n_Integer]:=Module[{m=n-GraphRank[g],possiblegraphs={}},
For[j=0,j<=m,j++,If[CyclotomicTest[Translate[g,j]],possiblegraphs=Union[possiblegraphs,{Translate[g,j]}];
];
];
possiblegraphs
]

CyclotomicToBound[HaagerupBigraph,90]

DisplayBigraph/@%

Table[CyclotomicToBound[GoodVinesWithBounds[[i,1]],GoodVinesWithBounds[[i,2]]],{i,1,32}]