text:
\label{section6.1}

In this section, we show that the cotangent stack to the moduli of objects~\cite{ToVa} of a finite type dg-category is
equivalent, as a symplectic stack, to the moduli of object of its Calabi--Yau completion.
Moreover, this is compatible with the functoriality of our constructions (Calabi--Yau completion on the one hand, and
taking cotangent stacks on the other hand), in the following sense:

\begin{theorem}\label{thm:mainmain}
There is a natural isomorphism
\[
\xymatrix{
Ho(\scat{Cat}_k^{f.t.})^{\op} \ar[r]^-{\sigma\circ \cG_n} \ar[d]_-{\bPerf}
& Ho(\scat{ExCY}_{[n]}^{f.t.}) \ar[d]^-{\bPerf} \ar@{=>}[ld] \\
Ho(\scat{dSt}_k^{Art}) \ar[r]_-{ \bT^*[2-n]} & Ho(\scat{ExLag}_{[2-n]})
}
\]
where $\scat{Cat}_k^{f.t.}$ is the full subcategory of $\scat{Cat}_{k}$ spanned by finite type dg-categories, and
$\scat{ExCY}_{[n]}^{f.t.}$ is the subcategory of $\scat{ExCY}_{[n]}$ whose objects and morphisms only involve finite
type dg-categories.
\end{theorem}
The rest of this section is devoted to the proof of this result:
\begin{itemize}
\item We first recall the works of To\"en--Vaqui\'e~\cite{ToVa} and Brav--Dyckerhoff~\cite{BD2} (see also To\"en's~\cite{ToCY}),
that make sense of the vertical functors;
\item We then prove a version of the theorem that does not take into account symplectic and lagrangian structures,
i.e.~functors take their values in $Ho\big(\scat{Span}_1(\scat{dSt}_k)\big)$ instead of $\scat{ExLag}_{[2-n]}$;
\item We finally check the compatibility with exact symplectic and lagrangian structures.
\end{itemize}

\medskip

Along with a side result relating graphs of closed forms with Calabi--Yau morphisms associated with negative cyclic classes,
this allows us to prove that the moduli of objects of $\mathcal{G}_3(kQ|kD,\delta W)$ can be indeed identified, as a lagrangian,
with a relative (derived) critical locus.

\subsection{From Calabi--Yau structures to shifted symplectic structures}

\subsubsection{Moduli of objects}

Let $\cat{A}$ be a dg-category, that we assume to be of finite type. We denote its derived moduli stack of objects
(from \cite{ToVa}) by $\bPerf_{\cA}$: for a cgda $B$
\[
\scat{Perf}_{\cat{A}}(B):=\cat{Map}_{\scat{Cat_k}}(\cat{A},\cat{Mod}_B^{perf})\,.
\]
In other words, a $B$-point $x$ is then given by a $\cat{A}-B$-bimodule $M_x$ that is pseudo-perfect (i.e.~it is perfect as
a $B$-module).
\begin{example}
For a finite set $I$, $\scat{Perf}_{k^I}\simeq\scat{Perf}_{kI}\simeq\scat{Perf}_k^I$: a $B$-point $x$ of $\scat{Perf}_{k^I}$
is an $I$-family $M_x$ of perfect $B$-modules.
Therefore, if $\cat{A}=T_{k^I}(N)$ is free, then $\scat{Perf}_{\cat{A}}$ is a stack over $\scat{Perf}_{k^I}$, and
for every $x:\scat{Spec}(B)\to \scat{Perf}_{k^I}$,
\[
\scat{Perf}_{\cat{A}}(x)
=\cat{Map}_{\scat{Cat}_k}\big(T_{k^I}(N),\cat{Mod}_B^{perf}\big)\underset{(\cat{Mod}_B^{perf})^I}{\times}\{M_x\}
=\scat{Map}_{\scat{Mod}_{(k^I)^e}}\big(N,\underline{\mathrm{End}}_B(M_x)\big)\,.
\]
Here the $k^I$-bimodule $\underline{\mathrm{End}}_B(M_x)$ can be described in the following equivalent ways:
\begin{itemize}
\item Abstractly, it is just the $k^I$-bimodule structure on $\cat{Mod}_B^{perf}$ that we get from the dg-functor
$M_x:k^I\to \cat{Mod}_B^{perf}$;
\item In concrete terms, it is the $I\times I$-graded complex given by
\[
\mathrm{End}_B(M_x)_{i,j}=\underline{\cat{Hom}}_{\cat{Mod}_B}\big(M_x(j),M_x(i)\big)\,.
\]
\end{itemize}
\end{example}
If we borrow the notation from Example~\ref{exQuiv2} and write $E$ for the tautological sheaf on
$\scat{Perf}_k$, then, for a $B$-point $x$ of $\scat{Perf}_{k^I}$,
\[
M_x\simeq x^*\big(\underbrace{\bigoplus_{i\in I}p_i^*E}_{=:E^I}\big)\,,
\]
where $p_i:\scat{Perf}_k^I\to \scat{Perf}_k$ is the $i$-th projection.
Given a $k^I$-bimodule $N$, we get a quasi-coherent sheaf $\underline{\cat{End}}(E^I)^N\in \scat{QCoh}(\scat{Perf}_k^I)$
defined by
\[
x^*(\underline{\cat{End}}(E^I)^N):=\underline{\scat{Map}}_{\scat{BiMod}_{(k^I)^e}}\big(N,\underline{\mathrm{End}}_B(M_x)\big)\,.
\]
Hence, by definition, for $\cat{A}=T_{k^I}(N)$,
\[
\scat{Perf}_{\cat{A}}(x)\simeq |x^*(\underline{\cat{End}}(E^I)^N)|\,.
\]
In other words:
\begin{lemma}\label{lemma: linear}
The moduli of objects $\bPerf_{\cat{A}}$ of a free dg-category $\cat{A}=T_{k^I}(N)$ is equivalent to the linear stack
$\mathbb A_{\cat{End}(E^I)^N}$.
\end{lemma}
\begin{example}
In the quiver case (i.e.~$I=V(Q)$ and $N=kE(Q)$), one observes that
\[
\cat{End}(E^I)^N\simeq E^Q\,,
\]
again following the notation of Example~\ref{exQuiv2}. Hence we get an equivalence
$\scat{Perf}_{kQ}\simeq \mathbb{A}_{E^Q}$, as witnessed in Remark~\ref{labelresBG}.
\end{example}
\begin{comment}
We denote  $E_\cA \in \Perf_{\bPerf_\cA }(\cA)$ the sheaf representing the identity morphism $\mathrm{id}: \bPerf_\cA\to\bPerf_\cA$.
It is a sheaf on  the moduli space $\bPerf_{\cA}$ with values in the dg category $\cat{Mod}^{perf}_{\cA}$. Note that every
$\cA$-bimodule $N$ induces functors $\bPerf_{\cA} \to \bPerf_{\cA}$ and
$ \Perf_{ \bPerf_{\cA}} (\cA) \to \Perf_{ \bPerf_{\cA}}(\cA)$ which will all be denotes
$N\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}-$. This functor satisfies that
$x^* (  E_{\cA}\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}N)
 \simeq M_x\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}} N$ as an $\cA-B$ module.
We denote by $E$ the universal sheaf $E_{\bPerf_k}$.
Recall from Example \ref{exQuiv2}, that for a finite quiver $Q$, with vertex set $V(Q)$ and edge set $E(Q)$, we define the perfect sheaf
\[
E^Q:=\prod_{e\in E(Q)}\textsc{Map}(p_{s(e)}^*E,p_{t(e)}^*E)
\]
on $\scat{Perf}_k^{V(Q)}$, where $p_v:\scat{Perf}_k^{V(Q)}\to \scat{Perf}_k$ is the $v$-th projection for $v\in V(Q)$.
\begin{lemma}\label{lemma: linear}
The moduli space $\bPerf_{k Q}$ is equivalent to the linear stack $\mathbb A_{E^{Q}}$ .
\end{lemma}
\begin{proof}
Let $u: \scat{Spec}(B) \to \scat{Perf}_k^{V(Q)}$ for some $B \in \scat{Calg}_k$. We observe that by definition
\[
\mathbb A_{E^{Q}} (u)=| u^* E^Q|= \Big|\prod_{e\in E(Q)}\textsc{Map}(u^*p_{s(e)}^*E,u^*p_{t(e)}^*E)\Big|
=\Big|\prod_{e\in E(Q)}\Hom(a_{s(e)},a_{t(e)})\Big|\,,
\]
where $a_i$ is the object in $\cat{Mod}_B^{perf}$ classifying $p_i\circ u:  \scat{Spec}(B) \to \scat{Perf}_k$
for all $i \in V(Q)$. This is clearly equivalent to $\bPerf_{k Q} (A)=  \cat{Map}_{\scat{Cat_k}}(k Q,\cat{Mod}^{perf}_A)$.
\end{proof}
\end{comment}

The following is now a direct consequence of Lemma~\ref{lemma: linear} and Remark~\ref{remlinquiv}.

\begin{proposition}\label{proposition: cotangentkQ}
The following diagram is a homotopy pullback square in the category of derived stacks
\[
\xymatrix{
\bT^* \bPerf_{k Q}  \ar[r]	\ar[d] 	& \bPerf_{ k^{ V(Q)}} \ar[d] \\
\bPerf_{k \overline{Q}}													\ar[r]		&  \bPerf_{k[x]^{V(Q)}} }
\]
The map $\bPerf_{k \overline{Q}} \to \bPerf_{k[x]^{V(Q)}} $ is induced by the $k$-linear functor
$k[x]^{V(Q)} \to k \overline{Q}$ that maps the $v$-th generator $x$ to $\sum_{e \in E(Q)} e_v(ee^*-e^*e)e_v$ for all $v \in V(Q)$, if $e_v$ stands for the length $0$ idempotent path at $v$.
\end{proposition}

\begin{remark}
The Proposition will also be a consequence of Corollary~\ref{theorem: compareGinzburg} together with~\S\ref{subsubginz}.
\end{remark}

\subsubsection{Forms on the moduli of objects}\label{sss: CYLag}

Let $\cat{C}$ be a dg-category. We have a sequence of morphism $ch_{\cat{C}}$ defined as the composition,
\begin{eqnarray*}
\scat{HH}(\cat{C})	& \rightarrow	& \underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}\scat{HH}(\cat{Mod}_B^{perf}) \\
					& \simeq		& \underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}\scat{HH}(B) \\
					& \tilde{\to}	& \underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}|\scat{DR}(B)|^\ell \\
					& \rightarrow	& \underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}|\scat{DR}(B)|^r \\
					& \simeq		& \Big|\underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}\scat{DR}(B)\Big|^r
										=:\scat{DR}(\scat{Perf}_{\cat{C}})
\end{eqnarray*}
which is natural in $\cat{C}$ and induces a commuting diagram
\[
\xymatrix{
|\cat{HH}(\cat{C})[n+1]| \ar[r]^-{ch^{(p-1)}_{\cat{C}}}\ar[d]_{\delta} & \mathcal A^{1}(\scat{Perf}_{\cat{C}},n+p) \ar[d]^{d_{dR}} \\
|\cat{HC}^-(\cat{C})[n]|\ar[r]^-{\tilde{ch}^{(p)}_{\cat{C}}}\ar[d] & \mathcal A^{2,\cl}(\scat{Perf}_{\cat{C}},n+p) \ar[d] \\
|\cat{HH}(\cat{C})[n]|\ar[r]^-{ch^{(p)}_{\cat{C}}} & \mathcal A^{2}(\scat{Perf}_{\cat{C}},n+p)
}
\]
that is also natural in $\cat{C}$. When $p=2$, the top part of the above diagram induces a commuting diagram
of $\infty$-categories
\[
\xymatrix{
\scat{ExprCY}_{[n]} \ar[r]^{\scat{Perf}}\ar[d]_{\mathbf{\Delta}} & \scat{ExIso}_{[2-n]} \ar[d]^{\mathbf{D_{dR}}} \\
\scat{prCY}_{[n]} \ar[r]^{\scat{Perf}} & \scat{Iso}_{[2-n]}
}
\]
and the bottom part ensures that $\tilde{ch}^{(2)}_{\cat{C}}(-)^\sharp\simeq ch^{(2)}_{\cat{C}}((-)^\natural)$.
\begin{remark}
In the above diagram, all functors commute with the anti-involution $\sigma$ that reverses the direction of (co)spans.
\end{remark}
\begin{example}
In weight $0$, the map
\[
ch^{(0)}:|\cat{HH}(\cat{C})[n]|\to \mathcal{A}^0(\scat{Perf}_{\cat{C}},n)=|\Gamma(\mathcal O_{\scat{Perf}_{\cat{C}}})[n]|
\]
is simply obtained from
\[
\cat{HH}(\cat{C})	\to\underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}\cat{HH}(B)
					\to\underset{\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}B
					=\Gamma(\mathcal O_{\scat{Perf}_{\cat{C}}})\,.
\]
\end{example}
The following example will be useful for the comparison results in the next Section.
\begin{example}[\cite{BD2}, Proposition 5.3]\label{ex:BDcompute}
Let us write $M_x$ for the pseudo-perfect $\cat{C}-B$-bimodule corresponding to a point $x:\scat{Spec}(B)\to\scat{Perf}_{\cat{C}}$,
and recall that there are natural equivalences of $B$-modules
\[
x^*\mathbb{T}_{\scat{Perf}_{\cat{C}}}\simeq \underline{\cat{Map}}_{\scat{Mod}_{\cat{C}^{\op}}}(M_x,M_x)[1]\quad\textrm{and}\quad
x^*\mathbb{L}_{\scat{Perf}_{\cat{C}}}\simeq \underline{\cat{Map}}_{\scat{Mod}_{\cat{C}^{\op}}}
(\cat{C}^\vee\underset{\cat{C}}{\overset{\mathbb{L}}{\otimes}}M_x,M_x)[-1]\,.
\]
Therefore, applying \cite[Proposition 5.3]{BD2} to the weight one case, we get that $ch^{(1)}$ is given by
\begin{eqnarray*}
|\cat{HH}(\cat{C})[n]|\simeq \cat{Map}_{\scat{Mod}_{\cat{C}^e}}(\cat{C}^\vee,\cat{C})[n]
& \overset{-\otimes\mathrm{id}}{\longrightarrow} &
\underset{x:\cat{C}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}\cat{Map}_{\scat{BiMod}_{\cat{C}-B}}
(\cat{C}^\vee\underset{\cat{C}}{\overset{\mathbb{L}}{\otimes}}M_x,M_x[n]) \\
& \simeq & |\Gamma(\mathbb{L}_{\scat{Perf}_{\cat{C}}})[1+n]| \\
& \rightarrow & \mathcal{A}^1(\scat{Perf}_{\cat{C}},1+n)\,.
\end{eqnarray*}
Recall that, if $\cat{C}$ is of finite type, then $\scat{Perf}_{\cat{C}}$ is Artin and thus the last morphism is
actually an equivalence.
\end{example}
We now recall the
\begin{theorem}[\cite{BD2}, Theorem 5.5]
\begin{enumerate}
\item If a finite type dg-category $\cat{A}$ is equipped with a $n$-Calabi--Yau structure $c$, then
$\tilde{ch}^{(2)}_{\cat{C}}(c)$ is a $(n-2)$-shifted symplectic structure on $\scat{Perf}_{\cat{C}}$.
\item The image by $\tilde{ch}^{(2)}$ of a $n$-Calabi--Yau structure on a cospan of finite type dg-categories is a $(n-2)$-shifted
lagrangian structure on the associated correspondence of derived moduli of objects.
\end{enumerate}
\end{theorem}
As a consequence, the previous commuting diagram of $\infty$-categories restricts to
\[
\xymatrix{
\scat{ExCY}^{f.t.}_{[n]} \ar[r]\ar[d]_{\mathbf{\Delta}} & \scat{ExLag}_{[2-n]} \ar[d]^{\mathbf{D_{dR}}} \\
\scat{CY}^{f.t.}_{[n]} \ar[r] & \scat{Lag}_{[2-n]}
}
\]
where the superscript $f.t.$ means that we restrict ourselves to the subcategory of cospans where all involved dg-categories are
of finite type (instead of only being smooth).

\subsection{Calabi--Yau completions as noncommutative cotangents: underlying stacks}

In this subsection, we prove that $\bPerf_{\cG_n(\cA)} \simeq \bT^*\b[2-n]\bPerf_{\cA}$ for a finite type dg-category $\cA$, as
well as relative version of this.

We start with a generalization of Lemma~\ref{lemma: linear}.
\begin{proposition}\label{prop:pasdenom}
Let $\cat{A}$ be a dg-category of finite type and $M$ a perfect $\cA$-bimodule. Then the derived moduli stack
$\bPerf_{T_{\cA}(M)}$ is equivalent to the linear stack $\mathbb{A}_{ \mathcal{M}}$, where
$\mathcal{M}\in \cat{Mod}_\cA^{perf}$ is defined by
\[
x^*\mathcal{M}:=\underline{\cat{Map}}_{\scat{Mod}_{\cat{A}^{\op}}}(M\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}} M_x, M_x)\,,
\]
on $B$-points $x:\scat{Spec}(B)\to\scat{Perf}_{\cat{A}}$.
\end{proposition}
\begin{proof}
Both $\bPerf_{T_\cA(M)}$ and $\mathbb{A}_{ \mathcal{M}}$ are stacks over $\scat{Perf}_{\cat{A}}$.
By the universal property of $T_{\cat{A}}(M)$, we have natural equivalences (in $x$)
\begin{eqnarray*}
\bPerf_{T_{\cA}(M)}(x)	& \simeq & \cat{Map}_{\scat{Mod}_{\cat{A}^e}}\big(M,\cat{Mod}_B^{perf}\big)
\underset{\cat{Map}_{\scat{Cat}_k}(\cat{A},\scat{Mod}_B^{perf})}{\times}\{x\} \\
						& \simeq & \cat{Map}_{\scat{Mod}_{\cat{A}^e}}\big(M,\underline{\cat{End}}_B(M_x)\big)\,,
\end{eqnarray*}
where $\underline{\cat{End}}_B(M_x)$ is the $\cat{A}$-bimodule structure on $\cat{Mod}_B^{perf}$ given by
$x:\cat{A}\to \cat{Mod}_B^{perf}$; in other words, this is the dg-functor $\cat{A}^{\op}\otimes\cat{A}\to \cat{Mod}_k$
given by
\[
(a,a')\longmapsto \underline{\cat{Map}}_{\cat{Mod}_B}\big(x(a),x(a')\big)\,.
\]
Finally, there is a natural equivalence
\[
\scat{Map}_{\scat{Mod}_{\cat{A}^e}}\big(M,\cat{End}_B(M_x)\big)
\simeq \cat{Map}_{\scat{BiMod}_{\cat{A}-B}}(M\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}M_x,M_x)=:|x^*\mathcal{M}|\,.
\]
This proves the result.
\end{proof}

\begin{corollary}\label{theorem: compareGinzburg}
Let $\cat{A}$ be a dg-category of finite type. Then the derived stacks $\bPerf_{\cG_n(\cA)}$ and
$\bT^*[2-n] \bPerf_\cA$ are equivalent.
\end{corollary}
\begin{proof}
Both $\bPerf_{\mathcal G_n(\cat{A})}$ and $\mathbf{T}^*[2-n]\scat{Perf}_{\cat{A}}$ are linear stacks over $\scat{Perf}_{\cat{A}}$:
\begin{itemize}
\item On the one hand, $\bPerf_{\mathcal G_n(\cat{A})}\simeq\mathbb{A}_{\mathcal{M}}$, thanks to Proposition~\ref{prop:pasdenom},
where
\[
x^*\mathcal M:=\underline{\cat{Map}}_{\scat{Mod}_{\cat{A}^{\op}}}
(\cat{A}^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}} M_x, M_x)
\]
on a $B$-point $x$ of $\scat{Perf}_{\cat{A}}$.
\item On the other hand, $\mathbf{T}^*[2-n]\scat{Perf}_{\cat{A}}=\mathbb{A}_{\mathbb{L}_{\bPerf_{\cA}}[2-n]}$, by definition.
\end{itemize}
It thus remains to show that $\mathbb{L}_{\bPerf_{\cA}}[2-n]\simeq\mathcal{M}$.
The tangent complex to $\scat{Perf}_{\cat{A}}$ at $x$ is the $B$-module
\[
x^*\mathbb{T}_{\scat{Perf}_{\cat{A}^{\op}}}\simeq\underline{\cat{Map}}_{\scat{Mod}_{\cat{A}}}(M_x,M_x)[1]\,.
\]
Hence, the $(2-n)$-shifted cotangent complex at $x$ is the $B$-module
\begin{eqnarray*}
x^*\mathbb{L}_{\scat{Perf}_{\cat{A}}}[2-n] & \simeq & \underline{\cat{Map}}_{\scat{Mod}_{\cat{A}}}(M_x,M_x)[1]^\vee[2-n] \\
& \simeq & \underline{\cat{Map}}_{\scat{Mod}_{\cat{A}}}(\cat{A}^\vee\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}M_x,M_x)[1-n]
=:x^*\mathcal M\,.
\end{eqnarray*}
This proves the claim, as the above equivalences are natural in $x$.
\end{proof}

\begin{corollary}\label{theorem: compareGinzburgrel}
Let $f:\cat{A} \to \cat{B}$ a functor between dg-category of finite type. Then $\bPerf$ applied to the
cospan $\cG_n(\cA) \rightarrow \cG_n(f) \leftarrow \cG_n(\cB)$ is equivalent to
\[
\bT^*[2-n] \bPerf_\cA \leftarrow \varphi^* \bT^*[2-n] \bPerf_\cA \rightarrow \bT^* [2-n] \bPerf_\cB\,,
\]
where $\varphi=f^*:\bPerf_\cB\to \bPerf_\cA$.
\end{corollary}
\begin{proof}
We have equivalences
\[
		\varphi^* \bT^*[2-n]  \bPerf_\cA
:=		\bT^*[2-n]\bPerf_\cA \underset{\bPerf_\cA}{\times} \bPerf_{\cB}
\simeq	\bPerf_{\cG_n(\cA) \underset{\cA}{\amalg} \cB}
\simeq	\bPerf_{\cG_n(f)}\,,
\]
where the first one follows from Corollary~\ref{theorem: compareGinzburg} (and the fact that $\scat{Perf}$ sends push-outs
to pull-backs), and the second one follows from Lemma~\ref{lemma: G(f)}.
\end{proof}

Going back to the general situation of Proposition~\ref{prop:pasdenom}, let us observe that every bimodule morphism
$c:M\to\cat{A}$ defines a global section $s_c$ of $\mathcal{M}$ whose graph
\[
\bPerf_{\cA}\rightarrow \mathbb{A}_{\mathcal{M}}
\]
is identified with the image of $T_{\cA}(c)$ by $\scat{Perf}$. Indeed, we have a morphism
\begin{equation}\label{eq:plusdidee}
\cat{Map}_{\scat{Mod}_{\cA^e}}(M,\cA) \overset{-\otimes\mathrm{id}}{\longrightarrow}
\underset{x:\cat{A}\to\cat{Mod}_B^{perf}}{\mathrm{holim}}\cat{Map}_{\scat{BiMod}_{\cat{A}-B}}
(\mathcal{M}\underset{\cat{A}}{\overset{\mathbb{L}}{\otimes}}M_x,M_x)
\simeq \Gamma(\mathcal{M})\,.
\end{equation}
As a consequence, $\scat{Perf}$ sends the deformation of $T_{\cA}(M[1])$ by $c$, which is obtained as a push-out along
\[
\xymatrix{
T_{\cA}(M) \ar[r]^-{T_{\cA}(c)} \ar[d]_-{T_{\cA}(0)} & \cA \\
\cA &
}
\]
to the derived zero locus of $s_c$, which is defined as the derived intersection of $s_c$ with the zero section.
\begin{example}[Critical loci]\label{ex:criticalexample}
Observe that in the case when $M=\cA^\vee[n-1]$, \eqref{eq:plusdidee} retrieves the map $ch^{(1)}$ that was made explicit
in Example~\ref{ex:BDcompute}.
In the case when the Hochschild class $c=(\delta W)^\natural$ is exact, then the section we get is given by $(d_{dR}\phi)^\sharp$,
with $\phi:=ch^{(0)}(W)$. We therefore obtain an equivalence between $\scat{Perf}_{\mathcal{G}_{n+1}(\cA,\delta W)}$ and
the derived critical locus of $\phi$.
Similarly, given a functor $f:\cA\to\cB$ and an exact class $c=(\delta W)^\natural$, with $W:k[n-2]\to \cat{HH}(\cat{B})$,
there is an equivalence between $\scat{Perf}_{\mathcal{G}_{n+1}(\cB|\cA,\delta W)}$ and the relative derived critical locus
$\mathbf{crit}_\pi(\phi)$, where $\pi=f^*$ and $\phi=ch^{(0)}(W)$.
\end{example}
\begin{example}[Quivers]\label{ex:criticalquiverexample}
We now specialize the previous example to the case of an inclusion of quivers $D\subseteq Q$, and $n=2$.
In this situation $W\in kQ/[kQ,kQ]$ and the map $ch^{(0)}:kQ/[kQ,kQ]\to |\Gamma(\mathcal O_{\scat{Perf}_{kQ}})|$ has a
fairly explicit description: for every $B$-point $x$,
\[
kQ/[kQ,kQ]\to
\underline{\cat{End}}_{\cat{Mod}_B}(M_x)/[\underline{\cat{End}}_{\cat{Mod}_B}(M_x),\underline{\cat{End}}_{\cat{Mod}_B}(M_x)]
\overset{\mathrm{tr}}{\simeq}B
\]
In particular, we recover the identification of~\S\ref{pot3CY} \textit{via} the open embedding of derived stacks
$\scat{DRep}\big[\mathcal{G}_3(kQ|kD,\delta W),\vec{n})/GL_{\vec{n}}(k)\big] \hookrightarrow \bPerf_{\mathcal{G}_3(kQ|kD,\delta W)}$.
\end{example}

\begin{comment}
Note that every map $c \in \cat{Map}_{\scat{Mod}_{\cat{A}^e}}(\cA^\vee [n-1], \cA)$ induces a map
\[
\bPerf_{\cA} \to \bT^*[2-n] \bPerf_\cA\,.
\]
This can be seen as follows. A map $\bPerf_{\cA} \to \bT^*[2-n] \bPerf_\cA$
is given by a map $\pi:\bPerf_{\cA} \to \bPerf_\cA$ and a global section of $\pi^*\mathbb{L}_{ \bPerf_\cA}[2-n]$. We chose $\pi$ to be the identity and consider as global section the image of $c$ under the map
$$\cat{Map}_{\scat{BiMod}_{\cat{A}}}(\cat{A}^\vee, \cA[1-n] )\rightarrow \cat{Map}_{\scat{BiMod}_{\cat{A}}}(\cat{A}^\vee\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}E_\cA,E_\cA[1-n])\simeq |\Gamma \mathbb{L}_{ \bPerf_\cA }[2-n]|.$$ We will denote the map $\bPerf_{\cA} \to \bT^*[2-n] \bPerf_\cA$ also by $c$.
Hence, we can define $\bcrit(c)$ as the derived pullback
\[
\xymatrix{
\bcrit(c) \ar[r] 	\ar[d]	& \bPerf_\cA  \ar[d]^c \\
 \bPerf_\cA 													\ar[r]			& \bT^*[2-n] \bPerf_\cA
					}
\]

\begin{theorem}\label{theorem: crit}
Let $\cA$ be a dg category of finite type and $c: k[n-1] \rightarrow \cat{HH}(\cA)$. Then $\bcrit(c) \simeq \bPerf_{ \cG_{n+1}(\cA, c)}$.
\end{theorem}
\begin{proof}
By Theorem \ref{theorem: compareGinzburg}, we have that the map $c: \bPerf_{\cA} \to \bT^*[2-n] \bPerf_{\cA} $ is induced by the map of dg categories $T_\cA(c):\cG_n(\cA) \to \cA$ as in  Proposition \ref{proposition: leftCY}.
Now the claim follows by applying $\bPerf$ to the homotopy pushout square in Definition \ref{def: deformed}.
\[
\xymatrix{
\cG_{n}(\cA) \ar[r]^{T_\cA(c)} 	\ar[d]	& \cA \ar[d] \\
\cA														\ar[r]			& \cG_{n+1}(\cA,c)
					}
\]
Hence by the definition of $\bcrit(c)$ the statement follows.
\end{proof}

We now generalize the definition~\ref{critrel}.

\begin{definition}
Let $f: \cA \to \cB$ be a functor of dg categories and $c: k[n-1] \to \cat{HH}(\cB)$. The \emph{relative critical locus} is defined as the homotopy pullback of the diagram
 \begin{align}\label{critreldiag2}
  \xymatrix{ && \bcrit_f(c) \ar[rd] \ar[dl] && \\
&f^* \bT^*[2-n]  \bPerf_\cA  \ar[rd] \ar[ld]&& \bPerf_\cB \ar[ld]_-c  \ar[rd]& \\
\bT^*[2-n] \bPerf_\cA& &\bT^*[2-n] \bPerf_\cB&   &~~~~\mathrm{pt}~~~~
}
\end{align}
\end{definition}

\begin{proposition}\label{prop: ginzrel}
Let $f: \cA \to \cB$ be a functor of dg categories and $c: k[n-1] \to \cat{HH}(\cB)$. Then $ \bcrit_f(c)\simeq \bPerf_{\mathcal G_{n+1}(\cat{B}|\cat{A},\tilde c)}$, following the notation in \ref{ss: deformed}.
\end{proposition}
\begin{proof}
The proof follows from applying $\bPerf$ to the homotopy pushout diagram
 \begin{align}\label{ginzdiag}
\xymatrix{
&& \mathcal G_{n+1}(\cat{B}|\cat{A},\tilde c)  && \\
&  \mathcal{G}_n(f)  \ar[ru] & & \cat{B}\ar[lu] \\
\mathcal{G}_n(\cat{A}) \ar[ru] & & \mathcal{G}_n(\cat{B})\ar[lu]  \ar[ru]^-{T_{\cat B}(c)}& & ~~~~\emptyset~~~~  \ar[lu]
}
\end{align}
By Theorem \ref{theorem: compareGinzburg}, we can identify $c:\bPerf_\cB \to \bPerf_{\mathcal{G}_n(\cat{B})} \simeq \bT^*[2-n] \bPerf_\cB$ with the map induced by $T_\cB(c): \mathcal{G}_n(\cat{B})\to \cB$. The proposition now follows from Theorem~\ref{theorem: compareGinzburgrel}.
\end{proof}
\end{comment}

\subsection{Calabi--Yau completions as noncommutative cotangents: symplectic aspects}

On the one hand we have shown that $\cG_n(\cA)$ has a canonical exact $n$-Calabi-Yau structure, hence according
to~\S\ref{sss: CYLag} there is an exact $(2-n)$-shifted symplectic structure on $\bPerf_{\cG_n(\cA)}$.
On the other hand, after the identification $\bT^*[2-n] \bPerf_{\cA} \simeq \bPerf_{\cG_n(\cA)}$ from
Corollary~\ref{theorem: compareGinzburg} there is another exact $(2-n)$-shifted symplectic structure on $\bPerf_{\cG_n(\cA)}$.
We now prove that they are the same:
\begin{theorem}\label{theo: compare}
The exact $(2-n)$-shifted symplectic structure on $\bPerf_{\cG_n(\cA)}$ induced by the canonical exact $n$-Calabi-Yau structure on
$\cG_n(\cA)$ agrees with the canonical exact $(2-n)$-shifted symplectic structure on $\bT^*[2-n] \bPerf_\cA$.
\end{theorem}
\begin{proof}
Recall that both $\bPerf_{\cG_n(\cA)}$ and $\bT^*[2-n] \bPerf_\cA$ are canonically identified with the linear stack
$\mathbb{A}_{\mathcal M_\cA}$, where $\mathcal{M}_\cA\simeq\mathbb{L}_{\bPerf_\cA}[2-n]$ is defined by
\[
x^*\mathcal{M}_\cA:=\underline{\cat{Map}}_{\scat{Mod}_{\cat{A}^{\op}}}
(\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}} M_x, M_x)\,
\]
for every $B$-point $x:\cat{A}\to\cat{Mod}_B^{perf}$. The space of lifts $u:\scat{Spec}(B)\to\mathbb{A}_{{\mathcal M}_\cA}$
of such an $x$ is thus $|x^*\mathcal{M}_\cA|$. Abusing the notation, we allow ourselves to write $B$-points of
$\mathbb{A}_{{\mathcal M}_\cA}$ as pairs $(x,s)$, with $x:\cat{A}\to\cat{Mod}_B^{perf}$ and $s\in|x^*\mathcal{M}_\cA|$.
Finally, also recall that such a pair $u=(x,s)$ defines a $\mathcal{G}_n(\cA)-B$-bimodule $M_u$ whose restriction to $\cA$ is $M_x$.

Now observe that we have a commuting square
\[
\xymatrix{
\ul{\cat{Map}}_{\scat{Mod}_{\cat{A}^e}}(\cA^\vee[n-1],\cA^\vee[n-1])
\ar[r]^-{s\circ(-\otimes\mathrm{id})}\ar[d]_-{\eqref{exact nCY}} &
\underset{(x,s)}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\cat{A}^{\op}}}(\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}} M_x, M_x) \ar[d] \\
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(\cat{A})^e}}\big(\mathcal G_n(\cA)^\vee[n-1],\mathcal{G}_n(\cA)\big)
\ar[r]^-{-\otimes\mathrm{id}} &
\underset{u}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(\cat{A})^{\op}}}\big(\mathcal G_n(\cA)^\vee[n-1]\overset{\mathbb{L}}{\underset{\cG_n(\cat{A})}{\otimes}} M_u, M_u\big)
}
\]
in which the upper right corner is $\Gamma(\pi^*\mathcal{M}_\cA)\simeq\Gamma(\pi^*\mathbb{L}_{\scat{Perf}_\cA}[2-n])$, and the
lower right corner is equivalent to $\Gamma(\mathbb{L}_{\scat{Perf}_{\mathcal{G}_n(\cA)}}[2-n])$.

We let the reader check that the tautological $1$-form of degree $2-n$ on the $(2-n)$-shifted cotangent stack is the image of
$\mathrm{id}_{\cA^\vee[n-1]}$ through the upper part of the square, while $ch^{(1)}(c)$, $c$ being the exact Calabi--Yau structure
from Theorem~\ref{thm:CYcom}, is the image of $\mathrm{id}_{\cA^\vee[n-1]}$ through the lower part of the square.
Hence they coincide.
\end{proof}

\begin{comment}
As the $n$-Calabi-Yau structure and the symplectic form are exact, it is sufficient to compare the one-forms of degree $n-1$ on $\bT^*\b[2-n]\bPerf_{\cA}$ induced by both.
Let $x$ be a $B$-point of $\bPerf_{\cG_n(\cA)}$. It is given by the datum of a $\cA-B$-module $M_x$, that is a $B$ point of $\bPerf_\cA$, together with a section $s$ of $$\cat{Map}_{\scat{BiMod}_{\cat{A}-B}}(\cA^\vee\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}M_x,M_x[1-n])\simeq |\Gamma(x^*\mathbb{L}_{\scat{Perf}_{\cA}})[2-n]|.$$ This is equivalent to the datum of a $\cG_n(\cA)-B$-module $M_x(s)$ as explained in the proof of  Theorem \ref{theorem: compareGinzburg}. Let us first recall the Lagrangian structure optained from the Calabi-Yau structure. The one-form is given as the image of the the identity under the map
\begin{multline}\cat{Map}_{\scat{Mod}_{\cat{A}^e} }(\cA,\cA) \rightarrow  \cat{Map}_{\scat{BiMod}_{\cG_n(\cat{A})-B}}( \cG_n(\cat{A})^\vee, \cG_n(\cA)[n-1])\\ \rightarrow \cat{Map}_{\scat{BiMod}_{\cG_n(\cat{A})-B}}(\cG_n(\cat{A})^\vee  \overset{\mathbb{L}}{\underset{\cG_n(\cat{A})}{\otimes}}M_x(s),M_x(s)).\end{multline}
This map is the composition $$\cG_n(\cA)^\vee[n-1] \rightarrow \cA^\vee[n-1]\overset{\mathbb{L}}{ \underset{\cA^e} \otimes} \cG_n(\cA)^e  \rightarrow \cG_n(\cA)$$ tensored with $-\overset{\mathbb{L}}{\underset{\cA}{\otimes}}M_x(s),$ where the first respectively second map is induced from the canonical embedding $\cA \to \cG_n(\cA)$ and $\cA^\vee[n-1] \to \cG_n(\cA)$.

We need to compare this map with the image of the canonical map $$ |\Gamma(x^*\mathbb{L}_{\scat{Perf}_{\cA}})[2-n]|   \rightarrow |\Gamma(x^*\mathbb{L}_{\scat{Perf}_{\cG_n(\cA)}})[2-n]| $$  applied to $s$ inducing the 1-form on $\bT^*[2-n] \bPerf_{\cA}$.
It can be identified with
$$\cat{Map}_{\scat{BiMod}_{\cat{A}-B}}(\cA^\vee \overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}M_x[n-1],M_x) \to \cat{Map}_{\scat{BiMod}_{\cG_n(\cat{A})-B}}( \cG_n(\cat{A})^\vee[n-1]  \overset{\mathbb{L}}{\underset{\cG_n(\cat{A})}{\otimes}}M_x(s),M_x(s) ),$$ mapping a section $l \in \cat{Map}_{\scat{BiMod}_{\cat{A}-B}}(\cA^\vee \overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}M_x[n-1],M_x)$ to the composition
\[
\cG_n(\cA)^\vee[n-1] \overset{\mathbb{L}}{\underset{\cG_n(\cat{A})}{\otimes}}M_x(s)  \rightarrow \cG_n(\cA)\overset{\mathbb{L}}{\underset{\cA}{\otimes}} \cA^\vee[n-1] \overset{\mathbb{L}}{\underset{\cA}{\otimes}} M_x(s)  \stackrel{l} \rightarrow
 \cG_n(\cA) \overset{\mathbb{L}}{\underset{\cA}{\otimes}}M_x(s) \rightarrow M_x(s)
\]
 Now the one-forms agree for the choice of $l=s$.
\end{comment}

The next result shows that the equivalence of shifted symplectic stack from Corollary~\ref{theorem: compareGinzburg}
and Theorem \ref{theo: compare} is natural, and thus it completes the proof of Theorem~\ref{thm:mainmain}.
\begin{theorem}\label{theo: comparerel}
Let $f: \cA \to \cB$ be a functor between finite dg categories.
The moduli of objects functor sends the canonical exact $n$-Calabi-Yau cospan
$\cG_n(\cA) \rightarrow \cG_n(f) \leftarrow \cG_n(\cB)$ to the canonical exact $(2-n)$-lagrangian correspondance
\[
\bT^*[2-n]\bPerf_{\cA}  \leftarrow \varphi^*\bT^*[2-n]\bPerf_{\cA} \rightarrow  \bT^*[2-n] \bPerf_{\cB}\,,
\]
where $\varphi=f^*:\scat{Perf}_{\cB}\to\scat{Perf}_{\cA}$.
\end{theorem}
\begin{proof}
Recall (see Theorem~\ref{thm:Gn-functoriality}) that we have a Hochschild class $c_f$ defined as
\[
k[n-1]\overset
{f^\vee[n-1]}{\longrightarrow}
\ul{\cat{Map}}_{\cB^e}\left(\cB^\vee,\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cA^e}{\otimes}}\cB^e\right)
\longrightarrow
\ul{\cat{Map}}_{\mathcal{G}_n(f)^e}\big(\mathcal{G}_n(f)^\vee,\mathcal{G}_n(f)\big)
\simeq
\cat{HH}\big(\mathcal G_n(f)\big)\,,
\]
which coincides with with both pushouts of $c_{\cA}:=c_{\mathrm{id}_{\cA}}$ and $c_\cB:=c_{\mathrm{id}_{\cB}}$, thanks to the
commuting diagram
\[
\xymatrix{
&
\ul{\cat{Map}}_{\cA^e}(\cA^\vee,\cA^\vee[n-1]) \ar[r] \ar[d]^-{(-\otimes\mathrm{id})\circ f^\vee} &
\ul{\cat{Map}}_{\mathcal{G}_n(\cA)^e}\big(\mathcal{G}_n(\cA)^\vee,\mathcal{G}_n(\cA)\big) \ar[d] \\
k[n-1] \ar@/^/[ru]^-{\mathrm{id}_{\cA^\vee}[n-1]}\ar[r]^-{f^\vee[n-1]}\ar@/_/[rd]_-{\mathrm{id}_{\cB^\vee}[n-1]} &
\ul{\cat{Map}}_{\cB^e}\left(\cB^\vee,\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cA^e}{\otimes}}\cB^e\right) \ar[r] &
\ul{\cat{Map}}_{\mathcal{G}_n(f)^e}\big(\mathcal{G}_n(f)^\vee,\mathcal{G}_n(f)\big) \\
&
\ul{\cat{Map}}_{\cB^e}(\cB^\vee,\cB^\vee[n-1]) \ar[r] \ar[u]_-{f^\vee\circ-} &
\ul{\cat{Map}}_{\mathcal{G}_n(\cB)^e}\big(\mathcal{G}_n(\cB)^\vee,\mathcal{G}_n(\cB)\big) \ar[u]
}
\]
Recall also (see Corollary~\ref{theorem: compareGinzburgrel}) that we have an equivalence
\[
\scat{Perf}_{\mathcal{G}_n(f)}\simeq \varphi^*\bT^*[2-n]\scat{Perf}_{\cA}
\]
of linear stacks over $\scat{Perf}_{\cB}$. Indeed, both $\scat{Perf}_{\mathcal{G}_n(f)}$ and $\varphi^*\bT^*[2-n]\scat{Perf}_{\cA}$
are canonically identified with $\mathbb{A}_{\mathcal{M}_f}$,
where $\mathcal{M}_f\simeq\varphi^*\mathbb{L}_{\scat{Perf}_{\cA}}[2-n]$ is defined by
\[
x^*\mathcal M_f:=\ul{\cat{Mod}}_{\scat{Mod}_{\cat{B}^{\op}}}
\big(\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cA^e}{\otimes}}\cB^e\overset{\mathbb{L}}{\underset{\cB}{\otimes}}M_x,M_x\big)
\simeq\ul{\cat{Mod}}_{\scat{Mod}_{\cat{A}^{\op}}}(\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cA}{\otimes}}f^*M_x,f^*M_x)
\]
for every $C$-point $x:\cB\to \cat{Mod}_C^{perf}$.

Now, as in the proof of Theorem~\ref{theo: compare}, we abuse the notation and denote a $C$-point
$u:\mathcal G_n(f)\to\cat{Mod}_C^{perf}$ of $\scat{Perf}_{\mathcal G_n(f)}$ as a pair $(x,s)$, where $x:\cB\to\cat{Mod}_C^{perf}$
and $s\in|x^*{\mathcal M}_f|$.
We then repeat several times an argument similar to the one appearing in the proof of Theorem~\ref{theo: compare}.

\medskip

(i) We first consider the commuting square, denoted $\mathcal Q_n(\cA)$,
\[
\xymatrix{
\ul{\cat{Map}}_{\scat{Mod}_{\cat{A}^e}}(\cA^\vee[n-1],\cA^\vee[n-1])
\ar[r]^-{s\circ(-\otimes\mathrm{id})}\ar[d] &
\underset{(x,s)}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\cat{A}^{\op}}}(\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{A}}{\otimes}}f^*M_x,f^*M_x) \ar[d] \\
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(\cat{A})^e}}\big(\mathcal G_n(\cA)^\vee[n-1],\mathcal{G}_n(\cA)\big)
\ar[r]^-{-\otimes\mathrm{id}} &
\underset{u}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(\cat{A})^{\op}}}\big(\mathcal G_n(\cA)^\vee[n-1]\overset{\mathbb{L}}{\underset{\cG_n(\cat{A})}{\otimes}}a^*M_u,a^*M_u\big)
}
\]
in which the upper right corner is
$\Gamma(\pi^*\varphi^*\mathcal{M}_{\cA})\simeq\Gamma(\pi^*\varphi^*\mathbb{L}_{\scat{Perf}_{\cA}}[2-n])$,
the lower right corner is equivalent to $\Gamma(\alpha^*\mathbb{L}_{\scat{Perf}_{\mathcal G_n(\cA)}}[2-n])$, and where
$a:\mathcal G_n(\cA)\to\mathcal G_n(f)$ and $\alpha=a^*$.
The image of $\mathrm{id}_{\cA}$ through the upper part of the square is $\alpha^*\lambda_{\scat{Perf}_\cA}$, its image
through the lower part of the square is $\alpha^*ch^{(1)}(c_\cA)$, and the homotopy we obtain between these is the pull-back
\textit{via} $\alpha$ of the homotopy from Theorem~\ref{theo: compare}.

\medskip

(ii) We then consider the commuting square, denoted $\mathcal Q_n(\cB)$,
\[
\xymatrix{
\ul{\cat{Map}}_{\scat{Mod}_{\cat{B}^e}}(\cB^\vee[n-1],\cB^\vee[n-1])
\ar[r]^-{s\circ(-\otimes\mathrm{id})}\ar[d] &
\underset{(x,s)}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\cat{B}^{\op}}}(\cB^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{B}}{\otimes}} M_x, M_x) \ar[d] \\
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(\cat{B})^e}}\big(\mathcal G_n(\cB)^\vee[n-1],\mathcal{G}_n(\cB)\big)
\ar[r]^-{-\otimes\mathrm{id}} &
\underset{u}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(\cat{B})^{\op}}}\big(\mathcal G_n(\cB)^\vee[n-1]\overset{\mathbb{L}}{\underset{\cG_n(\cat{A})}{\otimes}}b^*M_u,b^*M_u\big)
}
\]
in which the upper right corner is $\Gamma(\pi^*\mathcal{M}_{\cB})\simeq\Gamma(\pi^*\mathbb{L}_{\scat{Perf}_{\cB}}[2-n])$, the
lower right corner is equivalent to $\Gamma(\beta^*\mathbb{L}_{\scat{Perf}_{\mathcal G_n(B)}}[2-n])$, and where
$b:\mathcal G_n(\cA)\to\mathcal G_n(f)$ and $\beta=b^*$.
As before, starting with $\mathrm{id}_{\cB}$ in the upper left corner of the square leads to the pull-back by $\beta$
of the homotopy between $\lambda_{\scat{Perf}_\cB}$ and $ch^{(1)}(c_\cB)$ from Theorem~\ref{theo: compare}.

\medskip

(iii) We finally consider the commuting square, denoted $\mathcal Q_n(f)$,
\[
\xymatrix{
\ul{\cat{Map}}_{\scat{Mod}_{\cat{B}^e}}(\cB^\vee[n-1],\cA^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{A^e}}{\otimes}}\cB^e)
\ar[r]^-{s\circ(-\otimes\mathrm{id})}\ar[d] &
\underset{(x,s)}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\cat{B}^{\op}}}(\cB^\vee[n-1]\overset{\mathbb{L}}{\underset{\cat{B}}{\otimes}}M_x,M_x) \ar[d] \\
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(f)^e}}\big(\mathcal G_n(f)^\vee[n-1],\mathcal{G}_n(f)\big)
\ar[r]^-{-\otimes\mathrm{id}} &
\underset{u}{\mathrm{holim}}\,
\ul{\cat{Map}}_{\scat{Mod}_{\mathcal{G}_n(f)^{\op}}}\big(\mathcal G_n(f)^\vee[n-1]\overset{\mathbb{L}}{\underset{\cG_n(f)}{\otimes}} M_u, M_u\big)
}
\]
in which the upper right corner is $\Gamma(\pi^*\mathcal{M}_{\cB})\simeq\Gamma(\pi^*\mathbb{L}_{\scat{Perf}_{\cB}}[2-n])$, and
the lower right corner is equivalent to $\Gamma(\mathbb{L}_{\scat{Perf}_{\mathcal G_n(f)}}[2-n])$.
Starting with $f^\vee$ in the upper left corner gives us $ch^{(1)}(c_f)$.

\medskip

Finally observe that there is a commuting diagram
\[
\xymatrix{
& k \ar[ld]_-{\mathrm{id}_{\cA^\vee}}\ar[d]_{f^\vee}\ar[rd]^-{\mathrm{id}_{\cB^\vee}} & \\
\mathcal Q_n(\cA)\ar[r] & \mathcal{Q}_n(f) & \mathcal Q_n(\cB)\ar[l]
}
\]
which indeed exhibits an identification between the homotopies $\alpha^*\big(ch{(1)}(c_{\cA})\sim\lambda_{\scat{Perf}_\cA}\big)$ and
$\beta^*\big(ch{(1)}(c_{\cB})\sim\lambda_{\scat{Perf}_\cB}\big)$.
\end{proof}
Let $\cB$ be a finite type dg-category and $g: k[n-1] \to \cat{HH}(\cB)$.
We have seen in the previous subsection that $\scat{Perf}$ sends the morphism $T_{\cB}(g):\mathcal{G}_n(\cB)\to\cB$
to the graph of $ch^{(1)}(g)$.
Recall from proposition~\ref{proposition: leftCY} that every negative cyclic lift $\tilde{g}:k[n-1] \to \cat{HC}^-(\cB)$ of $g$
induces a Calaby--Yau structure on $T_{\cB}(g)$. Indeed, the image of the canonical Hochschild class $c_\cB$ through
$T_{\cB}(g)$ is the Hochschild class $g$, so that the image of $\delta c$ is $\delta g$, which is homotopic to $0$ for
every choice of negative cyclic lift $\tilde{g}$.

\medskip

It then follows from Example~\ref{ex:BDcompute} together with Theorem~\ref{theo: compare} that the pull-back of the $2$-form
$\omega_{\scat{Perf}_{\cB}}=d_{dR}\lambda_{\scat{Perf}_{\cB}}$ along the graph of $ch^{(1)}(g)$ is
$d_{dR} ch^{(1)}(g)=\tilde{ch}^{(2)}(\delta g)$. Therefore the lagrangian structure induced by the Calabi--Yau structure
that is determined by the negative cyclic lift $\tilde{g}$ is the corresponding de Rham closed lift $\tilde{ch}^{(1)}(\tilde{g})$.

\medskip

Hence, if $g=\delta W$, then $\scat{Perf}$ gives back the lagrangian structure on the graph of $d_{dR}ch^{(0)}(W)$.
As a consequence, using that $\scat{Perf}$ defines a functor $\scat{CY}_{[n]}^{f.t.}\to \scat{Lag}_{[2-n]}$, we
get the following lagrangian extension of Example~\ref{ex:criticalexample}:
\begin{corollary}
Let $f:\cA\to\cB$ a morphism between finite type dg-categories, $W:k[n-2]\to \cat{HH}(\cB)$, $\phi:=ch^{(0)}(W)$, and
$\pi:=f^*:\scat{Perf}_{\cB}\to\scat{Perf}_{\cA}$. Then there is an equivalence of lagrangian morphisms between
\[
\scat{Perf}_{\mathcal{G}_{n+1}(\cB|\cA,\delta W)}\to \scat{Perf}_{\mathcal{G}_n(\cA)}\quad\textrm{and}\quad
\mathbf{crit}_\pi(\phi)\to \bT^*[2-n]\scat{Perf}_{\cA}\,.
\]
\end{corollary}
\begin{example}
If we specialize the above corollary to the quiver case as in Example~\ref{ex:criticalquiverexample} with $n=2$, then we get an
equivalence of lagrangian morphisms between
\[
\scat{Perf}_{\mathcal{G}_{3}(kQ|kD,\delta W)}\to \scat{Perf}_{\mathcal{G}_2(kD)}\quad\textrm{and}\quad
\mathbf{crit}_\pi(\phi)\to \bT^*\scat{Perf}_{kD}\,.
\]
\end{example}

\begin{example}
Let $Q$ be a quiver, and let $Q^+$ be its framing:
\[
V(Q^+)=V(Q)\cup\{v^+|v\in V(Q)\}\quad\textrm{and}\quad E(Q^+)=E(Q)\cup\{(v,v^+)|v\in V(Q)\}\,.
\]
Consider the sub-quiver $D\subset Q^+$ defined by $V(D)=\{v^+|v\in V(Q)\}$ and $E(D)=\emptyset$.
There is a Calabi--Yau morphism $\mathcal{G}_1(kD)\to \mathcal G_2(kQ^+|kD)$. According to the above corollary,
there is an equivalence of lagrangian morphisms between
\[
\scat{Perf}_{\mathcal{G}_{2}(kQ^+|kD)}\to \scat{Perf}_{\mathcal{G}_1(kD)}\quad\textrm{and}\quad
\bT^*_{\scat{Perf}_{kQ^+}}[1]\scat{Perf}_{kD}\to \bT^*[1]\scat{Perf}_{kD}\,.
\]
When restricted to open substacks of perfect modules of amplitude $0$ with fixed dimension vectors, we obtain
lagrangian morphisms
\[
\big[\mathbf{DRep}\big(\mathcal G_2(kQ^+|kD);\vec{n},\vec{m}\big)/GL_{\vec{n},\vec{m}}\big]
\longrightarrow \big[\mathbf{DRep}\big(\mathcal{G}_2(kD);\vec{m}\big)/GL_{\vec{m}}\big]
\simeq \big[\mathfrak{gl}_{\vec{m}}/GL_{\vec{m}}\big]\,.
\]
Finally, taking the fiber product with the lagrangian morphism
\[
\mathfrak{gl}_{\vec{m}}\longrightarrow \big[\mathfrak{gl}_{\vec{m}}/GL_{\vec{m}}\big]\,,
\]
one gets a $0$-shifted symplectic structure on
\[
\big[\mathbf{DRep}\big(\mathcal G_2(kQ^+|kD);\vec{n},\vec{m}\big)/GL_{\vec{n}}\big]\,.
\]
These are derived stacky enhancements of Nakajima quiver varieties \cite{Nak96}.
\end{example}

\begin{comment}
Suppose that $c$ has a lift to negative cyclic homology. Recall that we have proven in \ref{ss: deformed} that the diagram  \ref{ginzdiag}  is a composition Calabi--Yau cospans and therefore itself a Calabi--Yau cospan. The Calabi-Yau spans induce a Lagrangian structure on
 \ref{critreldiag2}.
We can compare this Lagrangian structure with the classical one defined in \ref{ss:critrel}.
\begin{theorem}
Under the equivalence $ \mathcal G_{n+1}(\cat{B}|\cat{A},\tilde c)  \simeq  \bcrit_f(c) $, the lagrangian structure on \eqref{critreldiag2} induced by the cotangent stack, coincides with the Lagrangian structure induced by the Calabi--Yau
structure on \ref{ginzdiag}.
\end{theorem}
\begin{proof}
By Proposition \ref{prop: relCY}, the Calabi-Yau structure   on  \ref{ginzdiag} is induced by the composition of the Calabi-Yau structures on the cospans
$$\mathcal{G}_n(\cat{A}) \rightarrow  \mathcal{G}_n(f)  \leftarrow  \mathcal{G}_n(\cat{B})$$
 and
$$\mathcal{G}_n(\cat{B}) \stackrel{{T_{\cat B}(c)}} \longrightarrow \cB  \longleftarrow \emptyset .$$

As explained in  \ref{ss:critrel}, the Lagrangian structure on   \ref{critreldiag2} is given by  the composition of Lagrangian structures on the correspondances
$$\bT^*[2-n]\bPerf_{\cA}  \leftarrow f^*\bT^*[2-n]\bPerf_{\cA} \rightarrow  \bT^*[2-n] \bPerf_{\cB}$$
 and
$$\bT^*[2-n]\bPerf_{\cB}  \leftarrow \bPerf_{\cB} \rightarrow  \mathrm{pt}.$$

Now Theorem \ref{theo: comparerel} concludes the proof.
\end{proof}
\begin{remark}
Note that we  recover the constructions of section \ref{pot3CY} via the open embedding of derived stacks $\scat{DRep}\big[\mathcal{G}_3(kQ,\delta W),\vec{n})/GL_{\vec{n}}(k)\big] \to \bPerf_{\mathcal{G}_3(kQ,\delta W)}$.
\end{remark}
\end{comment}


TITLE: Convergence of $na_{n+1}-\sum_{k=1}^n a_k$
QUESTION [2 upvotes]: I am given an increasing sequence $\{a_n\}_{n\ge 1}$ such that $0< a_n\le 1,\ n\ge 1$. Can we say that the sequence $$b_n:=na_{n+1}-\sum_{k=1}^n a_k,\quad n\ge 1$$ converges? And if we can then are there conditions on $a_n$ for that? Thank you.

REPLY [4 votes]: Since $\{ a_{n} \}$ is monotone increasing and bounded, it converges to a limit $\alpha$. Then it is easy to check that
$$ \lim_{n\to\infty}b_{n} = \sum_{n=1}^{\infty} (\alpha - a_{n}). $$
(Of course, we are not excluding the possibility that this diverges to $\infty$.) Since $c_{n} = \alpha - a_{n}$ can be any decreasing sequence having values in $[0, \alpha]$, there seems no easy criterion for the convergence of $\{ b_{n} \}$.