Flags and tangles

We show that two constructions yield equivalent braided monoidal categories. The first is topological, based on Legendrian tangles and skein relations, while the second is algebraic, in terms of chain complexes with complete flag and convolution-type products. The category contains Iwahori--Hecke algebras of type $A_n$ as endomorphism algebras of certain objects.

braided monoidal categories with certain extra properties [FY89]. Linearizations of the category of tangles, the passage from classical topology to "quantum topology", come from HOMFLY-PT skein theory. The novelty of this work is to consider legendrian tangles and skein relations to obtain an analog of Turaev's Hecke category [Tur90]. Our main result provides a very different description of this category in terms of complete flags on chain complexes and convolution-type products.
Prelude: Iwahori-Hecke algebras of type A n .
To motivate our later considerations we begin by recalling several points of view (algebraic and topological) on Iwahori-Hecke algebras of type A n , denoted by H n . More details may be found in several places, e.g. the textbook [KT08].
Suppose we want to find a q-deformation of (the group algebra of) the symmetric group S n+1 .
The q-analog of a set X with n + 1 elements is a vector space V of dimension n + 1 over a finite field F q , and the q-analog of a total order on X is a complete flag on V . Let QF l(V ) be the Q-vector space with basis the set of complete flags on V . The q-analog of the transposition (i, i + 1) ∈ S n+1 is the linear operator T i on QF l(V ), i = 1, . . . , n, which takes a complete flag to the sum of the q flags Thus, T i is a sort of random modification at the i-th step. It is easy to see that the relations i = 1, . . . , n − 1 (1.1) T 2 i = (q − 1)T i + q, i = 1, . . . , n (1.3) hold, and these turn out to be a complete set of relations for the subalgebra of End(QF l(V )) generated by the T i . Since the relations are polynomial in q, we can also treat q as a formal parameter and define H n over Z[q ±1 ], as is usually done. Setting q = 1 gives the group algebra of the symmetric group S n , and the definition by generators and relations generalizes to arbitrary Coxeter groups.
The fact that (1.1) and (1.2) are the defining relations of the braid group suggests that we represent elements of H n by braid diagrams with n + 1 strands, where T i corresponds to the braid with a single positive crossing of the i-th and i + 1-st strand. The relation (1.3) is then equivalent, modulo the second Reidemeister move, to the skein relation − q = (q − 1) which explains the relevance of H n to knot theory, c.f. Jones [Jon87].
The purpose of this work is to extend the above from vector spaces to Z-graded chain complexes of vector spaces. Instead of defining a single algebra, it is natural to construct a braided monoidal category H, see below. It turns out that this category has a topological interpretation, though somewhat surprisingly we need to use Legendrian tangles instead of ordinary (topological) tangles.
The use of Legendrian tangles was suggested by the work by the author, where homomorphisms are constructed from Legendrian skein algebras to Hall algebras of Fukaya categories [Hai]. This text is, for the most part, logically independent from [Hai]. We anticipate that the braided monoidal categories defined here will be useful in gluing "frozen" variants of the skein algebras and Hall algebras from [Hai].
The monoidal category H Let us first describe the construction in terms of flags on chain complexes. Fix a finite ground field k = F q , then the monoidal category H is defined as follows.
• Objects: Finite-dimensional Z-graded vector spaces V = i∈Z V i over k together with a complete flag of graded subspaces • Morphisms: Hom H (V, W ) is the Q-vector space with basis the set B(V, W ) of equivalence where Hom −i <0 (V, V ) denotes homogeneous maps of degree −i sending F j V to F j−1 V , and the sum runs over all isomorphisms of chain complexes with complete flag, b : (V, d V ) → (V, d ′ V ), i.e. preserving the grading, the differential, and the flag. Extend this product bilinearly to all morphisms. The origin of this formula is discussed in Subsection B.2.
• Monoidal product of morphisms: This is essentially the Hall algebra product for dgcategories, see Subsection B.1. If U, V, X, Y ∈ Ob(H), (d U , f, d V ) represents a morphism U → V , and (d X , g, d Y ) represents a morphism X → Y then where the sum is over δ = (δ 11 , δ 12 , δ 22 ) ∈ Hom 1 (X, U ) ⊕ Hom 0 (X, V ) ⊕ Hom 1 (Y, V ) with d U δ 11 + δ 11 d X = 0, To relate this to the Iwahori-Hecke algebra of type A n we note that for the object of H given by a vector space V = k n+1 concentrated in degree zero and with the standard complete flag we have where B is the subgroup of upper triangular matrices and the second equality is the Bruhat decomposition. Moreover, the algebra Hom H (V, V ) is just H n , specialized to a prime power q.
Proposition 1.1. H as defined above is a monoidal category.
The proof of this proposition is completed in Subsection 2.2. The equivalence with the category S| q (see below) shows that H has a natural braiding.

The monoidal category S
The braided monoidal category S is defined in terms of graded Legendrian tangles. Before giving the definition we recall some basic terminology from Legendrian knot theory. A Legendrian curve L in R 3 is an embedded curve which is everywhere tangent to the contact distribution Ker(dz − ydx).
The front projection of L is the image under the projection to the (x, z)-plane. For generic compact Legendrian curve the front projection is locally the graph of a smooth function z(x) except near a finite set of singular points which are either simple crossings (×), left cusps (≺), or right cusps (≻).
A grading or Maslov potential for a Legendrian curve is given, in terms of the front projection, by a labeling of the strands connecting cusps by integers such that at each cusp the number assigned to the lower strand is one greater than the number assigned to the upper strand.
We now come to the definition of S.
• Objects: Finite Z-graded subsets X of R up to isotopy (A Z-grading is simply a function deg : X → Z.) • Monoidal product of objects: X ⊗ Y is obtained by stacking Y on top of X, which is well defined up to isotopy.
• Morphisms: Hom S (X, Y ) is the module over Z[q ± , (q − 1) −1 ] generated by isotopy classes of tangles L with ∂ 0 L = Y and ∂ 1 L = X modulo the following skein relations, where δ m,n is the Kronecker delta. These are relations between tangles which are identical except inside a small ball where they differ as shown.
(The vertically flipped variant of (S1) already follows from (S1) and legendrian isotopy.) • Composition: Horizontal composition (concatenation) of tangles • Monoidal product of morphisms: Vertical composition (stacking) of tangles • Braiding: The braiding morphism X ⊗ Y → Y ⊗ X is given by the following tangle (with grading determined by X and Y ). We note that this is not an isomorphism in general, so gives a braiding only in a weak sense, i.e. representing the positive braid monoid only instead of the full braid group.
The following proposition is automatic.
Proposition 1.2. S as defined above is a braided monoidal category.
The local description of front projections of Legendrian curves immediately implies that morphisms in S are generated by the following elementary tangles under horizontal and vertical composition.
(1.7) left and right boundary, as opposed to vertically. The composition of morphisms f : X → Y and g : Y → Z is usually written in the order g • f . Given tangles f, g, if we want g • f to be the tangle with g on the left and f on the right, then the source of the tangle must be on the right and the target on the left, which is the convention adopted here.

Main result
Fix a finite field k = F q and consider Q as an algebra over R := Z[t ± , (t − 1) −1 ] via the homomorphism R → Q which sends the formal variable t to the prime power q. Let S| q be the category obtained from S by base change to Q. Thus, Ob(S| q ) = Ob(S) and morphisms in S| q are Q-linear combinations of tangles modulo skein relations in which q is a prime power. A Q-linear functor of monoidal categories from S| q is determined by its value on objects and elementary tangles. We claim that there is a functor Φ : S| q → H defined on objects by mapping a graded subset X ⊂ R to the graded vector space V with basis the elements of X, and filtration F i V := Span(x 1 , . . . , x i ) where x i is the i-th (smallest) element of X, and on elementary tangles as follows: Note that the shift of a graded vector space is by definition/convention given by (V [n]) k := V k+n , so k[−n] is concentrated in degree n. The following theorem is the main result of this paper.
Theorem 1.3. The above rules define a monoidal functor Φ : S| q → H which is an equivalence of categories.

Outline
In section 2 we check that H is a monoidal category and study some of its properties. The goal of Section 3 is to obtain a more explicit description of the Hom-spaces in S using ideas from Legendrian knot theory. The heart of the paper is Section 4, in which we check that Φ is well-defined,  the Bruhat decomposition and is contained in work of Barannikov [Bar94]. To state the result we introduce some terminology.

Chain complexes with complete flag
Definition 2.1. Let X be a finite, totally ordered, Z-graded set. A partial ruling on X is given by a subset D ⊂ X and an injective function δ : D → X \ D such that δ(i) < i and deg δ(i) = deg i + 1 for all i ∈ D. A partial ruling is a ruling if X = D ∪ δ(D).
A Z-graded vector space V with complete flag F • V is classified by the set Φ −1 V := {1, . . . , n}, n := dim V , with the usual total order and grading such that i ∈ X has the same degree as the  for all i, k. The left-hand side above is a i,δ(k) if k ∈ D and i ≤ δ(k) and vanishes otherwise, and similarly the right-hand side is a δ −1 (i),k if i ∈ δ(D) and δ −1 (i) ≤ k and vanishes otherwise. It follows that Ad = dA is equivalent to the following list of relations.
Picture pairs (i, k) as positions in an n × n-matrix, then the first three types of relations correspond to those pairs (i, k) which are above or to the right of a pair of the form (δ(j), j). Thus, as an abstract algebraic variety, the group Aut(V, d) of automorphisms of V preserving the grading, the flag, and the differential d is 2.2 The proof of Proposition 1.1 The composition (1.5) is easily seen to be well-defined and associative.
Lemma 2.3. The identity 1 V of V ∈ H is given by is an isomorphism of filtered chain complexes is in bijection, via projection to the first factor, with the subgroup of invertible elements Recall the definition of the monoidal product from the introduction. The condition on δ = (δ 11 , δ 12 , δ 22 ) can be stated more conceptually as the requirement of being a closed morphism of ) in the derived dg-category of the A 2 quiver, D(A 2 ), as defined in Subsection B.1 in the appendix. In fact, the monoidal product is the Hall algebra product for this dg-category (or rather its full subcategory of perfect objects), hence welldefinedness and associativity are general facts. Another consequence is the following cohomological formula for the monoidal product.
Lemma 2.4. With the notation as in the definition of the monoidal product, the morphism where the sum is over h 11 : X → U and h 22 : Y → V of degree 0 and h 12 : X → V of degree -1. Then where the first and second block matrices are grading and filtration preserving automorphisms of U ⊕ X and V ⊕ Y , respectively, and the third is a homotopy between the quasi-equivalences For the second claim note that the projection is a quasi-isomorphism since f and g are quasi-isomorphism and thus the two representation are contained in a full subcategory of D(A 2 ) which is quasi-equivalent to the category of chain complexes.
In general, if C is a finite-dimensional chain complex over k with cohomology H(C) then for any class ω ∈ H 1 (C). Combining these two fact we get where the first sum is over cocycles and the second over cohomology classes, which together show the claimed formula.
Proof. The product on the left-hand side of (2.3) is a weighted sum over certain 9-tuples of maps where horizontal and vertical arrows are chain maps and squares commute up to homotopies given by diagonal arrows. Here, the differentials on U and the first copy of V and g 2 come from α, and similarly the other differentials and f 2 , g 1 , f 1 from β, γ, δ respectively. The product on the right-hand side of (2.3) is a weighted sum over certain 5-tuples of maps where horizontal and vertical arrows are chain maps and the square commute up to homotopy given by c 12 . The condition on the c ij , given a 1 , a 2 , is precisely that they give a closed morphism of degree one (c 11 , c 12 , c 22 ) ∈ Hom 1 D(A 2 ) (X → Z, U → W ) in the dg-category of representations of the A 2 quiver (• → •) defined in Appendix A. Similar, the condition on the b ij , given a 1 , a 2 , is that they given a closed morphism of degree one in the dg-category of representations of the A 4 quiver (• → • → • → •). Furthermore, let then the left-hand side of (2.3) is We claim that the equivalence classes of the morphisms (triples) which appear as summands in (2.6) and (2.7), which we denote by T (b) and T (c), depend only on the classes of , respectively (as well as other maps and differentials involved). This is very similar to what was proven in Lemma 2.4, in particular in the case of c. In the case of b one has to use the homotopy given by Next, note that all horizontal arrows in (2.4) (which are the same as those in (2.5)) are quasiisomorphisms, and thus there are quasi-isomorphisms of Hom-complexes providing an isomorphism | using the quasi-isomorphism above and (2.2). Putting everything together, we have The second part, 1 V ⊗W = 1 V ⊗ 1 W , is proven using the quasi-isomorphism where the complex on the left appears in the definition of 1 V ⊗W and the complex on the right appears in the product 1 V ⊗ 1 W . The identity also follows from (4.1) or (4.2) below.

Dualities
Given a triple (d V , f, d W ) there are two natural duals to take: induced by vector space duality. In this subsection we show that these two operations induce contravariant autoequivalences from H to itself which are compatible with the monoidal product.
We first discuss the functor D : H → H which is the identity on objects and acts on morphisms by (2.8). Contravariance with respect to composition in H uses only the fact that . It is also clear that D preserves identities.
Proposition 2.6. The functor D is covariant with respect to the monoidal product. f commuting up homotopy given by δ 12 . We can interpret the triple (g, δ 12 , f ) as a closed morphism ) and it has an inverse up to homotopy denoted ( with the properties of the previous one. Moreover, the map which sends (δ 11 , δ 12 , δ 22 ) to (δ 22 , δ ′ 12 , δ 11 ) induces an isomorphism compatible with the identification of both spaces with Ext 1 ((X, d X ), (U, d U )). Setting and using Lemma 2.4 and the notation T (δ) in its proof we compute where the sums are over We turn to the second duality, (2.9). The functor acts on objects by V → V ∨ , sending a graded vector space to its dual in the graded sense and with the dual complete flag given by where Ann(W ) ⊂ V ∨ denotes the annihilator of W ⊂ V . We also write this as Ann V (W ) if the choice of ambient space needs to be emphasized.
The assignment V → V ∨ on objects in H is contravariant with respect to the monoidal product of objects, i.e.
as graded spaces with flag, where the identification comes from the usual isomorphism (V ⊕ W ) ∨ ∼ = W ∨ ⊕ V ∨ . Indeed, on the left hand side we get the flag which under the identification above is the same as which we get on the right hand side.
We note that taking the dual of a map of graded vector spaces gives an isomorphism which moreover send flags-preserving morphisms to flag-preserving ones if V and W are equipped with flags and V ∨ and W ∨ with the dual ones. Using this fact it is straightforward to see that the functor (2.9) is contravariant with respect to both the composition and the monoidal product of morphisms.

Cones
There is an identification using the fact that the cone over a quasi-isomorphism is an acyclic complex. The isomorphism (2.10) can alternatively be written in terms of horizontal and vertical composition as follows. Let where d ranges over flag preserving differentials on W . Note the similarity with (2.1).
where the sum ranges over differentials d : and a change of basis eliminates the δ 12 term, giving Next we compute the horizontal product with β W , where we rename the d in β W to ε to prevent a clash of notation. Non-zero terms come from invertible upper-triangular matrices B = b 11 b 12 so several terms cancel giving the desired formula. Using is a grading-preserving bijection.

The category S
The goal of this section is to obtain explicit bases of Hom S (X, Y ). In the first subsection we discuss how to reduce the problem to the case Y = ∅. In Subsection 3.2 we provide a small spanning set for Hom S (X, ∅). In Subsection 3.3 we define rulings of tangles with right boundary only, which give a way to construct a natural basis of Hom S (X, ∅). The final subsection describes two dualities of the category S which are used to simplify proofs later.

Bending tangles
Given a graded Legendrian L and n ∈ Z denote by L[n] the same underlying Legendrian curve but with the grading k on each strand replaced by k − n. This induces an autoequivalence of S. There is a canonical isomorphism (even without imposing skein relations) which takes a tangle, L, and reattaches the left end at the right boundary below the right end of L. This operation looks simpler when viewed under Lagrangian projection and assuming that the boundary X and Y [−1] are placed at an offset in the y direction. The argument to show this operation is a bijection on Legendrian isotopy classes is then the usual straightening of a cap-cup.

Generating the skein
The following gives an upper bound on Hom S (X, ∅) which will be used in the next subsection to determine a basis. Proof. We will arrive at the statement of the lemma via a route of successively stronger claims.
This follows from the proof in [Rut06, Section 3]. Roughly, the idea is to consider the leftmost right cusp as part of a tangle mirror to the one in Figure 3. Moreover, a given tangle L without right cusps can be written as a linear combination of such tangles which have the same number or less crossings than L.
Using the first claim we may restrict to tangles without right cusps. One considers the rightmost left cusp as part of tangle as in Figure 3.2 and the basic tangle, necessarily a crossing, immediately to the right of it. As before, the case-by-case analysis in [Rut06] shows one can reduce the number of crossings to the right of the cusp without increasing the total number of crossings.
3. Claim: Hom S (X, ∅) is generated by tangles which are a composition L n • · · · • L 1 of tangles L 1 , . . . , L n as in Figure 3.2 and if k ∈ {1, . . . , n} such that L k contains the left cusp whose bottom strand connects to the lowest point in X then n 2 = 0 for L k and n 3 = 0 for L 1 , . . . L k−1 .
Let L be a tangle without right cusps. We show by induction on the number of crossings in L that it may be written as a linear combination of tangles as in the statement of the claim. By the previous claim we may assume that L is a composition L n • · · · • L 1 of tangles L 1 , . . . , L n as in Figure 3.2. Let k ∈ {1, . . . , n} such that L k contains the left cusp whose bottom strand connects to the lowest point in X. The skein relation (S1) allows us to decrease n 2 for L k , should it be positive, modulo terms which have less crossings and are thus taken care of by induction, until n 2 = 0. Similarly we may decrease n 3 for L 1 , . . . , L k−1 using (S1) until reaching a tangle as in the statement of the claim.
Finally, suppose L = L n • · · · • L 1 is as in the third claim, then we can use a Legendrian isotopy to move the left-cusp in L k to the right past all the left cusps in L 1 , . . . , L k−1 giving a tangle which factors into a tangle as in Figure 3.2 with n 1 = n 2 = 0 and a tangle with two boundary points less.
The lemma follows by induction on |X|.

Rulings
Counting rulings of Legendrian links provide a way of extracting invariants under isotopy and skein moves. The technique, originally due to Chekanov-Pushkar [PC05] based on earlier ideas of Eliashberg [Eli87], may be used to find a basis of the skein of tangles, i.e. of Hom S (X, Y ) for any X, Y ∈ Ob(S). This will lead to an alternative definition of Φ and the proof of the main theorem.
Rulings of Legendrian tangles where also considered in [Su18], which generalized several results from Legendrian knot theory to tangles.
Let L be a tangle with ∂ 0 L = ∅. Suppose also that the front projection of L is generic in the sense that all singularities are cusps and simple crossings and project to distinct points on the x-axis.
A (graded, normal) ruling ρ of L is given by a collection of closed intervals I i ⊂ [0, 1] and piecewise smooth functions α i , β i : I i → R, i = 1, . . . , n such that 1) The graphs of α i , β i are contained in the front projection of L.

5) At
Proof. On needs to check invariance under three types of moves: 1) a cusp/crossing passing over another cusp/crossing (coinciding x-coordinate), 2) Reidemeister moves (see Figure 3.4), and 3) skein moves. This is a lengthy but straightforward case-by-case analysis, c.f. [PC05], which we omit since invariance will follow instead from Proposition 4.3 which gives an alternative definition of ν X .
Our next goal is to show that ν X is an isomorphism, and thus Hom S (X, ∅) has a basis given by Proof. We prove the statement by induction on the size |X| of X ∈ Ob(S). The base case |X| = 0 follows from the fact that Hom S (∅, ∅) is generated by the empty link, a special case of Lemma 3.1.
Also, if |X| is odd then Hom S (X, ∅) = 0 and R(X) are empty.
In the general case let y ∈ X be the smallest element and where a ruling of X \ {x, y}, extended by δ(x) = y, gives a ruling of X. Consider the diagram where the left vertical arrow is given on Hom S (X \ {x, y}, ∅) by composition on the right with a tangle of the form shown in Figure 3.2 with n 1 = n 2 = 0 and the right vertical arrow is defined so that the diagram commutes, which is possible since the top horizontal arrow is an isomorphism by the induction hypothesis. The left vertical map is surjective by Lemma 3.1. Hence, it suffices to show that the right vertical map is an isomorphism to conclude that ν X is an isomorphism.
Choose a total order on each of the sets R (X \ {x, y}), y ∈ J. This, together with the rule that δ −1 (y) < δ ′−1 (y) =⇒ δ < δ ′ and (3.3) determines a total order of R(X), thus an ordered basis on R R(X) . We also have a corresponding basis of x∈J R R(X\{x,y}) of the same size. The matrix of the right vertical arrow in the diagram with respect to these bases is block upper triangular with diagonal blocks which are scalar multiples of the identity. The scalars on the diagonal are of the form q m (q − 1) n , so in particular units in R. This follows from considering how a ruling of a tangle L with ∂ 1 L = X \{x, y} extends to a ruling of L composed with a tangle as in Figure 3.2. The coefficients in the diagonal blocks come from extensions of rulings without additional switches.
where D + n := {y + n | y ∈ Y } is the translated set. 2) The lower path encounters a switch, so both paths end at Y .
3 i.e. if j ∈ D, δ(j) > i or i ∈ δ(D), δ −1 (i) < j, and a departure otherwise. Thus, in total, we get a contribution q a(D,δ) from crossings which are not switches.

Dualities
The standard contact form dz − ydx on R 3 is invariant under (x, y, z) → (−x, −y, z) and switches sign under (x, y, z) → (x, −y, −z), thus induce maps on legendrian curves denoted by D v and D h respectively. We can upgrade these to maps of graded legendrian curves by the following rule: For D v keep the same integers on the strands and for D h reverse the sign of the integers on the strands. This rule is essentially forced, up to overall shift, by the condition on the grading near cusps, c.f. the discussion on grading in the introduction.
We claim that the maps D v and D h are compatible with the skein relations (S1), (S2), and (S2). This is fairly easy to see except perhaps for D v and (S1), but obvious for the relation equivalent to (S1) (up to legendrian isotopy) found in the proof of Proposition 4.2. Thus D v and D h give functor from S to itself where D v acts as the identity on objects and is contravariant with respect to composition and covariant with respect to the monoidal product, and D h acts on objects by  2. The tangle 1 X ⊗ λ n ⊗ 1 Y maps to where the sum is over all matrices B giving a filtration decreasing differential on V ⊕ W .

Let
where the sum is over all matrices B giving a filtration decreasing differential on V ⊕ E ⊕ W where T = 0 1 1 0 and the sum is over all matrices B giving a filtration decreasing differential on V ⊕ E ⊕ W and such that B 22 = 0.
Proof. We begin by computing the monoidal product of a general morphism with a morphism of the form (d, 1, d). We claim that (4.1) where the sum is over δ 11 ∈ Hom 1 (X, U ) with d U δ 11 + δ 11 d X = 0.
To see (4.1) apply the definition of ⊗ which gives This becomes (4.1) after noting that the Hom −i (X, U ) and Hom −i−1 (X, U ) terms in the product cancel except for Hom 0 (X, U ) −1 and that a shear transformation on X ⊕ U can be applied to remove δ 12 ∈ Hom 0 (X, U ). The proof of (4.2) is similar. We continue with the individual basic tangles.
2. Using (4.1) and (4.2) we get 3. With B 22 as in the statement of the lemma we can write Again we apply (4.1) and (4.2) which after some rearranging of the products gives 4. This follows again from (4.1) and (4.2) and as in the statement of the lemma.
From this, the value of Φ on a tangle which is presented as a horizontal composition of basic tangles is fixed by the requirement that Φ is a functor.
Proposition 4.2. The above rules define a unique functor Φ : S| q → H of monoidal categories.
This functor is compatible with the dualities: the functor V → V ∨ induced by vector space duality, see (2.9).
Proof. Note that the value of Φ on elementary tangles is compatible with the dualities, so compatibility with dualities for general morphisms follows from their covariance/contravariance properties once we have shown that Φ is well-defined.
We first check invariance of Φ under planar isotopy. Any planar isotopy is a composition of the following basic moves: a cusp/crossing passing over another cusp/crossing (i.e. switching the order of their projection to the x-axis). Invariance of Φ thus follows immediately from the fact that H is monoidal, more specifically that identities of the form so we need to show that holds. We claim that both sides are equal to (q − 1) −3 (0, e 13 + e 22 + e 31 , 0) and will show this for the left-hand side, the calculation for the right-hand side being similar.
To simplify the calculation, note first that while each factor on the left hand side of (4.4) potentially has terms with non-zero differential, these do not contribute to the final product. Furthermore, a five-term product of matrices of the form (q − 1) 6 τ k,m τ k,n τ m,n τ m,k τ m,n τ k,n while from the vertical product used to form each factor (or Lemma 4.1) we get (τ k,m τ k,n τ m,n τ m,k τ m,n τ k,n ) −1 which shows that the end result comes with a factor (q − 1) −3 .
(S1) Modulo Reidemeister moves, the first skein relation can also be written as We verify the cases m = n, m = n + 1, and m = n, n + 1 separately. For n = m we compute Φ(σ n,n )Φ(σ n,n ) = (q − 1) −4 (0, T, 0)(0, T, 0) while for m = n, n + 1 we have Φ(σ m,n )Φ(σ n,m ) = (q − 1) −2 τ n,m (0, 1, 0) = q (−1) m−n Φ(1 m ⊗ 1 n ) where we used that τ m,n τ n,m = q (−1) m−n for m = n.  Suppose first that B has a left cusp, is given by where, if ∂ 0 ρ n = {y, z} with y < z, then (D ′ , δ ′ ) is the extension of the ruling (D, δ) of Y ⊗ Z with D ′ = D ∪ {z} and δ ′ (z) = y. It follows from Lemma 4.1 that composition with ΦB on the right has the same effect, i.e. maps (d(D, δ), 0, 0) to (q − 1) −1 (d(D ′ , δ ′ ), 0, 0). To see this, note that in the formula for ΦB the set of triples which appear is preserved under the action of filtration-preserving automorphisms on the target V ⊕ W . Thus in the formula for the composition in H we do not need to take the sum over all b but just one particular one and add an overall factor counting the number of filtration preserving isomorphisms. Finally note that if we set B = d(D, δ) in the triple in the formula of ΦB from Lemma 4.1, then the differential on the source is d(D ′ , δ ′ ).
Suppose that B has a right cusp, so B = 1 Y ⊗ρ n ⊗1 Z where Y ⊗∂ 0 ρ n ⊗Z = X. Let ∂ 0 ρ n = {y, z} with y < z. The map sends rulings with z ∈ D and δ(z) = y to their restriction to Y ⊗ Z and all other rulings to zero.
From Lemma 4.1 we see by the same argument as in the previous case that composition with ΦB on the right has the same effect.
Finally, suppose that B has a crossing, so B = 1 Y ⊗ σ m,n ⊗ 1 Z where X = Y ⊗ ∂ 0 σ m,n ⊗ Z. Let ∂ 0 σ m,n = {y, z} with ordering y < z and ∂ 1 σ m,n = {z, y} with ordering z < y. The map is described as follows. In the case m = n a ruling (D, δ) gets sent to zero if z ∈ D and δ(z) = y and to τ m,n (D, δ) otherwise. In the case m = n a ruling (D, δ) gets sent to q(D, δ) if when extending the ruling to B without a switch, the crossing becomes a return and to (D, δ) + (q − 1)(D ′ , δ ′ ) if the crossing becomes a departure, where (D ′ , δ ′ ) is obtained from (D, δ) by switching the roles of y and z, i.e. is the same ruling if the two sets are identified via the order preserving bijection. From Lemma 4.1 we see that composition with ΦB on the right has the same effect. Unlike the previous cases, the set triples which appear in the formula for ΦB is not invariant under flag preserving automorphism of the target, but this becomes true when instead of using the fixed T we take the sum over all elements of the form T b where b is a two-by-two upper triangular matrix. The same reasoning as in the previous cases then works. The computation is essentially the same as the one which verified that the skein relation S1 holds in H in the proof of Proposition 4.2.
As the notation suggests, these correspond to one another under Φ.
Proof. This follows from Lemma 3.5, where ν(β Y ) was computed, and Proposition 4.3. Note that it follows from the discussion in Subsection 2.1 that

A Quiver representations
In this section we provide an explicit dg-model for the derived category of representations of a quiver Q. This particular model has the virtue of having small Hom-complexes and comes from computing Ext • (E, F ) by replacing E by its minimal projective resolution. It is well-known to experts, though we could not find a suitable reference. The dg-category will be used as a starting point for the categories defined in the following section.
Fix a (finite) quiver Q with set of vertices Q 0 and an arbitrary field k. Define a dg-category D(Q) of complexes of quiver representations. An object of D(Q) is given by a chain complex (E i , d) (over k) for each vertex i ∈ Q 0 and a chain map T α : E i → E j of degree 0 for each arrow α : i → j.

Given a pair of objects
where Hom(E i , F i ) = k Hom k (E i , F i ) includes homogeneous maps of all degrees. The differential is given by The proof of the following proposition is a straightforward checking of signs and will be omitted.
Proposition A.1. D(Q) is a dg-category.

B Counting in higher categories
A good definition of the cardinality of an essentially finite groupoid G is where Iso(G) = Ob(G)/ ∼ = is the set of isomorphism classes of objects in G and Aut(X) = Hom G (X, X). This idea was generalized to ∞-groupoids, aka homotopy types, by Baez-Dolan [BD01] and we will apply it to dg-categories following Toen [Toe06].
Let C be a dg-category over a finite field F q such that for each X, Y ∈ Ob(C) all Ext i (X, Y ) := H i (Hom • C (X, Y )) are finite-dimensional and vanish for i ≪ 0. In this situation one can define the counting measure, µ # , on the set of isomorphism classes Iso(C) by The set QIso(C) of finite Q-linear combinations of elements in Iso(C) has two interpretations: one as finitely supported functions on Iso(C) and another as finite signed measures on Iso(C). We will adopt the latter here, following Kontsevich-Soibelman [KS, Section 6.1]. Note that Toen [Toe06] uses the former convention. The conversion factor between the two is given by µ # .
Suppose F : C → D is a dg-functor where C and D are F q -linear and satisfy the finiteness conditions as in the previous paragraph. Assume furthermore that F sends only finitely many distinct X ∈ Iso(C) to a given Y ∈ Iso(D). Define induced linear maps F * : QIso(C) → QIso(D) and F ! : QIso(D) → QIso(C) by Ext −i (F X, F X) The maps F * , F ! fit with the "measures" interpretation of QIso(C). For the "functions" interpretation it is more natural to use F * : QIso(D) → QIso(C) and F ! : QIso(C) → QIso(D) defined by (F * f )(X) := f (F (X)) There is a simpler formula for F ! for a special class of functors which was proven in [Hai]. More precisely, in addition to the finiteness conditions already imposed, we will assume that: 1) F is full at the chain level, i.e. the maps Hom • C (X, Y ) → Hom • D (F X, F Y ) are surjective.
2) F has the isomorphism lifting property: Given an isomorphism f : F X → Y in D there is an object Y ∈ Ob(C) with F Y = Y and an isomorphismf : X → Y with F (f ) = f .

3) F reflects isomorphisms:
If F (f ) : F X → F Y is an isomorphism then f is an isomorphism.
(Here an isomorphism is a map which is invertible up to homotopy.) By the first assumption on F we have an exact sequence of cochain complexes for each X, Y ∈ Ob(C), where and thus long exact sequences Given Y ∈ D let F Y be the set of equivalence classes of objects X ∈ C with F X = Y where X ∼ X ′ if there is an isomorphism f : X → X ′ with F (f ) = 1 Y in Hom 0 (Y, Y ) (equivalently: F (f ) = 1 Y in Ext 0 (Y, Y )).
Lemma B.1. Let F : C → D be an dg-functor satisfying the above conditions, then for any Y ∈ QIso(D).
See [Hai] for the proof in the more general case of A ∞ -categories.

B.1 Hall algebra
The monoidal product in the category H turns out to be a special case of the Hall algebra product for dg-categories, which in particular implies its associativity by general results which we recall in this subsection.
Let C be a dg-category over a finite field F q satisfying the finiteness conditions as above. Assume furthermore that C is triangulated, i.e. closed under shifts, cones, and has a zero object. Then we have a diagram of categories and functors where C A 2 is the category of exact triangles in C, whose objects can be concretely represented by Lemma B.1 provides the following explicit formula for the product.
The vector space QIso(C) together with this product is called the Hall algebra of C, denoted Hall(C). This is an associative algebra, see [Toe06] or [Hai] for a short proof, with unit the class of the zero object 0 ∈ Ob(C).

B.2 Deriving the formula for composition in H
Fix an arbitrary field k. We begin by defining dg-categories F n for each integer n ≥ 1, whose objects are roughly speaking given by an object of Perf(k) with n complete flags, in the sense of triangulated categories, on it. Formally, an object of F n is given by n chain complexes with complete flags (C i , d, F • C i ), i = 1, . . . , n and quasi-isomorphisms φ i : C i → C i+1 , i = 1, . . . , n − 1. Forgetting the flags, the C i and φ i given an object in D(A n ), where A n is the quiver with underlying graph the A n Dynkin diagram and all arrows oriented in the same direction. A morphism of degree k in D(A n ) has components f i : C i → D i , i = 1, . . . , n, of degree k and g i : C i → D i , i = 1, . . . , n − 1 of degree k − 1 fitting into a diagram f 2 g 2 φ n−1 g n−1 fn ψ 1 ψ 2 ψ n−1 were for a closed morphism each square commutes up to chain homotopy given by g i . We define morphisms in F n to be the subset of those morphisms in D(A n ) such that f i (F j C i ) ⊆ F j D i . The differential and composition in F n are defined as for D(A n ).
Assume from now on that k = F q is a finite field. To make contact with the definition of H consider for given V 1 , . . . , V n ∈ Ob(H) the full subcategory F n (V 1 , . . . , V n ) ⊂ F n of objects with