Computing Heegaard Floer invariants of closed contact 3-manifolds from open books Çağatay Kutluhan, Gordana Matić, Jeremy Van Horn-Morris, Andy Wand Abstract . We present two SageMath programs that build on and improve upon Sucharit Sarkar’s hf-hat . Given an abstract open book and a collection of pairwise disjoint properly embedded arcs on a page of the open book, the first program, hf-hat-obd , can be used to analyze the resulting Heegaard diagram, while the second, hf-hat-obd-nice computes the hat version of Heegaard Floer homology of the closed oriented 3-manifold described by the Heegaard diagram as long as the latter is nice. We also provide an auxiliary program, makenice , that can be used to produce a nice Heegaard diagram out of any abstract open book and a collection of pairwise disjoint properly embedded arcs on a page of the open book. The primary applications of hf-hat-obd-nice are to the computation of the Ozsváth–Szabó contact invariant and to the detection of finiteness of spectral order, which is a Stein fillability obstruction that is stronger than the vanishing of the Ozsváth–Szabó contact invariant. 1. Introduction A classical result due to Alexander [ Ale20 ] states that every closed oriented 3-manifold admits an open book decomposition. Once an open book and an arc basis on its page are chosen, we can construct a Heegaard diagram. The latter can then be used to compute the Heegaard Floer homology of the 3-manifold described by that Heegaard diagram. Moreover, the chosen open book supports a contact structure [ TW75 ] and an invariant of this contact structure living in Heegaard Floer homology defined by Ozsváth and Szabó in [ OS05 ] is represented by a distinguished tuple of points in that Heegaard diagram [ HKM09 ] . Using this description of the contact invariant in Heegaard Floer homology, the authors defined in [ KMVHMW23 ] a refinement of it, called spectral order , taking values in the set \mathbb{N}\cup\{\infty\} , and showed that Theorem . [ KMVHMW23 , Corollary 4.8] If the contact structure is Stein fillable, then its spectral order is infinite. Moreover, the spectral order of the contact structure can be computed using a sufficiently large collection of pairwise disjoint properly embedded arcs on a page of the open book and it is finite if and only if it is finite for some arc collection. In order to compute spectral order for a fixed arc collection, one has to (1) find all Maslov index-1 positive domains in the Heegaard diagram, and (2) compute the number of holomorphic curves in the moduli spaces of all Maslov index-1 positive domains. Task ( 1 ) is in general impossible to fulfill if the Heegaard diagram belongs to a closed oriented 3-manifold with non-zero first Betti number. This is why Sucharit Sarkar’s hf-hat [ Sar ] can only be used to analyze Heegaard diagrams for rational homology 3-spheres. In Section 2.1 , we show that there is an a priori bound on the number of positive domains between any pair of generators of the Heegaard Floer chain complex when the Heegaard diagram is obtained from an open book and a collection of pairwise disjoint properly embedded arcs on a page of the open book. This allows us to find all positive domains between pairs of generators of the Heegaard Floer chain complex algorithmically, thereby completing task ( 1 ). Using this fact, we wrote an improved version of hf-hat , named hf-hat-obd , a tutorial for which is provided in Section 3 . As for task ( 2 ), it was shown by Plamenevskaya in [ Pla07 ] that one may isotope the monodromy of the open book so as to produce a nice Heegaard diagram. Her proof is based on an algorithm of Sarkar and Wang [ SW10 , Section 4] which we implement in an auxiliary program, makenice . Once a nice Heegaard diagram resulting from an open book and a collection of pairwise disjoint properly embedded arcs on a page of the open book is provided, hf-hat-obd-nice can be used to compute the hat version of Heegaard Floer homology of the 3-manifold described by the Heegaard diagram and the Ozsváth–Szabó contact invariant of the contact structure supported by the open book. In addition, hf-hat-obd-nice implements an algorithm to compute the value of spectral order of the open book and the arc collection based on a criterion for finiteness of spectral order, which we prove in Section 2.2 . A tutorial for hf-hat-obd-nice is provided in Section 4 . 2. Main Results In this section, we prove some key results that form the basis of the algorithms used in hf-hat-obd and hf-hat-obd-nice . To set the stage, let (S,\varphi) be an abstract open book and \mathbf{a}=\{a_{1},\dots,a_{\textsc{n}}\} be a collection of pairwise disjoint, properly embedded oriented arcs on S cutting it open into a disjoint union of disks. Then the triple (S,\varphi,\mathbf{a}) , which we shall refer to as an open book diagram , yields a weakly admissible (multi-)pointed Heegaard diagram (\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathbf{z}) where • \Sigma=S_{1/2}\cup_{\partial S}-S_{0} , • \boldsymbol{\alpha}=\{\alpha_{1},\dots,\alpha_{\textsc{n}}\} and \alpha_{i}=a_{i}\cup-a_{i} , • \boldsymbol{\beta}=\{\beta_{1},\dots,\beta_{\textsc{n}}\} and \beta_{i}=b_{i}\cup-\varphi(b_{i}) with each b_{i} a Hamiltonian isotopic copy of a_{i} that intersects a_{i} positively in one distinguished point {x_{\xi}}^{i}\in\mathrm{int}(S_{1/2}) , called a contact intersection point , and • \mathbf{z}=\{z_{1},\dots,z_{m}\} and each z_{i} lies in the interior of a distinct connected component of S_{1/2}\,\setminus\bigcup_{i=1}^{\textsc{n}}a_{i} , outside the thin strips between a_{i} and b_{i} . The \boldsymbol{\alpha} - and \boldsymbol{\beta} -curves divide the Heegaard surface \Sigma into a number of subsurfaces whose closures are called regions . Let \mathbf{x}=\{x_{1},\dots,x_{\textsc{n}}\},\mathbf{y}=\{y_{1},\dots,y_{\textsc{n}}\} be two sets of intersection points between \boldsymbol{\alpha} - and \boldsymbol{\beta} -curves each of which determines a one-to-one pairing between the two kinds of curves, and \widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) denote the set of 2-chains D that are formal integer linear sums of unpointed regions in the Heegaard diagram (\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathbf{z}) such that \partial(\partial|_{\boldsymbol{\beta}}D)=\mathbf{y}-\mathbf{x} , where \mathbf{x} and \mathbf{y} are considered 0-chains. Such 2-chains are called domains and a domain D is positive ( D\geq 0 ) if its multiplicity in every unpointed region is non-negative. Elements of \widehat{\pi}_{2}(\mathbf{x},\mathbf{x}) are called periodic domains . 2.1. A bound on the number of positive domains First we prove the aforementioned a priori bound on the number of positive domains between \mathbf{x} and \mathbf{y} . The upcoming lemma can be considered an improvement over [ OS04 , Lemma 4.13] for Heegaard diagrams resulting from open books. Lemma 1 . Suppose that \widehat{\pi}_{2}(\mathbf{x},\mathbf{y})\neq\emptyset and let k denote the number of contact intersection points in \mathbf{y} that are not in \mathbf{x} . Then there are at most 2^{k} positive domains in \widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) . Proof. Fix D_{\circ}\in\widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) and let D\in\widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) be a positive domain. If D\neq D_{\circ} , then D-D_{\circ}\in\widehat{\pi}_{2}(\mathbf{x}_{\xi},\mathbf{x}_{\xi}) is a non-trivial periodic domain. Since a non-trivial periodic domain has to have the entirety of at least one \boldsymbol{\alpha} - or \boldsymbol{\beta} -curve with non-zero multiplicity on its boundary, it has to contain at least one contact intersection point on its boundary. Moreover, a contact intersection point {x_{\xi}}^{i} is at the corner of exactly two unpointed regions, {R^{i}}_{1} and {R^{i}}_{3} , which intersect only at that contact intersection point (see Figure 1 ); therefore, a non-trivial periodic domain containing the contact intersection point {x_{\xi}}^{i} has to have both \alpha_{i} and \beta_{i} on its boundary with multiplicities in {R^{i}}_{1} and {R^{i}}_{3} adding up to zero. It follows, by applying [ OS04 , Lemma 2.18] , that the multiplicities of D-D_{\circ} in {R^{i}}_{1} and {R^{i}}_{3} for i\in\{1,\dots,\textsc{n}\} uniquely determine the periodic domain. Consequently, multiplicities of D in {R^{i}}_{1} and {R^{i}}_{3} for {x_{\xi}}^{i} in \mathbf{y} but not in \mathbf{x} uniquely determine that domain. Since D has multiplicity 1 in exactly one of {R^{i}}_{1} or {R^{i}}_{3} while having multiplicity 0 in the other three regions with corners at {x_{\xi}}^{i} for each {x_{\xi}}^{i} in \mathbf{y} but not in \mathbf{x} , there are at most 2^{k} positive domains in \widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) . ∎ Figure 1 . Neighborhood of a contact intersection point. 2.2. Detecting finiteness of spectral order As was shown in [ KMVHMW23 , Section 5.2] , finiteness of spectral order is an obstruction to Stein fillability of contact 3-manifolds that is stronger than vanishing of the Ozsváth–Szabó contact invariant. In this regard, the ability to detect finiteness of spectral order is valuable even if we may not be able to compute its exact value. To detect finiteness of spectral order, it suffices to find an open book (S,\phi) and an arc collection \mathbf{a} on S for which spectral order is finite. In this subsection, we discuss how to do this efficiently. In what follows, Y denotes the closed oriented 3-manifold described by the Heegaard diagram (\Sigma,\boldsymbol{\alpha},\boldsymbol{\beta}) and \xi is the contact structure on Y supported by the open book (S,\varphi) . We start by recalling the definition of spectral order. For any D\in\widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) , define (2.1) J_{+}(D):=\mu(D)-2e(D)+|\mathbf{x}|-|\mathbf{y}|, where • |\cdot| denotes the number of disjoint cycles in the element of the symmetric group \mathrm{S}_{N} determined by the pairing between the \boldsymbol{\alpha} - and \boldsymbol{\beta} -curves associated to a generator of the Heegaard Floer chain complex (e.g. the canonical generator \mathbf{x}_{\xi}=\{{x_{\xi}}^{1},\dots,{x_{\xi}}^{\textsc{n}}\} has |\mathbf{x}_{\xi}|=\textsc{n} ), • e(D) is the Euler measure of D (see [ Lip06 , §4.1 p. 973] for definition), and • \mu(D) is the Maslov index of D , which, by a formula of Lipshitz [ Lip06 , Corollary 4.10] (cf. [ Lip14 , Proposition 4.8^{\prime} ] ), is equal to (2.2) \mu(D)=n_{\mathbf{x}}(D)+n_{\mathbf{y}}(D)+e(D), with n_{\mathbf{x}}(D) representing the point measure of D at \mathbf{x} , i.e. the sum of the averages of the coefficients of D in the four regions with corners at each x_{i}\in\alpha_{i}\cap\beta_{j} . It was shown in [ KMVHMW23 , Section 2.2] that J_{+}(D) is a non-negative integer divisible by two when D\in\widehat{\pi}_{2}(\mathbf{x},\mathbf{y}) is represented by a holomorphic curve. Therefore, we can decompose the Heegaard Floer differential as \widehat{\partial}_{\mathit{HF}}=\partial_{0}+\partial_{1}+\cdots+\partial_{\ell}+\cdots, where \partial_{\ell} counts holomorphic curves representing domains with J_{+}=2\ell . Using this decomposition, construct a chain complex \widehat{\mathcal{CF}}(S,\phi,\mathbf{a}):=\widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha})\otimes_{\mathbb{F}}\mathbb{F}[t,t^{-1}] over \mathbb{F}=\mathbb{Z}/2\mathbb{Z} filtered by the power of t and endowed with the differential \widehat{\partial}:=\sum_{\ell\in\mathbb{N}}\partial_{\ell}\otimes t^{-\ell}. Define o(S,\phi,\mathbf{a}) to be the smallest non-negative integer k such that \mathbf{x}_{\xi} represents the trivial class in the k+1^{\textrm{st}} page of the spectral sequence E^{\ast}(S,\phi,\mathbf{a}) associated to the filtered chain complex (\widehat{\mathcal{CF}}(S,\phi,\mathbf{a}),\widehat{\partial}) , and the spectral order \mathbf{o}(\xi) to be \mathbf{o}(\xi):=\min\{o(S,\phi,\mathbf{a})\}, where the minimum is taken over all open books supporting \xi and all collections of pairwise disjoint properly embedded arcs on pages of those open books. With the preceding understood, we have the following lemma. Lemma 2 . Suppose that c_{1}(\xi) is torsion. If \widehat{c}(\xi)=0 , then \mathbf{o}(\xi)<\infty . Proof. First note that for any periodic domain P\in\widehat{\pi}_{2}(\mathbf{x}_{\xi},\mathbf{x}_{\xi}) , we have \mu(P)=\langle c_{1}(\xi),H(P)\rangle=0 , and n_{\mathbf{x}_{\xi}}(P)=0 ; hence, e(P)=0 . As a result, J_{+}(P)=0 for every periodic domain P\in\widehat{\pi}_{2}(\mathbf{x}_{\xi},\mathbf{x}_{\xi}) . It follows that there is a well-defined filtration \mathcal{F} on \widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathfrak{s}_{\xi}) by J_{+} where \mathbf{x}_{\xi} lies in \mathcal{F}_{0}\setminus\mathcal{F}_{-1} . Moreover, this filtration is bounded by virtue of the fact that \widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathfrak{s}_{\xi}) is finitely generated. Consequently, the spectral sequence of the filtered chain complex converges to the homology of \widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathfrak{s}_{\xi}) , that is, \widehat{\mathit{HF}}(-Y,\mathfrak{s}_{\xi}) . Meanwhile, \mathbf{o}(\xi)<\infty if and only if \mathbf{x}_{\xi} represents the zero class on some finite page of the spectral sequence of the filtered chain complex, which must be the case if \widehat{c}(\xi)=0 in \widehat{\mathit{HF}}(-Y,\mathfrak{s}_{\xi}) . ∎ To detect whether o(S,\phi,\mathbf{a})<\infty or not in general, we have to compute the differential on \widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathfrak{s}_{\xi}) . To be able to do this, we assume that \phi is such that the Heegaard diagram (\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathbf{z}) constructed from (S,\phi,\mathbf{a}) is nice, i.e. all unpointed regions in the Heegaard diagram are either bigons or rectangles. Since Maslov index-1 positive domains in a nice Heegaard diagram are either empty embedded bigons or empty embedded rectangles [ SW10 , Theorem 3.3] , the moduli space of holomorphic curves for a Maslov index-1 positive domain consists of a single point, and \widehat{\partial}_{\mathit{HF}}=\partial_{0}+\partial_{1}. Moreover, \partial_{0} and \partial_{1} are both differentials themselves and \partial_{0}\partial_{1}=\partial_{1}\partial_{0} . With the preceding understood, let C_{0}\subset\widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathfrak{s}_{\xi}) denote the subspace of chains in the same (relative) Maslov grading as \mathbf{x}_{\xi} and C_{1}\subset\widehat{\mathit{CF}}(\Sigma,\boldsymbol{\beta},\boldsymbol{\alpha},\mathfrak{s}_{\xi}) denote the subspace of chains in (relative) Maslov grading 1 above \mathbf{x}_{\xi} . Then o(S,\phi,\mathbf{a})<\infty if and only if there exist chains b_{0},\dots,b_{k}\in C_{1} with k\geq 0 such that (2.3) \begin{split}\partial_{0}b_{0}+\partial_{1}b_{1}&=\mathbf{x}_{\xi},\\ \partial_{0}b_{1}+\partial_{1}b_{2}&=0,\\ &\vdots\\ \partial_{0}b_{k-1}+\partial_{1}b_{k}&=0,\\ \partial_{0}b_{k}&=0.\end{split} Figure 2 . Directed graph depicting b_{0},\dots,b_{k}\in C_{1} from ( 2.3 ) and their differentials. We shall regard \partial_{0},\partial_{1} as maps from C_{1} to C_{0} . The next lemma allows us to assume, without loss of generality, that \partial_{1} is injective. Lemma 3 . There exists a minimal subspace K\subset C_{1} with the property that the map from C_{1}/K to C_{0}/\partial_{0}(K) induced by \partial_{1} is injective. Proof. Construct a nested sequence K_{0}\subset K_{1}\subset\cdots\subset K_{i}\subset\cdots of subspaces of C_{1} as follows: \displaystyle K_{0} \displaystyle= \displaystyle\ker(\partial_{1}:C_{1}\to C_{0}), \displaystyle K_{i} \displaystyle= \displaystyle\ker(\partial_{1}:C_{1}\to C_{0}/\partial_{0}(K_{i-1}))\;\textrm{for\;each}\;i\geq 1. Since C_{1} is finite dimensional, there exists n\geq 0 and a subspace K\subset C_{1} such that K_{i}=K for all i\geq n . Then \ker(\partial_{1}:C_{1}\to C_{0}/\partial_{0}(K_{n}))=K, hence the induced map \underline{\partial}\,_{1}:C_{1}/K\to C_{0}/\partial_{0}(K)) is injective. ∎ Note that if o(S,\phi,\mathbf{a}) is non-zero, K=C_{1} implies that o(S,\phi,\mathbf{a})=\infty since otherwise \partial_{1}(C_{1})\subset\partial_{0}(C_{1}) and we would be able to find b\in C_{1} such that \partial_{0}b=\mathbf{x}_{\xi} , resulting in a contradiction. With the above understood, if o(S,\phi,\mathbf{a})\neq 0 and K\neq C_{1} , then C_{0}/\partial_{0}(K) and C_{1}/K are both non-zero and we may instead consider the maps \displaystyle\underline{\partial}\,_{0}:C_{1}/K\to C_{0}/\partial_{0}(K)), \displaystyle\underline{\partial}\,_{1}:C_{1}/K\to C_{0}/\partial_{0}(K)). Clearly, if there exist b_{0},\dots,b_{k}\in C_{1} satisfying ( 2.3 ), then \underline{b}\,_{0},\dots,\underline{b}\,_{k}\in C_{1}/K satisfy (2.4) \begin{split}\underline{\partial}\,_{0}\,\underline{b}\,_{0}+\underline{\partial}\,_{1}\,\underline{b}\,_{1}&=\underline{\mathbf{x}}\,_{\xi},\\ \underline{\partial}\,_{0}\,\underline{b}\,_{1}+\underline{\partial}\,_{1}\,\underline{b}\,_{2}&=0,\\ &\vdots\\ \underline{\partial}\,_{0}\,\underline{b}\,_{k-1}+\underline{\partial}\,_{1}\,\underline{b}\,_{k}&=0,\\ \underline{\partial}\,_{0}\,\underline{b}\,_{k}&=0.\end{split} Conversely, Lemma 4 . If there are \underline{b}\,_{0},\dots,\underline{b}\,_{k}\in C_{1}/K satisfying ( 2.4 ), then there are b_{0},\dots,b_{k}\in C_{1} satisfying ( 2.3 ). Proof. Let \underline{b}\,_{0},\dots,\underline{b}\,_{k}\in C_{1}/K be such that ( 2.4 ) is satisfied. Then there are c_{0},\dots,c_{k}\in C_{1} with \underline{b}\,_{i}=c_{i}K for all i=0,\dots,k and d_{0},\dots,d_{k}\in K such that \begin{split}\partial_{0}c_{0}+\partial_{1}c_{1}&=\mathbf{x}_{\xi}+\partial_{0}d_{0},\\ \partial_{0}c_{1}+\partial_{1}c_{2}&=\partial_{0}d_{1},\\ &\vdots\\ \partial_{0}c_{k-1}+\partial_{1}c_{k}&=\partial_{0}d_{k-1},\\ \partial_{0}c_{k}&=\partial_{0}d_{k}.\end{split} (We use the fact that \partial_{0}\partial_{1}=\partial_{1}\partial_{0} to derive the above set of equations.) Let b_{k}=c_{k}+d_{k} . Then \partial_{0}b_{k}=0 and \partial_{1}b_{k}=\partial_{1}c_{k}+\partial_{1}d_{k}=\partial_{1}c_{k}+\partial_{0}e_{k-1} for some e_{k-1}\in K by the proof of Lemma 3 . Next, define b_{k-1}=c_{k-1}+d_{k-1}+e_{k-1} and note that \partial_{0}b_{k-1}+\partial_{1}b_{k}=\partial_{0}(c_{k-1}+d_{k-1}+e_{k-1})+\partial_{1}c_{k}+\partial_{0}e_{k-1}=0. Continue in the same way so as to define all other b_{i}\in C_{1} and note that b_{0},\dots,b_{k} satisfy ( 2.3 ). ∎ For the remainder of this section, we shall assume that \partial_{1}:C_{1}\to C_{0} is injective. Furthermore, if \partial_{0}:C_{1}\to C_{0} were also injective, then o(S,\phi,\mathbf{a}) would be infinity, as is easily seen from ( 2.3 ). Therefore, we shall also assume that \partial_{0} is not injective. Since \partial_{1} is injective, there exists a map \delta:U_{0}=\partial_{1}(C_{1})\to C_{0} defined by \delta=\partial_{0}\circ{\partial_{1}}^{-1} . Note that \ker{\delta}=\partial_{1}(\ker{\partial_{0}})\neq 0 since \partial_{0} is not injective and \partial_{1} is injective. Next, for i\geq 1 define subspaces U_{i}\subset C_{0} iteratively as U_{i}=\delta^{-1}(U_{i-1}) . Note that these subspaces satisfy \ker{\delta}\subset\cdots\subset U_{i}\subset\cdots\subset U_{1}\subset U_{0}, and that \bigcap U_{i}=U_{n}\neq 0 for some n\geq 0 since C_{0} is finite dimensional and \ker\delta\neq 0 . Then for each i\geq 1 the maps defined by \delta_{i}=\delta|_{U_{i}}:U_{i}\to U_{i-1} and \delta^{i}=\delta\circ\delta_{1}\circ\cdots\circ\delta_{i-1}:U_{i-1}\to C_{0} have \ker{\delta_{i}}=\ker\delta and \ker{\delta^{i}}={\delta_{i-1}}^{-1}({\delta_{i-2}}^{-1}(\dots({\delta_{1}}^{-1}(\ker\delta)))\cdots)={\delta_{i-1}}^{-1}(\ker{\delta^{i-1}}). It is easy to see by induction that \ker{\delta^{i}}\subset\ker{\delta^{i+1}} for all i\geq 1 . Therefore, • \ker{\delta^{i}}\subset U_{n} for all i\geq 1 , and • there exists m\geq 1 such that \ker{\delta^{i}}\subset\ker{\delta^{m}} for all i\geq 1 . Finally, let \mathcal{R}=\mathbf{x}_{\xi}+\partial_{0}(C_{1}), which we call the remainder set . Then, Theorem 5 . o(S,\phi,\mathbf{a})<\infty if and only if \ker{\delta^{m}}\cap\mathcal{R}\neq\emptyset , where m\geq 1 is as in the second bullet point above. Proof. It is clear that if there exist b_{0},\dots,b_{k}\in C_{1} satisfying ( 2.3 ), then \mathbf{x}_{\xi}+\partial_{0}b_{0}\in\ker{\delta^{k}}\cap\mathcal{R} which in turn is contained in \ker{\delta^{m}}\cap\mathcal{R} by the second bullet point above. Conversely, if there exist r\in\ker{\delta^{m}}\cap\mathcal{R} , then \delta^{k}r=0 for some k\geq 1 , \mathbf{x}_{\xi}+r=\partial_{0}b_{0} for some b_{0}\in C_{1} , and b_{i}\in C_{0} defined by b_{i}={\partial_{1}}^{-1}r_{i} where r_{1}=r and r_{i+1}=\delta r_{i} for i=1,\dots,k-1 satisfy ( 2.3 ). Hence, o(S,\phi,\mathbf{a})<\infty and o(S,\phi,\mathbf{a})=\min\{k\;|\;\ker{\delta^{k}}\cap\mathcal{R}\neq\emptyset\}.\qed 3. A Tutorial for hf-hat-obd Download hf-hat-obd.sage from [ KMVHMW ] . After running SageMath on your computer, load the program: ⬇ sage : load ( ’hf-hat-obd.sage’ ) The primary input for the program is a list of regions cut out by the alpha and beta curves in the (multi-)pointed Heegaard diagram resulting from an open book and a collection of disjoint properly embedded arcs on a page of the open book, which we shall refer to as an open book diagram . To form a list of regions, one starts by labeling the intersection points on each alpha curve making sure that the lowest index on each alpha curve is assigned to the contact intersection point on that curve. Once every intersection point is labeled, proceed as described by Sarkar in his SageMath program hf-hat to associate to each region a list of intersection points where the first two intersection points in the list lie on the same alpha curve and the intersection points are ordered so as to traverse the boundary of that region in the counter-clockwise orientation. Finally, form a list of such lists of intersection points where the lists of intersection points corresponding to the pointed regions are located at the end. For example 1 1 1 This is the region list for the ‘warm-up’ example presented in [ KMVHMW23 , Section 5.1] . ; ⬇ sage : rlist = [ [1,0,19,20,13,14], [2,1,14,15], [3,2,15,16], [4,3,16,17], [5,4,17,6], [7,6,1,2], [8,7,2,3], [9,8,3,4], [10,9,4,5], [11,10,5,0,25,24], [12,11,24,23], [13,12,23,22,11,12,21,22], [14,13,22,23], [15,14,23,24], [16,15,24,25], [17,16,25,18], [19,18,7,8], [20,19,8,9], [21,20,9,10], [22,21,10,11], [20,21,12,13], [0,1,6,17,18,19,0,5,6,7,18,25]] Next, initialize the Heegaard Diagram with the given regions list. ⬇ sage : G1 = HeegaardDiagram ( rlist , 1, ’NotStein’ ) Here the second entry indicates the number of base-pointed regions while the last entry provides a name to be appended to any output file that would result from running functions belonging to the HeegaardDiagram class. Once the Heegaard diagram has been initialized, the following variables from hf-hat are readily available. (1) G1.boundary_intersections (2) G1.regions (3) G1.regions_un (4) G1.intersections (5) G1.euler_measures_2 (6) G1.euler_measures_2_un (7) G1.boundary_mat (8) G1.boundary_mat_un (9) G1.point_measures_4 (10) G1.point_measures_4_un (11) G1.alphas (12) G1.betas (13) G1.intersections_on_alphas (14) G1.intersections_on_betas (15) G1.intersection_incidence (16) G1.intersection_matrix (17) G1.generators (18) G1.generator_reps Also readily available are the following variables new to hf-hat-obd . (20) G1.contact_intersections stores the list of distinguished intersection points that give the Honda-Kazez-Matic representative for the Ozsváth-Szabó contact class. (21) G1.periodic_domains stores the free abelian group of periodic domains. (22) G1.pd_basis stores a basis for the free abelian group of periodic domains. (23) G1.b1 stores the first Betti number of the Heegaard Diagram. (Note that this is strictly bigger than the first Betti number of the underlying 3-manifold if the diagram has more than one basepoint.) (24) G1.QSpinC stores a list whose i-th entry is the list of Chern numbers for the SpinC structure associated to the i-th generator The following variables will be initialized once one runs G1.sort_generators() : (26) G1.SpinC_structures stores SpinC structures realized by Heegaard Floer generators, as specified by their Chern numbers and distinguished integers. (27) G1.SpinC stores a list whose i-th entry is the SpinC structure of the i-th generator. (28) G1.genSpinC stores a list whose i-th entry is a list of generators living in the i-th SpinC structure. (29) G1.gradings stores a list whose i-th entry is a dictionary assigning to a generator in the i-th SpinC structure its (relative) Maslov grading (modulo divisibility of the i-th SpinC structure as stored in G1.div .) (30) G1.differentials is a dictionary of Maslov index 1 positive domains between pairs of generators. To complete the initialization of the Heegaard Floer chain complex, run ⬇ sage : G1 . print_differentials () which also outputs a .txt file ( NotStein_possible_differentials.txt ) with all possible Heegaard Floer differentials in every SpinC structure and fills in the dictionary G1.pos_differentials that associates to a pair of Heegaard Floer generators the list of positive Maslov index 1 domains, if any, between them. Below are a list of functions that can be used to analyze the Heegaard Floer chain complex once the Heegaard diagram is initialized. ⬇ sage : G1 . find_pos_domains ( i , j ) finds all positive domains between the i -th and the j -th generators. ⬇ sage : G1 . domain_type ( i , j , D ) returns the J_{+} , the Euler characteristic, the number of boundary components, and the genus of a Lipshitz curve associated to the domain D between the i -th and the j -th generators. ⬇ sage : G1 . find_pos_diffs_from ( i ) returns a list of positive Maslov index 1 domains from the i -th generator along with the corresponding output generator. ⬇ sage : G1 . find_pos_diffs_to ( j ) returns a list of positive Maslov index 1 domains to the j -th generator along with the corresponding input generator. ⬇ sage : G1 . plot_complex ( k ) returns a directed graph where the vertices are the Heegaard Floer generators in the k -th SpinC structure and the edges are all possible differentials, with blue indicating those with unique holomorphic representatives. 4. A tutorial for hf-hat-obd-nice Download hf-hat-obd-nice.sage from [ KMVHMW ] . After running SageMath on your computer, load the program: ⬇ sage : load ( ’hf-hat-obd-nice.sage’ ) The primary input for the program is the same as it is for hf-hat-obd.sage ; namely, a list of regions cut out by the alpha and beta curves in the (multi-)pointed Heegaard diagram resulting from an open book and a collection of disjoint properly embedded arcs on a page of the open book. We require that the Heegaard diagram is nice. To produce a nice Heegaard diagram, use makenice.sage , which can be downloaded from [ KMVHMW ] . For example, the following regions list ⬇ sage : rlist = [ [1,0,5,6], [2,1,6,4,6,5], [3,2,5,4,1,2,8,7], [9,8,2,3,9,7], [3,0,8,9], [0,1,4,6,4,5,0,3,7,9,7,8]] does not define a nice Heegaard diagram as it has two hexagonal regions and one octagonal region. To produce a nice Heegaard diagram out of this, load makenice.sage via ⬇ sage : load ( ’makenice.sage’ ) and run ⬇ sage : M12 = HeegaardDiagram ( rlist ,1) sage : M12 . compute_distances () sage : M12 . make_nice () sage : nicerlist = M12 . nice_boundary_intersections After initializing the nice Heegaard diagram via ⬇ sage : N12 = NiceHeegaardDiagram ( nicerlist ,1) and running ⬇ sage : N12 . sort_generators () the N12 versions of the variables (1)–(30) from Section 3 become available. Then we are ready to use the following functions. ⬇ sage : N12 . find_diffs ( i , j ) finds all differentials between the i -th and the j -th generators. ⬇ sage : N12 . print_differentials ( k ) outputs a .txt file ( N12_differentials_in_spinc_k.txt ) with all Heegaard Floer differentials in the k -th SpinC structure. ⬇ sage : N12 . plot_complex ( k ) returns a directed graph where vertices are the Heegaard Floer generators in the k -th SpinC structure and edges are the Heegaard Floer differentials between them. ⬇ sage : N12 . compute_homology ( k ) returns the hat version of the Heegaard Floer homology of the 3-manifold described by the Heegaard diagram in the k -th SpinC structure. If you want to compute the Ozsváth–Szabó contact invariant and the spectral order of the open book diagram, it suffices to run ⬇ sage : N12 . sort_canonical_spinc () instead of N12.sort_generators() so as to sort those generators in the canonical SpinC structure that reside in Maslov gradings 0 and 1 relative to the canonical generator \mathbf{x}_{\xi} . Either will populate the lists N12.cx0 and N12.cx1 containing those generators in (relative) Maslov gradings 0 and 1 , respectively. These are then used by ⬇ sage : N12 . compute_bmaps () to compute \widehat{\partial}_{\mathit{HF}} , \partial_{0} , and \partial_{1} between (relative) Maslov gradings 1 and 0 , ⬇ sage : N12 . check_contact_class () to check whether the Ozsváth–Szabó contact invariant is zero, and ⬇ sage : N12 . compute_order () to compute the spectral order o(S,\phi,\mathbf{a}) of the open book diagram (S,\phi,\mathbf{a}) .