A surgery formula for knot Floer homology

Let $K$ be a rationally null-homologous knot in a $3$-manifold $Y$, equipped with a nonzero framing $\lambda$, and let $Y_\lambda(K)$ denote the result of $\lambda$-framed surgery on $Y$. Ozsv\'ath and Szab\'o gave a formula for the Heegaard Floer homology groups of $Y_\lambda(K)$ in terms of the knot Floer complex of $(Y,K)$. We strengthen this formula by adding a second filtration that computes the knot Floer complex of the dual knot $K_\lambda$ in $Y_\lambda$, i.e., the core circle of the surgery solid torus. In the course of proving our refinement we derive a combinatorial formula for the Alexander grading which may be of independent interest.


Introduction
Let K be a rationally null-homologous knot in a 3-manifold Y . Let λ be any framing on K, and let Y λ (K) denote the result of λ-framed surgery along K. In [41, 42], Ozsváth and Szabó gave a formula for the Heegaard Floer homology groups of Y λ (K) in terms of the knot Floer complex CFK ∞ (Y, K). This formula has been one of the most important tools in the Heegaard Floer toolkit. Not only has it has been the primary method of computation for many specific examples of Floer homology groups [2,8,12,15,18,22,27], but the existence of the formula indicates that the knot Floer homology invariants tightly constrain the Floer invariants of manifolds obtained by surgery, and conversely. This interplay between the two invariants, coupled with the rich geometric content of both, has led to striking new applications in Dehn surgery. For instance, it has given rise to interesting new surgery obstructions [17,14,45] and led to significant progress on the cosmetic surgery conjecture [47,48,31], exceptional surgeries [3,16,23,28,32,49], and the Berge Conjecture [1,7,44]. The surgery formula was subsequently generalized by Manolescu and Ozsváth [25] to surgeries on links, which results in a combinatorial (albeit largely impractical) algorithm for computing all versions of Heegaard Floer homology for any 3-manifold [26].
Let K λ ⊂ Y λ (K) denote the core circle of the surgery solid torus, often called the dual knot. In this paper, we strengthen Ozsváth and Szabó's results to provide a formula for CFK ∞ (Y λ (K), K λ ), provided the framing is nonzero. Specifically, we define a second filtration on the chain complex defined by Ozsváth and Szabó, and we show that it agrees with the Alexander filtration induced by K λ .
Some special cases of our formula are already known and have had numerous applications. In [6], the first author established a limited version of our formula, addressing the significantly easier computation of the "hat" knot Floer homology groups of the dual knot in sufficiently large surgery, and used this computation to derive a formula for the knot Floer homology of Whitehead doubles in terms of the complex of the companion knot. In [7], the same formula was used to derive an obstruction to lens space surgeries in terms of the dual knot, namely that the dual knot must have simple Floer homology (c.f. [44]); this result is central to Baker-Grigsby-Hedden's approach to the Berge conjecture [1]. Also, in joint work with Plamenevskaya [11], the "hat" formula was used to provide criteria for manifolds obtained by Dehn surgery on fibered knots to admit tight contact structures. Subsequently, Kim, Livingston, and the first author [8] extended the preceding result to describe the full complex CFK ∞ (Y λ (K), K λ ) for sufficiently large surgeries, established that a framing coefficient that is twice the genus of K is "sufficiently large," and used the surgery formula as the key tool in d-invariant computations that verified the existence of 2-torsion in the subgroup of smooth concordance generated by topologically slice knots.
Most recently, Hom, Lidman, and the second author [15] have used our main theorem (Theorem 1.1) to provide an example of a knot in a homology sphere which has infinite order in the non-locally-flat piecewise-linear concordance group. The reader is encouraged to refer to that paper for a detailed computation using this formula, which illustrates the general technique.
1.1. Statement of the theorem. In order to state the main theorem, we start by quickly establishing some terminology and notation. We will fill in more details in Section 3.
Assume that K represents a class of order d > 0 in H 1 (Y ; Z). Fix a tubular neighborhood nbd(K). Let µ ⊂ ∂(nbd(K)) be a right-handed meridian of K.
A relative spin c structure is a homology class of nowhere-vanishing vector fields on Y nbd(K) which is tangent to the boundary along ∂(nbd(K)). The set of relative spin c structures is denoted Spin c (Y, K) and is an affine set for H 2 (Y, K). (This set does not depend on the orientation of K.) Given an orientation, Ozsváth and Szabó define a map G Y,K : Spin c (Y, K) → Spin c (Y ), which is equivariant with respect to the restriction map The fibers of G Y,K are precisely the orbits of Spin c (Y, K) under the action of PD[µ] ⊂ H 2 (Y, K; Z). The Alexander grading of each ξ ∈ Spin c (Y, K) is defined as where F is a rational Seifert surface for K, and · denotes the intersection pairing between H 1 (Y K) and H 2 (Y, K). For each s ∈ Spin c (Y ), the values of A Y,K (ξ), taken over all ξ ∈ G −1 Y,K (s), form a single coset in Q/Z, which we denote by A Y,K (s). Indeed, any ξ ∈ Spin c (Y, K) is uniquely determined by the pair (G Y,K (ξ), A Y,K (ξ)).
Let F denote the field of two elements. The knot Floer complex of (Y, K) is a doublyfiltered chain complex CFK ∞ (Y, K), defined over F[U, U −1 ], which is invariant up to doubly-filtered chain homotopy equivalence, with a decomposition CFK ∞ (Y, K) = s∈Spin c (Y ) CFK ∞ (Y, K, s).
The two filtrations are denoted by i and j. Our conventions are slightly different from Ozsváth and Szabó's: on each summand CFK ∞ (Y, K, s), i is an integer, while j takes values in Z+A Y,K (s). The action of U decreases both filtrations by 1. By ignoring the j filtration, we have CFK ∞ (Y, K, s) = CF ∞ (Y, s); in particular, the groups HF − (Y, s), HF + (Y, s), and HF(Y, s) are the homologies of the i < 0 subcomplex, the i ≥ 0 quotient, and the i = 0 subquotient, respectively. If s is a torsion spin c structure, then CFK ∞ (Y, K, s) also comes equipped with an absolute Q-grading gr that lifts a relative Z-grading; the differential has grading −1, and multiplication by U has grading −2.
For each ξ ∈ G −1 Y,K (s), there is a "flip map" Ψ ∞ ξ : CFK ∞ (Y, K, s) → CFK ∞ (Y, K, s + PD[K]), a filtered chain homotopy equivalence that is an invariant of the knot K up to filtered chain homotopy. (See Lemma 2.12 for the precise sense in which Ψ ∞ ξ is filtered.) An (integral) framing on K is specified by a choice of longitude λ, which we may view as a curve in ∂(nbd(K)). As elements of H 1 (∂(nbd(K))), we have ∂F = dλ − kµ for some k ∈ Z; the framing determines and is determined by k. Let Y λ = Y λ (K) denote the manifold obtained by λ-framed surgery on K. The meridian µ is isotopic to a core circle of the glued-in solid torus. Let K λ denote this core circle, with the orientation inherited from the left-handed meridian −µ. The sets Spin c (Y, K) and Spin c (Y λ , K λ ) are canonically identified, since they depend only on the complement. The orientation of K λ induces a map G Y λ ,K λ : Spin c (Y λ , K λ ) → Spin c (Y λ ) whose fibers are the orbits of the action of PD [λ].
Assume henceforth that k = 0. Choose a spin c structure t on Y λ (K). Let us index the elements of G −1 Y λ ,K λ (t) by (ξ l ) l∈Z , where ξ l+1 = ξ l + PD [λ]. Let s l = G Y,K (ξ l ) and s l = A Y,K (ξ l ). Then s l+1 = s l + PD [K] (so that the sequence (s l ) l∈Z repeats with period d), while s l+1 = s l + k d . We pin down the indexing by the conventions Moreover, it is easy to see that For each l ∈ Z, let A ∞ ξ l and B ∞ ξ l each denote a copy of CFK ∞ (Y, K, s l ). Define a pair of filtrations I t and J t and an absolute grading gr t on these complexes as follows: For [x, i, j] ∈ A ∞ ξ l , I t ([x, i, j]) = max{i, j − s l } (1.5) J t ([x, i, j]) = max{i − 1, j − s l } + 2ds l + k − d 2k (1.6) gr t ([x, i, j]) = gr([x, i, j]) + (2ds l − k) 2 4dk + 2 − 3 sign(k) 4 (1.7) The values of I t are integers, while the values of J t live in the coset A Y λ ,K λ (t). Let A − ξ l (resp. B − ξ l ) denote the subcomplex of A ∞ ξ l (resp. B ∞ ξ l ) generated by elements with I < 0, and let A + ξ l (resp. B + ξ l ) denote the quotient by this subcomplex; these agree with the definitions from [42].
Let v ∞ ξ l : A ∞ ξ l → B ∞ ξ l denote the identity map, and let h ∞ ξ l : A ∞ ξ l → B ∞ ξ l+1 denote the "flip map" Ψ ∞ ξ l described above. Both v ∞ ξ l and h ∞ ξ l are filtered with respect to both I t and J t and homogeneous of degree −1 with respect to gr t ; this is obvious for v ∞ ξ l , and for h ∞ ξ l it is Lemma 3.1 below. It is simple to check that v ∞ ξ l and h ∞ ξ l are homogeneous of degree −1 with respect to gr t .
If k > 0, then for any integers a ≤ b, define a map which is the sum of all the terms v ∞ ξ l (for l = a+1, . . . , b) and h ∞ ξ l (for l = a, . . . , b−1). If k < 0, we likewise define to be the sum of all terms v ∞ ξ l and h ∞ ξ l for l = a, . . . , b. In either case, D ∞ λ,t,a,b is a doubly-filtered chain map. Let X ∞ λ,t,a,b denote the mapping cone of D ∞ λ,t,a,b , which inherits the structure of a doubly-filtered chain complex that is finitely generated over F[U, U −1 ]. We will see below (Lemma 3.2) that for all a sufficiently negative and all b sufficiently positive, the doubly-filtered chain homotopy type of X ∞ λ,t,a,b is independent of a and b.
We are now able to state the main theorem: Theorem 1.1. Let K be a rationally null-homologous knot in a 3-manifold Y , let λ be a nonzero framing on K, and let t be any torsion spin c structure on Y λ (K). Then for all a 0 and b 0, the chain complex X ∞ λ,t,a,b , equipped with the filtrations I t and J t , is doubly-filtered chain homotopy equivalent to CFK ∞ (Y λ , K λ , t). s l are all the same. In particular, when k = ±1, the bounds (1.2) and (1.3) imply that s l = ±l. A portion of the mapping cone complex in the k = ±1 cases is shown in Figure 1, where we index the A and B complexes by the integers s l , as in [41].
The proof of Theorem 1.1 follows the same template as Ozsváth and Szabó's original proof in [41,42], with some modifications. Specifically, we examine the construction of an exact triangle relating the Heegaard Floer homologies of Y , Y λ (K), and Y λ+mµ (K) where m is large. The main new ingredient is the behavior of the maps in the exact triangle with respect to the Alexander gradings, which turns out to be quite subtle. Specifically, we must show that the chain maps and chain homotopies used in the exact triangle detection lemma are filtered with respect to the relevant Alexander filtrations. This turns out to be true only for the subquotients of the Heegaard Floer complexes consisting of generators with bounded powers of U , and it requires modification of the construction of the maps by considering only certain spin c structures on the various cobordisms involved.
In an unpublished preprint from 2006 [4], Eftekhary described a similar mapping cone formula for CFK ∞ (Y λ (K), K λ ). Although there are certain technical problems with that formula, primarily related to the behavior of the flip maps Ψ ∞ ξ and the filtration issues discussed in the previous paragraph, the overarching ideas are similar. Moreover, the "hat" version of our formula (i.e., the associated graded complex, which computes HFK(Y λ (K), K λ )) coincides with Eftekhary's description in [5]; see Corollary 3.6 below.
A key technical tool which allows us to get a handle on the grading subtleties is a formula for the rational Alexander grading of knot Floer homology generators in terms of data on the Heegaard diagram. This formula is analogous to Ozsváth and Szabó's formula for the evaluation of the Chern class of a spin c structure associated to a Floer complex generator on the homology class of a periodic domain. We expect this formula to be a useful addition to the Heegaard Floer tool-box, independent of the present paper. (For instance, it was recently used by Raoux [43]). For that reason, we take the time to state it here. Recall that a relative periodic domain on a doubly-pointed Heegaard diagram is a linear combination of its regions whose boundary consists of multiples of the α and β curves and a longitude for the knot, drawn as a union of arcs connecting the basepoints. (See [11, Definition 2.1]). Proposition 1.3. Let (Σ, α, β, w, z) be a doubly-pointed Heegaard diagram for a knot (Y, K) representing a class in H 1 (Y ) of order d, and let P be a relative periodic domain specifying a homology class [P ] ∈ H 2 (Y, K). Then the absolute Alexander grading of a generator x ∈ T α ∩ T β , taken with respect to [P ], is given by A w,z (x) = 1 2d (χ(P ) + 2n x (P ) − nz(P ) − nw(P )) (1.13) Hereχ(P ) denotes the Euler measure of P , and n x (P ) denotes the sum, taken over all x i ∈ x, of the average of the four local multiplicities of P in the regions abutting x i . Finally, nw(P ) (resp. nz(P )) denotes the average of the multiplicities of P on either side of the longitude atw (resp.z).

Future directions.
Before turning to the proof of Theorem 1.1, we discuss a few potential applications and directions for future investigation.
Our formula should be useful for computing the Heegaard Floer homology of a splice of knot complements in terms of their knot Floer homology. Indeed, let K and K be knots in S 3 , and let M be the manifold obtained by gluing the exteriors of K and K , where the gluing identifies the meridian of K (resp. K ) with a longitude λ (resp. λ) of K (resp. K). Then M can be viewed as Dehn surgery on the knot K λ # K ⊂ S 3 λ (K). Thus, we can determine the Heegaard Floer homology of M (and, better yet, the knot Floer complex of a certain knot in M ) as follows: use Theorem 1.1 to determine CFK ∞ (Y λ (K), K λ ), take the tensor product with CFK ∞ (S 3 , K ) to obtain CFK ∞ (Y λ (K), K λ # K ), and then use the surgery formula again to determine the Heegaard Floer homology of M . The only difficulty is that for the second application, we need to understand the flip map on CFK ∞ (Y λ (K), K λ # K ). This can always be done explicitly if Y λ (K) is an L-space; see Lemma 2.14 below. The general case would be tractable if we could compute the flip map on CFK ∞ (Y λ (K), K λ ) in terms of the mapping cone formula, but at present we do not know of such a description.
In another direction, the knot Floer homology of fibered knots carries geometric information about their associated contact structures. As mentioned above, this idea was used in [11] in conjunction with the "large surgery" version of our formula to give conditions for surgeries on a fibered knot to admit tight contact structures. The present work allows us to extend the scope of these results. In particular, the formula for the knot Floer homology of the dual knot to ±1 surgery on a fibered knot significantly extends the potential scope of applications to contact geometry. This is because the dual knot to −1 (resp. +1) surgery on a fibered knot K is a fibered knot whose monodromy differs from that of K by a right-handed (resp. lefthanded) boundary Dehn twist. As an application, coupling our formula with the strong detection by knot Floer homology of the identity mapping class ([13, Theorem 4]) should allow us to prove that knot Floer homology determines whether a knot is fibered with monodromy consisting of a boundary Dehn twist; we plan to return to this question in a future paper.
In the same vein, our formula will allow us to derive conditions on the knot Floer homology of a fibered knot which determine whether adding a left-handed (respectively right-handed) Dehn twist along the boundary will kill the contact invariant (respectively have non-trivial contact invariant). This understanding, in turn, should lead to restrictions on the fractional Dehn twist coefficient of the monodromy of a fibered knot in terms of its Floer homology and its flip map. To the latter end, it would be quite useful to have a formula for the Floer homology of the dual knot to a rational surgery. This would allow for a determination of the integral part of the fractional Dehn twist in terms of knot Floer homology. (In Section 8, we describe CFK ∞ of the knot in a rational surgery obtained from the meridian of the surgery curve; however, when the surgery slope is not integral, the meridian is not isotopic to the core of the surgery solid torus.) More abstractly, our main theorem can be viewed as a stand-in for the infinity or minus version of the bordered Floer homology of a knot complement in a general 3-manifold. More precisely, the bordered invariant of a manifold with torus boundary will admit a splitting with respect to idempotents corresponding to a basis for its first homology. The basis can be taken as a meridian and longitude for a knot in any 3-manifold obtained by Dehn filling. In these terms, our formula allows us to compute the invariant gotten by projection to one of the idempotents in terms of the invariant gotten by projection to the other. In principle, higher structure maps will be necessary to understand the full A ∞ module associated to a knot complement by any minus version of bordered Floer homology, but in practice it should be feasible to work solely with our formula. For many applications this should prove easier.
Organization. In Section 2, we collect various preliminary results, many of which can be described as "Heegaard Folkloer," and prove Proposition 1.3. In Section 3, we provide more details about the mapping cone formula, outline the proof, and discuss an example. In Section 4, we study the behavior of the Alexander grading under 2-handle cobordisms. In Section 5, we look at the Heegaard quadruple diagrams relating Y , Y λ (K), and Y λ+mµ (K), and give a formula for CFK ∞ of the dual knot in large surgery. The most technical part of the paper is Section 6, where we go through the construction of the surgery exact sequence relating Y , Y λ (K), and Y λ+mµ (K) and study the behavior of each map with respect to the Alexander gradings. In Section 7, we assemble the pieces to prove Theorem 1.1. Finally, in Section 8, we discuss rational surgeries.

Preliminaries
2.1. Homological algebra. We begin by stating a few basic facts about filtered chain complexes that will be useful later on. Definition 2.1. Let S be a partially ordered set. An S-filtered chain complex is a chain complex C (over any ring) equipped with an exhausting family of subcomplexes {F s C | s ∈ S}, such that F s C ⊂ F s C whenever s ≤ s . The associated graded complex of C is with the induced differential. Given two S-filtered chain complexes B and C, a chain map f : B → C is called a filtered chain map if f (F s B) ⊂ F s C for all s ∈ S. We call f a filtered quasi-isomorphism if it induces an isomorphism on the homology of the associated graded complexes. 1 (We emphasize that a quasi-isomorphism that is filtered is not necessarily a filtered quasi-isomorphism.) If the filtrations on B and C have finite length, then repeated use of the five-lemma shows that a filtered map f : B → C is a filtered quasi-isomorphism iff it induces isomorphisms H * (F s B) → H * (F s C) for all s ∈ S.
A filtered chain homotopy equivalence is immediately seen to be a filtered quasiisomorphism. The converse does not hold for complexes over an arbitrary ring, but it does hold over a field. Furthermore, it holds (in a slightly stronger sense) for the type of chain complexes that arise in the context of knot Floer homology, as explain below. The reason we mention the distinction is that the proof our main theorem relies on a filtered version of the mapping cone detection lemma [38, Lemma 4.2], which takes place in the filtered derived category. Although we will mainly work over Z/2Z, we state the lemma with signs for completeness: Lemma 2.2. Let S be a partially ordered set, and let (C i , ∂ i ) i∈Z be a family of Sfiltered chain complexes (over any ring). Suppose we have filtered maps f i : C i → C i+1 and h i : C i → C i+2 so that: (1) f i is an anti-chain map, i.e., is a filtered quasi-isomorphism (and hence a filtered homotopy equivalence when working over a field).
Proof. Follow the proof of [38, Lemma 4.2], adding the word "filtered" as appropriate.
The sign convention follows [20, Lemma 7.1], which we have verified independently.
Even over an arbitrary ring, one can also prove a version of the (filtered) mapping cone detection lemma in the (filtered) homotopy category, but it requires a stronger set of hypotheses. We state it here for posterity: Lemma 2.3. Let S be a partially ordered set, and let (C i , ∂ i ) i∈Z be a 3-periodic family of S-filtered chain complexes. Suppose we have filtered maps f i : (1) f i is an anti-chain map; is a filtered homotopy equivalence, with homotopy inverse given by Oddly enough, Lemma 2.3 is easier to derive than Lemma 2.2 (and is hence left to the reader as an exercise), but its hypotheses are clearly more difficult to verify. In the context of surgery exact triangles in Floer theory, in particular, the families of complexes considered are not 3-periodic; it is only their isomorphism type which is 3-periodic. This fact makes Lemma 2.3 rather unwieldy for our purposes.
Let F be any field. Analogous to [41, Definition 2.6] and [25,Definition 10.2], we say that a chain complex of torsion CF − type is a finitely generated, free module C over F[U ], equipped with an absolute Q-grading that lifts a relative Z-grading, for which multiplication by U has degree −2, and a differential ∂ with degree −1. 2 Given a basis {x 1 , . . . , x k } for C consisting of homogeneous elements, note that if the coefficient of U n x j in ∂(x i ) is nonzero, then n = (gr(x j ) − gr(x i ) + 1)/2.
We now describe a construction of filtrations on chain complexes of CF − type. Suppose C is a complex of torsion CF − type, and let x 1 , . . . , x k be homogeneous elements which form an F[U ]-basis for C. Let J : {x 1 , . . . , x k } → Q be a function whose values are congruent mod Z, and extend this function to the set of all translates . Then the subspaces of C spanned by the sublevel sets of J give a filtration of C by F[U ]-subcomplexes. A filtration obtained in this way is said to be of Alexander type. We will typically just refer to J as the filtration.
Note that the filtration of C by the subcomplexes U n C is itself of Alexander type, defined via a function I that is identically 0 on the elements of any basis for C. We call this the trivial filtration. Any F[U ]-equivariant quasi-isomorphism between complexes of CF − type is a filtered quasi-isomorphism with respect to the trivial filtration. If we are given a second filtration J of Alexander type, C acquires the structure of a Z × Z-filtered complex. We say that C is reduced if there are no terms in the differential that preserve both the I and J filtrations; in other words, if U n x j appears in ∂(x i ), then either n > 0 or J (U n x j ) < J (x i ). In particular, a reduced complex is isomorphic (as an F[U ]-module) to its associated graded complex. The following lemma is well-known; see, e.g., [ Lemma 2.4. Let C be a complex of CF − type equipped, equipped with an Alexandertype filtration J . Then C is filtered homotopy equivalent (over F[U ]) to a reduced complex.
Proposition 2.5. Let B and C be complexes of CF − type, each equipped with an Alexander-type filtration. Then any filtered quasi-isomorphism f : is a filtered homotopy equivalence.
Proof. By Lemma 2.4, we may find reduced complexes B and C which are filtered homotopy equivalent to B and C, respectively. The composition B − → B f − → C − → C is a filtered quasi-isomorphism, and therefore a filtered chain isomorphism of complexes of F[U ]-modules. It then follows that f is a filtered homotopy equivalence.
Finally, we introduce the machinery of "vertical truncation." Given a chain complex C of torsion CF − type, for any t ∈ N, let C t denote the quotient C/U t+1 C. Any filtration of C of Alexander type descends to a filtration of C t . Note that C t is a free module over F[U ]/(U t+1 ), and any basis for C descends to a basis for C t . Moreover, for any t < t , we have natural isomorphisms U t −t · C t ∼ = C t (with a grading shift of 2(t − t)). The following lemmas imply that a (filtered) complex C of torsion CF − type is determined up to (filtered) quasi-isomorphism by the complexes C t for large t. (Compare [41, Lemma 2.7] and [25,Lemma 10.4].) Lemma 2.6. Let C be a complex of torsion CF − type, equipped with a filtration of Alexander type. Then for large t, C is filtered quasi-isomorphic to C t in sufficiently large gradings. To be precise, for any δ ∈ Q, there exists T ∈ N such that for all t ≥ T , all gradings d ≥ δ, and all filtration levels s, the projection map Proof. Given δ, for all t sufficiently large, the projection C to C t is simply the identity map in all gradings d ≥ δ − 1, and the filtrations on those portions of C and C t agree by construction. The result then follows immediately.
Lemma 2.7. Let B and C be chain complexes of torsion CF − type, each equipped with a filtration of Alexander type. Suppose that for all t ≥ 0, the complexes B t and C t are F[U ]-equivariantly filtered quasi-isomorphic. Then B and C are F[U ]-equivariantly filtered quasi-isomorphic.
Proof. To begin, we show that there is a single chain map f : B t → C t that induces filtered quasi-isomorphisms B t → C t for all t simultaneously. (A priori, the hypotheses of the lemma only stipulate that there exist such maps for each t, without requiring them to be related in any way.) Let {x 1 , . . . , x k } and {y 1 , . . . , y l } be bases for B and C, respectively, on which we have functions J B and J C specifying the filtrations. Choose some t 0 large enough that for all z, z ∈ {x 1 , . . . , x k , y 1 , . . . , y l }, we have t 0 > (gr(z ) − gr(z) + 1)/2. Let ∂ B and ∂ C denote the differentials on B and C respectively, and ∂ t 0 B and ∂ t 0 C the induced differentials on B t 0 and C t 0 . Choose a filtered quasi-isomorphism f t 0 : Let us write where each coefficient p i,j , q i,j , and r i,j is either 0 or a multiple of U n for some 0 ≤ n ≤ t. We claim that the differential ∂ B must be given by precisely the same formula: Indeed, every nonzero term in ∂ t 0 B must be induced from the corresponding term in ∂ B . The only possible additional terms would have to involve powers of U that vanish in F[U ]/U t 0 ; however, this contradicts our hypothesis on t. The same applies identically to ∂ C . Likewise, the map f : B → C defined by f (x i ) = j r i,j y j is a chain map: any nonzero term in ∂ C • f must also occur in ∂ t 0 C • f t 0 , and hence be cancelled by a term in f t 0 • ∂ t 0 B , which then also occurs in f • ∂ B .
Next, we claim that f induces a filtered quasi-isomorphism B t → C t for all t. For t < t 0 , this follows by restricting f t 0 to the kernel of U t+1 , while for t ≥ t 0 , it then follows by induction using the five-lemma.
By the previous lemma, for any grading d and filtration level s, we may find t for which the map induced by f factors as Thus, f is a filtered quasi-isomorphism, as required.

2.2.
Relative spin c structures and Alexander gradings. We now discuss some more details about relative spin c structures and Alexander gradings. As above, let Y be a closed, oriented 3-manifold, and let K be an oriented, rationally null-homologous knot in Y , representing a class of order d > 0 in H 1 (Y ). 4 For any class P ∈ H 2 (Y, K), the intersection number [µ] · P is divisible by d. In particular, if P = [F ], where F is a rational Seifert surface for K, then [µ] · P = d.
As in (1.1), for any P with P · µ = 0, and any relative spin c structure ξ, the Alexander grading of ξ with respect to P is defined as By construction, A Y,K,P (ξ) is unchanged under multiplying P by a nonzero scalar; in particular, if Y is a rational homology sphere, then the Alexander grading is independent of P . 5 More generally, suppose P, P are nonzero classes in H 2 (Y, K) whose restrictions to K agree; after scaling, assume that [µ] · P = [µ] · P = d. Then P − P is the image of a class Q ∈ H 2 (Y ). For any ξ ∈ Spin c (Y, K), we have In particular, if G Y,K (ξ) is a torsion spin c structure on Y , then A Y,K,P (ξ) is completely independent of the choice of P . We will henceforth drop P from the notation and just denote the Alexander grading by A Y,K . A framing for K is determined by the choice of a longitude λ, which we view as an oriented curve in ∂(nbd(K)). Let F be a rational Seifert surface for K. As elements of H 1 (∂(nbd(K)); Z), we have ∂F = dλ − kµ for some k ∈ Z. For any other framing λ = λ+mµ, we have ∂F = d(λ+mµ)−(k +dm)µ. Thus, the framing determines and is determined by k, and the class of k mod d is independent of the choice of framing. The rational self-linking of K is [ k d ] ∈ Q/Z; it depends only on the homology class of K.
Let Y λ = Y λ (K) denote the manifold obtained by λ-framed surgery on K. The meridian µ is isotopic to a core circle of the glued-in solid torus. Let K λ denote this core circle, with the orientation inherited from the left-handed meridian −µ. The curve λ ⊂ ∂(nbd(K λ )) = ∂(nbd(K)) then serves as a right-handed meridian for K λ , since #(−µ · λ) = 1 when ∂(nbd(K λ )) is given its boundary orientation.
The sets Spin c (Y, K) and Spin c (Y λ , K λ ) are canonically identified, since they depend only on the complement. Viewing [F ] as an element of This justifies (1.4). As shown in [35], a doubly-pointed Heegaard diagram (Σ, α, β, w, z) determines a 3-manifold Y and an oriented knot K ⊂ Y . To be precise, let H α and H β be the two handlebodies in the Heegaard splitting; recall that Σ is oriented as the boundary of the α handlebody. Let λ be an immersed curve in Σ obtained as λ = t α + t β , where t α is an embedded arc in Σ α from z to w, and t β is an embedded arc in Σ β from w to z. We obtain K ⊂ Y by pushing t α into H α and t β into H β . Thus, K intersects Σ positively at w and negatively at z. In other words, we may write K = γ w − γ z , where γ w (resp. γ z ) is the upward-oriented flowline from the index-0 critical point p 0 to the index-3 critical point p 3 of the a function associated with the Heegaard diagram. The meridian µ can be realized as a counterclockwise circle in Σ around w.
Note that both possible conventions for how to orient K exist in the literature, leading to some sign confusions. Our convention agrees with [35], but not with [40,42]. The following discussion should show why ours is the correct convention.
Ozsváth and Szabó show how to associate to each generator x ∈ T α ∩ T β a relative spin c structure s w,z (x) ∈ Spin c (Y, K), with the property that G Y,K (s w,z (x)) = s w (x). The Alexander grading of x is defined as where F is a rational Seifert surface for K.
For any generators x, y with s w (x) = s w (y), and any disk φ ∈ π 2 (x, y), we have the familiar formula We will verify this formula below. More generally, given any x, y ∈ T α ∩ T β , let a and b be 1-chains in α and β, respectively, with ∂a = ∂b = y − x, and let (x, y) be the 1-cycle a − b. (That is, (x, y) goes from x to y along α and from y to x along β.) This is well-defined up to adding multiples of the α and β circles. Note that (x, y) is homologous in H 1 (Y K) to the difference γ y − γ x , where γ x (resp. γ y ) is the sum of the upward gradient flow lines through x (resp. y) of the Morse function on Y associated to the Heegaard diagram. Therefore, This formula completely characterizes the Alexander grading up to an overall shift, even when Y is not a rational homology sphere.
If x and y represent the same (absolute) spin c structure, and D is the domain of a disk φ ∈ π 2 (x, y), then ∂D = (x, y). More generally, suppose the image of (x, y) in H 1 (Y ) has finite order n. (If Y is a rational homology sphere, this is true for all x and y.) Then there is a domain D in Σ (that is, an integral linear combination of regions) with ∂D = n (x, y). We may interpret the intersection number [ (x, y)] · [F ] from (2.5) as the linking number between the disjoint 1-cycles (x, y) and dK. Symmetry of the linking number then implies that n Since K meets Σ positively at w and negatively at z, we deduce that The n = 1 case is (2.3), as claimed above. Next, we explain the second term in the numerator of (1.1), which is related to the symmetrization of knot Floer homology. It is shown in [40, Lemma 3.12 and Proposition 8.2] that for each ξ ∈ Spin c (Y, K), we have with an appropriate shift in the Maslov grading, where J denotes spin c conjugation. 7 By our definition (1.1), we have: 6 Formula 2.4 was stated with signs reversed in [40, Lemma 3.11], on account of (x, y) implicitly being oriented the wrong way. However, the proof of [37, Lemma 2.19] shows that our statement has the correct signs. 7 Ozsváth and Szabó [40] state this formula with + PD[µ] instead of −. However, as noted above, their orientation convention for K is opposite ours, so the sign of the meridian is reversed as well. Ni's definition of the Alexander grading [29,Section 4.4] follows the same convention as [40]; this explains the sign discrepancy between our definition (1.1) and Ni's.
Therefore, if we define (for any rational number r) we have the symmetrization property  Proof of Proposition 1.3. It is possible to give an explicit topological proof of (1.13) along the lines of the first Chern class formula from [36, Proposition 7.5], taking into account both basepoints. Here, we take a more indirect approach. As noted in the previous section, the function A w,z : T α ∩ T β → Q is completely determined by the properties (2.5) and (2.9). It thus suffices to show that the function A w,z (x) := 1 2d (χ(P ) + 2n x (P ) − nz(P ) − nw(P )) satisfies the same two properties.
To check that A w,z satisfies the analogue of (2.5), it suffices to see that is somewhat more involved, though straightforward. The first step is to check that the absolute grading on CFK(Σ, α, β, w, z) induced by A w,z does not depend on the Heegaard diagram or auxiliary choices. This entails several verifications, whose details are left as an exercise: • If we leave λ fixed, any other relative periodic domain representing [F ] differs from P by adding a multiple of Σ. Note that χ(P + Σ) =χ(P ) + 2 − 2g n x (P + Σ) = n x (P ) + g n y (P + Σ) = n y (P ) + g nw(P + Σ) = nw(P ) + 1 nz(P + Σ) = nz(P ) + 1.
Therefore, A w,z is unchanged under replacing P by P + Σ in the definition. • Any two choices of the arc t α differ by isotopy rel endpoints or by a handleslide over the α circles. Either operation may introduce new intersections between t α and either the β circles or t β . By looking at how the local multiplicities of P change under each operation, one can verify that A w,z is unchanged. An analogous argument holds for t β . • Finally, if we modify the Heegaard diagram by an isotopy, handleslide, or (de)stabilization away from both w and z, the induced homotopy equivalence on CFK preserves A w,z . Moreover, if this map takes a generator x of the old diagram to a generator y of the new one, then by looking at an appropriately defined 1-cycle (x, y) and its intersection with the Seifert surface as above, one can verify that Hence, the homotopy equivalence preserves A w,z as well.
Next, recall that the Heegaard diagrams (Σ, α, β, w, z) and (−Σ, β, α, z, w) both present (Y, K) with the same orientations and have isomorphic CFK, which gives the spin c conjugation symmetry (2.7). Because we swap w and z, −P plays the role of the relative periodic domain in the latter Heegaard diagram; this has the effect of negating each term on the right side of (1.13). For each x ∈ T α ∩ T β , we thus have A w,z (x) = −A z,w (x), where the former refers to the proposed grading on CFK(Σ, α, β, w, z) and the latter refers to its values on CFK(−Σ, β, α, z, w). Thus, we have an isomorphism HFK(Σ, α, β, w, z, A w,z = r) ∼ = HFK(−Σ, β, α, z, w, A z,w = −r).
It is perhaps worth remarking that, by considering an unknot in Y , the above provides an alternative proof of Ozsváth and Szabó's Chern class evaluation formula [36, Proposition 7.5].
through the basepointsw andz, represents a +5-framed longitude. The coefficients in Figure 2 represent a relative periodic domain P . We havê χ(P ) = −4 nz(P ) = − 1 2 nw(P ) = 9 2 n a (P ) = 1 n b (P ) = 2 n c (P ) = 3 n x (P ) = 2 and therefore This is consistent with both (2.3) and (2.9). For a second example, note that the Heegaard diagram (Σ, α, γ) presents λ-framed surgery on K, where γ = {β 1 , λ}. Moreover, the curve β 2 determines the knot K λ induced by the surgery, so we can represent K λ with basepoints w , z ∈ β 2 as shown. The ordering of w and z is chosen to be consistent with the orientation on β 2 that makes it occur in the boundary of P with positive coefficient. The reader can check that the Alexander gradings of generators of CFK(Σ, α, γ, w , z ) are: A w ,z (cr) = 1 5 Once again, the symmetry (2.9) is satisfied.
In the complex CFK(Σ, α, γ, w , z ), we have ∂(pt) = ∂(qs) = br, which implies that the knot K λ is Floer simple. As a sanity check, since |α 2 ∩ λ| = 1, we can destabilize this pair of curves to produce a standard genus-1 Heegaard diagram for a simple knot in a lens space, which is consistent with known results about +5 surgery on the trefoil.
Remark 2.9. Suppose we choose a Heegaard diagram (Σ, α, β, w, z) for an oriented knot K, but consider a relative periodic domain P that represents −[F ] rather than [F ]; in other words, we assume ∂P = −dλ + · · · , where d > 0. Then (1.13) still holds, provided that we take −d in place of d in the denominator. In other words, the denominator is simply the coefficient of λ in ∂P , whether positive or negative. This is one of the reasons we prefer our normalization for the Alexander grading.
We conclude this section with another helpful fact about the relationship between the Alexander and Maslov gradings (c.f. [1, Proof of Lemma 4.10], [30, Proof of Theorem 3.3]). For any generator x ∈ T α ∩T β , we have s z (x) = s w (x)+PD[K]. Since we assume that the knot K is rationally null-homologous, this implies that s w (x) is a torsion spin c structure iff s z (x) is. If so, then x admits two separate absolute Maslov gradings when viewed as an element of CF(Σ, α, β, w) and CF(Σ, α, β, z); we denote these by gr w and gr z respectively.
Proof. Define A w,z (x) = 1 2 ( gr w (x) − gr z (x)). Suppose x and y are generators representing (possibly different) torsion spin c structures. Choose a domain D with ∂(D) = n (x, y). By the Lee-Lipshitz relative grading formula [21, Proposition 2.13] together with (2.6), we compute: Thus, A w,z agrees with A w,z (on all generators representing torsion spin c structures) up to an overall constant. To pin down the constant, note that A z,w (x) = −A w,z (x), where the former refers to the grading on CFK(−Σ, β, α, z, w), and proceed just as in the proof of Proposition 1.3.

2.4.
The knot Floer complex for rationally null-homologous knots. For any Heegaard diagram (Σ, α, β, w), the complex CF ∞ (Σ, α, β, w) is generated (over F) by all pairs [x, i], where x ∈ T α ∩ T β and i ∈ Z. The differential on the chain complex CF ∞ (Σ, α, β, w) is given by For each spin c structure s, the summand CF ∞ (Σ, α, β, w, s) is generated by all [x, i] with s w (x) = s. The action of U is given by U ·[x, i] = [x, i−1]. Let CF − (Σ, α, β, w, s) denote the subcomplex generated by all [x, i] with i < 0, and CF + (Σ, α, β, w, s) the quotient of CF ∞ by this complex. For t ∈ N, let CF t (Σ, α, β, w, s) denote the kernel of the action of U t+1 on CF + ; concretely, it is generated by all [x, i] with 0 ≤ i ≤ t. 8 Note that CF t (Σ, α, β, w, s) is isomorphic (up to a grading shift) to the quotient and we sometimes use this perspective instead. Let (Σ, α, β, w, z) be a doubly pointed Heegaard diagram for a rationally null- , and the differential is given by which is valid by (2.3). There is a canonical isomorphism In other words, the j coordinate can be seen as giving an extra filtration on CF ∞ (Σ, α, β, w), which we call the Alexander filtration. Using the terminology of Section 2.1, this is a filtration of Alexander type, given by the This filtration descends to the other flavors; when thinking of them as doublyfiltered objects, we will sometimes denote them by CFK − , CFK + , and CFK t . In particular, CFK 0 (Σ, α, β, w, z) is simply CF(Σ, α, β, w), equipped with its Alexander filtration. The associated graded complex of the latter is CFK(Σ, α, β, w, z), whose homology is the knot Floer homology HFK(Y, K).
Each of these complexes is a topological invariant of (Y, K) up to doubly-filtered chain homotopy equivalence; as in the introduction, we sometimes denote them by CFK ∞ (Y, K, s), etc.
Remark 2.11. In [42], Ozsváth and Szabó define a separate doubly filtered complex for each relative spin c structure. Specifically, they define CFK ∞ (Σ, α, β, w, z, ξ) to be generated by all For all ξ within a given fiber G −1 Y,K (s) (for s ∈ Spin c (Y )), the resulting complexes are isomorphic by a shift in j. To translate between the Ozsváth-Szabó description of CFK ∞ and ours, for each We now describe the so-called "flip map" alluded to in the introduction. To begin, note that for any be the F[U ]-equivariant chain homotopy equivalence induced by Heegaard moves taking the diagram (Σ, α, β, z) to the diagram (Σ, α, β, w). By the naturality theorem of Juhász and Thurston [19], Γ is independent (up to F[U ]-equivariant chain homotopy) of the choice of Heegaard moves. Let Since the pair (s, s) determines, and is determined by, a relative spin c structure ξ, we may also denote this map by Ψ ∞ ξ . For varying s, the maps Ψ s,s are related by: Thus, it really suffices to know only one of them. When K is null-homologous, so that the Alexander grading is integer-valued, it is most convenient to take s = 0.
Lemma 2.12. The map Ψ ∞ s,s is a filtered homotopy equivalence with respect to the j filtration on the domain and the i filtration (shifted) on the range, in the following sense: for any t ∈ A Y,K (s), Ψ ∞ s,s restricts to a homotopy equivalence from the j ≤ t subcomplex of CFK ∞ (Σ, α, β, w, z, s) to the i ≤ t − s subcomplex of CFK ∞ (Σ, α, β, w, z, s + PD[K]). Moreover, Ψ ∞ s,s is homogeneous of degree −2s with respect to the Maslov grading gr.
Proof. For any [x, i, j] ∈ CFK ∞ (Σ, α, β, w, z, s), we have: where p is taken from some finite indexing set and each i p is an integer ≤ j − s. This fact follows from the definition of Γ, which is a composition of maps which are filtered homotopy equivalences with respect to the basepoint filtration. Finally, for the statement about the Maslov grading, Lemma 2.10 implies that Ω z,s is homogeneous of degree −2s (using gr w on the domain and gr z on the target), while Γ and Ω are grading-preserving.
However, we emphasize that Ψ ∞ s,s is not necessarily filtered with respect to the other filtration on the domain and target; see Section 3.1 for an example. In particular, in the case of a null-homologous knot, the complex CFK ∞ (Y, K, s) is symmetric (up to isomorphism) under interchanging i and j, but the map Ψ ∞ s,0 does not necessarily realize that symmetry.
The maps Ψ ∞ s,s are actually invariants of the knot K, in the following sense: Lemma 2.13. Let (Σ, α, β, w, z) and (Σ , α , β , w , z ) be two doubly-pointed Heegaard diagrams diagram which present (Y, K). Then for each pair (s, s) as above, the following diagram commutes up to homotopy: where Φ s and Φ s+PD [K] are the doubly-filtered chain homotopy equivalences induced by a sequence of Heegaard moves taking (Σ, α, β, w, z) to (Σ , α , β , w , z ), and the homotopy can be assumed to satisfy the same filteredness property as Ψ ∞ s,s (see Lemma 2.12).
In general, the maps Ψ ∞ are extremely difficult to determine from the definition, since they require understanding the homotopy equivalences induced by a series of Heegaard moves. However, there is a special case in which they can be determined explicitly: Lemma 2.14. Let Y be an L-space and K a knot in Y . Let be any two maps which are filtered chain homotopy equivalences (in the sense of Lemma 2.12). Then Ψ and Ψ are filtered chain-homotopic.
Proof. By construction, Ψ and Ψ each restrict to filtered quasi-isomorphisms (for some fixed s ∈ Z +Ã w,z (s)). Since Y is an L-space, the homology of each of these complexes is isomorphic to F[U ], so Ψ − and Ψ − induce the same map on homology. Therefore, Ψ − − Ψ − is filtered null-homotopic (with respect to the filtration by U powers), via an F[U ]-linear null-homotopy By U -equivariance, we can then extend H over all of CFK ∞ (Y, K, s) to be a filtered null-homotopy of Ψ ∞ − Ψ ∞ .
Thus, when Y is an L-space, it suffices to guess any chain map Ψ ∞ which is a filtered quasi-isomorphism (in the sense of Lemma 2.12); Lemma 2.14 then guarantees that this map is the actual map. In particular, for null-homologous knots in any L-space (e.g. knots in S 3 ), any map realizing the i ↔ j symmetry suffices. (This principle has been used, implicitly or explicitly, by many authors; see, e.g., [15,Section 6].)

More on the mapping cone formula
We now discuss a few more details concerning the mapping cone formula from the introduction, and outline the proof.
Lemma 3.1. For each l ∈ Z, the map h ∞ ξ l is filtered with respect to both I t and J t and homogeneous of degree −1 with respect to gr t .
Proof. This is a straightforward exercise using Lemma 2.12.
For all a sufficiently negative and all b sufficiently positive, the doublyfiltered chain homotopy type of X ∞ λ,t,a,b is independent of a and b, and likewise for X − λ,t,a,b , X + λ,t,a,b , and X t λ,t,a,b . Proof. The values of j − i for all nonzero elements of CFK ∞ (Y, K) are bounded above and below by constants. Therefore, when s l 0 (which holds for l 0 if k > 0 and for l 0 if k < 0), the filtrations on A ∞ ξ l both agree precisely with (1.8) and (1.9), so v ∞ ξ l is a doubly-filtered isomorphism. Similarly, when s l 0 (which holds for l 0 if k < 0 and for l 0 if k > 0), the filtrations on A ∞ ξ l are given by which is just the vertical (z basepoint) filtration, shifted appropriately. It follows from Lemma 2.12 that h ∞ ξ l is a doubly-filtered quasi-isomorphism. Now, suppose k > 0; the other case is handled similarly. If b is large enough, then in the complex X ∞ λ,t,a,b+1 , we can cancel the filtered-acyclic subcomplex The range of values of a and b for which the conclusion of Lemma 3.2 holds (i.e., how large is sufficiently large) depends on the spread of the Alexander grading on HFK(Y, K), and thus on the genus of K. For simplicity, suppose that K is null-homologous, so that d = 1, and let g = g(K). If we used a reduced complex for CFK ∞ (Y, K), then all nonzero elements of CFK ∞ (Y, K) satisfy −g ≤ j − i ≤ g. By examining (1.5) and (1.6), we see that v ∞ ξ l is a doubly-filtered isomorphism when s l ≥ g + 1, and h ∞ ξ l is a doubly-filtered quasi-isomorphism when s l ≤ −g. Thus, for example, when k = ±1, we may compute CFK ∞ (Y λ (K), K λ ) using the complex X ∞ λ,t,1−g,g .
Let A − ξ l (resp. B − ξ l ) denote the subcomplex of A ∞ ξ l (resp. B ∞ ξ l ) generated by elements with I < 0, and let A + ξ l (resp. B + ξ l ) denote the quotient by this subcomplex. As a result, these maps on the plus and minus versions of the complexes. Under the isomorphisms from Remark 2.11, our construction of the A + and B + complexes and the v + and h + maps agrees with Ozsváth and Szabó's description in [42, Section 4]. Additionally, for any t ∈ N, let A t ξ l (resp. B t ξ l ) denote the kernel of U t+1 on A + ξ l (resp. B + ξ l ); concretely, these are generated by all generators with 0 ≤ I ≤ t. We also define the U -completed versions of the minus and infinity complexes: . Concretely, the elements of each group are countably infinite sums α [x α , i α , i α + A(x α )] such that for each I ∈ Z, there are at most finitely terms with i α ≥ I. As such, the I t and J t filtrations still make sense. We may thus define corresponding versions of the mapping cone, which we denote by In particular, the finite U -power versions X t λ,t,a,b will play a crucial role in the proof.
Remark 3.4. Ozsváth and Szabó originally stated the surgery formula only for HF + , not for HF ∞ , and they made use of an infinite version of the mapping cone. Specifically, let be the sum of all the v + ξ l and h + ξ l maps, and let X + λ,t be the mapping cone of D + λ,t . Ozsváth and Szabó proved that X + λ,t is quasi-isomorphic to CF + (Y λ (K), t). Manolescu and Ozsváth [25] showed that the analogous results for HF − and HF ∞ hold if one uses the U -completed versions and infinite direct products: that is, HF − (Y λ (K)) and HF ∞ (Y λ (K)) are respectively isomorphic to the mapping cones of (See [25, Section 4.3] for a discussion of why direct products rather than direct sums are needed.) The technique of "horizontal truncation" from [25, Section 10.1] shows that the finite and infinite versions yield filtered quasi-isomorphic complexes. We find it preferable to avoid using infinite direct sums and products entirely, at the cost of being more explicit about the roles of a and b.
We now discuss the proof of Theorem 1.1. The proof follows the same basic outline as Ozsváth and Szabó's [41,42], with a few modifications. Our main technical result, which occupies most of the remainder of the paper, is the following: . Then for any a 0 and b 0 and any t ∈ N, CFK t (Y λ (K), K λ , t) is filtered homotopy equivalent to the mapping cone X t λ,t,a,b , equipped with the filtrations I t and J t .
The new (but surprisingly subtle) ingredient in this result is that the equivalence respects the second filtrations; the rest was shown by Ozsváth and Szabó. Assuming Proposition 3.5, the rest of the main theorem follows immediately: Proof of Theorem 1.1. In the terminology of Section 2.1, X − λ,t,a,b is a complex of torsion CF − type equipped with a filtration of Alexander type, and X t λ,t,a,b is filtered isomorphic (with a shift in the grading) to X − λ,t,a,b /U t+1 X − λ,t,a,b . Therefore, Lemma 2.7 and Proposition 3.5 imply that X − λ,t,a,b is filtered quasi-isomorphic to CFK − (Y λ , K λ , t). By taking the tensor product of each complex with F[U, Next, we describe the version of the mapping cone which computes HFK(Y λ , K λ ). For knots in homology spheres, this agrees with Eftekhary's results in [5].
is isomorphic to the homology of the mapping cone of its Alexander filtration, so its associated graded complex computes CFK(Y λ , K λ ). In particular, for each Using the definitions, we may verify that the only portions of the complex for which both of these conditions hold are the three terms listed in (3.2).
Remark 3.7. The mapping cone formula in [41, 42] is stated with coefficients in Z, not just in F. Our proof should go through with coefficients in Z as well, but this requires understanding signed counts of holomorphic rectangles and pentagons, which is a technical headache and not fully spelled out in the literature. (One particular difficulty that arises is described below in Remark 6.30.) Therefore, we have chosen to work over F for simplicity.
3.1. Example: Surgery on the trefoil. In Lemma 2.12, we saw that the flip map on CFK ∞ is filtered with respect to the vertical (j) filtration on the domain and the horizontal (i) filtration on the target. Using the mapping cone formula, we now show an example illustrating that the map can be quite badly behaved with respect to the second filtration on each complex. (Another example can be found in [18, Section 3.2], although the pathologies there become apparent only when using Z coefficients.) Let K ⊂ S 3 denote the right-handed trefoil. The complex CFK ∞ (S 3 , K) can be generated (over F[U, U −1 ]) by generators a, b, c in (i, j) filtration levels (0, −1), (0, 0), (0, 1) and Maslov gradings −2, −1, 0 respectively. The differential is given by ∂(b) = a + U c and ∂(a) = ∂(c) = 0, and the flip map is an involution which fixes b and interchanges a and U C. This complex is shown in Figure 3.
Let (Y, J) = (S 3 −1 (K), K −1 ). Let us first apply Theorem 1.1 to compute CFK ∞ (Y, J). Since g(K) = 1, it suffices to look at the mapping cone which preserve both the I and J filtrations, it is not hard to check that X can be reduced to the complex generated (over F[U, U −1 ]) by generatorsp,q,r,s,t as in the following table: We can then make a filtered change of basis to simplify the differential further: set p =p + Us, q =q +r, r =r, s =s, and t =t +s, so that ∂(q) = p, ∂(r) = U t, and ∂(p) = ∂(s) = ∂(t) = 0. The complex CFK ∞ (Y, J) is shown with respect to this basis in Figure 3(b). (See [15, Section 6] for a more extensive computation that illustrates the technique in more detail.) We now study the flip map Ψ ∞ on C = CFK ∞ (Y, J). Let us just consider the induced mapΨ : C{j = 0} → C{i = 0}, which is necessarily a quasi-isomorphism. The complexes C{j = 0} and C{i = 0} are each filtered (the former by i, the latter by j) and are filtered quasi-isomorphic, but we claim thatΨ cannot be a filtered map. The grading requires thatΨ(q) = r and thatΨ(s) is a nonzero linear combination of s and t. Suppose, toward a contradiction, thatΨ is filtered; thenΨ(s) = s. However, observe that (Y +1 (J), J +1 ) = (S 3 , K). Consider the associated graded complex of the filtered mapping cone formula for +1 surgery, as described in Corollary 3.6. The part in Alexander grading 0 has the form which is the following complex: (Here, the subscripts indicate the Maslov grading on the mapping cone, given by (1.7) and (1.10), and the dashed arrows indicate possible additional terms inΨ.) Examining this complex, we see that its homology has rank 3, which contradicts the fact that HFK(S 3 , K, 0) ∼ = F. The only way to remedy this issue is to add a component taking s ∈ A 0 {i ≤ 0} to t ∈ B 1 {i = 0}, which means thatΨ is not filtered with respect to the second grading. (With further work, one can then use this information to completely pin down Ψ ∞ up to chain homotopy.)

Alexander gradings and surgery cobordisms
In this section, we study the relationship between the Alexander grading and spin c structures on the 2-handle cobordism associated to a framed knot.
As above, assume that Y is an oriented 3-manifold and that K is an oriented, rationally null-homologous knot representing a class of order d > 0 in H 1 (Y ; Z). Let λ be a nonzero framing for K, and let W = W λ (K) be the corresponding 2-handle cobordism from Y to Y λ (K).
Let C ⊂ W λ (K) denote the core disk of the 2-handle together with K × I, and let C * ⊂ W λ (K) denote the cocore disk. We assume these are oriented to intersect positively. Then [C] and [C * ] generate H 2 (W, Y ) and H 2 (W, Y λ ), respectively. Consider the Poincaré duals PD[C] ∈ H 2 (W, Y λ (K)) and PD[C * ] ∈ H 2 (W, Y ); by a slight abuse of notation, we will also use PD[C] and PD[C * ] to denote the images of these classes in H 2 (W ). Then PD[C] restricts to PD[K] ∈ H 2 (Y ), and it generates the kernel of H 2 (W λ (K)) → H 2 (Y λ (K)). In particular, if t and t are spin c structures on W λ (K) whose restrictions to Y λ (K) (resp. Y ) are the same, then they differ by a multiple of PD[C] (resp. PD[C * ]).
Let F be a rational Seifert surface for K, and assume that [∂F ] = dλ − kµ in H 1 (∂(Y nbd(K))). We can cap off F in W λ (K) to obtain a closed surfaceF . 9 To understand this surface, it helps to imagine attaching the 2-handle in two steps: is homologous to (d parallel copies of λ) × {1}; let G be a surface joining them, and letF = F ∪ G ∪ (d parallel copies of the core of the 2-handle). The homology class We may represent W by a doubly pointed Heegaard triple diagram (Σ, α, β, γ, w, z) with the following properties: • The diagram (Σ, α, β, w, z) represents (Y, K), as above. Moreover, there is an arc t α from z to w that meets β g in a single point and is disjoint from all other α and β curves. • The curve β g meets α g in a single point x 0 and is disjoint from the remaining α curves. • The curve γ g is a λ-framed longitude that meets β g once and is disjoint from the remaining β curves; it is oriented with the same orientation as K. For i = 1, . . . , g − 1, γ i is a small pushoff of β i , meeting β i in two points. • The points w and z lie to the right of γ g (with its specified orientation). We say that (Σ, α, β, γ, w, z) is adapted to (Y, K, λ).
we will further assume that (Σ, α, β, w) is admissible for all torsion spin c structures on Y . Indeed, let Π αβ denote the group of (α, β) periodic domains satisfying n w = 0, and define Π αγ analogously. Then Π αβ ∼ = H 2 (Y ) and Π αγ ∼ = H 2 (Y λ (K)). Because K is rationally null-homologous, every element of Π αβ must have n w = n z , so the multiplicity of β g in its boundary is 0. Furthermore, if k = 0, there is a natural isomorphism Π αβ ∼ = Π αγ , given by adding thin (β, γ) periodic domains; thus, the multiplicity of γ g in the boundary of any element of Π αγ is also 0. (If k = 0, then Π αγ ∼ = Π αβ ⊕ Z, where the generator of the Z factor is given by P plus appropriate thin domains, but we will rarely need to consider this case.) Orient the curves α g , β g , γ g so that #(α g ∩ β g ) = #(γ g ∩ β g ) = #(t α ∩ β g ) = 1 and γ g . Orient the remaining α, β, and γ curves arbitrarily, except that β i and γ i are assume to be oriented parallel to each other for i = 1, . . . , g − 1. There is a triply periodic domain P with n z (P ) = −k, n w (P ) = 0, and for some integers a i , b i (using the specified orientations). This periodic domain represents the class of a capped-off Seifert surface in H 2 (W λ (K)); we may also view it as a relative periodic domain in the sense of the previous subsection. (Compare Figure  2.) If k > 0, then the diagram (Σ, α, β, γ, w) is admissible since P has both positive and negative coefficients. If k < 0, an adapted diagram is not necessarily admissible. We can achieve admissibility by winding, as discussed below.
The self-intersection number of the homology class represented by P is given by In this case, this formula gives Figure 4. Winding γ g . The numbers represent the local multiplicities of the triply periodic domain P .
As discussed above, let K λ ⊂ Y λ (K) be obtained from a left-handed meridian of K. Let z be a basepoint on the other side of γ g from w. The Heegaard diagram (Σ, α, γ, w, z ) then represents K λ , with the specified orientation.
We now show how to relate the Alexander gradings for (Y, Proof. To begin, we may assume that the Heegaard diagram contains a "winding region" in a tubular neighborhood of β g , shown in Figure 4 in the case where k is positive. Specifically, we wind the γ curve |k| times in a direction specified by the sign of k, so that every spin c structure on Y λ (K) is represented by a generator that uses a point in the winding region. When k < 0, this further guarantees that the triple diagram (Σ, α, β, γ, w) is admissible, since n w (P ) = 0 and P has both positive and negative coefficients. The general case will then follow by tracing through the proof of isotopy invariance.
Up to permuting the indices of the β curves, let us assume that x consists of points x j ∈ α j ∩ β j for j = 1, . . . , g. In particular, x g is the unique point in α g ∩ β g , which is located in the winding region. For j = 1, . . . , g − 1, the local multiplicities of P around x j are c j , c j + a j , c j + a j + b j , c j + b j in some order (for some c j ), while the local multiplicities at x g are 0, d, d − k, −k as in Figure 4. Hence, we have For each x ∈ T α ∩ T β and each i = 1, . . . , |k|, let x i ∈ T α ∩ T γ be the generator consisting of the i th point of α g ∩γ g over from x g , together with the points of α j ∩γ j that are "nearest" to x j for j = 1, . . . , g − 1. These generators all represent different spin c structures on Y λ (K). Let ψ x,i ∈ π 2 (x, Θ βγ , x i ) be the class whose domain consists of g small triangles ψ j x,i , where ψ g x,i is supported in the winding region (having positive coefficients if k > 0 and negative coefficients if k < 0), and for j = 1, . . . , g − 1, ψ j x,i connects x j to its "nearest point" in α j ∩ γ j (and is independent of i). It is easy to check that We begin by showing that (4.2) and (4.3) hold when ψ = ψ x,i . Let P be obtained from P by adding copies of the small periodic domains bounded by β i − γ i for i = 1, . . . , g − 1. Then P is a relative periodic domain for K λ , in the sense of Section 2.3. We consider each of the terms in (1.13). We haveχ(P ) =χ(P ). Letw andz be the points on β g closest to w and z , respectively; then Finally, for x ∈ T α ∩ T β and i = 1, . . . , k, we have: For j = 1, . . . , g − 1, the local multiplicities of P at x j are the same as those of P at the nearest point. Combining these facts, we see that To prove (4.4), we use the first Chern class formula from [39, Proposition 6.3]. 10 The local contribution of ψ j x,i to the dual spider number Note that the latter equals n w (ψ x,i ) in either case. Therefore, 10 There is a sign inconsistency in the definition of the dual spider number in [39, Section 6.1]: if we compute intersection numbers in the usual way, it should be rather than with + signs throughout. Also, the term #(∂P ) is a signed count of the curves in ∂P relative to some fixed orientations (which are the ones used to define the parallel pushoffs ∂ α P , etc.) Now, we consider an arbitrary triangle ψ ∈ π 2 (x, Θ βγ , q). (Assume that k > 0; the other case follows similarly.) Choose r ∈ Z and i ∈ {1, . . . , k} such that as required. Similarly, we have: characterized by the property that for ψ ∈ π 2 (x, Θ βγ , q), (where, as above, our µ is the negative of theirs). Lemma 4.2 gives an explicit and diagram-independent description of E Y,λ,K : for any t ∈ Spin c (W λ (K)), E Y,λ,K (t) is the relative spin c structure that satisfies Let W λ = W λ (K) denote W λ with orientation reversed, viewed as a cobordism from Y λ (K) to Y . This cobordism can be represented by the triple diagram (Σ, α, γ, β). The periodic domain P still generates H 2 (W λ ); with respect to the reversed orientation, we have [P ] 2 = −dk. Let Θ γβ be the corresponding top generator. The analogue of Lemma 4.2 for (α, γ, β) triangles then states: Proof. There is a disk φ ∈ π 2 (Θ βγ , Θ γβ ) consisting entirely of small bigons outside the winding region, with n w (φ) = n z (φ) = n z (φ) = 0. Hence, for any q ∈ T α ∩ T γ , x ∈ T α ∩ T β , and ψ ∈ π 2 (q, Θ γβ , x), we have a class ψ = ψ * φ ∈ π 2 (x, Θ βγ , q). We now apply Lemma 4.2 to this class.
As a consequence of either of the two previous lemmas, we see that the cosets in Q/Z in which the Alexander gradings for Y λ (K) are contained is closely connected to spin c structures on W λ (K): Corollary 4.5. Let t ∈ Spin c (Y λ (K)), and let v be any spin c structure on W λ (K) extending t. Then Proof. Apply (4.4) to any triangle representing v.

Large surgeries
In this section, we will restate the large surgery formulas from [42, Section 4] and [11,Section 4.1] with more details about the Alexander and Maslov gradings, and prove some key lemmas that will be needed for studying the surgery exact triangle in Section 6. Throughout this section, let λ denote a fixed longitude for K as above, corresponding to some integer k = 0. We will be studying Heegaard diagrams for Y λ+mµ (K), where m is a large positive integer. i is a small translate of γ i meeting it in two points. The curve δ g is obtained from a parallel pushoff of γ g by performing m left-handed Dehn twists parallel to β g , where b (resp. m − b) of these twists are performed in the component of A A on the same side of β g as w (resp. z). (See Figure 5.) We say that the Heegaard diagram (Σ, α, δ m,b , w, z, z ) is well-adapted to (λ + mµ)-surgery on K. We call A the winding region. If m and b are understood from context, we omit the superscripts from the δ curves.
The Heegaard triple diagram (Σ, α, β, δ m,b , w, z, z ) is adapted to (λ+mµ)-surgery on K. Hence, all the results of the previous section apply, where we take k + dm in place of k throughout.
As shown in Figure 5, let u be a basepoint located on the w side of β g , in between γ g and δ g . This will be needed later on to understand the effect of (α, γ, δ) triangles on the Alexander grading.
We will typically use s, t, and u to refer to spin c structures on Y αβ , Y αγ , and Y αδ , respectively, and use v for spin c structures on the various cobordisms between them. As a notational convenience, define S(α, β) = T α ∩ T β and and likewise for the spin c decompositions of the other complexes.
To begin, for any j = 1, . . . , g − 1, there are small periodic domains S j βγ and S j γδ with ∂S j βγ = β j − γ j and ∂S j γδ = γ j − δ j , supported in a small neighborhood of each pair of curves. We will refer to these as thin domains. As in the previous section, the groups Π αβ , Π αγ , and Π αδ are naturally isomorphic, by adding thin domains as needed.
Let P γ and P δ be the triply periodic domains for (α, β, γ) and (α, β, δ), respectively, which correspond to P from Section 4. Specifically, we have n w (P γ ) = n w (P δ ) = 0 and There is a (β, γ, δ) triply periodic domain Q with The multiplicities of the periodic domains at the various basepoints are as follows: Let Π αβγδ denote the group of integral (α, β, γ, δ) periodic domains with n w = 0, and letΠ αβγδ denote its quotient by the thin domains. Define Π αβγ , Π αβδ , Π αγδ , and Π βγδ and their barred versions similarly. The following lemma is left as an exercise for the reader: Lemma 5.1. The groupΠ αβγδ is free abelian of rank 2 + b 1 (Y ), generated (over Z) by P γ and Q together with any basis for Π αβ ∼ = H 2 (Y ). For any multi-periodic domain S (including those with nonzero multiplicity at w), we have N (S) = 0, since any such domain is a linear combination of P γ , Q, Σ, thin domains, and elements of Π αβ , and N vanishes for each of these. Observe that for different types of domains, the formula for N (S) simplifies considerably depending on which basepoints are in the same regions. These simplifications are noted in the following table: Topology of the cobordisms. Let us consider the topology of the cobordisms associated with the quadruple diagram (Σ, α, β, γ, δ).
The construction from [37, Section 8.1.5] gives rise to three separate 4-manifolds X αβγδ , X αγδβ , and X αδβγ , with: Each one comes with a pair of decompositions: The 3-manifolds in question are: Note also that X αγβ = −X αβγ , and so on. LetX αβγ ,X αβγδ , etc., be the manifolds obtained by attaching 3-handles to kill all of the S 1 × S 2 summands in Y βγ , Y γδ , and Y δβ , as appropriate; analogues of (5.5), (5.6), and (5.7) hold for these manifolds as well. In each case, there are isomorphisms making the following diagram commute: where * is any 3-or 4-element ordered subset of {α, β, γ, δ}). In particular, the periodic domains {P γ , P δ , Q, R} represent homology classes which survive in H 2 (X αβγδ ) and satisfy the relations .) The same relations also hold in H 2 (X αγδβ ) and H 2 (X αδβγ ), which are defined analogously.
Let W αβγ (resp. W αδβ ) be obtained fromX αβγ (resp.X αδβ ) by gluing a 4-handle to the S 3 boundary component left over from Y βγ (resp. Y δβ ). These cobordisms are simply the 2-handle cobordisms W λ (K) and W λ+mµ (K), respectively. However, we cannot do this withX αγδ , since the boundary component left over from Y γδ is L(m, 1) rather than S 3 . Instead, let W αγδ be obtained fromX αγδ by deleting a neighborhood of an arc connecting Y αγ and L(m, 1). This is a cobordism from Y λ (K) # L(m, 1) to Y λ+mµ given by a single 2-handle attachment.
The situation for Y γδ is a bit more complicated. The triple diagram (Σ, γ, β, δ) is an adapted diagram for m-framed surgery on the unknot in # g−1 (S 1 × S 2 ), where β g is the meridian and δ g is the longitude, and −Q plays the role of P from Section 4; this confirms that Y γδ is indeed as describe above. Indeed, if we let B m denote the Euler number m disk bundle over S 2 , which has boundary L(m, 1), the 2-handle cobordism associated to (Σ, γ, β, δ) is diffeomorphic to ((# g−1 S 1 × S 2 ) × I) B m , and Q corresponds to the homology class of the zero section in B m .
Let s 0 γδ ∈ Spin c (Y γδ ) denote the canonical spin c structure from [42, Definition 6.3]; that is, s 0 γδ the unique spin c structure on Y γδ that is torsion and has an extension t to X γβδ which satisfies c 1 (t), [S 2 ] = ±m. The m intersection points of γ g ∩ δ g can be paired with the top-dimensional intersection points of γ j ∩ δ j (j = 1, . . . , g − 1) to give m canonical cycles in CF ≤0 (Σ, γ, δ, w), each of which represents a different torsion spin c structure on Y γδ . Let Θ γδ denote the generator which uses the point of γ j ∩ δ j that is adjacent to w, z , and u, as shown in Figure 5. We have: Lemma 5.2. The generator Θ γδ represents s 0 γδ . We prove this by studying the diagram (Σ, β, γ, δ), which describes the same 4manifold as (Σ, γ, β, δ) but with reversed orientation. The following result is a simple adaptation of [39, Section 6]; see also [9, Section 5].
Since the restriction of s w (τ ± l ) to Y γδ is s w (Θ γδ ), this shows that s w (Θ γδ ) is the canonical spin c structure.
For each of the 4-manifolds X * described above, let Spin c 0 (X * ) denote the set of spin c structures that restrict to s 0 βγ on Y βγ , s 0 γδ on Y γδ , and s 0 δβ on Y δβ , as applicable. Note that all such spin c structures extend uniquely toX * .
Remark 5.4. Assuming that k and k + dm are both nonzero, the groups H 2 (Y αβ ), H 2 (Y αγ ), and H 2 (Y αδ ) are naturally isomorphic. Moreover, these isomorphisms are realized through the cobordisms X * ; that is, any element S αβ ∈ H 2 (Y αβ ) is homologous in X αβγ to a unique element S αγ ∈ H 2 (Y αγ ), and so on. As a result, if s ∈ Spin c (Y αβ ) and t ∈ Spin c (Y αγ ) are the restrictions of some v ∈ Spin c 0 (X αβγ ), then c 1 (s), S αβ = c 1 (t), S αγ . In particular, s is torsion iff t is torsion. (The same applies for the other cobordisms.) We conclude this section by discussing the intersection forms on the 4-manifolds X * . While H 2 (X αβγδ ), H 2 (X αγδβ ), and H 2 (X αδβγ ) are all isomorphic groups, their intersection forms are quite different, as we now explain.
In X αβγδ , the classes [P γ ], [P δ ], [Q], and [R] can be represented by surfaces which are contained in X αβγ , X αβδ , X βγδ , and X αγδ , respectively. Using the formula (4.1), we can compute that (5.8) The decomposition (5.5) shows that On the other hand, in X αγδβ , the above-mentioned classes have different selfintersection numbers (up to sign) and different pairs which are disjoint, namely: The signs of [P γ ] 2 and [P δ ] 2 are reversed because they are contained in X αγβ and X αδβ , respectively, which are diffeomorphic to −X αβγ and −X αβδ . Note that these determine the reversed cobordisms W λ (K) and W λ+mµ (K). Similar analysis applies to X αδβγ .

5.4.
Polygons, spin c structures, and Alexander gradings. We now describe the Alexander grading shifts and c 1 evaluations associated to Whitney triangles and rectangles in our Heegaard multi-diagram. If b 1 (Y ) > 0, then the Alexander grading may depend on the choice of homology class of Seifert surface; if so, we fix such a choice for K, and use the corresponding choices for K λ and K λ+mµ .
Throughout the rest of the paper, we will generally refer to elements of T α ∩ T β as x or y, elements of T α ∩ T γ as q or r, and elements of T α ∩ T δ as a or b. Also, as a notational convenience, let us define: (That is,Ã denotes the other normalization convention for the Alexander grading, as discussed in footnote 5.) (1) For any ψ ∈ π 2 (x, Θ βγ , q), (2) For any ψ ∈ π 2 (q, Θ γδ , a), (3) For any ψ ∈ π 2 (a, Θ δβ , x), Note that the linear combinations of basepoint multiplicities in (5.10), (5.13), and (5.16) are all specializations of N (ψ) from (5.4).
Proof of Proposition 5.5. The statements about (α, β, γ) and (α, δ, β) triangles are given by Lemmas 4.2 and 4.4, respectively, where for the latter we take k + dm in place of k. It remains to prove the three statements about (α, γ, δ) triangles.
Using Lemma 4.2 (with k + dm in place of k), we now compute:
5.5. The filtered large surgery formula. We now focus on the special Heegaard diagrams (Σ, α, δ) associated to Y λ+mµ (K), adding some additional details to the discussion from [35, Section 4], [42, Section 4], [11, Section 4.1], and elsewhere. For ease of notation, let us write W m = W λ+mµ (K) and W m = W λ+mµ (K); these are the cobordisms induced by (Σ, α, β, δ) and (Σ, α, δ, β), respectively. For any u ∈ Spin c (Y λ+mµ (K)), the set of spin c structures on W m which extend u form an orbit of the action of PD[C], where C denotes the core of the 2-handle attached to Y , extended across Y × I. For each such spin c structure v, we have so the values of c 1 (v), [F ] taken over all such v form a single coset in Z/2(k + dm). Therefore, we can make the following definition.
Definition 5.7. For each u ∈ Spin c (Y λ+mµ (K)), let x u denote the unique spin c structure on W m extending u such that Finally, define Note that x u and y u achieve the two lowest values of | c 1 (v), [P δ ] | among all v ∈ Spin c (W m ) restricting to u. (These two values may be equal.) In the special case where c 1 (x u ), [P δ ] = 0 and c 1 (y u ), [P δ ] = 2(k + dm), there is a third spin c structure whose evaluation is −2(k + dm), but this will not affect our arguments. Finally, Corollary 4.5 implies that for any a ∈ T α ∩ T δ , we have the congruence (5.36) 2Ã(a) + k + dm + d ≡ 2ds u (mod 2(k + dm)).
We define a pair of filtrations I u , J u on CFK ∞ (Y, K, s u ) by the formula . (5.38) (Compare (1.5) and (1.6).) It is clear from the definition that the differential on CFK ∞ (Y, K, s u ) is filtered with respect to both I u and J u . Observe that I u only depends on u via the number s u , while J u also includes a shift that depends on k + dm.
The bulk of Theorem 5.8 was proven by Ozsváth and Szabó, apart from the presence of the second filtration and a slight technical issue regarding the definition of x u and y u (see Remark 5.13 below). We will follow through their proof while keeping track of the second filtration, clarifying a few details along the way. (An analogous result for large negative surgeries on knots in S 3 , including the second filtration, was shown by Kim, Livingston, and the first author [8,Theorem 4.2].) Consider any well-adapted Heegaard diagram (Σ, α, β, γ, δ m,b , w, z, z ), as described above. The reader should refer to Figure 5.
We begin by discussing the generators in S(α, δ m,b ) more carefully. Let q be the unique point of α g ∩ β g . Label the m points of α g ∩ δ m,b g in the winding region p b−m , . . . , p b−1 according to the orientation of α g . Thus, p l is on the z side of β g if l < 0 and on the w side if l ≥ 0, and q lies between p −1 and p 0 . For any x ∈ S(α, β) and l ∈ {b−m, . . . , b−1}, let x m,b l ∈ S(α, δ m,b ) be the point obtained by replacing q with p l and taking "nearest points" elsewhere; these generators are called interior generators. (We sometimes omit the superscripts if they are understood from context.) There is a small triangle ψ m,b x,l ∈ π 2 (x m,b l , Θ δβ , x) with (5.39) (n w (ψ m,b x,l ), n z (ψ m,b x,l ), n z (ψ m,b x,l )) = (0, −l, 0) l < 0 (l, 0, l + 1) l ≥ 0.
The spin c structures represented by the two types of generators in S(α, δ m,b ) are governed by the following lemma: Lemma 5.9. For any m > 0 and any 0 ≤ b ≤ m, the following hold: (1) For each x ∈ S(α, β) and each l ∈ {b−m, . . . , b−1}, s w (x m,b l ) ∈ Spin c (Y λ+mµ (K)) depends only on x and l and not on b. Moreover, the Maslov grading of x m,b l is given by Thus, s w (ψ m,b x,l ) is completely determined by x and l and is independent of b. The same is therefore true of s w (x m,b l ). Equation (5.40) then follows because For statement (2) Definition 5.10. Following [42, Definition 4.3], we say that u ∈ Spin c (Y λ+mµ ) is supported in the winding region of (Σ, α, δ m,b ) if every a ∈ T α ∩ T δ with s w (a) = u is of the form x m,b l for some l, and for every pair of such generators a, b and any φ ∈ π 2 (a, b), ∂D(φ) ∩ δ g is contained in the winding region. (By Remark 4.1, the multiplicity of δ g in the boundary of any (α, δ) periodic domain is 0, so this condition holds for a single φ ∈ π 2 (a, b) iff it holds for every φ.) We say that u is strongly supported in the winding region if, additionally, for each generator x l representing u, we have c 1 (s w (ψ m,b x,l )) = x u (equivalently, c 1 (s z (ψ m,b x,l )) = y u ). The following lemma gives a more explicit characterization of what it means for a spin c structure to be (strongly) supported in the winding region.
(2) A spin c structure u is supported in the winding region of (Σ, α, δ m,b , w) iff for some spin c structure s on Y and some constant L, we have A spin c structure u is strongly supported in the winding region of (Σ, α, δ m,b , w) iff Proof. For the "only if" direction of statement 1, suppose s w (x m,b i ) = s w (y m,b j ), and choose any class φ ∈ π 2 (x m,b i , y m,b j ). Consider the concatenation ρ = ψ x,i * φ * ψ y,j . The domain of ρ has boundary equal to (x, y) (viewed as a 1-chain in α∪β) together with r copies of δ g , where r = n z (ρ) − n w (ρ) ∈ Z. This shows that (x, y) is homologous to −r[K] in H 1 (Y ). Moreover, B = dD(ρ) − rP δ (plus thin domains) is a domain whose boundary is d (x, y). Therefore, The "if" direction follows similarly, by applying the same construction in reverse.
For the "only if" direction of statement 2, suppose u is supported in the winding region. If x m,b i and y m,b j are generators representing u, let φ ∈ π 2 (x m,b i , y m,b j ) be a class whose δ g boundary segment is contained in the winding region. Applying the above construction, we find that r = 0. Thus, s w (x) = s w (y) and A(x) − A(y) = i − j, so both x m,b i and y m,b j are of the stated form. Moreover, given any generators x, y with s w (x) = s w (y) and s w (x m,b i ) = u for some i, we can find some j for which s w (y m,b j ) = u as well, and therefore i − j = A(x) − A(y). The converse follows similarly.
Lemma 5.12. Let (Σ, α, β, γ, w, z) be an adapted Heegaard diagram for λ-surgery on K. Then there exists an M such that for all m ≥ M and each spin c structure u ∈ Spin c (Y λ+mµ (K)), u is strongly supported in the winding region of (Σ, α, δ m,b , w) for some b. (Note, however, that b depends on the choice of u.) Remark 5.13. In [42, Lemmas 4.5 and 4.6], it is shown that each spin c structure u can be supported in the winding region, in such a way that for each small triangle ψ, we have −C − 2(k + dm) ≤ c 1 (s w (ψ)), [P δ ] ≤ C for some constant C ≥ 0 independent of m. However, this is not quite as strong as saying that u is strongly supported in the winding region, since these bounds do not uniquely determine s w (ψ).
Proof of Lemma 5.12. We begin by establishing a sufficient condition for S(α, δ m,b , w, u) to contain all the generators called for by (5.44), i.e., Thus, a sufficient condition for (5.45) is that Let B(u) denote the difference between the upper and lower bounds in (5.46); then Next, we discuss the Alexander grading on CF(α, δ, w) induced by the knot K λ+mµ . (Henceforth, we omit the m, b superscripts for conciseness.) For any interior generator x l , (5.16) gives: If we assume that x l represents a spin c structure u which is strongly supported in the winding region, then l = A(x) − s u , and therefore we have: Thus, the Alexander grading for u takes exactly two values, which differ by 1. (Cf. [11,Theorem 4.2]).
Proof of Theorem 5.8. Using Lemma 5.12, we may assume that u is strongly supported in the winding region of (Σ, α, δ m,b , w, z ) for some b. Define Standard arguments show that Λ ∞ u is a chain map, and the shift in the Maslov grading by ∆ u makes Λ ∞ u grading-preserving. Using the standard identification of CF ∞ (Σ, α, δ, w, u) with CFK ∞ (Σ, α, δ, w, z , u), we may also think of Λ u as being defined on the latter.
Because u is strongly supported in the winding region, every element of S(α, δ, w, u) is of the form x l , where x ∈ S(α, β, w, s u ) and l = A(x) − s u . Denote the contributions to Λ ∞ u coming from the small triangles ψ x,l byΛ ∞ u . By (5.39), these terms are given by Note thatΛ ∞ u is a F[U ]-module isomorphism but not necessarily a chain map. Indeed, it is easy to check that for [x, i, j] with j = i + A(x), the inverse ofΛ ∞ u is given by: where l = A(x) − s u as above.
The proof that Λ ∞ u is a chain isomorphism uses the fact that Λ ∞ u =Λ ∞ u + higher order terms with respect to an energy filtration, as proved by Ozsváth and Szabó. We just need to check that every triangle contributing to Λ ∞ u decreases or preserves both filtrations, and that every triangle contributing toΛ ∞ u preserves both filtrations. The proof for I u is obvious from the definition, so we focus on J u .
In the case where n z (ψ) = 0 and l < 0, equations (5.17), (5.47) (with y in place of x), and (5.33) imply that and hence n w (ψ) = n z (ψ). However, the multiplicity of ψ in the fourth region abutting Θ δβ in the winding region must then be −1, a contradiction. Thus, the left-hand side of (5.53) is always nonnegative, as required.
Finally, the small triangles ψ x,l (which contribute toΛ ∞ u ) all have either n w (ψ) = 0 or n z (ψ) = 0, and hence the difference (5.53) vanishes for those terms.
Example 5.14. As a sanity check, consider the example where Y = S 3 and K is the unknot, so that Y m (K) is the lens space L(m, 1). Denote the induced knot by O m . In this case, we may assume that Figure 5  5.6. Maslov gradings on the large surgery. We will now prove some bounds on the Maslov gradings on the complexes CF t (Σ, α, δ m,b , w) as a function of m, provided that b is within a bounded distance of m 2 . These bounds will be used in Section 6 to control the spin c structures in the surgery exact triangle. The technical statement is as follows: Proposition 5. 15. Let (Σ, α, β, γ, w, z, z ) be a Heegaard triple diagram adapted to (Y, K, λ) as above. For any integer e ≥ 0, there is a constant C ≥ 0 such that for all m sufficiently large, and any b with m−e 2 ≤ b ≤ m+e 2 , 11 every generator a ∈ T α ∩ T δ m,b satisfies Remark 5. 16. In [42, Corollary 4.7], which is stated when Y is an integer homology sphere (hence d = 1), Ozsváth and Szabó proved the upper bound from (5.55) but gave an incorrect lower bound, asserting that the gradings on CF t (Σ, α, δ, w) are always within a bounded distance of m/4. Equation (5.54) above shows that only a constant lower bound is possible. Additionally, the statement of [42, Corollary 4.7] requires looking at different Heegaard diagrams for different spin c structures on Y λ+mµ (K) (namely, arranging for the chosen spin c structure to be supported in the winding region), whereas Proposition 5.15 applies simultaneously to all of the generators in the same Heegaard diagram.
To prove Proposition 5.15, there are two types of generators in T α ∩ T δ to consider: interior generators x m,b l (for x ∈ T α ∩ T β ) and exterior generators q m,b (for q ∈ T α ∩ T γ ). These two types of generators will require separate arguments.
Lemma 5. 17. Fix e ≥ 0. There is a constant C 1 ≥ 0 such that for any m sufficiently large, if we take m−e 2 ≤ b ≤ m+e 2 , then for any x ∈ T α ∩T β and any l = b−m, . . . , b−1, the grading of the generator x l satisfies Proof. By our hypothesis on b, we may assume that − m+e 2 ≤ l ≤ m+e 2 . Using Lemma 5.9, for each x ∈ T α ∩ T β , define (5.56) g x (l) := gr(x m,b l ) − gr(x) + which we may view as a function of all real numbers l. Assuming m is sufficiently large, one can easily check that the local minima of g x occur at l = A(x) ± k+dm 2d , with values of 0 and −2A(x). The local maxima of g x on the interval [− m+e 2 , m+e 2 ] occur for l ∈ {− m+e 2 , 0, m+e 2 }, with values given by: Both g x (− m+e 2 ) and g x ( m+e 2 ) are bounded above independent of m, whereas g(0) = gr(x 0 ) is not, so g attains its global maximum on the interval [− m+e 2 , m+e 2 ] at l = 0.
Thus, there is a constant C x such that for any b satisfying m−e 2 ≤ b ≤ m+e 2 and any Maximizing C x over all x ∈ T α ∩ T β gives the desired result. To prove this lemma, we will work inductively on m and b. Note that the Heegaard quadruple diagrams (Σ, α, β, δ m,b , δ m+1,b ) and (Σ, α, β, δ m,b , δ m+1,b+1 ) are welladapted, where now we are treating λ+mµ as the "original" longitude and λ+(m+1)µ as the new one. The cases correspond to m = 1, b = 0 and m = 1, b = 1 respectively. For each of these quadruple diagrams, an analogue of Proposition 5.5 holds, where we plug in 1 for m, k + dm for k, and 1 for ν in each of the formulas. Let R − m,b and R + m,b respectively denote the triply periodic domains that are analogous to R in the two cases; note that [R ± m,b ] 2 = −(k + dm)(k + dm + d). We may also refer to the original γ as δ 0,0 .

The surgery exact sequence
In this section, we will examine the construction of the long exact sequence relating the Floer homologies of Y , Y λ (K), and Y λ+mµ (K) for m large. In fact, we will make all statements on the level of chain complexes, rather than discussing the resulting exact sequence on homology. Ozsváth and Szabó's original proof of the surgery formula [41, 42] does not explicitly discuss the maps that count holomorphic rectangles and pentagons (first used in [38]), so we will need to describe these maps in more detail, based on the description given by Mark and the first author [9]. 12 Throughout the proof, we will use a well-adapted diagram (Σ, α, β, γ, δ b,m , w, z, z ), as described above. We will make a series of statements about "all m sufficiently large." To be precise, this means that we fix some integer e ≥ 0, and consider pairs (m, b) for which m−e 2 ≤ b ≤ m+e 2 , as in Proposition 5.15. This will be implicit throughout; we will generally suppress b from the notation. 6.1. Construction of the exact sequence. We begin by defining the twisted chain complex associated to (Σ, α, β, w). Let Γ m denote the group ring F[Z/mZ], which we realize as the quotient F[T ]/(T m − 1). It is convenient to think of Γ m as a subring of F[Q/mZ], which is the ring of rational-exponent polynomials in T (i.e., sums r∈Q a r T r with only finitely many a r = 0) modulo the relation T m = 1. In particular, for any r ∈ Q, the coset T r Γ m depends only on the fractional part of r (and is isomorphic to F m as a vector space). 12 Our cyclic indexing of the groups and maps is shifted from that of [9]: our β, γ, and δ respectively correspond to γ 2 , γ 0 , and γ 1 there, and our f • j , h • j , and g • j (defined below) correspond to f j+2 , h j+2 , and g j+2 (indices mod 3). Also, our T corresponds to ζ in [9].
The twisted complex CF ∞ (α, β, w; Γ m ) is generated over Γ m by all pairs [x, i] as usual, with differential 13 The other versions CF − , CF + , and CF t (for t ∈ N) are derived from the infinity version in accordance with their definitions in the untwisted setting. As in [41,42], the complex CF ∞ (α, β, w; Γ m ) is isomorphic to a direct sum of m copies of CF ∞ (Σ, α, β, w), but we define the isomorphism slightly differently. Let It is simple to check that this is an isomorphism of chain complexes. Let us look more closely at the right-hand side of (6.2). For each s ∈ Spin c (Y ), there are m different powers of T occurring in CF + (α, β, s, w) ⊗ T −A(s) Γ m , with exponents in Q/mZ. We will frequently need to lift these exponents to Q; we do so by choosing the m values of r satisfying We may thus write Define chain maps f + 0 : CF + (α, β, w; Γ m ) → CF + (α, γ, w) (6.6) f + 1 : CF + (α, γ, w) → CF + (α, δ, w) (6.7) f + 2 : CF + (α, δ, w) → CF + (α, β, w; Γ m ) (6.8) by the following formulas: the analogous maps on CF t , which will play a critical role in our argument below. (There are also corresponding chain maps on the U -completed complexes CF − and CF ∞ , but not on the ordinary CF − and CF ∞ because the sums may fail to be finite.) Following [9], the quadrilateral-counting maps are defined by the following formulas: q∈Tα∩Tγ ρ∈π 2 (a,Θ δβ ,Θ βγ ,q) µ(ρ)=−1 nw(ρ)≡nz(ρ) (mod m) #M(ρ) [q, i − n w (ρ)] (6.17) A standard argument shows that for each j ∈ Z/3, the following holds: The second statement is proven by introducing pentagon-counting maps, which we discuss in Section 6.4.) Therefore, the exact triangle detection lemma [38, Lemma 4.2] implies an exact sequence on homology. Again, using the same formulas, one can likewise define such maps on CF t , CF − , and CF ∞ .
Each of the complexes CF + (α, β, w; Γ m ), CF + (α, γ, w), and CF + (α, δ, w) has a decomposition according to the evaluations of spin c structures on elements of H 2 of the corresponding 3-manifolds. Remark 5.4 implies that the maps f + j and h + j all respect that decomposition. In particular, the maps respect the subgroup of each complex consisting only of the groups in torsion spin c structures. Henceforth, by abuse of notation, we will disregard all non-torsion spin c structures; that is, whenever we refer to the Heegaard Floer complexes, we actually mean the subgroups consisting of only the torsion spin c structures.
Each of the three complexes discussed above is naturally filtered by the i coordinate, with respect to which the maps f j and h j are obviously filtered. We define a second filtration on each complex as follows: Definition 6.1.
• The filtration J αγ on CF + (α, γ, w) is simply the Alexander filtration: • The filtration J αδ on CF + (α, δ, w) is the Alexander filtration shifted by a constant on each spin c summand. To be precise, for each spin c structure u, and each generator a with s w (a) = u, we define where s u is the number from Definition 5.7. • The filtration J αβ on CF + (α, β, w; Γ m ) is defined via the identification θ and the decomposition (6.5). For any x ∈ T α ∩ T β with s w (x) = s, and any r satisfying (6.4), That is, J αβ is the trivial filtration shifted by a constant that depends linearly on the exponent of T , and it does not depend on x except via its the associated spin c structure. We transport this back to CF + (α, β, w; Γ m ) via θ.
It would be tempting to try to prove that the maps f + j and h + j defined above are all filtered with respect to the filtrations J αβ , J αγ , and J αδ , but this turns out not to be the case. To understand the reason for this failure, we must look at spin c structures. Each of the maps f + j , h + j decomposes as a sum of terms corresponding to spin c structures on the relevant cobordisms: for instance, we may write where f + 0,v counts only the terms in (6.9) for which s w (ψ) = v, and likewise for the other maps. (Recall that Spin c 0 (X αβγ ) denotes the set of spin c structures which restrict to the canonical torsion spin c structure on Y βγ , which is represented by the generator Θ βγ .) As we will see, for each triangle ψ contributing to f + j,v , the filtration shift of ψ is given by n z (ψ) plus a term that is given by a linear step function of the evaluation of c 1 (v) on the relevant triply periodic domain (P γ , R, or P δ ). As a result, f + j,v is filtered only when v lies within a certain range.
However, the maps on the truncated complexes CF t (for t ∈ N) are better behaved. Since the Maslov grading shift of f t j,v is given by a quadratic function of c 1 (v), only finitely many terms of the terms f t j,v can be nonzero for any fixed t. (If b 1 (Y ) > 0, this is why we only consider the torsion spin c structures.) By looking closely at how the Maslov gradings interact with the filtration shifts described above, we will prove: Proposition 6.2. Fix t ∈ N. For all m sufficiently large, the maps f t 0 , f t 1 , and f t 2 are all filtered with respect to the filtrations J αβ , J αγ , and J αδ . Moreover, for any triangle ψ contributing to any of these maps, the filtration shift of the corresponding term equals n z (ψ).
The situation with the rectangle-counting maps is even more complicated. Unlike with the triangle maps, the Maslov grading alone does not guarantee that the only nonzero terms h t j,v are filtered. However, it turns out that we can simply throw away the bad terms. To be precise, we will define "truncated" versionsh t j , each of which is a sum of terms h t j,v satisfying certain constraints. We will prove: Proposition 6.3. Fix t ∈ N. For all m sufficiently large, the mapsh t 0 ,h t 1 , andh t 2 have the following properties: The challenging part is to choose the spin c constraints appropriately so as to makẽ h t j a filtered map but still preserve the degeneration arguments needed to prove the other properties. Moreover, the filtered quasi-isomorphism property requires defining spin c -truncated versions of the pentagon-counting maps, which we will discuss in Section 6.4.
We also define a modified version of the Maslov (homological) grading on each of the three complexes.
Definition 6.4. Let gr denote the standard Maslov grading on each complex; in particular, on CF • (α, β; Γ m ), it is simply an extension of the ordinary Maslov grading on the untwisted complex, without reference to the twisting variable T . The new grading gr is defined as follows: • On CF • (α, γ, w), define gr = gr.
(Throughout the discussion below, we will use gr(f ) and gr(f ) to denote the grading shift of any map f with respect to the appropriate grading: for instance, gr(f ) = gr(f (x)) − gr(x)) for any homogeneous element f .) Proposition 6.5. Fix t ∈ N. For all m sufficiently large, the maps f t 0 , f t 1 , f t 2 ,h t 0 , h t 1 , andh t 2 are all homogeneous with respect to gr, with respective degrees 0, −1, 0, 0, 0, and 1.
Combining Propositions 6.2 and 6.3 with Lemma 2.2, we deduce: Theorem 6.6. Fix t ∈ N. For all m sufficiently large, the map is a filtered homotopy equivalence that preserves the grading gr.
6.2. Triangle maps. In this section, we prove Proposition 6.2. We consider the maps f t 0 , f t 1 , and f t 2 individually. (Throughout, we will write f • j when making statements that apply all the flavors of Heegaard Floer homology.) To begin, we look at how the spin c decomposition of f • 0 interacts with the trivializing map θ. For any v ∈ Spin c 0 (X αβγ ), any x ∈ T α ∩ T β with s w (x) = v| Y , and any r ∈ Q/mZ congruent mod Z to −A w,z (x), we have: By (5.11), note that .
On this summand, neglecting the power of T , the composition equals the untwisted cobordism map F • W λ (K),v . Lemma 6.7. Fix t ∈ N and > 0. For all m sufficiently large, if v is a spin c structure for which f t 0,v = 0, then (6.23) In particular, if we take < 1, then for any s ∈ Spin c (Y ) and any r ∈ Q which satisfies (6.4), there is at most one v ∈ Spin c (W λ (K)) for which f t 0,v •θ −1 may restrict nontrivially to CF(α, β, s, w) ⊗ T r Γ m ; this spin c structure must satisfy Proof. The grading shift of the term f • 0,v is given by For fixed t, gradings of nonzero elements of CF t (α, β, w; Γ m ) and CF t (α, γ, w) are bounded by a constant independent of m. Thus, for m sufficiently large, the terms For the second statement, note that the values of c 1 (v), [P γ ] for which f t 0,v • θ −1 may restrict nontrivially to CF t (α, β, w, s) ⊗ T r form a single coset in Z/2dm. If < 1, there is at most one such value within the permitted range. Proposition 6.8. Fix t ∈ N. For all m sufficiently large, the map f t 0 : CF t (α, β, w; Γ m ) → CF t (α, γ, w) is filtered with respect to the filtrations J αβ and J αγ and is homogeneous of degree −1 with respect to gr.
Proof. Assume m is large enough to satisfy Lemma 6.7 (with ≤ 1). Let v be a spin c structure for which f t 0,v = 0, and let s = v| Y , which must therefore satisfy (6.24). For any x ∈ T α ∩ T β and q ∈ T α ∩ T γ with s w (x) = s = v| Y αβ and s w (q) = v| Yαγ , and any triangle ψ ∈ π 2 (x, Θ βγ , q) contributing to f t 0,v , we then have: as required. The final statement follows from (6.22), (6.24), and (6.25).
By a result of Zemke [50], each term f • 1,v has an alternate description, as follows. Let t = v| Y λ (K) . As in Section 5.3, let W αγδ be the 2-handle cobordism from Y λ (K) # L(m, 1) to Y λ+mµ obtained by drilling out an arc fromX αγδ . Then v induces a spin c structure on W αγδ whose restriction to Y λ (K) # L(m, 1) is t # s 0 , where s 0 is the canonical spin c structure on L(m, 1). Moreover, since L(m, 1) is an L-space, CF • (Y λ (K) # L(m, 1), t # s 0 ) is naturally identified with CF • (Y λ (K), t) with grading shifted up by m−1 4 (which is the grading of the generator of HF(L(m, 1), s 0 )). Under this identification, [50, Theorem 9.1] implies that f • 1,v is naturally identified with the map F • W αγδ ,v , as originally defined by Ozsváth and Szabó [39]. As a consequence of this identification, we deduce that f • 1,v is homogeneous of degree In particular, for any u ∈ Spin c (Y λ+mµ (K)), there is at most one nonzero term landing in CF t (Σ, α, δ, u, w), corresponding to a spin c structure v with Proof. By Proposition 5.15, there is a constant C such that for all m sufficiently large, (Here, we used the fact that the gradings on CF t (Σ, α, γ, w) are bounded above and below independent of m.) Thus, for another constant C , and hence Thus, we obtain an upper bound on | c 1 (v), [R] | which is asymptotic to m 3/2 if k > 0 and to m if k < 0. In either case, for m sufficiently large, we immediately deduce the weaker bound (6.28).
Proposition 6.10. For m sufficiently large, the map f t 1 : CF t (α, γ, w) → CF t (α, δ, w) is filtered with respect to the filtrations J αγ and J αδ and is homogeneous of degree −1 with respect to gr.
6.2.3. The map f t 2 . We start by examining how the spin c decomposition of f • 2 interacts with the trivializing map θ. For any a ∈ T α ∩ T δ , using (5.18), we have: In other words, the term θ • f • 2,v lands in the summand and agrees with the untwisted map F • W m ,v in the first factor. The Maslov grading shift of the term f • 2,v is given by Lemma 6.11. Fix t ∈ N and > 0. For all m sufficiently large, if f t 2,v = 0, then (6.32) In particular, if we assume that (1 + )(k + dm) < 2dm, the only spin c structures that may contribute to f t 2 are those denoted by x u and y u in Definition 5.7. Proof. Assume that m is large enough to satisfy Proposition 5.15. Suppose, toward a contradiction, that f t 2,v = 0 and | c 1 (v), [P δ ] | ≥ (1 + )(k + dm), Then for some constants C, C independent of m, for any homogeneous element a ∈ CF t (α, δ, w) with f t 2,v (a) = 0, we have: Since the grading on CF t (α, β, w; Γ m ) is bounded below independent of m, while gr(f t 2,v (a)) is bounded above by a negative multiple of m, we obtain a contradiction if m is large enough. Proposition 6.12. Fix t ∈ N. For all m sufficiently large, the map f t 2 : CF t (α, δ, w) → CF t (α, β, w; Γ m ) is filtered with respect to the filtrations J αδ and J αβ and is homogeneous of degree 0 with respect to gr.
6.3. Rectangle maps. Next, we turn to the rectangle-counting maps. We will introduce the truncated mapsh t 0 ,h t 1 , andh t 2 , and use them to prove the first part of Proposition 6.3.
on which h • 0,v • θ −1 equals an untwisted count of rectangles. The cobordism X αβγδ is always indefinite. Specifically, if k > 0, then X αβγ is positive-definite and X αγδ is negative-definite while the reverse is true if k < 0. Define v αβγ = v| W αβγ , and likewise for other subsets of α, β, γ, δ.
Each summand h • 0,v is homogeneous, with grading shift given by We can break this down in two ways. The first is: This expression alone does not allow us to simultaneously control c 1 (v), [P γ ] and c 1 (v), [R] as in Lemmas 6.7 and 6.9; there could be nonzero summands h t 0,v for which the evaluations of c 1 (t) on [P γ ] and [R] are both large in magnitude while gr(h t 0,v ) is small. Instead, it will be more useful to write: where e is an odd integer. 14 We will mostly be interested in the cases where e = ±1, but we can state the following lemma in more generality: Lemma 6.13. Fix t ∈ N and > 0. For all m sufficiently large, the following holds: Proof. By Proposition 5.15, there is a constant C (independent of m) such that the gradings of all elements of CF t (α, δ, w) are bounded above by C + m 4 , while the grading on CF t (α, β, w; Γ m ) is bounded below by −C. Suppose that h t 0,v = 0 and The right hand side tends to infinity as m → ∞, which gives a contradiction.
We now define the "truncated" version of h 0 . Fix a small real number > 0.
Definition 6.14. For any > 0, leth t 0, be the sum of all terms h t 0,v corresponding to spin c structures v which either satisfy both We will often suppress the dependence on from the notation and just writeh t 0 .
It follows that the map h t 0 −h t 0, (which counts rectangles which satisfy neither [(6.37) and (6.38)] nor (6.39)) commutes with the differentials: it follows thath t 0, is as well. Proposition 6.16. Fix t ∈ N and 0 < < 1. For all m sufficiently large, the map h t 0, is filtered with respect to J αβ and J αδ and is homogeneous of degree 0 with respect to gr.
Proof. We will start by trying to understand the filtration shift of an arbitrary summand h t 0,v , and then specialize by imposing the conditions required for h t 0,v to be included inh t 0, . Write c 1 (v), [Q] = em, where e is an odd integer. Suppose x ∈ T α ∩ T β and a ∈ T α ∩ T δ are generators with s := s w (x) = v| Y and u := s w (a) = v| Y λ+mµ (K) . Suppose that ρ ∈ π 2 (x, Θ βγ , Θ γδ , a) is a rectangle which Note that r is one of the exponents appearing in (6.5), and hence it appears in the definition of J αβ ([x, i] ⊗ T r ) by (6.20). Our goal is to show that Let us write where p ∈ Z. In other words, p is the unique integer for which In particular, if v satisfies (6.37), then p = 0. Associated to the spin c structure u, we have the number s u , which by (5.34) and (5.36) satisfies −(k + dm) < 2ds u ≤ k + dm and 2ds u ≡ 2Ã(a) + k + dm + d (mod 2(k + dm)).
At the same time, by (5.21), we have ν m where q ∈ Z, so that We compute: Thus, to show thath t 0, is filtered, we must simply show that p − q = 0 whenever v satisfies the conditions from Definition 6.14.
If v satisfies (6.37) and (6.38), we immediately deduce that p = q = 0. Thus, suppose that v satisfies (6.39), i.e. e = ±1. By Lemma 6.13, we may also assume that Assuming m is sufficiently large, this implies that p, q ∈ {0, e}. It then follows from (6.44) that p = q, as required.
We now turn to the statement about gr, which we check in each of the two cases in the previous paragraph. In the case where p = q = 0, equations (6.21), (6.22), (6.35), (6.40), and (6.42) immediately imply that gr(h t 0,v ) = 0. If p = q = e = ±1, then let v = v + e PD[Q], which has the same restrictions to Y and Y λ+mµ (K) as v and the same corresponding values of r and s u . We may easily check the following: Thus, the analogues of e, p, and q associated to v are e = −e and p = q = 0, which implies that gr(h t 0,v ) = 0 by the previous case. At the same time, (6.36) implies that c 1 (v) 2 = c 1 (v ) 2 , and hence gr(h t 0,v ) = 0 as required.
6.3.2. The map h t 1 . As in the previous section, we will need to define a truncated version ofh t 1 that uses only certain spin c structures. To begin, for any v ∈ Spin c 0 (X αγδβ ) and any q ∈ T α ∩ T γ , we have Thus, the summand of (6.5) in which θ • h • 1,v lands is determined by the value of c 1 (v), [P δ ] modulo 2dm. Remark 6.18. The definition ofh t 1 appears considerably somewhat simpler than that ofh t 0 (Definition 6.14) in the previous section. In fact, however, the two definitions are parallel. Suppose that 0 < < 1 and that v is any spin c structure which satisfies (which are the conditions suggested by Lemmas 6.9 and 6.11, analogous to (6.37) and (6.38) in Definition 6.14). We then have which implies (6.45). Thus, it is not necessary to include (6.46) and (6.47) in the definition ofh t 1 .
Proof. This follows just like Lemma 6.15, taking Remark 6.18 into account.
The cobordism X αγδβ is indefinite if k < 0 and negative-definite if k > 0. As in the previous section, the grading shift h t 1,v is given by The following lemma is analogous to Lemma 6.13: Proof. The gradings on CF t (α, β, w; Γ m ) and CF t (α, γ, w) are bounded above and below by constants independent of m. Therefore, for some constant C, if v is any spin c structure for which h t 0,v = 0, then −C < gr(h t 1,v ) < C. Using (6.49), we have: Thus, for some other positive constant C , Setting C = 4d |k| C , we have which is a contradiction for m sufficiently large. Hence | c 1 (v), [P γ ] | < |e| dm as required.
When k > 0, there is an even stronger statement: Lemma 6.21. Fix t ∈ N, and assume k > 0. For all m sufficiently large, if v is any spin c structure for which h t 1,v = 0, then v satisfies (6.46) and (6.47) (and hence (6.45)). In particular,h t 1 = h t 1 . Proof. Let C be as in the proof of Lemma 6.13. By (6.48), we have The first two terms are both nonnegative since k > 0, so each one is less than m+5 4 +C. Just as in the proofs of Lemmas 6.9 and 6.11, for m sufficiently large, both (6.46) and (6.47) must hold. Proposition 6.22. Fix t ∈ N. For all m sufficiently large, the maph t 1 is filtered with respect to the filtrations J αγ and J αβ and is homogeneous of degree 0 with respect to gr. (When k > 0, the same is true for h t 1 .) Proof. Let v be a spin c structure for which h t 1,v = 0. Write c 1 (v), [Q] = em. By (6.45), we will eventually assume that e = ±1, but for now let us treat e as an arbitrary odd integer (which will motivate the definition ofh t 1 ). Suppose that ρ ∈ π 2 (q, Θ γδ , Θ δβ , x) is a rectangle which contributes to h t 1,v . Let r be the value with which is one of the exponents appearing in (6.5). Let p be the integer for which which implies that It also follows from (5.25) that −2dr + 2pdm = 2Ã(x) − 2dn w (ρ) + 2dn z (ρ).
For the statement about gr, we first note that Equations (6.22) and (6.49) then immediately imply that gr(h t 1,v ) = 0, as required. Remark 6.23. In the proof above, without the simplifying assumption that e + 2p = 1, we would have found that Thus, the map h + 1 (which incorporates all spin c structures) is not necessarily filtered. 6.3.3. The map h t 2 . Next, we consider the map h t 2 . Let W αδβγ be the associated cobordism, which is indefinite if k > 0 and negative-definite if k < 0. According to (6.17), the map h t 2 counts only holomorphic rectangles ρ with the property that n w (ρ) ≡ n z (ρ) (mod m). By (5.30), this is equivalent to the condition that c 1 (s w (ρ)), [Q] = em, where e is an odd integer. As usual, consider the decomposition into terms of the form h t 2,v . Just as in the previous section, leth t 2 denote the sum of all terms h t 2,v for which (6.51) The analogue of Remark 6.18 holds here as well: for any 0 < < 1, if v satisfies Lemma 6.26. Fix t ∈ N and > 0, and assume k < 0. For all m sufficiently large, if v is any spin c structure for which h t 1,v = 0, then v satisfies (6.52), (6.53), and hence (6.51). Therefore,h t 2 = h t 2 . Proposition 6.27. Fix t ∈ N. For all m sufficiently large, the maph t 2 is filtered with respect to the filtrations J αδ and J αγ and is homogeneous of degree 1 with respect to gr. When k < 0, the same is true for h t 2 . Proof. Let a ∈ T α ∈ T δ and q ∈ T α ∩ T γ , and suppose ρ ∈ π 2 (a, Θ δβ , Θ βγ , q) contributes to h t 2,v ([a, i]). Let u = s w (a). The definition of J αδ involves the number s u , which by (5.34) and (5.36) satisfies −(k + dm) < 2ds u ≤ k + dm and 2ds u ≡ 2Ã(a) + k + dm + d (mod 2(k + dm)).
6.4. Pentagon maps. We now turn to the proof of the second part of Proposition 6.3: showing that each maph t j+1 • f t j + f t j+2 •h t j (where j ∈ Z/3) is a filtered quasiisomorphism. This relies on the standard strategy of counting holomorphic pentagons, used by Ozsváth and Szabó in [38] and then adapted by Mark and the first author in [9]. We will only discuss the case of j = 0, which is the most technically difficult because of the twisted coefficients. The arguments for j = 1 and j = 2 are similar and are left to the reader as an exercise. Letβ = (β 1 , . . . ,β g ) be obtained from β by a small Hamiltonian isotopy, such that eachβ i meets β i in a pair of points, and assume thatβ g is as shown in Figure 6. Let v be a point that is in the same region of Σ (α ∪ β) as w and in the same region of Σ (α ∪β) as z. Finally, let Θ ββ ∈ T β ∩ Tβ denote the canonical top-dimensional generator. (The twisted chain complex associated to (β,β) is somewhat subtle; see [9, p. 36].) For each x ∈ T α ∩ T β , letx ∈ T α ∩ Tβ be the nearest point. Indeed, every generator in T α ∩ Tβ is of this form, and clearly A(x) = A(x) and gr(x) = gr(x). The differentials on the complexes CF t (α, β, w; Γ m ) and CF t (α,β, w; Γ m ) are given by: Figure 6. Close-up of the winding region with the added curveβ g .
Note that in the exponents of T , we now use v in place of whichever basepoint (w or z) is contained within the same region. Let θ αβ and θ αβ be the trivializations defined by (6.3) and itsβ analogue, and let J αβ and J αβ be the corresponding filtrations defined by (6.20).
Henceforth, we will treat f t 2 and h t 1 as mapping into CF t (α,β, w; Γ m ), with (6.11) and (6.16) modified accordingly. Of course, all of the results of Sections 6.2.3 and 6.3.2 continue to hold. Thus, we may define maps In [9], it is verified that Ψ 0 is a quasi-isomorphism. We must prove the analogous filtered statement: Proposition 6.28. Fix t ∈ N and > 0. For all m sufficiently large,Ψ t 0 is a filtered quasi-isomorphism with respect to the filtrations J αβ and J αβ .
It is immediate from our previous results thatΨ t 0 is a filtered map (since it is a sum of compositions of filtered maps), but more work will be required to see that is a filtered quasi-isomorphism.
The key to understandingΨ t 0 is to relate it to the chain isomorphism (6.55) The verification that Φ • 0 is an isomorphism uses a standard energy filtration argument, as in [9]: we have Φ • 0 (T s · [x, i]) = T s · [x, i] + lower order terms. Moreover, for any ψ ∈ π 2 (x, Θ ββ ,ỹ), we have A(x) − A(ỹ) = n z (ψ) − n w (ψ). It follows easily that Φ • 0 is a filtered isomorphism with respect to J αβ and J αβ .
Consider the map (6.57) g • 0 : CF • (Σ, α, β, w; Γ m ) → CF • (Σ, α,β, w; Γ m ) defined by: The following lemma is a slight refinement of the statement from [9] and immediately implies that Ψ • 0 is a quasi-isomorphism: Lemma 6.29. The map g • 0 is a chain homotopy between Ψ • 0 and Φ • 0 + U m Φ , where Φ is some other chain map. In particular, when m > t, g t 0 is in fact a chain homotopy between Ψ t 0 and Φ t 0 . Proof. Just as in [41, p. 122] and [9, p. 36], this comes down to a model computation of F • βγδβ (Θ βγ ⊗ Θ γδ ⊗ Θ δβ ), which is made only slightly more complicated by the presence of twisted coefficients. The key observation is that there are m distinguished holomorphic rectangles in π 2 (Θ βγ , Θ γδ , Θ δβ , Θ ββ ), which are the only classes with n w = 0. By looking more closely at the computation there (specifically [9, Figure  2]), one can verify that all other holomorphic rectangles have n w divisible by m.
(Compare Lemma 5.3 above.) Therefore, one of the terms that arises in the count of degenerations of holomorphic pentagons is of the form F • αββ (− ⊗ (Θ ββ + U m Θ )), where Θ is some element of CF ≤0 (Σ, β,β, w), so it has the form described in the lemma.
Remark 6.30. To generalize Lemma 6.29 to Z coefficients, one would need to show that the m distinguished holomorphic rectangles mentioned above all count with the same sign. This statement is implicitly asserted, but without justification, in [41]. Intuitively, Ozsváth-Stipsicz-Szabó's approach to sign assignments from [33] could be useful here; because the boundaries of domains of these rectangles all interact with the orientations of the β, γ, δ, andβ curves in the same way, the rectangles should all count with the same sign. However, that argument is far from rigorous; to our knowledge, it is not known whether the combinatorial sign assignments from [33] actually agree with the orientations of moduli spaces, even for bigons.
Before we discuss the filtration shifts, we need to state analogues of the results of Section 5.4 for pentagons. To begin, let V be the (β,β) periodic domain with ∂V = β g −β g , n v (V ) = 1, and n w (V ) = n z (V ) = n z (V ) = n u (V ) = 0. LetP γ ,P δ , andQ be the analogues of P γ , P δ , and Q with β circles replaced by β circles: to be precise, up to thin domains, we have The Heegaard diagram determines a 4-manifold X αβγδβ , which admits various decompositions into the pieces described in Section 5.3; for instance, we have In the intersection pairing form on H 2 (X αβγδβ ), we have and all other intersection numbers can be deduced accordingly.
Just as with the other maps, g • 0 decomposes as a sum.
where g • 0,v counts pentagons σ with s w (σ) = v. To be precise, for any x ∈ T α ∩ T β and any r ≡ −A w,z (x) (mod Z), we have: In particular, given a spin c structure v, let r and s be the numbers satisfying which are both among the exponents appearing in the decompositions of CF • (α, β, w; Γ m ) and CF • (α,β, w; Γ m ) given by (6.5). Then the composition θ where s = v| Y αβ ands = v| Y αβ . (Analogous statements hold for Φ 0 .) The grading shift of g • 0,v is This can be expressed in terms of c 1 evaluations in various ways. For instance:   Proof. The gradings on CF t (α, β, w; Γ m ) and CF t (α,β, w; Γ m ) are bounded (above and below) independently of m. Thus, for some constant C > 0, if g t 0,v = 0, then (6.71) − C ≤ gr(g t 0,v ) ≤ C. To prove (1), let us assume k > 0; the case where k < 0 proceeds almost identically. By (6.67), we have: where C = 4dk(C + 1). Therefore, if m > C d 2 ( 2 − 2 ) , we obtain c 1 (v), [P γ ] < dm, as required. The proof of (2) proceeds similarly using (6.68). Thus, for m sufficiently large, we deduce that e = ±1, as required. Letg t 0 denote the sum of all terms g t 0,v for which v is good. Lemma 6.34. Fix t ∈ N and > 0. For all m sufficiently large, the mapg t 0 is filtered with respect to the filtrations J αβ and J αβ .
Proof. It suffices to show that each nonzero term g t 0,v in the definition ofg t 0 is filtered. We will start by looking at an arbitrary term g t 0,v , and then specialize to the case where v is good (which will justify our definition).
Because (6.74) holds, one of the criteria for ρ 1 counting forh t 0 (namely (6.39)) coincides precisely with one of the criteria for v being good (namely (6.75)). We thus must simply show that the remaining criteria in each definition are equivalent.
• Next, suppose M(σ) has an end of type (P-3). If we assume that m ≥ t, we see that ψ 3 equals one of the classes τ ± 0 from the proof of Lemma 5.3; without loss of generality, assume that ψ 3 = τ + 0 , so that c 1 (v), [Q] = m. Let σ = τ − 0 * ρ 3 , which is the class that provides the canceling end, and let v = s w (σ ). Then D(σ ) = D(σ) + Q, so v = v + PD[Q], so c 1 (v ), [Q] = −m. We claim that v is good iff v is good. It will follow that when considering contributions coming from only good spin c structures, ends of type (P-3) cancel in pairs. Since As in Lemma 6.32(2), we have where C is a constant that is independent of m. Note that Therefore, we have: If m is sufficiently large, it follows that c 1 (v), [P δ ] < (1 + )(k + dm).
And since c 1 (v), [P δ ] = c 1 (v ), [P δ ] , we deduce that v is good. The claim is thus proved. The case of where M(σ) has an end of type (P-4) is handled similarly.
We have thus concluded the proof of Proposition 6.28, and hence of Theorem 6.6.

Proof of the filtered mapping cone formula
We now turn to the proof of the filtered mapping cone formula. As noted in Section 3, it suffices to prove the mapping cone formula for CF t , namely Proposition 3.5.
Proof. Let us assume that k > 0; the case where k < 0 is similar and is left to the reader. Fix t ∈ N. By Theorem 6.6, for sufficiently large m and a well-adapted diagram (Σ, α, β, δ, w, z, z ), the map is a filtered homotopy equivalence. Let us start by looking closely at how these maps interact with the spin c decomposition of CF t (Σ, α, γ, w).
In particular, the images of the maps θ • f t 2,x l and θ • f t 2,y l−1 both lie in the summand CF t (α, β, s l , w) ⊗ T −s l , using the decomposition (6.5). Finally, Lemma 6.11 implies that the maps θ • f t 2,x −L and θ • f t 2,y L vanish. Next, suppose v ∈ Spin c 0 (X αγδβ ) is a spin c structure restricting to t for which c 1 (v), [Q] = ±m and h t 1,v = 0. By Lemma 6.21, we have |c 1 (v), [R]| < m(k+dm) ν and |c 1 (v), [P δ ]| < (1 + )(k + dm). This implies that for some l ∈ {−L, . . . , L}, v restricts to v l on X αγδ and to either x l or y l on X αδβ (and not x −L or y L ). Therefore, the image of h t 1,v lies in one of the summands of (6.5) mentioned in the previous paragraph. Thus we see that CF t (Σ, α, γ, w, t), equipped with its two filtrations I αγ and J αγ , is doubly-filtered quasi-isomorphic to the doubly-filtered complex (7.2) CF t (α, δ, u −L ) · · · CF t (α, β, s L ) ⊗ T −s L which inherits its filtrations from those on CF t (α, δ, w) and CF t (α, β, w; Γ m ). By Theorem 5.8, there are doubly-filtered quasi-isomorphisms Λ t u l : CF t (Σ, α, δ, u l ) → A t s l ,s l where the Alexander filtration on Λ t u l is identified with the filtration J u l from (5.38). Moreover, each CF t (α, β, s l ) ⊗ T −s l can be identified with B t s l = C s l {0 ≤ i ≤ t}, so that the complex in (7.2) is quasi-isomorphic to By definition, this is precisely the complex X t λ,t,−L,L from Section 3. To complete the proof, we must check that the J filtration and the absolute grading on (7.3) agree with the descriptions given in the Introduction. Let us denote these by J mc and gr mc , respectively.
• On each summand CF t (α, δ, u l ), J αδ is defined in (6.19) as the Alexander filtration plus d 2 m(2su l −1) 2k(k+dm) , so J mc on A t ξ l is obtained by shifting J u l by the same amount: with the second filtration discussed in this paper. For simplicity, we show the details only in the case of 1/n surgery on a null-homologous knot K ⊂ Y for n > 0, but it is not hard to generalize to the case of arbitrary rational surgeries on rationally null-homologous knots. Let K 1/n denote the knot in Y 1/n (K) obtained from a left-handed meridian of K. (Unlike in the case of integral surgery, we emphasize that K 1/n is not isotopic to the core circle of the surgery solid torus.) Observe that Y 1/n (K) is obtained by a certain surgery on K = K # O n in Y = Y # −L(n, 1), where O n ⊂ −L(n, 1) is the Floer simple knot from Example 5.14, and the induced knot (coming from the meridian of K ) is precisely K 1/n .
There is a natural one-to-one correspondence between Spin c (Y ) and Spin c (Y 1/n (K)). To be completely precise, let W be the 2-handle cobordism from Y to Y 1/n (K). For each s ∈ Spin c (Y ) and each q ∈ {0, . . . , n − 1}, let s q = s # u q ∈ Spin c (Y # −L(n, 1)), where u q is as described in Example 5.14. Then then all the s q are cobordant to the same spin c structure t ∈ Spin c (Y 1/n (K)) through W .
The computation in Example 5.14 shows that HFK(−L(n, 1), O n , u q ) is supported in Alexander grading − n−2q−1 2n . (The − comes from the orientation reversal on L(n, 1).) The Künneth principle for connected sums ([35, Theorem 7.1], [42, Theorem 5.1]) then implies that CFK ∞ (Y , K , s q ) is isomorphic to CFK ∞ (Y, K), with the Alexander grading (and hence all values of j) shifted by − n−2q−1 2n . We now apply the mapping cone formula to (Y , K ) to compute CFK ∞ (Y 1/n (K), K 1/n , t). Using the terminology from Section 2.2, we take d = n, and the framing on K corresponds to k = 1. Label the elements of G −1 Y 1/n ,K 1/n (t) by (ξ l ), where 2l − 1 2n < A Y ,K (ξ l ) ≤ 2l + 1 2n , and set s l = A Y ,K (ξ l ). For each l ∈ Z, it is clear that G Y ,K (ξ l ) = s [q] for some q ∈ {0, . . . , n − 1}. To determine q, the Alexander grading satisfies On A ∞ ξ l , I t ([x, i, j]) = max{i, j − r} (8.1) It is easy to check that the I t filtration agrees with Ozsváth and Szabó's description of the A and B complexes: namely, the mapping cone contains n copies of each of the A s and B s complexes for K. The J t filtration takes the same form on each copy, with some shifts as necessary.