Relative Calabi-Yau structures II: Shifted Lagrangians in the moduli of objects

We show that a Calabi-Yau structure of dimension $d$ on a smooth dg category $C$ induces a symplectic form of degree $2-d$ on the moduli space of objects $M_{C}$. We show moreover that a relative Calabi-Yau structure on a dg functor $C \to D$ compatible with the absolute Calabi-Yau structure on $C$ induces a Lagrangian structure on the corresponding map of moduli $M_{D} \to M_{C}$.


Introduction
Given a smooth, proper variety X over a field k, there is a reasonable derived moduli space of perfect complexes M X on X, with the property that at a point in M X corresponding to a perfect complex E on X, the tangent complex at E identifies with the shifted (derived) endomorphisms of E: [1].
For X of dimension d, a trivialisation θ : O X ≃ ∧ d T * (X) of its canonical bundle gives a trace map tr : End(E) θ ≃ Hom(E, E ⊗ ∧ d T * (X)) → k[−d] such that the Serre pairing is anti-symmetric and non-degenerate. When d = 2, so that X is a K3 or abelian surface, and the moduli space M X is replaced with that of simple sheaves, Mukai [18] showed that the above pointwise pairings come from a global algebraic symplectic form. Similarly, when X is taken to be a compact oriented topological surface, Goldman [10] showed that using Poincaré pairings in place of Serre pairings as above gives a global symplectic form on the moduli space of local systems on X.
Such examples motivated Pantev-Toën-Vaquié-Vezzosi [19] to introduce shifted symplectic structures on derived Artin stacks and to show that, in particular, the above pairings are induced by a global symplectic form of degree 2 − d on M X . The main goal of this paper is to establish an analogue of this global symplectic form when a Calabi-Yau variety (X, θ) is replaced by a 'non-commutative Calabi-Yau' in the form of a nice dg category C equipped with some extra structure and the moduli space M X is replaced with a 'moduli space of objects' M C . More precisely, a non-commutative Calabi-Yau of dimension d is a (very) smooth dg category C equipped with a negative cyclic chain θ : k[d] → HC − (C) satisfying a certain non-degeneracy condition, and the moduli space M C parametrises 'pseudo-perfect C-modules', introduced by Töen-Vaquié in [22]. More generally, we shall be interested in 'relative left Calabi-Yau structures' on dg functors C → D, in the sense of Brav-Dyckerhoff [4].
The main result of this paper is Theorem 5.5, which we paraphrase here.
Main theorem. Given a non-commutative Calabi-Yau (C, θ) of dimension d, the moduli space of objects M C has an induced symplectic form of degree 2 − d. If in addition f : C → D is a dg functor equipped with a relative left Calabi-Yau structure, then the induced map of moduli spaces M D → M C has an induced Lagrangian structure.
In Corollary 6.2, we shall show that the above theorem about non-commutative Calabi-Yaus allows us to say something new even for non-compact commutative Calabi-Yaus with Gorenstein singularities. Namely, we have the following corollary.
Corollary of main theorem. Let X be a finite type Gorenstein scheme of dimension d with a trivialisation θ : O X ≃ K X of its canonical bundle. Then the moduli space M X of perfect complexes with proper support has an induced symplectic form of degree 2 − d. When X arises as the zero-scheme of an anticanonical section s ∈ K −1 Y on a Gorenstein scheme Y of dimension d + 1, then the restriction map M Y → M X carries a Lagrangian structure.
In Corollary 6.5, we shall show that the notion of relative Calabi-Yau structure and its relation to Lagrangian structures allows us to construct Lagrangian correspondences between moduli spaces of quiver representations, generalising examples known to experts. We record here a special case.
Corollary of main theorem. For a noncommutative Calabi-Yau (C, θ) of dimension d, there is a Lagrangian correspondence C is the moduli space of exact triangles in C. Remark 1.2. Before proceeding, let us mention some related work. The notion of relative Calabi-Yau structure was introduced in our previous paper, [4], where we announced the theorem above. In [21], 5.3, Toën sketches an argument for the particular case of the main theorem when C is both smooth and proper, and describes a version of the second corollary. In [24], Theorem 4.67, Yeung proves a version of the main theorem for a certain substack of M C . In [20], Shende and Takeda develop a local-to-global principle for constructing absolute and relative Calabi-Yau structures on dg categories of interest in symplectic topology and representation theory. Combined with our main theorem, this gives many examples of shifted symplectic moduli spaces and Lagrangians in them coming from non-commutative Calabi-Yaus.
We now sketch the main constructions involved in establishing the main theorem. First, by definition of the moduli space M C , there is a universal functor While the construction of the above closed 2-form is fairly easy, it requires some work to show that it is non-degenerate. Indeed, much of the paper consists in setting up the theory necessary for computing this 2-form in such a way that its non-degeneracy becomes manifest. The computation is broken into a number of steps.
First, we note that since C is smooth, the functor F is corepresentable relative to Perf(M C ) in the sense that there is a universal object E C ∈ C c ⊗ Perf(M C ) so that F C = Hom MC (E C , −). Moreover, there is a form of Serre duality relative to Perf(M C ), formulated in terms of the 'relative inverse dualising functor' (see Corollary 2.5), which in the case that (C, θ) is a noncommutative Calabi-Yau of dimension d induces a global version of the Serre pairing 1: Next, we show (see Proposition 3.3) that there is a natural isomorphism of Lie algebras of the shifted tangent complex of M C with endomorphisms of E C : In particular, the shifted tangent complex T (M C )[−1] carries not only a Lie algebra structure, but even an associative algebra structure.
Finally, after a general study of maps of Hochschild chains induced by dg functors, we check that under the identification T (M C )[−1] ≃ End MC (E C ), the pairing 1.3 agrees with that given by the 2-form induced by θ. (See Proposition 5.3 in the body of the text. ) We end this introduction with an outline of the structure of the paper, highlighting those points important to the proof of the main theorem.
In Section 2, we introduce notation for dg categories. The two most important points are Corollary 2.6, which shows that certain dg functors are corepresentable, and Lemma 2.5, which shows that the 'inverse dualising functor' for a smooth dg category behaves like an 'inverse Serre functor'.
In Section 3, we introduce some basic objects of derived algebraic geometry, as well as the protagonist of our story, the 'moduli space of objects' M C in a dg category C. The main result of this section is Theorem 3.3, which for nice C establishes an isomorphism of Lie algebras , where E C is the 'universal left proper object'. In particular, this endows the shifted tangent complex T (M C )[−1] with the structure of associative algebra.
In Section 4, we review the formalism of traces of endofunctors, which we use to describe the functoriality and S 1 -action for Hochschild chains. The most import points are Lemma 4.5, which describes how to compute the Hochschild map for a dg functor with smooth source and rigid target, and Proposition 4.6, which establishes an S 1 -equivariant isomorphism between functions on the loop space LU of an affine scheme U and Hochschild chains HH(QCoh(U )) of the category of quasi-coherent sheaves.
In Section 5, we review the theory of closed differential forms in derived algebraic geometry. In Proposition 5.2, we show how to construct closed differential forms on the moduli space M C from negative cyclic chains on C, and then prove our main result, Theorem 5.5. We conclude by discussing some corollaries and examples.

Conventions
For ease of reading, we have adopted some linguistic and notational hacks. For example, (∞, 1)-categories are simply called categories, (∞, 1)-functors are called functors, and homotopy limits and colimits are called limits and colimits. Similarly for (∞, 2)-categories. Certain objects or morphisms, such as adjoints and compositions, are only defined up to a contractible space of choices and we leave this ambiguity implicit. However, given an (∞, 1)-category C and two objects x, y ∈ C, we do write Map(x, y) for the mapping space between them, which should serve as a reminder of what is not explicitly mentioned. Certain properties, like a morphism being an equivalence or an object in a monoidal category being dualisable, can be checked in the homotopy category and we do not usually mention explicitly the passage to the homotopy category. In particular, we simply call equivalences isomorphisms. Since there are no new ∞-categorical notions introduced in this paper, and almost all notions that we use appear in standard references such as [17] and [16], we hope the reader will not have difficulty in applying these conventions.

Dualisability and smoothness for dg categories
In this section we review some basic definitions and results about dg categories. The main results that we use in later sections are Proposition 2.4 and Corollary 2.6.

Dualisability in symmetric monoidal categories
In order to aid later calculations, we give a few definitions and make a few observations about dualisable objects and morphisms between them.
We introduce some notation and recall common notions. Let C be a symmetric monoidal category. An object C ∈ C is dualisable if there is another object C ∨ , together with an evaluation ev C : C ∨ ⊗ C → 1 C and coevaluation co C : 1 C → C ⊗ C ∨ satisfying the usual axioms. Given a morphism f : C → D with dualisable source, the adjoint morphism ϕ : 1 → C ∨ ⊗ D is given as the composition (2.1) Conversely, given a morphism ϕ : 1 → C ∨ ⊗D, we obtain the adjoint morphism f : C → D as the composition Note that these two constructions are inverse to each other. Given a morphism f : C → D with dualisable source and target, the dual morphism f ∨ : D ∨ → C ∨ is given as the composition Remark 2.4. Note that for a dualisable object C, the evaluation ev C and coevaluation co C are dual to each other after composing with the symmetry C ∨ ⊗ C ≃ C ⊗ C ∨ . Moreover, the endomorphism of C adjoint to ev ∨ C : 1 C → C ∨ ⊗ C is nothing but the identity endomorphism Id C . Lemma 2.1. Consider a symmetric monoidal 2-category C.
(1) Let C f → D and D g → C be morphisms between 1-dualisable objects in C. Then we have a natural identification of compositions In other words, the adjoint of the composition D (2) More generally, given an endomorphism F : C → C with adjoint morphism Φ : 1 C → C ∨ ⊗ C, the adjoint of the composition f F g can be computed as g ∨ ⊗ f • Φ.
(3) Similarly, we have a natural identification both sides being adjoint to gf .
(4) An adjoint pair f : C ↔ D : f r dualises to an adjoint pair (f r ) ∨ : Proof. As these are standard facts, we make only brief remarks on the proofs. For 1), using the definition of (co)evaluation,we obtain a factorisation Id C ≃ co ∨ C ⊗ Id C • Id C ⊗ ev ∨ C . Now insert Id C between f and g, and rearrange, using For 2), use essentially the same argument as in 1), but replacing f with F f . For 3), again use the same argument as in 1), but inserting a factorisation of Id D between g and f . For 4), note that for a 2-morphism α : f 1 → f 2 , there is a naturally induced 2-morphism α ∨ : f ∨ 2 → f ∨ 1 . Applying this to the unit and co-unit f f r → Id D and f r f → Id C gives the dualised adjunction.

Presentable dg categories
In this subsection we discuss the formalism in which we deal with dg categories. Mostly we follow Gaitsgory-Rozenblyum [8].
DGCat 2 cont denotes the symmetric monoidal 2-category of presentable dg categories, continuous dg functors, and dg natural transformations. Here continuous means colimit preserving. The underlying 1-category, with presentable dg categories as objects and continuous dg functors as 1-morphisms, is denoted DGCat cont . We denote by Fun the internal Hom adjoint to tensor product. 1 The unit with respect to the tensor product is the dg category Vect k of dg vector spaces.
Given a dg category C ∈ DGCat cont , we denote its subcategory of compact objects by C c . A dg category C is compactly generated if C = Ind(C c ). Note that for any presentable dg category C, C c is a small, idempotent complete dg category. The category of such small dg categories is denoted dgcat.
As a matter of convention, objects of DGCat cont shall be called simply 'dg categories', while objects of dgcat shall be called 'small dg categories'. Let us emphasise here that in the prequel to this paper [4], 1 In some sources, Fun is denoted Fun L , to emphasise that morphisms preserve colimits.
we worked with a model for small dg categories dgcat in terms of small categories enriched over cochain complexes and Morita equivalences between them. In the present paper, it is both more convenient and also necessary to work with DGCat cont , since we to handle not-necessarily compactly generated dg categories when dealing with quasi-coherent sheaves on prestacks.
The dualisable objects in DGCat cont (1-dualisable objects in DGCat 2 cont ) are simply called dualisable dg categories. Concretely, a dg category C is dualisable if there is another dg category C ∨ and a pairing ev C : C ∨ ⊗ C → Vect k and copairing co C : Vect k → C ⊗ C ∨ satisfying the usual properties. Note that if C is compactly generated, then it is dualisable with dual C ∨ = Ind((C c ) op ). One shows that ev C and co C are dual up to a switch of tensor factors. Furthermore one shows that for a dualisable dg category, we have a natural equivalence C ∨ ⊗ D ≃ Fun(C, D), and that under this equivalence, the composition Vect k Given a continuous dg functor f : C → D between presentable dg categories (that is, a map in DGCat cont ), the adjoint functor theorem ensures the existence of a formal right adjoint f r : D → C. When the right adjoint f r is itself continuous, we call f : C ↔ D : f r a continuous adjunction. When C and D are dualisable, passing to duals gives a continuous adjunction (f r ) ∨ : C ∨ ←→ D ∨ : f ∨ , by Lemma 2.1. One shows that if C is compactly generated, then a continuous functor f : C → D has continuous right adjoint if and only f sends compact objects to compact objects.
A dualisable dg category C is called proper if the evaluation functor C ∨ ⊗ C evC → Vect k has a continuous right adjoint and is called smooth if the evaluation functor has a left adjoint. Equivalently, C is smooth if the coevaluation functor Vect k coC → C ⊗ C ∨ has a continuous right adjoint. Since Vect k is generated by the compact object k, co C has a continuous right adjoint if and only co C (k) ∈ C ⊗ C ∨ is compact if and only if Id C ∈ Fun(C, C) is compact. (We note in passing that the 2-dualisable objects in DGCat 2 cont are precisely the dualisable dg categories C that are both smooth and proper.)

Rigid dg categories and continuous adjunctions
In this subsection, we review the notion of rigid dg category, following [8], and prove a corepresentability result (Corollary 2.6) for continuous adjunctions between smooth and rigid dg categories. This corepresentability lemma will be important for understanding the tangent complex of the moduli space of objects.
By monoidal/symmetric monoidal dg category, we mean an algebra/commutative algebra object in DGCat cont .
Given a monoidal dg category A, we denote the tensor product functor by m A : A ⊗ A → A, and the unit functor by − ⊗ 1 A : Vect k → A. Since A is an algebra object in DGCat cont , m A and 1 A are continuous, hence for every object a ∈ A, the functors a ⊗ −, − ⊗ a : A → A are continuous.
By A-module category we mean a (left) module C for A internal to DGCat cont . By definition, the action functor m C : A ⊗ C → C is continuous. In particular, given any object c ∈ C, the functor − ⊗ c : A → C is continuous. By the adjoint functor theorem, − ⊗ c has a (not necessarily continuous) right adjoint Hom A (c, −) : C → A, called 'relative Hom'.
We use the notation End A (c) := Hom A (c, c).
End A (c) admits a natural structure of algebra in A. See [16], 4.7.2.
Given an associative algebra A in a monoidal dg category A and an A-module category C, there is a dg category of A-modules in C, denoted A -mod(C) The datum of an object c ∈ A -mod(C) is equivalent to giving an algebra morphism A → End A (c). We shall need the following fact, proved in [8], I.1.8.5.7: There is an equivalence of categories A monoidal dg category A is called rigid if the unit 1 A is compact, the monoidal product m A : A ⊗ A → A has a continuous right adjoint m r A , and m r A is a map of A-bimodules. It is easy to see that ev A := Hom A (1 A , m A (−)) : A ⊗ A → A → Vect k induces a self-duality equivalence A ≃ A ∨ . When A is compactly generated, the condition that m r A be a bimodule functor can replaced with the requirement that an object is compact if and only if it admits a left and right dual. See [8], I.1.9.
If C is dualisable, then one can show that there is an equivalence of dg categories C ∨ ≃ Fun A CA and that there is an A-linear relative evaluation functor ev C/A : C ∨ ⊗ A C → A exhibiting C ∨ as the A-module dual of C ( [8], I.1.9.5.4). We say that C is smooth over A if the relative evaluation ev C/A has a left adjoint ev l C/A and proper over A if there is a continuous right adjoint ev r C/A . For a rigid dg category A, the induction-restriction adjunction is continuous. Tensoring 2.7 with a dg category C, we obtain a continuous induction-restriction functor for C and C A := A ⊗ C, which for brevity we denote Lemma 2.3. Let C be a dg category, A a rigid dg category, f : C ↔ A : f r a continuous adjunction.
(1) There is an induced, continuous A-linear adjunction Applying i to the latter and using the unit of the adjunction i, i r , we obtain a natural transformation (3) Using the above natural transformation and the natural isomorphism i • Φ ≃ Id A ⊗Φ• i for a continuous endomorphism Φ of C, we obtain a natural transformation Proof. The proofs are straightforward. Let us merely note that F is A-linear by construction. The fact that its right adjoint F r is also A-linear uses rigidity of A and is verified in [8], I.9.3.6.
Next, we specialise to the case of dualisable and smooth sources and rigid target, where standard diagram chases establish the following. (1) Under the self-duality A ≃ A ∨ , the dual functor F ∨ identifies with the composition and the dual functor F r∨ identifies with the composition (2) By definition of dual functor, F ≃ ev C/A •F ∨ ⊗ A Id C . Then using the above computation of F ∨ , F identifies with the composition (3) If C is smooth over A, so that ev C/A : C ∨ ⊗ A C → A has a left adjoint ev l C/A , then we can pass to left adjoints in F ≃ ev C/A •F ∨ ⊗ A Id C to obtain a left adjoint F l ≃ F r ∨ ⊗ A Id C • ev l C/A . Using the above computation of F r ∨ , we find that F l identifies with the composition Inspecting the above composition, we find that (4) When C is smooth over A, we set E := F l (1 A ) ∈ C and obtain that F is corepresentable relative to A: Let A be a rigid, compactly generated dg category, C a compactly generated A-module category. An The functor Id ! C/A adjoint to ev l C/A (k) ∈ C ∨ ⊗ A C is called the (relative) inverse dualising functor, since by the following corollary it behaves like an 'inverse Serre functor' relative to A. Corollary 2.5. Let C be a compactly generated dg category, smooth over a rigid dg category A. Suppose c ∈ C is right proper over A, so that the functor Hom A (−, c) ∨ : C → A is continuous with continuous right adjoint. Then there is a natural isomorphism of functors In particular, Id ! C/A (c) is left proper. Moreover, applying the above isomorphism to c, we have Hom Composing with the dual of the unit 1 A → Hom A (c, c), we obtain a trace map tr c : Hom By assumption, F has a continuous right adjoint F r . For each compact object d ∈ C, we have a natural equivalence hence by the Yoneda lemma F r (1 A ) ≃ c. By Proposition 2.4, F also has a left adjoint given as , as claimed. The statement about the isomorphism being induced by the pairing follows from naturality of the isomorphism, just as in the case of Serre functors.
Combining Lemma 2.3 and Proposition 2.4, we have the following corepresentability result, which will be essential in understanding the tangent complex of the moduli space of objects M C in a smooth dg category C.
Corollary 2.6. Let f : C ←→ A : f r be a continuous adjunction with smooth source and rigid target. Then the induced functor has a left adjoint F l and F is corepresented by the compact object We have isomorphisms We end this section with a computation that will be useful later for computing fibres of certain canonical perfect complexes on the moduli space of objects in a dg category.
Lemma 2.7. Let C be a dg category, A a rigid dg category, and ϕ : A ←→ Vect k : ϕ r an adjunction with ϕ a symmetric monoidal dg functor. Then for objects Proof. First, let us note that Vect k becomes an A-module via ϕ and that with respect to this A-module structure ϕ r is A-linear. Hence the endofunctor ϕ r ϕ of A is A-linear and so determined by its action on 1 A , giving an isomorphism of functors Using this isomorphism, adjunction, and A-linearity of internal Hom, we obtain the following sequence of isomorphisms: 3 The moduli space of objects

Quasi-coherent and ind-coherent sheaves on affine schemes
We review some basic notions in derived algebraic geometry that we shall need later, mostly following [8], Chapters 2-6. For more subtle points, we give precise references. For now on, we take k be a field of characteristic 0. By definition, the category of (derived) affine schemes Aff is opposite to the category CAlg ≤0 k ⊂ CAlg k of connective commutative algebras in Vect k . 3 An affine scheme U = Spec(R) is said to be of finite type over the ground field k if H 0 (R) is finitely generated as a commutative algebra over k, H i (R) is finitely generated as a module over H 0 (R), and H −i (R) = 0 for i >> 0. The category of affine schemes of finite type is denoted Aff ft .
By definition, the dg-category of quasi-coherent sheaves QCoh(U ) on an affine scheme U = Spec(R) is the dg category of dg modules over the commutative algebra R. Given a map f : U → V , the pullback functor f * : QCoh(V ) → QCoh(U ) is given by induction of modules along the corresponding map of rings.
As such, f * is symmetric monoidal. The naturality of pullback is expressed via a functor QCoh(−) * : Aff op → DGCat cont Since we are so far considering only affine schemes, f * always has a continuous right adjoint f * . One can show that QCoh(U ) is a rigid symmetric monoidal dg category, and in particular that ⊗dualisable objects coincide with compact objects. In this case, the structure sheaf O U , corresponding to the ring R, is a compact generator. The compact objects in QCoh(U ) are called perfect complexes, which form a small idempotent complete dg category denoted Perf(U ). They are preserved by pullback. In the present affine case, we therefore have Ind(Perf(U )) = QCoh(U ).
Given a pullback square of affine schemes naturality of pullback gives an isomorphism q * f * ≃ p * g * , so by adjunction we obtain a base-change map which is easily checked to be an isomorphism by considering its action on the generator O V ∈ QCoh(V ). For affine schemes U = Spec(R) of finite type, define the small subcategory Coh(U ) ⊆ QCoh(U ) of coherent sheaves to consist of quasi-coherent sheaves with bounded, finitely generated cohomology: More precisely, we have a functor IndCoh(U ) has a natural symmetric monoidal structure, the product of which is denoted ⊗ ! , and the unit of which is ω U := p ! (k) for p : U → * . Using the action of QCoh(U ) on IndCoh(U ), tensoring with ω U gives a symmetric monoidal functor The functor Υ intertwines * -pullback and !-pullback: More precisely, Υ is a natural transformation For an 'elementary' definition of f ! , see [8], II.5.4.3.
of functors from Aff ft op to DGCat cont . There is a self-duality equivalence IndCoh(U ) ≃ IndCoh(U ) ∨ . The corresponding equivalence between compact objects is denoted can be used to define a contravariant Grothendieck-Serre duality functor hence the functor 3.3 is given on perfect complexes by In particular, it is symmetric monoidal and fully faithful when restricted to perfect complexes. More generally, one can show that D U (−) is fully faithful on bounded above quasi-coherent sheaves having coherent cohomology sheaves.

Prestacks and the moduli of objects
In this subsection, we fix notation by reviewing some basic constructions concerning prestacks and dg categories of sheaves on prestacks. Our basic reference is [8], [9]. We denote by PrStk := Fun(CAlg ≤0 k , Spc) the category of prestacks on Aff. Being a topos, PrStk is cocomplete, Cartesian closed, and colimits commute with pullbacks. We denote the internal/local mapping space adjoint to X × − by Map(X, −), and the global mapping space by Map(X, −). Moreover, there is a continuous faithful embedding Spc ֒→ PrStk sending a space K to the constant prestack with value K.
The embedding Spc ֒→ PrStk is symmetric monoidal for the Cartesian monoidal structures, so (abelian) groups in Spc map to (abelian) groups in PrStk. We shall be especially interested in the circle group BZ = S 1 .
Definition 3.5. Given a prestack X, its free loop space LX is by definition the mapping prestack Map(S 1 , X).
The free loop space LX carries a natural action of the circle group S 1 , which we call 'loop rotation'. Decomposing a circle into two intervals and using the fact that mapping out of a colimit gives a limit, we obtain an isomorphism of the free loop space with the self-intersection of the diagonal: In particular, if X is affine, then the free loop space is again affine.
Mostly we shall be interested in prestacks that are laft (locally almost of finite type) and def ('have deformation theory'). Roughly, a prestack X is laft if it is determined by maps U → X with U an affine of finite type, and is def if it has a (pro-)cotangent complex T * (X) that behaves as expected. See the next section for what we expect of a (pro-)cotangent complex.
Since every prestack X is tautologically a colimit over all affines mapping into it, X = colim Aff /X U , we have by definition an identification For each map of prestacks f : X → Y , we have by definition a pullback functor f * : QCoh(Y ) → QCoh(X). The adjoint functor theorem provides a right adjoint, denoted f * , but in general it can be poorly behaved. However, for 'qca' morphisms f , f * is continuous and satisfies base change and the projection formula for pullbacks along maps of affines U → Y (see Corollary 1.4.5 [7]). A morphism f : X → Y is qca if the pullback of X along a map from any affine U → Y is a nice Artin 1-stack with affine stabilisers. This will be obvious in the situations where we need it.
One can similarly define perfect complexes on a prestack by right Kan extension from affines, so that in particular we have an identification For a general prestack X, perfect complexes need not be compact as objects in QCoh(X), but they always identify with the subcategory of ⊗-dualisable objects in QCoh(X). In particular, QCoh(X) is not always rigid, nor even dualisable in DGCat cont . It shall therefore be convenient for us to formally introduce the category of ind-perfect sheaves Ind(Perf(X)). Note that by construction Ind(Perf(X)) is compactly generated and that pullback preserves compact objects, hence for a map of prestacks f : X → Y , we have a continuous adjunction Similarly, for a general laft prestack X, the category of ind-coherent sheaves is defined as the limit along !-pullback over all finite type affine schemes mapping to X: For a map of laft prestacks f : X → Y , we have an evident pullback functor f ! : IndCoh(Y ) → IndCoh(X) and a natural transformation Υ : QCoh(−) * → IndCoh(−) ! of functors from PrStk laft op to DGCat cont given at a laft-prestack X by tensoring with ω X . Remark 3.6. For maps of laft prestacks f : X → Y that are sufficiently algebraic, one can define a pushforward functor f * : IndCoh(X) → IndCoh(Y ). Beware, however, that unless f is proper, f ! is not right adjoint to f * . Nonetheless, one of the main results of [8], [9] is that * -pushforward satisfies base-change with respect to !-pullback.
We can now define the main object of interest for this paper.
Example 3.7. The moduli space of objects M C in a compactly generated dg category C is the prestack given on an affine U by Note that Map dgcat (C c , Perf(U )) is the space of exact functors C c → Perf(U ) from compact objects in C to perfect complexes on U . Equivalently, we could consider the space of continuous adjunctions C ↔ QCoh(U ). When C is smooth, Corollary 2.6 ensures that functors F : C c → Perf(U ) are precisely those corepresented by left proper objects E ∈ C c ⊗ Perf(U ), hence the (somewhat inaccurate) name 'moduli space of objects'. In particular, a k-point x : Spec(k) → M C classifies a functor and when C is smooth, this functor is corepresented by Id ! C ϕ r x (k). By Serre duality, we have Hom C (Id ! C ϕ r x (k), y) ≃ Hom C (y, ϕ r x (k)) * naturally in compact objects y ∈ C c , hence we have an isomorphism of functors ϕ x ≃ Hom C (−, ϕ r x k) * . Our convention is to identify the point x with the right proper object ϕ r (k), so that we have an isomorphism of functors By definition of the moduli space, there is a universal exact functor C c → Perf(M C ), or equivalently, a universal continuous adjunction By Corollary 2.6, the universal functor F C is corepresented by a left proper object Remark 3.9. The moduli space M C was introduced by Toën-Vaquié [22], where it is shown that for C a finite type dg category, M C is locally an Artin stack of finite presentation and in particular has a perfect cotangent complex. A compactly generated dg category C is of finite type if its category of compact objects C c is compact in the category dgcat of small idempotent complete dg categories and exact functors. One can show that finite type dg categories are always smooth. See [22], Proposition 2.14.

(Co)tangent complexes and differential forms
In this subsection, we review the notions of cotangent complex and tangent complex, following I.1 of [9]. (In fact, [9] work with the somewhat more general notion of pro-cotangent complex, but we shall not explicitly need that.) Given an affine scheme U = Spec(R) and a connective quasi-coherent sheaf F ∈ QCoh(U ) ≤0 , we form the trivial square-zero extension U F = Spec(R ⊕ F ). Given a prestack X and a point U  We say that X has a cotangent space . Suppose X has all cotangent spaces and is a commutative diagram of affines over X. Then there is a natural pullback map If 3.12 is an isomorphism for all diagrams 3.11, we obtain a cotangent complex T * (X) ∈ QCoh(X) = lim (Aff /X) op QCoh(U ) whose fibres are the cotangent spaces: Similarly, given a map of prestacks X → Y and a point x : U → X, the functor of relative derivations at x is If the functor 3.13 is co-represented by an object T * x (X/Y ) ∈ QCoh(U ) − , the co-representing object T * x (X/Y ) is called the relative cotangent space at x, and if relative cotangent spaces at different points are compatible under pullback, then we obtain a relative cotangent complex T * (X/Y ) ∈ QCoh(X).
Remark 3.14. One can show in particular that filtered colimits of Artin stacks have cotangent complexes, and that Artin stacks locally of finite presentation have perfect cotangent complexes. In particular, the moduli space M C for a finite type dg category C has a perfect cotangent complex. See [22], Theorem 3.6.
Given a laft prestack X with cotangent complex T * (X), its tangent complex is defined to be the image of its cotangent complex under the contravariant duality 3.3. In particular, when the cotangent complex of X is perfect, we have by 3.4 an identification We define the complex of differential p-forms on X to be ∧ p T * (X) ∈ QCoh(X). and the space of differential p-forms of degree n to be

The tangent complex of the moduli of objects
In this subsection, we compute the shifted tangent complex of the moduli of objects T (M C )[−1] in a finite type dg category C. Our argument is an adaptation of that of [9], II.8.3.3, which treats the case C = Vect k .
To begin with, we review the construction of the natural Lie algebra structure on T (X)[−1] ∈ IndCoh(X) for X ∈ PrStk laft-def .
Given X ∈ PrStk laft-def , consider the completion (X × X) ∧ of the diagonal ∆ : X → X × X as a pointed formal moduli problem over X: Looping, we obtain a formal group Ω X (X × X) ∧ over X sitting in a pullback diagram It is easy to check that the formal group Ω X (X × X) ∧ identifies with the completion LX ∧ of the loop space along the constant loops.
We shall need the following, which combines the equivalences of 3.17 and Proposition 2.2.
For later use, we elaborate on a particular case of the above proposition. Proof. The assertion is clear at the level of objects. Indeed, since End U (E) is perfect, Moreover, by definition of the duality functor D U (−) 3.3, we have for F ∈ Coh(U ), hence by the Yoneda lemma D U (∆ * ∆ * O U ) and ∆ ! ∆ * ω U are naturally isomorphic. At the level of morphisms, writing ΥEnd Since the duality functor D exchanges * -pullback and !-pullback, the assertion follows.
We now proceed to compute the shifted tangent complex of the moduli of objects M C in a dg category C of finite type.
Recall that by definition we have a universal continuous adjunction By adjunction, the automorphism α : π * f → π * f is equivalent to a map E → π * π * E ≃ E ⊕ F ⊗ E in C U whose first component is just Id E . Such a map is therefore determined by its second component E → F ⊗ E.
In short, homotopy classes of derivations with values in F ∈ Coh(U ) at (f, Id f ) : U → LM C relative to M C naturally identify with homotopy classes of maps E → F ⊗ E in C U .
We claim that such maps are naturally identified with maps D U (F ) → ΥEnd U (E), and thus ΥEnd U (E) identifies with the relative tangent space for every point. Indeed, we have We conclude this section with a computation of the (co)tangent map induced by a dg functor. .

We then have a composition of natural maps of functors
where the first arrow is induced by the unit Id C → F C F l C and the second by the counit F l D F D → Id D . Applying F D to this composition gives the desired map The dual statement for the cotangent map is proved dually.

Traces and Hochschild chains 4.1 Traces and circle actions
We begin by reviewing the theory of traces in (higher) symmetric monoidal categories. Our main reference is Hoyois-Scherotzke-Sibilla [12], which among other things provides enhanced functoriality for a construction of Toën-Vezzosi [23]. Other references making use of this circle of ideas include [2] and [14]. We follow [12], but slightly modify the notation and language to be consistent with other parts of the paper. In particular, we call a symmetric monoidal category 'very rigid' rather than 'rigid' if all its objects are dualisable.
Following [12], given a symmetric monoidal 2-category C, we consider the symmetric monoidal 1-category End(C), defined as the symmetric monoidal category of 'oplax natural transfors', in the sense of Scheimbauer-Johnson-Freyd [13], from the free very rigid category generated BN to C: (4.1) Accordingly, we shall informally say that that End(C) is 'oplax corepresentable'. At the level of homotopy categories, End(C) admits the following description: an object of End(C) is a pair (C, Φ), where C ∈ C is a 1-dualisable object and Φ is an endomorphism of x. Given two objects (C, Φ) and (D, Ψ), a morphism between them is a pair (f, α), where f : C → D is a 1-morphism admitting a right adjoint f r in C and α : f Φ ⇒ Ψf is a 2-morphism. Such a morphism is usually displayed as a lax commutative square The symmetric monoidal structure on End(C) is given 'pointwise'. We also consider the symmetric monoidal category ΩC, whose objects are endomorphisms of the unit 1 C and whose morphisms are natural transformations between such endomorphisms. Definitions 2.9 and 2.11 of [12] give a symmetric monoidal trace functor The value of Tr on an object (C, Φ) is computed simply as the trace of the endomorphism adjoint to Φ, namely, In other words, the trace of Φ is the composition Here, we have used Lemma 2.1 to define the 2-morphisms in the left-most and right-most squares as (  Proof. Observe that the diagram An important feature of the theory of traces developed in [12] is the naturality in C of the trace functor Tr C : End(C) → ΩC. While not explicitly stated in [12], the following lemma follows immediately from 'oplax corepresentability' of End(C).

End(D)
Tr D / / ΩD Explicitly, given an object (C, Φ) ∈ C, we have an equivalence Furthermore, if G is right adjoint to F , then for any object (D, Ψ) in D, the counit F • G ⇒ Id D induces a natural map F (Tr C (GΨ)) ≃ Tr D (F GΨ) → Tr D (Ψ) and hence, by adjunction, a natural map Similarly to the category of endomorphisms End(C), we define the category of automorphisms as At the level of homotopy categories, Aut C admits the following description. The objects of Aut C are pairs (C, Φ) of a dualisable object in C together with an automorphism Φ. The 1-morphisms in Aut C are the same as those in End(C). Restricting along BN → BZ = S 1 , we obtain a symmetric monoidal trace functor The main result that we need from [12] is Theorem 2.14 (refining Corollaire 2.19 of [23]), which states that the trace functor Tr C (−) : Aut C → ΩC admits a unique S 1 -equivariant lift natural in symmetric monoidal functors C → D. Here Aut C = Fun oplax ⊗ ((S 1 ) vrig , C) carries the S 1 -action induced by that on (S 1 ) vrig , while ΩC carries the trivial S 1 -action. Here we explicitly formulate the result from [12] that we shall need later. Proposition 4.3. Given an S 1 -fixed point (C, Φ) ∈ Aut C, there is an induced S 1 -fixed point structure on Tr C (Φ) ∈ ΩC, that is, an S 1 action on Tr C (Φ). Given a second S 1 -fixed point (D, Ψ) ∈ Aut C, and an S 1 -fixed map (f, α) : (C, Φ) → (D, Ψ), we get an induced S 1 -equivariant map Tr C (Φ) → Tr D (Ψ).
Moreover, given a symmetric monoidal functor F : C → D between symmetric monoidal 2-categories, we obtain an S 1 -equivariant equivalence The case of most interest to us will be the trace of the identity functor Id C on a dualisable object C ∈ C, which is naturally S 1 -fixed. In the next subsection, we consider the special case of the symmetric monoidal 2-category of presentable dg categories, in which case Tr(Id C ) gives a natural realisation of Hochschild chains of C with its functorial S 1 -action. In the following subsection, we consider the special case of the symmetric monoidal 2-category of correspondences of affine (derived) schemes, and use Proposition 4.3 to identify Hochschild chains and functions on the loop space as S 1 -complexes.
Remark 4.8. While the constructions above were described mostly at the level of homotopy categories, which is sufficient for later computations, the existence of a homotopy coherent trace functor and its S 1equivariant lift are important for us and provided by [12] and [23]. As we have briefly indicated, homotopy coherence and functoriality are handled by defining the symmetric monoidal categories End(C) and Aut C to be 'oplax corepresentable' by (BN) vrig and (BZ) vrig respectively.

Hochschild chains of dg categories
We now specialise to the case of the symmetric monoidal 2-category DGCat 2 cont of presentable dg categories. Given a dualisable dg category C ∈ DGCat 2 cont , we define Hochschild chains of C to be trace of the identity functor on C endowed with the S 1 -action described in the last section: HH(C) := Tr(Id C ) Remark 4.9. There are various approaches in the literature to the S 1 -action on Hochschild chains. Most classically, the S 1 -action is described in terms of the cyclic bar complex, as in the book of Loday [15]. Comparable to this is the construction of Hochschild chains in terms of factorisation homology, as in [16] and [1]. In this paper we use the S 1 -action coming from the cobordism hypothesis, as in [23]. While the comparison between the first two S 1 -actions and the third seem to be known to experts, we so far have not found a reference. Nonetheless, we have chosen not to reflect this ambiguity in the notation.
Given a continuous adjunction f : C ←→ D : f r between dualisable dg categories, we obtain from the formalism of traces an induced S 1 -equivariant map

HH(C) → HH(D).
Recall from Section 2 that when C is smooth, then by definition the evaluation functor ev C : C ∨ ⊗ C → Vect k has a left adjoint ev l C : Vect k → C ∨ ⊗ C. Under the identification C ∨ ⊗ C ≃ End(C), ev l C (k) corresponds to a continuous endofunctor of C, denoted Id ! C and called the inverse dualising functor of C. By definition of the identification C ∨ ⊗ C ≃ End(C), the action of Id ! C is given by the composition Forgetting the S 1 -action, we obtain the following expression for Hochschild chains of a smooth dg category C in terms of Hom-complexes: Using the above identification, we can compute the map on Hochschild chains for a dualisable functor with smooth source and dualisable target and in particular for smooth source and smooth target.
When D is also smooth, there is a natural unit mapη : Id ! D → f Id ! C f r so that the image of α identifies with the composition Proof. First note that Tr(Id ! C ) = ev C • ev l C (k), so there is a natural unit k → Tr(Id ! C ). After suspension, that gives the first arrow. Then by adjunction, the composition k Tr(α) → Tr(Id C ) identifies with the original Hochschild chain k[i] → Tr(Id C ). Now using Lemma 4.1, and the naturality of η : Id C → f r f , we obtain the commutative diagram Now suppose both C and D are smooth. Since they are in particular dualisable, we have a natural transformation ev C → ev D •(f r ) ∨ ⊗ f . Applying ev l D on the left and ev l C on the right of this natural transformation, we obtain a map ev l Since C is smooth, we have a unit k → ev C • ev l C (k) = End(Id ! C ). Applying ev l D on the left of this unit, we obtain a map ev l D (k) → ev l D • ev C • ev l C (k). (4.14) Composing 4.13 and 4.14 and using the usual identifications, we obtain the desired unit The claim about the image of α then follows as in the case of C smooth and D dualisable.
Our main interest is in computing the Hochschild map HH(C) → HH(A) induced by a continuous adjunction f : C ↔ A : f r with smooth source and rigid target. By Corollary 2.6, the induced A-linear functor F = f A : C A → A has a left adjoint F l : A → C A and F is corepresentable by Post-composing with the counit F F r → Id A and applying the tensor product m A : A ⊗ A → A, we obtain a composition Proof. Using the above isomorphisms and naturality of trace with respect to induction and restriction between k-linear and A-linear dg categories, we obtain a commutative diagram

Using the isomorphisms Tr
Finally, note that the restriction functor res A k : A → Vect k is just Hom k (1 A , −)

Functions on the loop space and Hochschild chains
In order to encode the functoriality of base change maps (3.2), it is best to use the 2-category Corr(Aff) of correspondences with the symmetric monoidal structure induced by the Cartesian monoidal structure on affine schemes Aff. At the level of homotopy categories, the objects of Corr(Aff) are just affine schemes, a 1-morphism in Corr(Aff) from U to V is a correspondence and a 2-morphism is a commutative diagram with h proper. Composition of 1-morphisms is given by pullback: It is easy to check that all objects U ∈ Corr(Aff) are dualisable, with evaluation and coevaluation Applying the formalism of traces from subsection 4.1, we obtain that the trace of Id U in Corr(Aff) is the correspondence and is endowed with a natural S 1 -action. Decomposing the circle S 1 into two intervals glued along their endpoints, one obtains an identification Map(S 1 , U ) ≃ U × U×U U ≃ Tr Corr(Aff) (Id U ), and one can identify the natural S 1 -action on Tr Corr(Aff) (Id U ) with 'loop rotation' on Map(S 1 , U ).
Remark 4.17. The formalism of correspondences makes sense for more general prestacks, usually with some restrictions on the arrows, but we shall only need to use it for affine schemes.
Remark 4.19. Note the contravariance between h and the induced natural transformation. This is the reason for the '2-op' in (DGCat 2 cont ) 2−op . Note that the '2-op' affects only the direction of functoriality of trace, not the trace itself.
We end this section with a comparison of geometrically and algebraically defined S 1 -actions.
Theorem 4.6. For an affine scheme U , there is a natural isomorphism of S 1 -complexes where the left-hand side has the S 1 -action coming from the identification LU = Tr Corr(Aff) (Id U ) and the right-hand side has the S 1 -action coming from the identification HH(QCoh(U )) = Tr DGCat 2 cont (Id QCoh(U) ). Proof. Apply the naturality of In terms of representations, q * forgets the G-action, q * coinduces from the trivial group, π * gives the trivial representation, and π * takes G-invariants. For G sufficiently nice, the right adjoints are continuous. More generally, given a map between group prestacks ϕ : G 1 → G 2 , we have an induced map f : BG 1 → BG 2 of classifying prestacks. In good circumstances, we have a continuous adjunction f * : Rep(G 2 ) = QCoh(BG 2 ) ←→ QCoh(BG 1 ) : f * , which we refer to as restriction and coinduction of representations. 7 In particular, consider the abelian group S 1 in PrStk. We define an S 1 -complex to be a quasi-coherent sheaf on the classifying prestack BS 1 . 8 By [3] Corollary 3.11, applying B to the affinisation map 9 S 1 → BG a induces an equivalence under pullback QCoh(B 2 G a ) ≃ QCoh(BS 1 ).
We may therefore identify S 1 -complexes with BG a -complexes, and we freely do so. We shall also be interested in graded S 1 -complexes, which by definition are objects of QCoh(B(BG a ⋊ G m )). 10 7 For classical group schemes, these functors correspond to the usual (derived) restriction and coinduction functors. 8 It is easy to show that this category of S 1 -complexes is equivalent to others in the literature, for example, with the category of functors Fun(BS 1 , Vect k ). 9 Given a prestack X, the affinisation of X is by definition the prestack Map CAlg k (Γ(X, O X ), −) : CAlg ≤0 k → Spc. It is not hard to show that the affinisation of S 1 is BGa. See [3], Lemma 3.13. 10 One can show that restriction of representations along Gm → BGa ⋊ Gm is conservative and preserves limits, so restriction/coinduction is comonadic in this case. Thus we may identify QCoh(B(BGa ⋊Gm)) with certain comodules in QCoh(BGm). One can use this to identify objects of QCoh(B(BGa ⋊ Gm)) with S 1 -complexes in QCoh(BGm), hence the name 'graded S 1 -complex'.
Using the pullback square and the section j : BG m → B(BG a ⋊ G m ) of p : B(BG a ⋊ G m ) → BG m , we can define various complexes and maps of complexes functorially associated to (graded) S 1 -complexes. 11 By definition, the negative cyclic complex HC − (E) of an S 1 -complex E ∈ QCoh(B 2 G a ) is the complex of BG a -invariants: Similarly, given a graded S 1 -complex F ∈ QCoh(B(BG a ⋊ G m )), we define its weight-graded negative cyclic complex as the pushforward to BG m : While the functors q * : QCoh(BG m ) → Vect k and i * : QCoh(B(BG a ⋊ G m )) → QCoh(B 2 G a ) are given concretely by summing over the weight-graded components of a graded (mixed) complex, for our purposes it will be more relevant to take the product over the weight-graded components. More formally, we note that the right adjoint functors q * : Vect k → QCoh(BG m ) and i * : QCoh(B 2 G a ) → QCoh(B(BG a ⋊ G m )) can be shown to be continuous and satisfy the projection formula (using [7], Corollary 1.4.5, and the fact that the morphisms are qca), and hence themselves admit (non-continuous) right adjoints (q * ) r and (i * ) r , which concretely are given by taking the product over weight-graded components. There are natural transformations concretely given by mapping the direct sum to the direct product. More precisely, the natural transformation q * ⇒ (q * ) r is adjoint to a natural transformation q * q * ⇒ Id QCoh(BGm) induced via the projection formula from the natural map q * q * O BGm → O BGm corresponding to the projection k[t, t −1 ] → k of the regular representation onto the trivial representation. An analogous construction gives the natural transformation i * ⇒ (i * ) r . The above long song and dance leads to the following simple and important observations. Lemma 5.1. Given a graded mixed complex E ∈ QCoh(B(BG a ⋊ G m )), there is a natural map and so in particular a natural 'pth component' map for each p. Moreover, applying p * to the unit Id QCoh(B(BGa⋊Gm)) ⇒ j * j * , we obtain a natural transformation p * ⇒ j * . Passing to weight-graded components, we obtain for each p a natural map 11 Achtung: Quasi-coherent base change does not hold for the pullback square 5.1.

Closed differential forms
Given an affine scheme U , the map S 1 → BG a induces an equivalence Map(BG a , U ) ≃ Map(S 1 , U ) = LU , by definition of affinisation. The action of BG a ⋊ G m on BG a then induces an action of BG a ⋊ G m on LU and hence the functions on LU carry a natural structure of graded S 1 -module. 12 More formally, LU is a BG a ⋊ G m -space, and we have a fibre square where LU ≃ LU/BG a ⋊ G m . One can check that q is a 'good' morphism 13 , so that base change in this fibre square gives an isomorphism We thus obtain a direct sum decomposition into weight-graded components. On the other hand, we have isomorphisms where the last isomorphism uses 3.16 and base change along the diagonal ∆ : U → U × U . Altogether, we obtain an identification of the weight-graded components of the functions on LU . 14 We introduce the following terminology, following [19]: The space of p-forms of degree n on an affine scheme U is The space of closed p-forms of degree n on U is 12 For a more detailed discussion in the not necessarily affine case, see Section 4 of [3]. 13 More precisely, q is a 'qca' morphism in the sense of [7], since its fibre is BGa ⋊ Gm, which is qca. 14 The fact that the direct sum and direct product agree depends on the fact that T * (U ) is connective.
Following [19], for a general laft-def prestack X, we define the space of closed p-forms and the space of p-forms, as well as the map between them, by applying Map(X, −) to 5.4: A p,cl (X, n) = Map(X, A p,cl (−, n)) → Map(X, A p (−, n)) = A p (X, n).
We now give the central construction of this paper. For a prestack X, we tautologically write X = colim (Aff /X) U . Then The universal continuous adjunction F C : C ←→ Ind(Perf(M C )) : F r C gives an S 1 -equivariant map HH(C) → HH(Ind(Perf(M C ))). Composing with the natural S 1 -equivariant map HH(Ind(Perf(M C ))) → lim (Aff /X) op HH(QCoh(U )) ≃ lim (Aff /X) op Γ(LU, O LU ), taking invariants, and using Lemma 5.3, we obtain for each p a natural map Truncating and shifting gives a mapκ p : Proposition 5.2. For each n ∈ Z, p ∈ N, there is a commutative square of spaces In words: from a negative cyclic class α : k[n] → HC − (C) of degree n, we obtain for each p a closed p-form κ(α) p of degree p − n on the moduli space M C , and the underlying p-form is associated to the underlying Hochschild class. [n] → Id CM C to the objectF r C (ω MC ) followed by applying the functor F C = Hom MC (ΥE C , −), we obtain a map Here we have used the isomorphisms End MC (ΥE C ) ≃F C Id ! Proof. The maps are defined globally, so to check that the composition is dual to that giving the p-form κ p (α), it is enough to check this by restricting along each map U → M C from an affine U of finite type. For such a map, we use Lemma 4.5 on Hochschild maps with smooth source and rigid target. Taking the Grothendieck-Serre dual of this map as in Lemma 3.2 and using the isomorphism 3.16 completes the identification of the p-form κ p (α).
Remark 5.6. In [19], it is shown that if X is locally an Artin stack, then A p (X, n) ≃ |Γ(X, ∧ p T * (X)[n])|, so the above notion of the space of forms is at least reasonable in this case. Since the moduli space M C is locally Artin when C is of finite type, this will suffice for our purposes. For a general laft-def prestack, it is perhaps more natural to work directly with the Hodge filtration on de Rham cohomology.

Symplectic and Lagrangian structures on the moduli of objects
all vertical arrows are isomorphisms. 15 Here let us note that the map Id !
f r is that given by 4.15.
In particular, a relative Calabi-Yau structure on 0 → D of dimension d is just a Calabi-Yau structure of dimension d + 1 on D. We are especially interested in relative Calabi-Yau structures giving an absolute Calabi-Yau structure on C.
We have the following easy lemma, which will be used in the proof of the main theorem below.
Lemma 5.4. Let C and D be compactly generated smooth dg categories, f : C → D : f r a continuous adjunction equipped with a relative Calabi-Yau structure of dimension d, and x ∈ D a right proper object so that F D = Hom D (−, x) * : D → Vect k has continuous right adjoint F r D . Then we have a commutative diagram of endofunctors of Vect k induced by applying F r D on the right and F D the left of the diagram 5.7. When evaluated on k, we obtain a commutative diagram It remains to see that the outer two vertical arrows in the above diagram are isomorphisms. Since M D is laft, it is enough to check isomorphisms on fibres over k-points x ∈ M D , which by definition of the moduli space correspond to right proper objects x ∈ D giving dg functors F D = Hom D (−, x) * : D → Vect k with continuous right adjoint. By Lemma 3.4, the fibre of the upper left horizontal arrow is the map End D (x)[d] → End C (f r (x))[d] induced by the functor f r : D → C and the fibre of the lower right horizontal map is dual to that, up to a shift. That the fibres of the outer two vertical maps are isomorphisms now follows from Lemma 5.4.

Applications and examples
In this section, we apply Theorem 5.5 to a number of examples of relative Calabi-Yau structures on functors C → D to produce Lagrangian structures on the corresponding maps of moduli spaces M D → M C . The example of local systems on manifolds with boundary and some version of the example of ind-coherent sheaves on Gorenstein schemes with anti-canonical divisors are also treated by Calaque [5], using different methods. The example coming from A n -quivers was known in some form to experts. See for example [21], 5.3. Applying Theorem 5.5 to this relative Calabi-Yau structure, we obtain the following. Similarly, given a finite type Gorenstein scheme X of dimension d together with a trivialisation θ : O X ≃ K X of its canonical bundle, Proposition 5.12 of [4] gives an absolute Calabi-Yau structure of dimension d on IndCoh(X). Given a Gorenstein scheme Y of dimension d + 1 with an anticanonical section s ∈ K −1 Y having a zero-scheme X of dimension d, there is an induced trivialisation θ : O X ≃ K X , and Theorem 5.13 of [4] gives a relative Calabi-Yau structure of dimension d + 1 on the pushforward functor i * : IndCoh(X) → IndCoh(Y ).

Oriented manifolds and Calabi-Yau schemes
Applying Theorem 5.5 to this relative Calabi-Yau structure, we obtain the following.
Corollary 6.2. The relative Calabi-Yau structure on the functor 6.1 induces a Lagrangian structure on the corresponding map of moduli spaces M Y → M X

Lagrangian correspondences and exact sequences
One of the basic examples of a relative Calabi-Yau structure, treated in [4], Theorem 5.14, comes from the representation theory of quivers of type A n . Specifically, there is a natural functor with a relative Calabi-Yau structure of dimension 1. Denoting the moduli space of objects in Vect k by M 1 and the moduli space of objects in Mod(A n ) by M n , Theorem 5.5 endows the induced map with a Lagrangian structure. Let us explain the case n = 2 in more detail. For the quiver A 2 , we have two simple modules S 1 and S 2 , which we denote schematically by k → 0 and 0 → k respectively, and the extension P of S 1 by S 2 , denoted schematically as k → k.
The functor ∐ 3 i=1 Vect k → Mod(A 2 ). taking the first copy of k to the simple module S 1 , the second copy of k to P , and the third copy of k to the simple module S 2 carries an essentially unique relative Calabi-Yau structure. Indeed, there is an isomorphism of S 1 -complexes HH(∐ 3 i=1 Vect k ) ≃ k ⊕ k ⊕ k given by the classes of the three copies of k, and similarly an isomorphism HH(Mod(A 2 )) ≃ k ⊕ k given by the classes of S 1 and S 2 . With respect to these isomorphisms, the exact sequence HH(Mod(A 2 ), Vect k ) → HH(Mod(A 2 )) identifies with the exact sequence By examining the action of the relevant functors on the simple modules of A 2 , it is not hard to check that the identification k ≃ HH(Mod(A 2 ), ∐ 3 i=1 Vect k )[−1] satisfies the non-degeneracy necessary for a relative Calabi-Yau structure. Now consider the induced map M 2 → M 1 × M 1 × M 1 . A k-point in M 2 is a continuous functor Mod(A 2 ) → Vect k with continuous right adjoint. The image of the exact sequence S 2 → P → S 1 under this functor essentially determines the functor, and so we can consider M 2 as the moduli space of exact sequence, with the first and last factor of M 2 → M 1 × M 1 × M 1 picking out the beginning and end of the sequence and the middle factor giving the middle term of the sequence.
Note that the Lagrangian structure on the map M 2 → M 1 × M 1 × M 1 is with respect to the degree 2 symplectic form (ω, −ω, ω) on the target, where ω is the standard degree 2 symplectic form on M 1 .
We consider now a generalisation of the above construction to the moduli space of A n -representations in a Calabi-Yau category C of dimension d. Proof. The general Künneth theorem for traces follows from the trace formalism that we reviewed in Section 4.1. The underlying k-linear isomorphism comes from the identification (C ⊗ D) ∨ ⊗ (C ⊗ D) ≃ (D ∨ ⊗ D) ⊗ (C ∨ ⊗ C) and the corresponding identification ev C⊗D ≃ ev C ⊗ ev D . In the case of smooth categories, passing to left adjoints gives a corresponding identification Id ! C⊗D ≃ Id ! C ⊗ Id ! D , whence the second claim follows.
Proposition 6.4. Given smooth dg categories A, B, and C with a relative Calabi-Yau structure θ 1 ∈ Hom S 1 (k[d 1 ], HH(B, A)) of dimension d 1 on a functor f : A → B, and an absolute Calabi-Yau structure θ 2 ∈ Hom S 1 (k[d 2 ], HH(C)) of dimension d 2 , the tensor product f ⊗ Id C : A ⊗ C → B ⊗ C has an induced relative Calabi-Yau structure θ 1 ⊗ θ 2 of dimension d 1 + d 2 .
In particular, setting A = 0, we see that the tensor product of two dg categories with Calabi-Yau structures has an induced Calabi-Yau structure.
Proof. This follows easily from the Künneth formula of Lemma 6.3.
We state explicitly an important special case of Proposition 6.4. Corollary 6.5. Let (C, θ) be a non-commutative Calabi-Yau of dimension d and set C n = Mod(A n ) ⊗ C. Then the functor ∐ n+1 i=1 C → C n induced by tensoring 6.2 with (C, θ) carries a relative Calabi-Yau structure of dimension d + 1, and the induced map of moduli carries a Lagrangian structure with respect to the degree 2 − d symplectic structure on M C . 16 .