(* ::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.                                                         *)
(************************************************************************)



(* ::Input::Initialization:: *)
SetDirectory["C:\\drorbn\\AcademicPensieve\\Talks\\Toronto-1811"];
Once[<< KnotTheory`];
tab=Join[{Knot[0,1]->{0., \[DoubleStruckCapitalE][1,0,0,0]}},Get["../../2016-09/tab.m"]];
tab /. (K_->{_,z_}) :> (z1[K]=z);
Ribbons={Knot[0,1],Knot[6,1],Knot[8,8],Knot[8,9],Knot[8,20],Knot[9,27],Knot[9,41],Knot[9,46],Knot[10,3],Knot[10,22],Knot[10,35],Knot[10,42],Knot[10,48],Knot[10,75],Knot[10,87],Knot[10,99],Knot[10,123],Knot[10,129],Knot[10,137],Knot[10,140],Knot[10,153],Knot[10,155]};


(* ::Input::Initialization:: *)
al[K_] := z1[K][[1]];
ap[K_] :=  al[K]/. t^n_./; n<0 :> 0;


(* ::Input::Initialization:: *)
e[K_] := Expand[Together[((t z1[K][[4]] /. c|u|w->0)+al[K]^3 t^2 D[al[K],t])/((t-1)^2 al[K]^2)]];
ep[K_] :=  e[K]/. t^n_./; n<0 :> 0;


(* ::Input::Initialization:: *)
KnotLine[K_] := StringReplace["\\rolcell{n_k}{n^t_{k}}{ap}{ep}{G}{U}{R}{C}", {
"n" -> ToString@K[[1]],
"k" -> ToString@K[[2]],
"t" -> If[AlternatingQ[K], "a", "n"],
"ap"-> ToString[ap[K], FormatType -> TeXForm],
"ep"-> ToString[ep[K], FormatType -> TeXForm],
"G" -> ToString@ThreeGenus@K,
"U" -> ToString@UnknottingNumber@K,
"R" -> If[MemberQ[Ribbons, K], "\\gY", "\\N"],
"C" -> If[MemberQ[{FullyAmphicheiral, NegativeAmphicheiral, ""}, SymmetryType@K], "\\oY", "\\N"]
}]


(* ::Input::Initialization:: *)
Make[n_]:=Make[n,2];
Make[n_,k_] := StringJoin@@Table[
StringJoin[StringJoin@@Riffle[L, " &\n"], " \\\\\n\\hline\n"],
{L, Partition[KnotLine /@ AllKnots[{0,n}], UpTo@k]}
];
Make[6,3]



