(* ::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\\ICERM-2305"];
<< Signatures`


(* ::Input::Initialization:: *)
OPD[BR[n_,l_List]]:=Module[{\[Sigma],f,y,r=PD[]},
\[Sigma]=Range[n];f=Table[0,n];
Do[y=Abs@x; ++f[[\[Sigma][[{y,y+1}]]]]; \[Sigma][[{y,y+1}]]=\[Sigma][[{y+1,y}]] ,{x,l}] ;
\[Sigma]=Range[n];f=Most@FoldList[Plus,1,f+1];
Do[y=Abs@x;
AppendTo[r,If[Sign[x]>0,
X[f[[\[Sigma][[y+1]]]],f[[\[Sigma][[y]]]]+1,f[[\[Sigma][[y+1]]]]+1,f[[\[Sigma][[y]]]]],
X[f[[\[Sigma][[y]]]],f[[\[Sigma][[y+1]]]],f[[\[Sigma][[y]]]]+1,f[[\[Sigma][[y+1]]]]+1]
]];
++f[[\[Sigma][[{y,y+1}]]]]; \[Sigma][[{y,y+1}]]=\[Sigma][[{y+1,y}]] ,
{x,l}];
r]
OPD@BR[Knot[5,2]]


(* ::Input::Initialization:: *)
Kas[b_BR]:=Kas@OPD@b; TL[b_BR]:=TL@OPD@b;



