(* ::Package:: *)

(************************************************************************)
(* This file was generated automatically by the Mathematica front end.  *)
(* It contains Initialization cells from a Notebook file, which         *)
(* typically will have the same name as this file except ending in      *)
(* ".nb" instead of ".m".                                               *)
(*                                                                      *)
(* This file is intended to be loaded into the Mathematica kernel using *)
(* the package loading commands Get or Needs.  Doing so is equivalent   *)
(* to using the Evaluate Initialization Cells menu command in the front *)
(* end.                                                                 *)
(*                                                                      *)
(* DO NOT EDIT THIS FILE.  This entire file is regenerated              *)
(* automatically each time the parent Notebook file is saved in the     *)
(* Mathematica front end.  Any changes you make to this file will be    *)
(* overwritten.                                                         *)
(************************************************************************)



BeginPackage["FusionAtlas`dTest`",{"FusionAtlas`","FusionAtlas`Bigraphs`"}~Join~If[$VersionNumber<6,{"NumberTheory`AlgebraicNumberFields`"},{}]];


DTest::usage="";


Begin["`Private`"];


AIPolynomial[p_,x_,i_Integer]:=
CoefficientList[p,x][[Length[CoefficientList[p,x]]-i]]


Divides[a_,b_]:=Mod[b,a]==0


dPolynomialQ[p_,x_]:=With[{deg=Length[CoefficientList[p,x]]-1},
And@@Table[Divides[AIPolynomial[p,x,deg]^i,AIPolynomial[p,x,i]^deg],{i,1,deg}]]


dNumberQ[z_]:=Module[{x},dPolynomialQ[MinimalPolynomial[z,x],x]]


DTest[g_GradedBigraph]:=dNumberQ[GlobalEvenDimension[g]]


End[];


EndPackage[];
