Usage » Output

When doing a computation, kht++ usually generates three kinds of output:

  • direct feedback in the terminal;
  • a summary of all computations in form of a .html-file;
  • a folder of the same name as the given .kht-file (without the .kht-suffix) in the same path as the .kht-file, containing all computed data pertaining to this particular .kht-file, namely:
    • .svg-files with pictures of the computed tangles, and
    • text files named cxCKh, cxBNr, and cxKhr containing any computed invariants $\widetilde{\mathrm{CKh}}(L)$ , $\widetilde{\mathrm{BN}}(T)$ , and $\widetilde{\mathrm{Kh}}(T)$ , respectively.

The most user-friendly output is the .html-file, which can be opened directly from your terminal after a computation by re-running the previous command with the added Option -w. The feedback in the terminal is primarily intended for human consumption. The data files, on the other hand, are primarily intended for automatic post-processing, for example via a bash-script. Most optional parameters, such as the ones specifying the field of coefficients, are appended to the names of the data files.

Interpreting the output

Below, we will focus on the invariants of tangles with two ends (i.e. knots and links) and tangles with four ends (i.e. Conway tangles). We will follow the terminology and conventions in [4].

The Khovanov invariant for knots and links

The Khovanov invariant $\widetilde{\mathrm{CKh}}(L)$ of a knot or link $L$ is a complex (a.k.a. type D structure) over the polynomial ring $k[H]$ , where $k$ is some field (or ring) of coefficients. What is usually known as reduced Khovanov homology is the chain complex obtained by setting $H=0$ . When $k$ is a field, irreducible complexes are classified by non-negative integers:

  • $C_0$ consists of a single copy of $k[H]$ (i.e. a single object) with no differential:

  • Given an integer $n>0$ , $C_n$ consists of two copies of $k$ with a single differential which is multiplication by some positive power of $H$ :


The complexes $\widetilde{\mathrm{CKh}}(L)$ carry three gradings: a quantum grading $q$ , a homological grading $h$ , and a third grading $\delta$ . These gradings are also known as a bigrading, since they are related by the identity

\[ \tfrac{1}{2}q=h+\delta \]

For example, the computation for the trefoil knot


looks as follows:

>>> Computation for 'examples/knots/3_1':
1 r1    ↑  ↷ 
| y0     ⤫  ↓ 
| y0     ⤫  ↓ 
| y0     ⤫  ↓ 
5 u1    ↑   ͝
>>> computations for -c2:
Computed cobordism complex with 3 generators in 0.002s.
The complex is already loop-type.
1) h^0 q^2 δ^1 ⬮
2) h^2 q^6 δ^1 ⬮——H—>⬮

Let us got through this output line by line:

  • The first eight lines identify the relevant .kht-file and give us a textual representation of the tangle (see Input)
  • The line >>> computations for -c2: says that the computation was done over the field of 2 elements $\mathbb{Z}/2$ ; see Options for details.
  • The next line gives us some indication for the complexity of the computation and the invariant.
  • The feedback The complex is already loop-type. means that no additional isotopy was necessary to achieve the decomposition into irreducible summands. For more complicated invariants, this might instead read Cleaned-up complex in 10 iterations and 0.000s.
  • The last two lines tell us that $\widetilde{\mathrm{CKh}}(L)$ of the trefoil knot is the direct sum of a copy of $C_0$ and a copy of $C_1$ , shifted in bigradings. For $n>0$ , only the bigrading of the source of the differential is specified.

Invariants for Conway tangles

The Khovanov invariants $\widetilde{\mathrm{BN}}(T)$ and $\widetilde{\mathrm{Kh}}(T)$ of a Conway tangle $T$ are complexes over the quiver algebra $\mathcal{B}$ over some field $k$ . This algebra has two idempotents, which we will denote by and . The morphisms are linear combinations of the following basic morphisms:

  • the two idempotents;
  • positive integer powers of $D$ , going between idempotents of the same type:

    ⬮——D^n—>⬮    or    ⬯——D^n—>⬯ 
  • positive even powers of $S$ , going between idempotents of the same type:

    ⬮~~S^2n~>⬮    or    ⬯~~S^2n~>⬯
  • positive odd powers of $S$ , going between idempotents of opposite types:

    ⬯~~S^2n-1~>⬮    or    ⬮~~S^2n-1~>⬯

Complexes over the $k$ -algebra $\mathcal{B}$ were classified in [4] in terms of cyclic or linear chains of idempotents and and differentials between adjacent idempotents that are labelled alternatingly by powers of $S$ and powers of $D$ , multiplied by some scalar. Here is an example of an irreducible complex over $\mathcal{B}$ :


This should be read cyclically, i.e. the last arrow connects the first generator to the last. Except for the very first arrow, we will always suppress the labels of differentials if those labels are equal to $D$ , $S$ , or $S^2$ .

Let us consider an example. The output for the (2,-3)-pretzel tangle


looks something like this:

>>> Computation for 'examples/pretzeltangles/PT2m3':
1 l1    ↑  ↶ 
| x2    ↑ ↓  ⤬ 
| y0     ⤫  ↑ ↑ 
| x2    ↓ ↑  ⤬ 
5 y0     ⤫  ↑ ↑ 
| x2    ↑ ↓  ⤬ 
7 u1    ↑   ͝
>>> computations for -c2:
Computed cobordism complex with 9 generators in 0.008s.
Cleaned-up complex in 10 iterations and 0.001s.
1) h^-2 q^-7 δ^-3/2 ⬮<—D——⬮<~⬯<—⬯~>⬮—>⬮~>⬮—>⬮~>⬯
Cleaned-up complex in 10 iterations and 0.004s.
1) h^-5 q^-11 δ^-1/2 ⬯~~S~>⬮—>⬮~>⬮<—⬮<~⬯<—     r(1/2) q^-26/3 δ|^-1
2) h^-6 q^-13 δ^-1/2 ⬯~~S~>⬮—>⬮~>⬮—>⬮~>⬯—>⬯<~⬮<—⬮<~⬮<—⬮<~⬯<—     s4(0) q^-8 δ|^-1

The invariant $\widetilde{\mathrm{BN}}(T)$ is always shown first. In this case, it is equal to a linear chain


The specified bigrading at the start of the line is the bigrading of the first generator. The invariant $\widetilde{\mathrm{Kh}}(T)$ consists of two components in our example. Again, only the bigradings of the first generators are given.

Recognition of rational and special components

The components of $\widetilde{\mathrm{Kh}}(T)$ are heavily restricted for any Conway tangle $T$ , at least when working over the field $\mathbb{F}_2$ of two elements. Up to an overall shift in bigrading, each component belongs to one of two families of components, namely rational components and special components [6]. We denote the former by $\mathbf{r}_n(\tfrac{p}{q})$ and the latter by $\mathbf{s}_n(\tfrac{p}{q})$ , where $\tfrac{p}{q}\in\mathbb{Q}\mathrm{P}^1$ is called the slope and $n\in\mathbb{Z}$ the length of the component. We expect this result to hold over all fields. Note that the dichotomy between rational and special curves is very reminiscent of the dichotomy for the Heegaard Floer tangle invariant $\mathrm{HFT}(T)$ [14] [13].

In the last two lines of the output in the previous example, you may have noticed the expressions r(1/2) q^-26/3 δ|^-1 and s4(0) q^-8 δ|^-1. The first of these expressions indicates that kht++ identified the first component as a rational curve of slope $\tfrac{1}{2}$ and length 1; the length is always suppressed from notation if it is equal to 1. The second component was recognized as a special component of length 4 and slope 0. The following quantum gradings are averages of the quantum gradings of all generators in the respective component. The expression δ|^-1 signifies that the vertical $\delta$ -grading of both components is equal to -1; the horizontal $\delta$ -grading would be denoted by δ_; see [6] for details.

Invariants for tangles with more than four ends

Complexes over the cobordism category for tangles with more than four ends are currently poorly understood. Consequently, kht++ does not know how to handle the output in a reader-friendly way. For such tangles, the cobordism complexes are stored in data files of the form cx-<options>. If you would like to understand this output, take a look at the code documentation for the implementation of Bar-Natan's universal cobordism category or get in touch.