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

FSM={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}]]};

DisplayBigraph/@Translate[FSM,2]

ReducedDimensionOfGenerator[Translate[FSM[[1,1]],2]]

N[%]

f[n_]:=(2+((q^(-4-2 n)) (1-2 (q^2)-(q^4)+3 (q^8)+2 (q^10)+(q^12)-4 (q^(4+2 n))-12 (q^(6+2 n))-9 (q^(8+2 n))+4 (q^(12+2 n))+12 (q^(14+2 n))+18 (q^(16+2 n))+4 (q^(18+2 n))-4 (q^(20+2 n))-9 (q^(24+2 n))-12 (q^(26+2 n))-4 (q^(28+2 n))+8 (q^(14+4 n))+24 (q^(16+4 n))+18 (q^(18+4 n))-2 (q^(20+4 n))-18 (q^(24+4 n))-36 (q^(26+4 n))-18 (q^(28+4 n))-2 (q^(32+4 n))+18 (q^(34+4 n))+24 (q^(36+4 n))+8 (q^(38+4 n))-4 (q^(24+6 n))-12 (q^(26+6 n))-9 (q^(28+6 n))-4 (q^(32+6 n))+4 (q^(34+6 n))+18 (q^(36+6 n))+12 (q^(38+6 n))+4 (q^(40+6 n))-9 (q^(44+6 n))-12 (q^(46+6 n))-4 (q^(48+6 n))+(q^(40+8 n))+2 (q^(42+8 n))+3 (q^(44+8 n))-(q^(48+8 n))-2 (q^(50+8 n))+(q^(52+8 n))))/((((-1+(q^2)))^2) (-1-2 (q^2)-3 (q^4)-3 (q^6)-3 (q^8)-(q^10)+(q^(10+2 n))+3 (q^(12+2 n))+3 (q^(14+2 n))+3 (q^(16+2 n))+2 (q^(18+2 n))+(q^(20+2 n))) (-1-3 (q^2)-2 (q^4)-2 (q^6)-2 (q^8)-(q^10)+(q^(10+2 n))+2 (q^(12+2 n))+2 (q^(14+2 n))+2 (q^(16+2 n))+3 (q^(18+2 n))+(q^(20+2 n)))))/2

f[0]

f[1]

Plot[f[0],{q,1,2.03}]

Cases[(q/.Solve[f[0]==1]),x_/;Im[x]==0∧x>1]

CyclotomicQ/@%

N[Cases[(q/.Solve[f[0]==1]),x_/;Im[x]==0∧x>1]]

Cases[(q/.Solve[f[0]==-1]),x_/;Im[x]==0∧x>1]

N[Cases[(q/.Solve[f[0]==-1]),x_/;Im[x]==0∧x>1]]

Cases[(q/.Solve[f[0]==0]),x_/;Im[x]==0∧x>1]

x=RootReduce[%93[[1]]]

Cases[(q/.Solve[f[0]==0]),x_/;Im[x]==0∧x>1]

CyclotomicQ/@%

N[%]

%+((%)^(-1))

CyclotomicTest

CyclotomicQ[z_,n_:200]:=Module[{x},FusionAtlas`CyclotomicTest`Private`PolyCyclotomicTest[MinimalPolynomial[z,x],n,x]]

x

CyclotomicQ[(((x+(x^(-1))))^2)]

Cases[(q/.Solve[f[1]==1]),x_/;Im[x]==0∧x>1]

N[%+((%)^(-1))]

CyclotomicQ[(((%+((%)^(-1))))^2)]

SolveRelativeDimensionsByDepthEquations[FSM[[1]],FSM[[2]],2,d,q]/.q->Root[1-#1-2 ((#1)^3)+((#1)^4)-3 ((#1)^5)+2 ((#1)^6)-3 ((#1)^7)+((#1)^8)-2 ((#1)^9)-((#1)^11)+((#1)^12)&,2]/.(a_->b_):>(N[b])

Cases[(q/.Solve[f[1]==Cos[2π/6]]),x_/;Im[x]==0∧x>1]

N[%+((%)^(-1))]

CyclotomicQ[(((%+((%)^(-1))))^2)]

SolveRelativeDimensionsByDepthEquations[FSM[[1]],FSM[[2]],2,d,q]/.q->√Root[1-#1-2 ((#1)^2)-3 ((#1)^3)-13 ((#1)^4)-19 ((#1)^5)-22 ((#1)^6)-38 ((#1)^7)-43 ((#1)^8)-37 ((#1)^9)-43 ((#1)^10)-38 ((#1)^11)-22 ((#1)^12)-19 ((#1)^13)-13 ((#1)^14)-3 ((#1)^15)-2 ((#1)^16)-((#1)^17)+((#1)^18)&,2]/.(a_->b_):>(N[b])

Cases[(q/.Solve[f[1]==Cos[2 2π/6]]),x_/;Im[x]==0∧x>1]

{√Root[1-#1-2 ((#1)^2)-2 ((#1)^3)-4 ((#1)^4)-5 ((#1)^5)-3 ((#1)^6)-5 ((#1)^7)-4 ((#1)^8)-2 ((#1)^9)-2 ((#1)^10)-((#1)^11)+((#1)^12)&,2]}

N[%+((%)^(-1))]

CyclotomicQ[(((%+((%)^(-1))))^2)]

SolveRelativeDimensionsByDepthEquations[FSM[[1]],FSM[[2]],2,d,q]/.q->√Root[1-#1-2 ((#1)^2)-2 ((#1)^3)-4 ((#1)^4)-5 ((#1)^5)-3 ((#1)^6)-5 ((#1)^7)-4 ((#1)^8)-2 ((#1)^9)-2 ((#1)^10)-((#1)^11)+((#1)^12)&,2]/.(a_->b_):>(N[b])

Cases[(q/.Solve[f[1]==Cos[3 2π/6]]),x_/;Im[x]==0∧x>1]

CyclotomicQ[(((#+((#)^(-1))))^2)]&/@%

Cases[(q/.Solve[f[1]==Cos[4 2π/6]]),x_/;Im[x]==0∧x>1]

N[%+((%)^(-1))]

CyclotomicQ[(((%+((%)^(-1))))^2)]

SolveRelativeDimensionsByDepthEquations[FSM[[1]],FSM[[2]],2,d,q]/.q->√Root[1-#1-2 ((#1)^2)-2 ((#1)^3)-4 ((#1)^4)-5 ((#1)^5)-3 ((#1)^6)-5 ((#1)^7)-4 ((#1)^8)-2 ((#1)^9)-2 ((#1)^10)-((#1)^11)+((#1)^12)&,2]/.(a_->b_):>(N[b])

Cases[(q/.Solve[f[1]==Cos[5 2π/6]]),x_/;Im[x]==0∧x>1]

N[%+((%)^(-1))]

N[(Sqrt[2])(((1+(Sqrt[5])))/2)]

CyclotomicQ[(((%+((%)^(-1))))^2)]

SolveRelativeDimensionsByDepthEquations[FSM[[1]],FSM[[2]],2,d,q]/.q->√Root[1-#1-2 ((#1)^2)-3 ((#1)^3)-13 ((#1)^4)-19 ((#1)^5)-22 ((#1)^6)-38 ((#1)^7)-43 ((#1)^8)-37 ((#1)^9)-43 ((#1)^10)-38 ((#1)^11)-22 ((#1)^12)-19 ((#1)^13)-13 ((#1)^14)-3 ((#1)^15)-2 ((#1)^16)-((#1)^17)+((#1)^18)&,2]/.(a_->b_):>(N[b])