diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzlrov" "b/data_all_eng_slimpj/shuffled/split2/finalzzlrov" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzlrov" @@ -0,0 +1,5 @@ +{"text":"\\section{Introduction}\n\\label{sec:intro}\n\nQuasars, a class of active galactic nuclei (AGN) \\citep[e.g.,][]{anto1993a, urry1995a}, have been an area of intense study for decades. However, their small physical sizes subtend angles that are much smaller than the resolution limit of any existing telescope. Hence we have been forced to infer the physics powering these luminous sources by studying intrinsic flux variability \\citep[e.g.,][]{vand2004a, serg2005a, cack2007a, kell2009a, macl2010a}, modeling spectral profiles \\citep{sun1989a, bonn2007a, gask2008a, hall2018a}, or using reverberation mapping \\citep[e.g.,][]{pete2004a, bent2010a, edel2015a, cack2018a}. While these methods have provided insights into quasar structure and central black hole masses, the accretion disk continuum size and temperature profile remain open research areas.\n\nMicrolensing, first observed by \\citet{chan1979a}, has offered an opportunity to better measure the size of quasars. Strongly lensed quasar images are magnified by a complex field of stellar-mass objects in the lens galaxy. As the quasar moves relative to our line of sight, the magnification changes, generating significant uncorrelated variability between images on timescales of months to years. If the time delays between images are known, it is possible to distinguish the correlated instrinsic quasar variability from the uncorrelated microlensing variability. \\citet{koch2004a} developed a Bayesian Monte Carlo technique to measure the sizes of quasars from multiple-epoch lightcurves. \nWith this technique, we have made measurements of accretion disk scale sizes in 15 quasars \\citep{koch2006a, morg2006a, poin2007a, morg2008a, morg2010a, morg2012a, hain2012a, hain2013a, mosq2013a, blac2014a, macl2015a, morg2018a}. This method requires cosmological modeling of the effective transverse velocity, but is insensitive to uncertainty in the median mass of stars in the lens galaxy. A machine learning analysis technique, developed by \\citet{vern2019a}, may allow for more rapid analysis of larger sets of quasar lightcurves.\n\nAlternatively, microlensing sizes can be inferred from chromatic variation between lensed images. In this method a quasar is imaged at a single-epoch across multiple filter bands. This approach has generated complementary measurements of quasar accretion disk sizes \\citep{pool2007a, bate2008a, blac2011a, medi2011a, mosq2011b, pool2012a, jime2012a, sche2014a, mott2017a, bate2018a}. This method uses dramatically less observing time, but requires careful treatment of broad emission line contamination and flux offsets due to dust or millilensing. Furthermore, all reported sizes are subject to an assumed prior on the unknown median mass of stars in the lens galaxy. Nevertheless, when combined with constraints from multi-epoch studies, the single-epoch method generally gives similar accretion disk size measurements.\n\nBecause of the rarity of lensed quasar discoveries and the onerous observing requirements of multi-epoch studies, only fourteen multi-epoch size measurements have been reported to date \\citep[and references therein]{morg2018a}. Here we increase that number to 15 with the addition of the quadruply lensed WFI J2026--4536 (hereafter WFI2026)\\footnote{Based on observations made with the ESO-VLT Unit Telescope 2 Kueyen (Cerro Paranal, Chile; Programs 074.A-0563 and 075.A-0377, PI: G. Meylan} \\citep{morg2004a}. The quasar source is at redshift $z_s = 2.23$, but the lens redshift was not measurable in archival spectra from the Very Large Telescope (VLT). The lens galaxy is faint and stacked galaxy spectra from fourteen exposures show no distinct spectral features. Although we were unable to estimate the lens redshift, we succeeded in using these archival VLT spectra to measure the black hole mass.\n\n Two different investigations have already used the single-epoch technique to estimate the accretion disk size in this system. \n\\citet{blac2011a} observed WFI2026 in the infrared using the Persson's Auxiliary Nasmyth Infrared Camera (PANIC) on the Baade telescope and in the optical using the Raymond and Beverly Sackler Magellan Instant Camera (MagIC) on both the Clay and Baade telescopes at Las Campanas Observatory. They estimated an accretion disk half-light radius of $\\log (r_{1\/2}\/\\text{cm}) = 16.46 \\pm 0.32$ at $2043\\text{\\AA}$, under a log-prior on $r_{1\/2}$. A recent analysis by \\citet{bate2018a} using IR and UVIS channels on the Wide Field Camera 3 (WFC3) on the Hubble Space Telescope (\\textsl{HST}) found evidence for a smaller size, $\\log (r_{1\/2}\/\\text{cm}) < 16$ (re-scaled to $2043\\text{\\AA}$ from an observed $1026\\text{\\AA}$). Both of these estimates assume a $0.3 M_{\\odot}$ median stellar mass in the lens galaxy.\n\nAnalysis of our 13 season lightcurve complements these previous studies with a multi-epoch constraint on the scale radius, $r_s$, and addresses the mild tension between previous results.\nNote that these studies reported the measured size as a half light radius, $r_{1\/2}$, while we cast our results as a thin disk scale radius, $r_s = r_{1\/2}\/2.44$, to facilitate comparison with theoretical disk models. In any case, \\citet{mort2005a} showed that projected area, not shape, dominates microlensing variablility, so these radii are directly proportional with $r_s = r_{1\/2}\/a$. The scaling factor $a$ depends on the assumed disk geometry with $a=2.44$ for a thin disk and $a=1.18$ for a Gaussian disk.\n\nThis paper is organized as follows. In section~\\ref{sec:data}, we present our monitoring data, photometric technique, and the reduced light curves. In section~\\ref{sec:lens_model} we present our strong lens modeling and our determination of time delays for the system. We discuss our microlensing model in section~\\ref{sec:ml_model}, and we present our measurements for the WFI2026 disk size and black hole mass in section~\\ref{sec:results}. \nIn section~\\ref{sec:discussion} we compare our measurements to those of \\citet{blac2011a} and \\citet{bate2018a} and we conclude with a discussion of the accretion disk size and black hole mass in the context of previous multi-epoch studies.\n\n\\section{Data}\n\\label{sec:data}\n\n\\begin{figure*}[t]\n\\gridline{\\fig{fig1.pdf}{0.8 \\textwidth}{}}\n\\caption{Deep field stack of reduced images of WFI2026 from the ECAM detector. Stars used for fitting the point spread function (PSF) are labeled in red and stars used for flux normalization (N) are labeled in green. The relative positions of the lensed quasar images are indicated in the expanded box, showing a single subexposure in excellent seeing.}\n\\label{fig:raw_ccds}\n\\end{figure*}\n\nThe observational campaign was conducted within the scope of the COSmological MOnitoring of GRAvItational Lenses COSMOGRAIL collaboration \\citep[e.g.][]{cour2005a, bonv2018a} We used images of WFI2026 obtained with the Swiss 1.2m Leonhard Euler telescope (hereafter Euler) located at La Silla Observatory in Chile between April, 2004 and November, 2016. Prior to 2010 we collected data using the C2 chip, a $2048\\times2048$ detector with a pixel scale of $0\\farcs344$. We took more recent exposures on the EulerCAM (ECAM) detector, with a smaller pixel scale of $0\\farcs2149$ and dimensions of $3496\\times3512$ pixels. Across all epochs we used the Rouge Gen\\'{e}ve (RG) filter, a modified R-band filter with an effective wavelength of $6600\\,\\text{\\AA}$. At each of the 548 epochs, we obtained five $360\\,\\text{s}$ subexposures. Our observations with Euler spanned 13 seasons with a typical observation cadence of once every six days for C2 and once every four days for ECAM with inter-season gaps of ${\\sim}\\,100$ days. In Figure~\\ref{fig:raw_ccds} we show a stacked ECAM exposure of WFI2026 indicating the reference stars used for point spread function (PSF) calibration and flux normalization (N).\n\n\\begin{figure*}[t]\n\\gridline{\\fig{fig2.pdf}{1.0 \\textwidth}{}}\n\\caption{Reduced lightcurve for WFI2026 obtained with Euler. The curves are plotted in relative magnitudes with an arbitrary offset. Image A (A1+A2) is red, image B is blue, and image C is green. The season averages for image C are overlaid atop the reduced lightcurve.}\n\\label{fig:lightcurves}\n\\end{figure*}\n\n\\begin{deluxetable*}{c|c|c|c|c|c|c}\n\\tablecaption{Astrometric measurements for WFI2026 based on \\textsl{HST} CASTLES imaging, F160W band. We used image B as the position reference. The lens galaxy is indicated by G. The effective radius, $r_e$, ellipticity, $e$, and position angle, $\\theta_e$, are indicated for the galaxy using a de Vaucouleurs profile.\\label{tab:hst_astrom}}\n\\tablehead{\n\\colhead{Component} & \\colhead{$\\Delta$RA (\\arcsec)} & \\colhead{$\\Delta$Dec (\\arcsec)} & \\colhead{$r_e$ (\\arcsec)} & \\colhead{$e$} & \\colhead{$\\theta_e$ (\\degr)} & \\colhead{F160W mag}\n}\n\\startdata\nA1 & $0.163\\pm0.003$ & $-1.428\\pm0.003$ & -- & -- & -- & $15.64\\pm0.01$ \\\\\nA2 & $0.416\\pm0.003$ & $-1.214\\pm0.003$ & -- & -- & -- & $16.09\\pm0.01$ \\\\\nB & $\\equiv 0.000$ & $\\equiv 0.000$ & -- & -- & -- & $17.11\\pm0.01$ \\\\\nC & $-0.572\\pm0.003$ & $-1.042\\pm0.003$ & -- & -- & -- & $17.33\\pm0.02$ \\\\\nG & $-0.074\\pm0.012$ & $-0.798\\pm0.008$ & $0.47\\pm{0.36}$ & $0.35\\pm{0.21}$ & $53\\pm{42}$ & $18.80\\pm0.43$ \\\\\n\\enddata\n\\end{deluxetable*}\n\n\\begin{figure}[t]\n\\includegraphics[width=0.5\\textwidth]{fig3.pdf}\n\\caption{Reduced VLT FORS1 spectra for images A (blue) and B (red), magnification corrected to intrinsic flux estimates. The locations of several known emission lines are marked and the corresponding rest-frame wavelength is indicated along the top of the plot.}\n\\label{fig:spectra}\n\\end{figure}\n\nThe angular separation between images in WFI2026 is small, with a scale size of ${\\sim}\\,1\\farcs4$ \\citep{morg2004a, vero2010a}, making photometric measurements challenging. Nevertheless with a typical seeing of $1\\farcs6$ with C2 and $1\\farcs4$ with ECAM, the angular separations are above the Nyquist limit ($\\approx \\frac{1}{2}\\,\\text{seeing} = 0\\farcs8$) for most image pairs. Images B and C are separated from each other and A1 and A2 by at least $1\\farcs0$. The merging pair A1 and A2, however, are only separated by ${\\sim}\\,0\\farcs3$, too close to resolve fluxes in the individual images. We reduced the data and performed our subsequent analysis using the combined flux A=A1+A2. We employed the Magain, Courbin, and Sohy (MCS) deconvolution algorithm of \\citet{maga1998a, maga2007a} for de-blending flux from the multiple images. Using a point spread function (PSF) measured from nearby reference stars, this algorithm computes a high-resolution deconvolved image of the quasar. We then followed the approach discussed in \\citet{vuis2007a, vuis2008a} to find flux in individual images, including priors on astrometry from \\citet{chan2010a} to further improve accuracy. We measured image fluxes in each subexposure and calculated the median value at each epoch to provide the reduced lightcurves shown in Figure~\\ref{fig:lightcurves} and in Appendix~\\ref{sec:lc_table}.\n\nThe compact angular size of the system gave rise to significant cross-talk between photometric measurements. This additional noise, in excess of photon shot-noise, is typical for multiply-lensed quasars. For image C in WFI2026, however, this cross-talk noise was on the same order as the intra-season variability and could mimic a microlensing signal. To mitigate this effect, we averaged over each season for image C and used these season averages in our microlensing analysis. \nWe determined each season average for image C, $\\langle c\\rangle$, using least-squares fitting. The error bars, $\\langle \\sigma_{c}\\rangle$, were selected such that within each season the $\\chi^2$ value, relative to the reduced lightcurve, was equal to the number of exposures, $N$, for the season. This amounted to numerically solving \n\\begin{equation}\nN = \\sum_i^N \\frac{(c_i - \\langle c\\rangle)^2}{\\sigma_i^2 + \\langle\\sigma_{c}\\rangle^2}.\n\\label{eqn:seas_avg}\n\\end{equation}\nfor $\\langle\\sigma_{c}\\rangle$.\nThe values $c_i$ and $\\sigma_i$ came from the reduced light curve. This simplification removed our ability to discern intra-season variability, but allowed us to more confidently measure the annual variability, which dominates the microlensing signal in WFI2026 \\citep{mosq2011a}. We show the image C season averages overlaid atop the reduced lightcurve in Figure~\\ref{fig:lightcurves}.\n\nFor lens modeling we used \\textsl{HST} imaging from the CfA-Arizona Space Telescope Survey (CASTLES\\footnote{https:\/\/www.cfa.harvard.edu\/castles\/}) \\citep{muno1998a, koch1999a, leha2000a}. Our exposure was taken on October 21, 2003 with the Near-Infrared Camera and Multi-Object Spectrograph (NICMOS) through the F160W filter \\citep{morg2004a}. From this image, we derived astrometry using the \\textit{imfitfits} routine of \\citet{leha2000a}. Our astrometric fits, including the shape parameters for a de Vaucouleurs lens galaxy, are shown in Table~\\ref{tab:hst_astrom}. Because the lens galaxy in WFI2026 is faint, the galaxy model parameters have sizable uncertainties, but the results are in agreement with values reported in \\citet{chan2010a}.\n\nWe also analyzed spectra obtained using the Very Large Telescope (VLT) of the European Southern Observatory (ESO) with the FORS1 mult-object spectrograph. In our analysis we use a series of fourteen $1400\\,s$ exposures through the GG435 filter obtained between 2004 and 2006. The slit was oriented to capture both images A (A1 + A2) and B. Each exposure spanned the observed wavelength range of $4400\\text{--}8690\\,\\text{\\AA}$. \nFor WFI2026 at $z_s=2.23$ we fully resolved the \\ion{C}{4} line which allowed us to estimate the black hole mass (see section~\\ref{sec:mbh}). We display these spectra in Figure~\\ref{fig:spectra}.\n\n\\section{Macro Lens Modeling}\n\\label{sec:lens_model}\n\nOur microlensing analysis required a model of the strong (macro) lensing in the system. WFI2026 has been previously modeled in \\citet{slus2012a} and \\citet{bate2018a}. In both cases, the authors found the need for significant external shear, but achieved good fits using a singular isothermal ellipsoid with shear (SIE+$\\gamma$) model. From the isothermal ellipsoid models of \\citet{slus2012a} and \\citet{bate2018a} we estimated the velocity dispersion in the lens. \n\nFollowing the convention of previous multi-epoch studies \\citep[e.g.][]{morg2018a}, we also modeled the lens with a sequence of two-component de Vaucouleurs and Navarro, Frenk, and White (NFW) \\citep{nava1997a} models with external shear. This simulated the expected profiles of stellar matter (de Vaucouleurs) and dark matter (NFW) and allowed us to marginalize over the unknown dark matter fraction. We used the \\texttt{LENSMODEL} software \\citep{keet2001a}, omitting constraints from the flux ratios, which can be influenced by microlensing. Our first model employed a pure de Vaucouleurs profile (100\\% stellar matter) to fit for the centroid, moment, ellipticity, position angle, effective radius, and shear strength and orientation of the lens galaxy.\nWe call this model $f_{M\/L}=1.0$, where we define $f_{M\/L}$ as the fractional strength of the de Vaucouleurs moment relative to a unity mass-to-light-ratio model.\nWe then reduced the de Vaucouleurs moment in increments of 10\\% and added an NFW component fixed to the same lens centroid, ellipticity, and position angle, and re-fit for all parameters. This generated a ten-model sequence with $f_{M\/L} = 0.10\\text{--}1.0$ in increments of 0.1, nominally spanning the range of 0-90\\% dark matter, and permitted our analysis to marginalize over the unknown dark matter fraction. \nAn advantage of using a wide range of dark matter fractions is that it also effectively samples a wide range of possible lens galaxy profile shapes. This is especially important for WFI2026 given the broad errors in Table~\\ref{tab:hst_astrom}, which can predict very different stellar mass fractions.\nBest fits for the convergence, $\\kappa$, and shear, $\\gamma$, and stellar-to-total-convergence ratio, $\\kappa_*\/\\kappa$, of this sequence are given in Table~\\ref{tab:lens_models}. We also show the relative quality of fit, which varies little between models. \n\nA shortcoming of our WFI2026 lens model sequence is the unknown lens redshift, $z_{l}$. In the discovery paper, \\citet{morg2004a} favor a lens redshift of $z_{l}=0.4$, based upon lens galaxy luminosity. However, in a more recent study \\citet{mosq2011a} used astrometry-based methods \\citep{ofek2003a} to estimate a lens redshift of $z_{l}=1.04$. As our VLT spectra showed no apparent lens galaxy features, we were unable to independently measure the redshift. We note that the lack of any lens galaxy signal in the spectrum is consistent with a featureless UV continuum of a $z_{l}=1.04$ or greater elliptical galaxy. \nIn our analysis we adopted the more recent estimate of $z_{l}=1.04$ as the nominal lens redshift, but we also examined the impact of instead using $z_{l}=0.4$ in section~\\ref{sec:ml_results}.\n\n\\begin{deluxetable*}{c|cccc|cccc|cccc|c}\n\\tablecaption{Convergence, shear, and stellar convergence fraction $\\kappa_{*}\/\\kappa$ for each lens model. The parameter $f_{M\/L}$ indicates the strength of the de Vaucouleurs moment relative to a de Vaucouleurs-only model, providing a proxy for the luminous matter fraction. The values for $\\kappa$, $\\gamma$, and $\\kappa_{*}\/\\kappa$ are calculated at the position of each image. The final column, $\\chi^2\/N_{dof}$, indicates the relative fit of the model across all images.\\label{tab:lens_models}}\n\\tablehead{\n\\multirow{2}{0.05\\textwidth}{$f_{M\/L}$} & \\multicolumn{4}{c|}{Convergence $\\kappa$} & \\multicolumn{4}{c|}{Shear $\\gamma$} & \\multicolumn{4}{c|}{$\\kappa_{*}\/\\kappa$} & \\multirow{2}{0.05\\textwidth}{$\\chi^2\/N_{\\text{dof}}$} \\\\ \n\\colhead{} \\vline &\\colhead{A1} & \\colhead{A2} & \\colhead{B} & \\colhead{C} \\vline & \\colhead{A1} & \\colhead{A2} & \\colhead{B} & \\colhead{C} \\vline& \\colhead{A1} & \\colhead{A2} & \\colhead{B} & \\colhead{C} \\vline & \\colhead{}\n }\n\\startdata\n0.1 & 0.90 & 0.91& 0.88& 0.91 & 0.08 & 0.11& 0.06& 0.14 & 0.04 & 0.05& 0.02& 0.05 & 3.60 \\\\\n0.2 & 0.85 & 0.86& 0.83& 0.86 & 0.12 & 0.16& 0.09& 0.20 & 0.04 & 0.05& 0.02& 0.05 & 2.85 \\\\\n0.3 & 0.76 & 0.78& 0.72& 0.78 & 0.20 & 0.27& 0.14& 0.34 & 0.11 & 0.13& 0.07& 0.13 & 3.10 \\\\\n0.4 & 0.70 & 0.71& 0.65& 0.70 & 0.26 & 0.34& 0.18& 0.42 & 0.15 & 0.16& 0.10& 0.16 & 3.16 \\\\\n0.5 & 0.63 & 0.65& 0.57& 0.64 & 0.31 & 0.42& 0.21& 0.52 & 0.20 & 0.22& 0.13& 0.21 & 2.82 \\\\\n0.6 & 0.56 & 0.58& 0.50& 0.57 & 0.37 & 0.49& 0.25& 0.61 & 0.26 & 0.28& 0.18& 0.27 & 2.89 \\\\\n0.7 & 0.51 & 0.53& 0.44& 0.52 & 0.41 & 0.56& 0.28& 0.69 & 0.31 & 0.34& 0.21& 0.33 & 2.77 \\\\\n0.8 & 0.40 & 0.43& 0.31& 0.42 & 0.50 & 0.68& 0.35& 0.84 & 0.56 & 0.59& 0.43& 0.58 & 2.89 \\\\\n0.9 & 0.33 & 0.36& 0.23& 0.35 & 0.56 & 0.76& 0.38& 0.94 & 0.75 & 0.77& 0.64& 0.77 & 2.87 \\\\\n1.0 & 0.26 & 0.30& 0.16& 0.29 & 0.61 & 0.83& 0.42& 1.03 & 1.00 & 1.00& 1.00& 1.00 & 2.84 \\\\\n\\enddata\n\\end{deluxetable*}\n\n\\begin{deluxetable}{c|c|c}\n\\tablecaption{Time delays used for the microlensing analysis.\\label{tab:time_delays}}\n\\tablehead{\n\\colhead{Source} & \\colhead{$\\tau_{B-A}$ (days)} & \\colhead{$\\tau_{B-C}$ (days)}\n}\n\\startdata\nEuler ECAM & $18.7 ^{+4.1}_{-4.3}$ & -- \\\\\nLens Models & -- & $23.7^{+5.2}_{-5.2}$ \\\\\n\\enddata\n\\end{deluxetable}\n\nWe attempted to measure the time delays using the \\texttt{PyCS} algorithm of \\citep{tewe2013a}, which performed very well in a recent time-delay challenge \\citep{liao2015a, bonv2016a}. \\texttt{PyCS} has been adopted as the curve-shifting algorithm of choice for COSMOGRAIL. Details of the WFI2026 measurement will be included as part of a larger set of time delay measurements in a forthcoming paper \\citep[in prep]{mill2019a}. Here we report only the resulting time delays, shown in Table~\\ref{tab:time_delays}. The time delays are consistent with models at $z=1.04$ but not at $z=0.4$, lending further support to the larger lens redshift.\nThe empirical time delays for image C were highly uncertain, and inconsistent between A-C and B-C. As such, we retained only the A-B measurement in our microlensing analysis. For image C, we instead used the $z=1.04$ lens model that best matched the empirical A-B delay, and extrapolated the model results to estimate a time delay. \nWe explored the impact of time delay uncertainty on our disk size measurement in section~\\ref{sec:ml_results}.\n\n\n\\section{Microlensing Models}\n\\label{sec:ml_model}\n\nOur microlensing analysis was based on the procedure developed in \\cite{koch2004a} and \\citet{koch2006a}. This technique uses Monte Carlo methods to fit the observed microlensing lightcurves from trajectories through a set of stellar magnification fields.\n\nBefore running our analysis, we binned the lightcurves in a 20-day window, using error-weighted mean magnitude and mean Heliocentric Julian Date (HJD). This decreased the number of epochs from 548 to 129 which kept calculation times reasonable for the subsequent Monte Carlo analysis. Because\n\\citet{mosq2011a} estimated a source-crossing timescale of $1.4$ years in WFI2026 and a longer Einstein-radius-crossing timescale of $26.6$ years we were not concerned about microlensing on a sub-monthly scale. These short time-scales are also not well-resolved for typical trajectories across the microlensing patterns.\nTo further mitigate the impact of short-timescale noise on the microlensing solution, we included systematic errors of $0.015\\,\\text{mag}$ to account for any unmodeled photometric errors.\n\nWe shifted each curve by the time delays, holding the lightcurve for B as a fixed reference and linearly interpolating for images A and C. We averaged over the time-delay shifted season C values as detailed in section~\\ref{sec:data}. The magnitude differences are shown in Figure~\\ref{fig:good_ml_fits} for B-A (top panel, red) and B-C (bottom panel, blue).\nMicrolensing is the dominant source of time variability between these time-delay-shifted difference lightcurves. \n\n\nIn a dynamic microlensing analysis, the magnification curve, $\\mu(t)$, depends on highly nonlinear magnification by a stellar field in the lens galaxy. Because we cannot measure the precise stellar characteristics in the lens galaxy, we generated many possible magnification patterns at the range of $\\kappa_*\/\\kappa$ from our model sequence (see Table~\\ref{tab:lens_models}). As with previous studies, we assumed a stellar mass distribution of $dN\/dM \\propto M^{-1.3}$, a ratio of maximum over minimum mass of 50, and a variable median microlensing mass $\\langle M_*\/M_{\\odot} \\rangle$. We projected the stellar magnification patterns on a $8192\\times 8192$ grid which spanned sizes from $40 R_{\\text{E}}$ down to the pixel scale, ${\\sim}\\,0.005 R_{\\text{E}}$. Here $R_{\\text{E}}=D_{OS}\\theta_{\\text{E}}$, where $D_{OS}$ is the angular diameter distance from the observer to the source and $\\theta_{\\text{E}} \\propto \\langle M_{*}\/M_{\\odot} \\rangle^{1\/2}$ is the Einstein radius as a function of median stellar microlens mass. \n\nFor each of the ten macro models ($0.1 \\leq f_{M\/L} \\leq 1.0$), we generated 40 magnification patterns for each lensed image, yielding 400 complete sets of magnification patterns. This eliminated concerns about the introduction of systematics from repetitive use of one or a small number of patterns for a given image location and macro model. We created fits to the combined image A = A1+A2 light curve by summing the model light curves generated separately from the magnification patterns for images A1 and A2. The goodness-of-fit to each point in the summed light curve A was assigned the same statistical weight as for each point in the resolved light curves for images B and C.\n\nTo model the disk radius, we convolved each magnification pattern with a Gaussian kernel at a range of trial accretion disk sizes. We chose seventeen radii evenly spaced in the logarithmic range $\\log(r\/\\text{cm}) = 14.5-18.5$. Since \\citet{mort2005a} showed that the half light radius, rather than profile shape, affects the inferred microlensing size, we selected the Gaussian profile rather than the thin disk model for speed of calculation. \nUpon conclusion of the analysis, we converted the best-fit Gaussian scale radius to a thin disk scale radius $r_s$. \n\nWe generated trial lightcurves by moving a point source across a convolved magnification pattern. We selected transverse velocities from the logarithmic range $10\\,\\text{km s$^{-1}$} \\leq \\hat{v_e}\\langle M_*\/M_{\\odot} \\rangle^{1\/2} \\leq 10^6\\,\\text{km s$^{-1}$}$ and randomized the directions and starting points in each image. From these trajectories, we found the magnification as a function of time and compared this to our empirical lightcurves using a $\\chi^2$ statistic. We allowed for a $0.5\\,\\text{mag}$ systematic uncertainty in the intrinsic flux ratios between the images to account for the influence of substructure and broad line region contamination. We terminated a trial when $\\chi^2\/N_{\\text{dof}} > 1.4$, where $N_{\\text{dof}}$ is the number of degrees of freedom, as these solutions did not contribute significant statistical weight to the inferred parameter values. In the Monte Carlo phase of our analysis, we used the United States Naval Academy High Performance Cluster\\footnote{https:\/\/www.usna.edu\/ARCS\/} to attempt $10^7$ trials on each of the 400 magnification patterns for a grand total of $4\\times10^9$ trials. Additional trials did not significantly improve constraints. \n\\section{Results}\n\\label{sec:results}\n\nIn this section we present our microlensing analysis and show our determination of the size of WFI2026, reported as the scale radius $r_s$. We also present our analysis of the VLT spectra to determine the mass of the black hole. \n\n\\begin{figure*}[t]\n\\includegraphics[width=\\textwidth]{fig4.pdf}\n\\caption{The 20 best-fit curves from our microlensing analysis. \\textit{Top}: Time-delay corrected difference curves for images A-B, $\\Delta m_{AB} = m_A - m_B$, in magnitudes. \\textit{Bottom}: The difference curves for images B-C, $\\Delta m_{BC} = m_B - \\langle m_C \\rangle$ where $\\langle m_C \\rangle$ is the season average for image C. All curves fit the strong microlensing feature from image B near HJD-2450000 = 4700 days. They also consistently fit the slow gradient between HJD-2450000 ${\\sim}\\,3500 \\text{--} 6000$ days.}\n\\label{fig:good_ml_fits}\n\\end{figure*}\n\n\\begin{figure*}[t]\n\\gridline{\\fig{fig5a.pdf}{0.5 \\textwidth}{}\n \\fig{fig5b.pdf}{0.5 \\textwidth}{}}\n\\caption{Effective source radius and velocity inferred from the WFI2026 microlensing analysis. \\textit{Left:} Probability density for the scale radius, $\\hat{r}_s$ in Einstein units, scaled to a $1\\,M_{\\odot}$ median microlensing mass. \\textit{Right:} The probability density function for the effective quasar velocity, $\\hat{v}_e$ in Einstein units, scaled to a $1\\,M_{\\odot}$ median microlensing mass. The thicker curve indicates the value found from the microlensing analysis and shows the same bimodality as seen in the probability density for the radius. The thin curve indicates our cosmological velocity model, $v_e$, in $\\text{km}\\,\\text{s}^{-1}$. }\n\\label{fig:vhat}\n\\end{figure*}\n\n\\begin{figure*}[t]\n\\centering\n\\includegraphics[width=0.5\\textwidth]{fig6.pdf}\n\\caption{Accretion disk radius of WFI2026 $\\lambda_{\\text{rest}} = 2043\\AA$, displayed as a probability density for the scale radius in physical units. The solid line corresponds to the result with no prior on median microlensing mass. The dashed line is the solution with a uniform prior on the median microlensing mass of $0.1 < \\langle M_{*}\/M_{\\odot}\\rangle < 1.0$.}\n\\label{fig:rhat}\n\\end{figure*}\n\n\\subsection{Microlensing}\n\\label{sec:ml_results}\n\n\\begin{figure}[t]\n\\centering\n\\includegraphics[width=0.5\\textwidth]{fig7.pdf}\n\\caption{Probability contours of $\\log(\\hat{v}_e)$ vs. $\\log(\\hat{r}_s)$ for WFI2026. Confidence intervals enclosing 68\\%, 95\\%, and 99\\% of the total probability are shaded in blue. The bimodal peaks are evident here, as is an overall linear relation between $\\log(\\hat{v}_e)$ and $\\log(\\hat{r}_s)$.}\n\\label{fig:rhat_vhat}\n\\end{figure}\n\nSeveral of the best-fits to the time-delay corrected curves are shown in Figure~\\ref{fig:good_ml_fits}. We can see strong microlensing variability in this system on the order of ${\\sim}\\,0.2\\,\\text{mag}$ over the 13 seasons. There is also a short duration, high-magnification event in image B rising across the entire 2008 season. The best-fit curves consistently reproduced these dominant microlensing features.\n\nWe calculated probability densities for the variables of interest by marginalizing over the other variables of the model. For the radius, this took the form\n\\begin{equation}\nP(\\hat{r}_s|D) \\propto \\int_{0}^{\\infty} P(D|\\hat{r}_s, \\xi)\\pi(\\xi)\\pi(\\hat{r}_s)d\\xi.\n\\label{eqn:marginalize}\n\\end{equation}\nHere $\\xi$ represents all other variables, including effective source velocity, $\\hat{v}_e$ and luminous matter fraction, $f_{M\/L}$. The prior distribution is captured in $\\pi(\\xi)$ and is, for example, log-uniform for $\\hat{v}_e$ on $[10, 10^6]$ and uniform for $f_{M\/L}$ on $[0.1, 1]$ while the prior $\\pi(\\hat{r}_s)$ is log-uniform on $[10^{14.5}, 10^{18.5}]$. The probability of the data $P(D|\\hat{r}_s, \\xi)$ is equivalent to $P(\\chi^2|N_{\\text{dof}})$ in equation 10 of \\citet{koch2004a}. \n\nIn Figure~\\ref{fig:vhat}, we display the resulting probability density for the primary variable of interest, the source size $\\hat{r}_s=r_s\\langle M_*\/M_{\\odot} \\rangle ^{-1\/2}$. The $\\hat{r}_s$ distribution is in Einstein units, scaled assuming a $1\\,M_{\\odot}$ median stellar mass in the lens galaxy. To convert this result to physical units, we convolve $\\hat{r}_s$ with the probability density for $\\langle M_*\/M_{\\odot} \\rangle$, where the $\\langle M_*\/M_{\\odot} \\rangle$ distribution is found as in \\citet{koch2004a} by\n\\begin{equation}\nP(\\langle M_*\/M_{\\odot} \\rangle|\\text{D}) \\propto \\int P(\\hat{v}_e|\\text{D}) P(v_e)dv_e\n\\label{eqn:mhat}\n\\end{equation}\nwhere $\\hat{v_e}=v_e\\langle M_*\/M_{\\odot} \\rangle^{-1\/2}$.\nThe velocity probability density distributions are shown in the right panel of Figure~\\ref{fig:vhat}. Because $\\hat{v}_e$ is more finely sampled than $\\hat{r}_s$, the resulting distribution is much smoother.\n\nTo find $P(v_e)$, the probability density for the actual source velocity, we model the effective source velocity $v_e$ following the method of \\citet{koch2004a} and using the formulation of \\citet{mosq2011a}.\n\nThis includes velocity contributions from the observer, $v_{\\text{CMB}}$, source, $\\sigma_{\\text{pec}}(z_s)$, lens bulk motion, $\\sigma_{\\text{pec}}(z_l)$, and lens velocity dispersion, $\\sigma_*$. \nWe projected the CMB dipole along the line of sight to WFI2026 to find the north and east vector components of $v_{\\text{CMB}}$ as $-227\\,\\text{km}\\,\\text{s}^{-1}$ and $-244\\,\\text{km}\\,\\text{s}^{-1}$ respectively.\n For the bulk galaxy motions we used cosmological models to estimate the one-dimensional peculiar velocity dispersions to be $\\sigma_{\\text{pec}}(z_l) = 265\\,\\text{km}\\,\\text{s}^{-1}$ and $\\sigma_{\\text{pec}}(z_s)=204\\,\\text{km}\\,\\text{s}^{-1}$. We also included a contribution of $\\sigma_* = 335\\,\\text{km}\\,\\text{s}^{-1}$ from the stellar velocity dispersion in the lens, determined from the Einstein radius found by \\citet{slus2012a} with an SIE+$\\gamma$ lens model. \n \nWith our inferred distribution for $\\langle M_*\/M_{\\odot} \\rangle$ we estimated the probability density function for the accretion disk size in physical units, $r_s$, shown with the solid line in Figure~\\ref{fig:rhat}. \nAdopting a nominal inclination of $\\langle \\cos(i)\\rangle = 0.5$ for ready comparison to other microlensing studies \\citep[e.g.][]{blac2011a, morg2018a}, the scale radius of the WFI2026 accretion disk at $\\lambda_{\\text{rest}} = 2043\\,\\text{\\AA}$ is $\\log\\{(r_s\/\\text{cm}) [\\cos(i)\/0.5]^{-1\/2}\\} = 15.74^{+0.34}_{-0.29}$. This result can be easily re-scaled to any inclination, such as a smaller angle of $\\la30\\degr$ that may be more typical of quasars under unification models \\citep[e.g.][]{beve1995a, urry1995a}.\n\nTo examine the impact of uncertainty in the median microlensing mass distribution, we also experimented with applying a uniform mass prior of $0.1 < \\langle M_*\/M_{\\odot} \\rangle < 1.0$, resulting in the distribution with the dotted line in Figure~\\ref{fig:rhat}. The mass prior narrows the distribution marginally, but nonetheless provides a fully consistent result. For self-consistency, we adopt the distribution without the mass prior as our primary result.\n \nWe found a bimodal distribution in both $dP(\\hat{r}_s)\/d\\log(\\hat{r}_s)$ and $dP(\\hat{v}_e)\/d\\log(\\hat{v}_e)$ but see no evidence for bimodality in $dP(r_s)\/d\\log(r_s)$. \nWe can understand this by examining the underlying nature of the bimodal solutions. The high-velocity, large-radius mode corresponds to a low median microlensing mass.\nHowever, because the median microlensing mass is smaller for these solutions, the true value of $r_s = \\hat{r}_s \\langle M_*\/M_{\\odot}\\rangle^{1\/2}$, the product of mass and radius, remains relatively unchanged. Both modes return the same physical estimate in the limit of $\\hat{v}_e \\propto \\hat{r}_s$. This relation is nearly satisfied by our solutions as seen in the probability contours in Figure~\\ref{fig:rhat_vhat}. This trend indicates that the data most strongly constrain the ratio of $\\hat{v}_e\/\\hat{r}_s$, which is independent of $\\langle M_*\/M_{\\odot}\\rangle$. This insensitivity to the unknown microlensing mass is one of the strengths of multi-epoch lightcurve analysis.\n\nAs an additional verification, we re-ran the microlensing analysis with a log-uniform prior on the source velocity of $1.0 < \\log\\hat{v}_e < 4.0$. This disallowed unreasonably high-velocity solutions, providing a different means of imposing a lower limit on microlensing mass. In this second analysis, the velocity distribution had only a single mode, as expected, and the resulting size estimate was effectively unchanged.\n\nWe also tested the sensitivity of our results to the unknown lens redshift, $z_{l}$, by calculating the distances, velocities, and radii for the low and high estimates of the lens redshift, $0.4 < z_{l} < 1.04$. Given the lack of a caustic crossing in the WFI2026 lightcurves, the dominant timescale for microlensing variability is the Einstein radius crossing time $t_{E} = R_{E}\/v_e$. Because the physical radius $R_{E} \\propto (D_{\\text{LS}}D_{\\text{OS}}\/D_{\\text{OL}})^{1\/2}$, the influence of the resulting sizes only scales as the square root of the change in the angular diameter distances. Comparing the physical size measurement between the two redshifts we found a change in $\\log(r)$ of less than 2\\%, fully consistent within the statistical errors.\n\nSimilarly, our results are only weakly sensitive to the time delay. We repeated the microlensing analysis with low and high time delays based on the error limits in Table~\\ref{tab:time_delays}, but the resulting changes in our measurement of the scale radius were negligible.\n\n\nWe attempted to estimate the relative stellar mass fraction by marginalizing over velocities and radii.\nThere was a mild preference for the lowest stellar mass models, but not significant enough to warrant a quantitative estimate.\n\n\\subsection{Black Hole Mass}\n\\label{sec:mbh}\n\nOur reduced VLT spectra for images A and B are shown in Figure~\\ref{fig:spectra} with several prominent emission lines indicated. Because of the relatively high source redshift, $z_s = 2.23$, the \\ion{Mg}{2} line is redshifted out of the observed frame. The \\ion{C}{4} line is, however, fully resolved in both images and can be used to estimate black hole mass \\citep{vest2006a, park2013a}.\n\nWe first estimated the \\ion{C}{4} emission line width in the spectra\n of image A and image B independently. Line widths were measured by\n fitting a local, linear continuum under the emission line and then\n determining the full width at half maximum (FWHM) and the line\n dispersion or second moment, $\\sigma_l$, directly from the data\n above the continuum (see \\citet{pete2004a} for a more detailed\n description). There is good agreement in the line widths determined\n from the spectra of the two separate images, with average values of\n FWHM$=6015\\pm40$\\,km\\,s$^{-1}$ and\n $\\sigma_l=3616\\pm4$\\,km\\,s$^{-1}$.\n\n\\citet{vest2006a} and \\citet{park2013a} provide\nprescriptions for estimating black hole masses based on the\n\\ion{C}{4} emission line that are calibrated to the H$\\beta$\n reverberation mapping results for local AGNs. Work by \\citet{denn2013a} shows that single-epoch black hole masses derived from\n the \\ion{C}{4} emission line are less biased when adopting\n $\\sigma_l$ as the line width measurement rather than FWHM, so we\n focus on those prescriptions. The other necessary ingredient is\n the continuum luminosity at rest-frame 1350\\,\\AA, which was not\n covered in the VLT spectra of WFI 2026-4536. Fortunately,\n \\citet{vest2006a} show that $L_{\\lambda}$(1450\\,\\AA)\n can be directly substituted for $L_{\\lambda}$(1350\\,\\AA).\n\nWe measured continuum flux densities of\n$f_{\\lambda}$($1450\\times(1+z)$)$=1.3\\times10^{-15}$\\,erg\\,s$^{-1}$\\,cm$^{-2}$\\,\\AA$^{-1}$\nfor image B and\n$6.9\\times10^{-15}$\\,erg\\,s$^{-1}$\\,cm$^{-2}$\\,\\AA$^{-1}$ for image A.\nAllowing for the range of image magnifications spanned by the model\nsequence in Table~\\ref{tab:lens_models}, and accounting for Galactic extinction along the\nline of sight, we find $\\log(\\lambda L_{\\lambda}$(1450\\,\\AA)$\\bm{\/\\text{ergs}\\,\\text{s}^{-1}})=46.523^{+0.388}_{-0.155}$.\nCombined with the emission line width and using the prescriptions of\n\\citet{vest2006a} we estimate $\\log(M_{\\rm BH}\/M_{\\odot})\n= 9.18^{+0.39}_{-0.34}$, including in our uncertainty the 0.33\\,dex of\nscatter reported for their prescription. The black hole mass estimate\nis nearly identical if the prescriptions of \\citet{park2013a} are\nadopted instead.\n\n\n \n\n\\section{Discussion and Conclusions}\n\\label{sec:discussion}\n\n\\begin{figure}[t]\n\\centering\n\\includegraphics[width=0.5\\textwidth]{fig8.pdf}\n\\caption{Quasar accretion disk sizes scaled to $\\lambda_{\\text{rest}} = 2500\\text{\\AA}$ plotted as a function of the central black hole masses. WFI2026 is highlighted in blue while the other available microlensing size measurements are shown as black dots \\citep{koch2004a, morg2008a, dai2010a, morg2010a, hain2012a, morg2012a, hain2013a, macl2015a,morg2018a}. The best-fit line from \\citet{morg2018a} is shown in purple with $1\\sigma$ errorbars encompassed by the purple band. The luminosity-based size estimates are shown with black diagonal crosses with the best fit indicated by the black dotted line.}\n\\label{fig:mbh_r}\n\\end{figure}\n\n\nThe key measurement we have presented in this study is the accretion disk size of WFI2026, shown in Figure~\\ref{fig:rhat}. Our findings with and without a prior on microlensing mass are consistent so this result is essentially independent of the unknown median microlensing mass. \nTo compare our measurement to those from other studies on WFI2026, we convert this to a half-light radius, under the thin-disk assumption, to give a value of $\\log\\{(r_{1\/2}\/\\text{cm}) [\\cos(i)\/0.5]^{-1\/2}\\} = 16.13^{+0.34}_{-0.29}$. Our estimate is smaller, but consistent with the findings of \\citet{blac2011a}, $\\log (r_{1\/2}\/\\text{cm}) = 16.46 \\pm 0.32$, and larger than the estimate $\\log (r_{1\/2}\/\\text{cm}) < 16$ found by \\citet{bate2018a}, but again, consistent within statistical bounds. The estimate from \\citet{bate2018a} adjusts the half-light radius based on their empirical temperature slope rather than thin-disk slope. If instead, we adjust their scale size based on thin-disk scaling, their estimate increases to $\\log (r_{1\/2}\/\\text{cm}) < 16.14$, fully consistent with our measurement.\n\nAlthough we found a well-constrained measurement of the physical accretion disk size, we did encounter a bimodal distribution in the effective radius and source velocity which was mitigated by the degeneracy between $\\hat{v}_e$ and $\\hat{r}_s$. In any case, the application of a velocity prior validated these results.\n\nWe also reported the first spectroscopic measurement of the central black hole mass based on the \\ion{C}{4} line width and the relation from \\citet{vest2006a}. This is a relatively large central black hole, the second most massive in our sample of 15 quasars. Our estimate of $\\log(M_{BH}\/M_{\\odot}) = 9.18^{+0.39}_{-0.34}$ is larger than the bolometric luminosity estimate from \\citet{blac2011a} of $\\log(M_{BH}\/M_{\\odot}) = 8.90$ in accordance with their findings that luminosity-based estimates are systematically smaller than virial estimates that also use the broad emission line width.\n\nWith our black hole mass estimate, we compared our results from WFI2026 to the $r_{\\mu}$ vs. $M_{\\text{BH}}$ relation from \\citet{morg2010a, morg2018a}. To match this study, we shifted our scale radius to $\\lambda_{\\text{rest}}=2500\\,\\text{\\AA}$, assuming a thin disk model, which gave $\\log(r_s\/\\text{cm} [\\cos(i)\/0.5]^{-1\/2}) = 15.86^{+0.34}_{-0.29}$. This value is fully consistent with the estimate of $\\log(r_{2500}\/\\text{cm}) = 15.97 \\pm 0.12$ predicted by the accretion disk size -- $M_{\\text{BH}}$ relation of \\citet{morg2018a}, as can be seen in Figure~\\ref{fig:mbh_r}.\n\nFigure~\\ref{fig:mbh_r} also displays that the microlensing sizes are systematically larger than the theoretical thin disk sizes one would predict using standard thin disk theory (see \\citet{morg2010a} for details). Following the same approach and using the Magellan $i$-band flux from \\citet{morg2004a} we estimated the luminosity size for WFI2026. Adopting an inclination angle of $60\\degr$, we found $\\log\\{(r_L\/\\text{cm})[\\cos(i)\/0.5]^{-1\/2}\\} = 15.08 \\pm 0.13$, when re-scaled to a rest-frame wavelength of $2500\\,\\text{\\AA}$. This estimate is smaller than the microlensing size measurements by $0.66\\pm0.33\\,\\text{dex}$, similar to the offset reported in previous microlensing studies.\n\nThe general consistency of these fifteen studies offers an opportunity to infer host quasar properties. In a forthcoming work, we will use the observed size offset and the framework developed in \\citet{morg2010a} to provide a robust observational constraint on the quasar accretion disk temperature profile.\n\n\n\n\\acknowledgments\n\nThis material is based upon work supported by the National Science Foundation under grant AST-1614018 to M.A.C. and C.W.M.\n\nCOSMOGRAIL is made possible thanks to the continuous work of all observers and technical staff obtaining the monitoring observations, in particular, at the Swiss Leonhard Euler telescope at La Silla Observatory, which is supported by the Swiss National Science Foundation. M.M., F.C. and V.B. acknowledge support from the Swiss National Science Foundation (SNSF) and through European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (COSMICLENS: grant agreement No 787886). \n\nMCB gratefully acknowledges support from the National Science Foundation through CAREER grant AST-1253702 to Georgia State University.\n\nWe are grateful to Christopher S. Kochanek for the use of his microlensing analysis code.\n\n\\facilities{\\textsl{HST} (NICMOS), VLT:Kueyen, Euler:1.2m}\n\n\\software{Anaconda, \\texttt{LENSMODEL} \\citep{keet2001a}, \\texttt{PyCS} \\citep{tewe2013a}}\n\n\n\\clearpage\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\\label{sec:introduction}\nDiagnostic systems play an important role for modern accelerators in measuring beam's properties and optimizing the performance of the accelerators. They are widely available in every accelerator from large complex machines such as the Large Hadron Collider (LHC) to simpler ones used for medical x-ray or precision experiments. \n All these devices provide versatility, high detecting efficiency and relatively low cost. However, due to the increasing power of large accelerators, that can damage these intercepting devices, and the need for online monitoring of the beam within the accelerator, interest towards non-invasive methods has increased.\nPreviously, interception diagnostics such as phosphor screens, scintillating screens, optical transition radiation screens, Faraday cup, wire scanners and grids, and etc. were commonly used because of their simplicity, high detecting efficiency and relatively low cost. However, due to the increasing power and intensity of large accelerators, these methods become fragile and no longer applicable. Therefore,interest towards non-invasive methods has increased recently.\n\nIonization profile monitors (IPMs) \\cite{AnneIPM1993,MiessnerIPM2010,BartkoskiIPM2014} and beam induced fluorescent monitors (BIFs) \\cite{VariolaBIF2007,TsangBIF2013,ForckBIFDIPAC2003,ForckBIFIPAC2010,BeckerBIFDIPAC2007} are widely used as non-invasive beam profile monitors in many accelerators. In such monitors, the particle beams interact with the residual gas, causing the gas molecule to either ionise or emit fluorescent light. The byproducts from the beam-gas interaction, can be collected via an external electromagnetic field (ions and electrons), or detected using a stand alone optical system (fluorescence) to provide the one dimensional distribution information of the primary beams. Depending on the background pressure level, they usually require long integration times or extra working gas being loaded. The latter will create a large pressure bump area and cause a potential degradation of the primary beams. Recent studies \\cite{HASHIMOTO2004289,FUJISAWA200350,VasilisAPL2014,Vasilis_PRAB} [Amir PRL], have shown that the transverse profile of particle beams can be obtained non-invasively by a novel beam profile monitor using a supersonic gas jet as a screen. Using a gas jet \\cite{VasilisVacuum2014} is a novel and safer way to introduce working gases where the supersonic gas jet flows across the primary beam in a small and confined area. The signal from the interaction will be significantly increased due to the increased local density but the surrounding pressure level will minimally if not affected due to the directionality of the supersonic gas propagates. Moreover, using a gas-curtain angled at 45 degrees will have the added benefit of providing a 2D profile of the beams. The thickness, uniformity and density of the gas jet curtain screen will affect the accuracy and detection efficiency of such monitors, and thus characterising these parameters is essential.\n\nPreviously, the density of the gas jet was measured overwhelmingly by laser interferometry techniques \\cite{KimAPL2003interferemetry,DitmireOL98interferemetry,LandgrafRSI2011interferemetry,GaoAPL2012interferemetry} but also by other techniques such as Rayleigh scattering \\cite{Stern2007JetMeasureRayleigh}, usage of a common microphone \\cite{Rajeev2013jetMicrophone}, multi-photon ionization \\cite{Schofield2009JetIon,Meng2015JetIon}, nuclear scattering \\cite{Pronko1993JetScattering}. The target density measured using these methods was in the range of \\(10^{20} - 10^{22}\\) \\(m^{-3}\\). When dealing with the gas jet with density in the range of \\(10^{15} - 10^{18}\\) \\(m^{-3}\\), the signal is weak from these methods. Compression gauge method \\cite{HASHIMOTO2004289,FUJISAWA200350,Y.Hashimoto2013} was used to measure the density of a pulsed gas jet in the range of ~\\(10^{16}\\) \\(m^{-3}\\) for a similar gas jet beam profile monitor. In this paper, we extend this method to measure the absolute density and distribution of a continuous gas jet. This enables us to understand the beam profile measured by such gas jet monitor and mitigate any distortion due to the jet thickness and non-uniformity of the gas jet. The paper is structured as follow. In section \\ref{sec:setup}, we describe the experimental setup. In sections. \\ref{sec:gasjetform} and \\ref{sec:Mprinciple}, the principle of the gas jet forming and measuring the gas jet density using the compression gauge will be explained. In section \\ref{sec:Results}, the experimental results are presented and discussed together with a comparison from theoretical predication. The conclusions are then summarized in section \\ref{sec:summary}.\n\n\\section{Experimental Setup}\n\\label{sec:setup}\n\\subsection{Supersonic gas jet monitor system description}\nThe layout with emphasis on pumping details of the setup are shown in Fig. \\ref{fig:Vacuumsy} and similar setup were described previously \\cite{VasilisVacuum2014,Vasilis_PRAB}. There are three sections including jet generation section, interaction section and gas dump section. The nozzle skimmer assembly separate the jet generation section into three chambers as nozzle chamber, skimmer chamber I and skimmer chamber II. The supersonic gas jet is generated by injecting high pressure gas (1 - 10 bar) from a gas tank through a small nozzle with a diameter of 30 \\(\\mu\\)m into a low pressure nozzle chamber (~\\(10^{-3}\\) mbar). With a collimation by two conical skimmers with diameters of 180 \\(\\mu\\)m and 400 \\(\\mu\\)m and a pyramid-shaped skimmer with the tip size of 0.4 \\(\\times\\) 4 \\(mm^2\\), the gas jet can travel mono-directionally and be shaped into a screen-like curtain for diagnostic purposes. The differential pumping stages separated by the skimmers were designed to remove the diffused gas molecules and maintain an ultra-high vacuum environment in the interaction chamber. Dumping sections, including diagnostic chamber and dump chamber, are used for dumping the jet and characterizing the jet. The pressure in each chamber is listed in Table \\ref{table:pressure} with the gas jet off or on at a stagnation pressure of 5 bar. This clearly shows that the introduction of the gas jet has a negligible effect on the ultra-high vacuum condition of the interaction chamber. \n\n\\begin{figure}[ht!]\n \\centering\n \\includegraphics[width=13cm]{VacuumSystem.png}\n \\caption{The layout of the gas curtain beam profile monitor setup, including the vacuum pumping system.}\n \\label{fig:Vacuumsy}\n\\end{figure}\n\n\\begin{table}[ht!]\n\\centering\n\\caption{ Pressure (mbar) in each vacuum chamber, with gas jet off and on at a stagnation pressure of 5 bar.}\n\\begin{tabular}{cccccc}\n\\hline \n & Nozzle & Skimmer I & Skimmer II & Interaction & Dump \\\\ \\hline \\\\\nOff & 5.0$\\times10^{-8}$ & 5.0$\\times10^{-8}$ & 4.0$\\times10^{-8}$ & \\textless{}1.0$\\times10^{-9}$ & \\textless{}1.0$\\times10^{-9}$ \\\\\n & & & & & \\\\\nOn & 3.9$\\times10^{-3}$ & 8.4$\\times10^{-6}$ & 7.3$\\times10^{-7}$ & 4.0$\\times10^{-9}$ & 1.4$\\times10^{-9}$ \\\\ \n\\hline \n\\end{tabular}\n\\label{table:pressure}\n\\end{table}\n\nIn the interaction section, the fluorescence induced by electron beam interacting with the gas molecular was observed by the imaging system including a dedicated band-pass filter and intensifier camera. The schematic drawing of the setup can be seen in Fig. \\ref{fig:setup}. One fluorescence image of a 5 keV and 0.73 mA electron beam obtained by using a nitrogen gas jet with a stagnation pressure of 5 bar in the fluorescent wavelength of 391.4 nm is shown in Fig. \\ref{fig:beamimage}. The root mean square (RMS) beam size is measured as 0.91 mm and 0.67 mm for x and y respectively.\n\n\\begin{figure}[ht!]\n \\centering\n \\includegraphics[width=12cm]{Setup.png}\n \\caption{The schematic drawing of the gas curtain beam profile monitor system. }\n \\label{fig:setup}\n\\end{figure}\n\n\\begin{figure}[ht!]\n \\centering\n \\includegraphics[width=8cm]{beamimage.png}\n \\caption{Image of the nitrogen gas-jet based BIF monitor with an electron beam of 5keV and 0.6 mA. The integration time is 400 s and the inlet pressure is 5 bar.}\n \\label{fig:beamimage}\n\\end{figure}\n\n\\subsection{Scanning gauge system}\nAs indicated in Fig. \\ref{fig:setup}, a movable gauge assembly could be installed either after the interaction chamber or between the second and third skimmer. As seen in Fig. \\ref{fig:setup} and \\ref{fig:gauge}, the assembly includes a small chamber consist of a DN40CF straight connector with the bottom side closed by a fixed flange and the top side attached to a Bayard-Alpert (BA) type ionization gauge. The connector has a length of 125.2 mm and an inner diameter of 34.9 mm. Two BA gauges were used, one is series 274 from Granville Phillips Ltd. for dumping section and the other one is AIG18G from Arun Microelectronics Ltd. for the skimmer chamber. This gauge assembly is then connected to a VACGEN Miniax XYZ manipulator powered by three stepper-motors to allow a 3-dimensional movement with a minimum resolution of 5 \\(\\mu\\)m. On the tube of the connector, 40 mm above the bottom, there is a pinhole with diameter of 0.5 mm. The gauge for the dump section is powered by a IGC26 ion gauge controller with a emission current of 0.1 mA by Vacgen Ltd., while the one for the skimmer chamber is powered by a NGC2 ion gauge controller with a emission current of 0.5 mA by Arun microelectronics Ltd. Their signals are amplified by a pico-ampere meter (CP8 by Cooknell Electronics Ltd.) and then recorded by a oscilloscope (DS1074 Z-plus by Rigol Ltd.).\n\n\\begin{figure}[ht!]\n \\centering\n \\includegraphics[width=12cm]{Diagnostic-Chamber2.png}\n \\caption{The schematic drawing of the movable gauge.}\n \\label{fig:gauge}\n\\end{figure}\n\n\\section{Forming the gas jet}\n\\label{sec:gasjetform}\nAs mentioned in Sec. \\ref{sec:setup}, the supersonic gas jet is generated when a high-pressure gas expands through a 30 \\(\\mu\\)m nozzle into a low-pressure region. From the nozzle till the first skimmer, the centre-line density scales as the distance increases, which can be described ideally as Eq. (\\ref{eq:1}) with the assumption of isentropic flow, ideal gas behaviour, constant heat capacity and continuum flow \\cite{TheBook}.\n\\begin{equation}\n \\rho = \\frac{P_0}{k_BT_0}(1+\\frac{\\gamma-1}{2}M^2)^{-\\frac{1}{\\gamma-1}}\\label{eq:1}\n\\end{equation}\nwhere \\(\\gamma\\) is the heat capacity ratio, \\(\\rho\\) is the number density and \\(P_0\\) and \\(T_0\\) are pressure and temperature at nozzle throat, and \\(M\\) is the Mach number which can be calculated using Eq. (\\ref{eq:2}). \n\\begin{equation}\n M = A(\\frac{x-x_0}{d})^{\\gamma-1}-\\frac{\\frac{1}{2}(\\frac{\\gamma+1}{\\gamma-1})}{A(\\frac{x-x_0}{d})^{\\gamma-1}} \\qquad (\\frac{x}{d})>(\\frac{x}{d})_{min}\\label{eq:2}\n\\end{equation}\nHere \\(d\\) is the nozzle throat size, \\(A\\) and \\(x_0\\) are fitted parameters which are \\(\\gamma\\)-dependent as seen in Table \\ref{table:1}.\n\\begin{table}[ht!]\n\\centering\n\\caption{Parameters for centre-line Mach number calculation for axisymmetric flow.}\n\\begin{tabular}{cccc}\n\\\\\n\\hline\n\\(\\gamma\\) & \\((x_0\/d)\\) & \\(A\\) & \\((x_0\/d))_{min}\\) \\\\ \\hline\n1.67 & 0.075 & 3.26 & 2.5 \\\\\n1.40 & 0.40 & 3.65 & 6 \\\\ \\hline\n\\end{tabular}\n\\label{table:1}\n\\end{table}\n\nThe temperature and the velocity of the gas jet in the continuum flow region can be obtained from Eqs.(\\ref{eq:3}) and (\\ref{eq:4}).\n\\begin{equation}\n T = T_0(1+\\frac{\\gamma-1}{2}M^2)^{-1}\\label{eq:3}\n\\end{equation}\n\\begin{equation}\n v_{jet}=\\sqrt{\\frac{2\\gamma}{\\gamma-1}\\frac{k_BT_0}{m}}\\label{eq:4}\n\\end{equation}\nWhere \\(T_0\\) is the temperature of the nozzle, \\(k_B\\) is the Boltzmann constant and \\(m\\) is the mass of the gas molecule. After the 1st skimmer, the pressure decreases below \\(10^{-5}\\) mbar, the mean free path will be around one meter where the collisions between molecules can be ignored, and the gas jet flow can be regarded as molecular flow. As a result, a geometric expansion can be safely assumed. The final density \\(\\rho\\) will decrease from the initial value \\(\\rho_{skimmer}\\) leaving the first skimmer with the transverse velocity spread \\(\\overline{v}\/v_{jet}\\) and distance from the skimmer \\(x\\), according to Eqs. (\\ref{eq:5}) and (\\ref{eq:6}) \\cite{GRUBER_GSI_1989}. \n\\begin{equation}\n \\rho = \\rho_{skimmer}(1+\\frac{x\\overline{v}}{r_{skimmer}v_{jet}})^{-2}\\label{eq:5}\n\\end{equation}\n\\begin{equation}\n \\overline{v} = \\sqrt{\\frac{3k_B T_{skimmer}}{m}}\\label{eq:6}\n\\end{equation}\n\n\\section{Measuring principle}\n\\label{sec:Mprinciple}\nThe small movable gauge assembly is placed in front the gas jet, as it passes through the system. A fraction of the jet enters the small chamber through the pinhole, and then the gas molecules within the fraction are accumulated inside the small chamber. It results in a higher density or a higher ion gauge current reading. The new equilibrium pressure \\(P\\) inside the small chamber is reached when the net effusive flow through the hole is equal to the entering fraction of the jet. According to \\cite{TheBook}, this pressure can be expressed as \n\\begin{equation}\n P = \\frac{4QIk_BT_1}{A}\\label{eq:7}\n\\end{equation}\nwhere \\(Q\\) is a factor related to the shape of the pinhole channel with radius r and length L and defined as \n\\begin{equation}\n Q = \\frac{3L}{8r}\\label{eq:7a}\n\\end{equation}\n\\(A\\) is the area of the aperture channel and \\(\\) is the mean velocity in the cell at the movable gauge temperature \\(T_1\\) as shown in Eq. (\\ref{eq:8}). \n\\begin{equation}\n = \\sqrt{\\frac{2k_BT_1}{\\pi m}} \\label{eq:8}\n\\end{equation}\n\\(I\\) is the flux of the molecules entering through the pinhole as shown in Eq. (\\ref{eq:9}.\n\\begin{equation}\n I = v_{jet} \\rho_{jet} A \\label{eq:9}\n\\end{equation}\nwhere \\(v_{jet}\\) and \\(\\rho_{jet}\\) is the longitudinal velocity and the density of the jet. \\begin{equation}\n v_{jet} = \\sqrt{\\frac{2\\gamma}{\\gamma-1}\\frac{k_B T_0}{m}}\\label{eq:10}\n\\end{equation}\nHere \\(\\gamma\\) is heat capacity ratio and \\(T_0\\) is the temperature of nozzle, which is room temperature of 300 K. For the gauge, the increased pressure can be calculated from the measured ion collector current \\(I_c\\) using Eq. (\\ref{eq:11}).\n\\begin{equation}\n\\Delta P = \\frac{\\Delta I_c}{S_g I_e} \\label{eq:11} \n\\end{equation}\nwhere \\(S_g\\) is the sensitivity factor which is 1.0 for nitrogen and 0.3 for neon, and the \\(I_e\\) is the electron emission current of the chosen gauge. Combining Eqs. (\\ref{eq:7})-(\\ref{eq:11}), we obtain the density of gas jet as \n\\begin{equation}\n \\rho_{jet} = \\frac{\\Delta I_c}{S_g I_e}\\frac{1}{4Q k_B T_1}\\sqrt{\\frac{T_1}{T_0}\\frac{\\gamma-1}{2\\gamma \\pi m}} \\label{eq:12}\n\\end{equation}\n\nIn the analysis, there are a few assumptions. First, the gas jet is uniform and stable in the scale of the pinhole size, the out-gassing rate for the inner surface of the small chamber is not changed, and at each pinhole location, the new equilibrium inside the small chamber will be established in a scale of less than one second. These assumptions are reasonable for a continuous jet and the de-gassed ion gauge. The molecule that enters the small chamber could experience more than 1000 interactions with chamber surface in one second which is long enough for new equilibrium to achieve. \n\nFor the density scan, the manipulator moves the small chamber with the pinhole to a set of coordinates (0.25 mm per steps horizontally and vertically) across a region of interest around the gas jet. In each coordinate, the collector current of the ion gauge is recorded over four second to see if a new equilibrium is achieved. If so, the current is averaged and subtracted with the ambient current. Then the density in that coordinate can be calculated from the current difference by Eq. (\\ref{eq:12}). Finally, the density map in all coordinates forms the transverse density map of the gas jet. \n\nTwo error sources have been considered, one is the error related to the position measurement, and the other one is related to the density measurement. The gauge is mounted on the manipulator, the resolution and repeatability of the motion in each axis is 5 \\(\\mu\\)m. For the measurement, the step size is always larger than 100 microns, then we can ignore the position error. For typical B-A type gauge, the measurement error of the current \\(I_c\\) can be 20\\%. Because of the hot ion, the small chamber could be heated up and the temperature will be higher than the normal room temperature of 300 K, but in the scope of this paper, we do not have a direct measurement of that temperature. Instead, a 5\\% error was used for the analysis. Combining these two errors, one can get a density error about 20\\% using Eq. (\\ref{eq:13}).\n\\begin{equation}\n \\frac{\\sigma_{\\rho_{jet}}}{\\rho} = \\sqrt{\\frac{\\sigma^2_{\\Delta I_c}}{\\Delta I_c^2}+\\frac{\\sigma^2_{T_1}}{4T^2_1}} \\label{eq:13}\n\\end{equation}\nwhere the \\(\\sigma\\) is the absolute error.\n\n\n\\section{Results and Discussions}\n\\label{sec:Results}\nThe ideal position to measure the gas jet density distribution will be at the interaction point. Due to the space limitation, we choose to measure it before and after the interaction point. Because the gas jet is in the molecular flow region after second skimmer, the gas jet density distribution can be calculated from these measurements from linear expansion. The geometry of the whole system can be simplified as Fig. \\ref{fig:measurement_geometry}.\n\n\\begin{figure}[ht!]\n \\centering\n \\includegraphics[scale=0.55]{measurement_geometry.png}\n \\caption{Schematic of the gas jet system with two movable gauge}\n \\label{fig:measurement_geometry}\n\\end{figure}\n\nSince the nozzle, 1st and 2nd skimmers are circular in shape, the sectional distribution of the gas jet after the 2nd skimmer and before the 3rd skimmer will be round. A measurement of such jets with Nitrogen and Neon as working gases are shown in Fig. \\ref{fig:NitrogenNeon1st}. The inlet pressure was set to 5 bar for both cases and the step size for the movable gauge was 0.5 mm. The maximum densities are \\(2.2\\times10^{16}\\) \\(m^{-3}\\) for the nitrogen gas jet and 1.1 \\(\\times\\) \\(10^{17}\\) \\(m^{-3}\\) for the neon one. The differences for the density fundamentally depend on the gas molecule status, mono-atomic or diatomic, the molecular weight m, the initial pressure \\(P_0\\) and temperature \\(T_0\\). In the continuum flow region (roughly from the nozzle to the first skimmer in our case), the density and the temperature of the gas jet drops much quicker for a diatomic gas than a mono-atomic gas (see Eq. (\\ref{eq:3})). The temperature of the gas jet and the molecular weight will determine the thermal velocity (see Eq. (\\ref{eq:5}))) which is key factor for the jet expansion in the molecular flow region and reduce the jet density further. Both density profiles shows a quasi-circular shape, which comes from the conical skimmers upstream. The asymmetry could result from the alignment error among the nozzle and both the skimmers. A Gaussian fit for both the dimensions shows a jet size of (0.80 mm, 0.87 mm) for nitrogen and (0.73 mm, 0.81 mm) for neon. The slightly smaller size of the neon gas jet is due to smaller velocity spread of the neon gas jet than the nitrogen one. As it can be seen from Eq. (\\ref{eq:6}), it is a combination effect of the the temperature at the skimmer and the molecule mass as well as the collimation from the skimmers. The latter is more complicated geometrical effect where dedicated simulations are required to calculate the differences, which is beyond the scope of this paper. \n\\begin{figure}[ht!]\n \\centering\n (a)\n \\includegraphics[width=8cm]{Nitrogen_1st.png}\n \n (b)\n \\includegraphics[width=8cm]{Neon_1st.png}\n \\caption{Measurement of nitrogen (a) and neon (b) gas jet density distribution at 1st diagnostics position}\n \\label{fig:NitrogenNeon1st}\n\\end{figure}\n\n\nThe density distribution measurement at the second diagnostic point is shown in Fig. \\ref{fig:NitrogenNeon2nd} for nitrogen and neon. The quasi-rectangular shape of the gas jet is the result of a vertically placed rectangular 3rd skimmer (0.4 mm \\(\\times\\) 4 mm). Both the distributions show a sharp drop of density on top and Gaussian tail on bottom, which indicates that the 3rd skimmer interact with the gas jet in an asymmetric way. Similarly, the density for the neon gas jet is still higher than the nitrogen gas jet which is consistent with the measurements from 1st diagnostic position and the geometric expansion assumptions. Here, sizes that defined as full width at half maximum (FWHM) were measured for both cases to be (7.50 \\(\\pm\\) 0.25 mm, 1.25 \\(\\pm\\) 0.25 mm) for nitrogen and (7.63 \\(\\pm\\) 0.25 mm, 1.25 \\(\\pm\\) 0.25 mm) for Neon. The size differences are in the error range which shows the velocity spread of both the gas jet are almost the same after the collimation from the 3rd skimmer. Note that, due to the finite size of the pinhole for the movable gauge, the distribution measured here will be a convolution of the real intensity distribution and the pinhole size. Deconvolution of these measurement by assuming a uniform original distribution of these measurement gives the original size of the jet is (8.32 mm. 0.96 mm) and (7.54 mm, 0.87 mm) for nitrogen and neon. The convoluted density distribution of the uniform gas jet with the pinhole is shown in Fig. \\ref{fig:Convolution}. \n\\begin{figure}[ht!]\n \\centering\n (a)\n \\includegraphics[width=6cm]{Nitrogen_2nd.png}\n (b)\n \\includegraphics[width=6cm]{Neon_2nd.png}\n \\caption{Measurement of nitrogen (a) and neon (b) gas jet density distribution at 2nd diagnostics position}\n \\label{fig:NitrogenNeon2nd}\n\\end{figure}\n\n\\begin{figure}[ht!]\n \\centering\n \\includegraphics[scale=1.0]{Convolution.png}\n \\caption{Convoluted images of uniform gas jet distributions with the pinhole matched with the measurement. }\n \\label{fig:Convolution}\n\\end{figure}\n\n\nFor the beam profile measurement, the vertical size of jet describes the range where one can use to measure the primary beam. The thickness and the uniformity of the gas jet will determine the smearing effect of the image quality. Both the measurements show a good uniformity in the central area in 2nd diagnostics position. From 3rd skimmer to the interaction point and then the 2nd diagnostics position, the jet flow is molecular flow where no collision will occur. Thus, or the interaction point, the gas jet thickness can be estimated by a linear expansion from the 0.4 mm 3rd skimmer at 357 mm to 1.25 mm at the 834 mm 2nd diagnostic position, which gives 0.85 \\(\\pm\\) 0.14 mm. \n\n\\section{Conclusion}\n\\label{sec:summary}\nIn this paper, we described a method to measure the absolute density and the density distribution of a gas jet in the molecular flow region. This method shows a wide detection range of density and a good spatial resolution. It will allow the further study or optimization of the gas jet by changing the geometry of the skimmers to meet different diagnostics requirements such as charged particle beam intensity, integration time and ambient vacuum environment. Currently, this method is used regularly for characterizing the gas jet, which is used for monitoring the profile of a laboratory electron beam. Future monitor has been designed for the LHC proton beam where a higher gas jet density and a larger and thinner gas jet curtain with uniform density distribution are required. Meanwhile, due to the space limitation, the geometry of skimmers will be redesigned. The method described in this paper will be a key for characterizing the gas jet to meet such requirement. Recent development of a beam profile and dose monitor for medical used charged particle beam is another example where the measurement of the gas jet density and its distribution will help in the designing phase and commissioning phase. \n\n\n\n\n\n \\bibliographystyle{elsarticle-num} \n ","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\\label{introduction and Overview}\nThe JETSCAPE (Jet Energy-loss Tomography with a Statistically and Computationally Advanced Program Envelope)\ncollaboration was formed in 2016, as a joint effort of theoretical and experimental physicists, statisticians, and computer scientists,\nwith the mission of creating a complete, extensible, and modular event generator\nusing state-of-the-art computer science techniques in framework development,\nas well as a complementary tool set for sophisticated statistical analysis (not contained in current release).\nThe event generator and the task-based framework with inter-task communication based on \nthe signal-slot paradigm~\\cite{external} and graph representation~\\cite{external} of the shower structure \nare now publicly available.\nWhile the $pp$ portion has been tuned, the heavy-ion portion requires calibration of several parameters, based on Bayesian\nmethods. This process, requiring upwards of 30 million core hours, is currently being carried out. This uncalibrated (raw) version is being\nreleased to seek usage data and community feedback. \n\nThe currently included modules provide \nphysics implementations for every stage of a collision (module name in parentheses):\nTRENTO (\\texttt{TrentoInitial}) for the initial state, a parton gun (\\texttt{PGun}) as well as a PYTHIA8 interface (\\texttt{PythiaGun}) for the initial hard scattering, \nsimple brick (\\texttt{Brick}) and Gubser (\\texttt{GubserHydro}) hydrodynamics modules,\nMATTER (\\texttt{Matter}), MARTINI (\\texttt{Martini}), Linear Boltzmann Transport\n (\\texttt{LBT}), and AdS\/CFT-based (\\texttt{AdSCFT}) energy loss modules, \nas well as two PYTHIA-based hadronization modules (\\texttt{Colored\\-Hadronization, Colorless\\-Hadronization}).\nAdditionally, wrappers exist that can be used for externally available packages, i.e.\\ a pre-equilibrium free-streaming module\n(\\texttt{FreestreamMilneWrapper}), viscous hydrodynamics with MUSIC (\\texttt{MpiMusic}), \nand a freeze-out surface sampler (\\texttt{iSpectraSamplerWrapper}), with download scripts\navailable in the \\texttt{external\\char`_packages} directory.\nInitial state and hydro history can also be read from suitably formatted HDF5 files~\\cite{external},\nplease contact the collaboration for details.\nReferences and license information can be found in the \\texttt{COPYING} and AUTHORS files.\n\n\n\\section{Installation}\n\\label{sec:installation}\nThe package can be downloaded from the official repository on GitHub~\\cite{jsrepo}.\nAn existing \\texttt{PYTHIA8}~\\cite{Sjostrand:2007gs} installation is assumed.\nThe framework is designed to rely only on minimal prerequisites, but some included and\noptional physics modules require additional packages, most notably the \\texttt{Boost} libraries~\\cite{external};\nfor a full list as well as more detailed installation instructions, please refer to the README files. \nAfter downloading, please create and descend into a \\texttt{build} directory where\nyou can configure with cmake~\\cite{external}, and compile:\n\\begin{lstlisting}\n $ cmake .. && make\n\\end{lstlisting}\n\nA few options, such as HepMC, are automatically recognized during configuration, \nbut some modules have to be activated using cmake switches.\nThe following example will (after additional downloads) make available the MUSIC module as well as a free streaming and a surface sampling module:\n\\begin{lstlisting}\n $ cmake -Dmusic=on -DiSS=on -Dfreestream=on ..\n\\end{lstlisting}\n\n\\section{Validated $pp$ Reference}\n\\label{sec:pp-reference}\n\n\\begin{figure}\n \\centering\n \\includegraphics[width=0.45\\textwidth]{PP_JETSCAPE_2760TeV_Eta1_SingleHadron_KoljaQMPaper}\n \\includegraphics[width=0.45\\textwidth]{PP_JETSCAPE_Rp4_Eta2_JetCrossSection_KoljaQMPaper}\n \\caption{Charged hadron spectrum (left) and $R=0.4$ anti-$k_T$ jet spectrum (right) compared to $pp$ data at $\\sqrt{s}=2.76$~TeV.}\n \\label{fig:spectra}\n\\end{figure}\n\nThe mandate of the JETSCAPE collaboration is to release the code to the community as soon as it is ready for heavy-ion analyses.\nAs such the $pp$ portion of the code has been tuned to reproduce most of the jet data at the level of agreement displayed by PYTHIA.\nCalibration of the heavy-ion sector is currently being carried out. \nFigure~\\ref{fig:spectra} demonstrates excellent agreement with published data~\\cite{CMSboth}. \nThe following is a guide through the steps to recreate these figures.\n\nThe JETSCAPE event generator is steered in two places, a wrapper program and an XML configuration file.\nTo create the $pp$ reference, the initial hard scattering is created \nwith PYTHIA8 (with multi-parton interaction (MPI) and initial state radiation (ISR) turned on), \nfinal state radiation (FSR) is handled by MATTER~\\cite{matter} with $\\hat q$ set to 0,\nand hadronization is again done by PYTHIA in one of two available modes, i.~e. with and without preserving color information.\nThe wrapper used for $pp$ runs is found in \\texttt{examples\/PythiaBrickTest.cc}. \nThe following line initializes JETSCAPE with an XML file and 200 events:\n\\begin{lstlisting}\n auto jetscape = make_shared(\".\/jetscape_init.xml\",200);\n\\end{lstlisting}\nNote that the default file (\\texttt{jetscape\\char`_init.xml}) in the build directory is overwritten \nby subsequent calls to cmake, and thus it is highly recommended to use a different filename. \nPhysics modules are attached using a shared \\emph{auto} pointer that resolves to the required type:\n\\begin{lstlisting}\n auto pythiaGun= make_shared (); jetscape->Add(pythiaGun);\n auto hydro = make_shared (); jetscape->Add(hydro);\n\\end{lstlisting}\nEnergy loss (or vacuum radiation in the case of MATTER with $\\hat q=0$) \nand hadronization are controlled by \\emph{managers} and need a few extra lines.\nThe following example demonstrates energy loss; the code is similar for hadronization:\n\\begin{lstlisting}\n auto jlossmanager = make_shared ();\n auto jloss = make_shared ();\n auto matter = make_shared (); jloss->Add(matter);\n jlossmanager->Add(jloss); jetscape->Add(jlossmanager);\n\\end{lstlisting}\nFinally, to create output files in the custom JETSCAPE format, use:\n\\begin{lstlisting}\n auto writergz= make_shared (\"test_out.dat.gz\");\n\\end{lstlisting}\nWithout the ``gz'', the created output is immediately human readable, \nbut for large-scale productions we strongly recommend this space-saving \ngzipped alternative. A provided reader can accomodate either choice without the need \nto manually unzip the output.\nAlternatively, a writer for HepMC3~\\cite{external} is provided for users more familiar with this format.\n\nThe configuration file controls settings for all modules in XML format. \nFor the purpose of running in $pp$ mode, only the following tags are relevant:\n\\begin{description}\n\\item[\\xml{Hard} $\\rightarrow$ \\xml{PythiaGun}:]\n \\xml{eCM} controls the center of mass energy in GeV, \n \\xml{pTHatMin} and \\xml{pTHatMax} correspond to PYTHIA's \\texttt{PhaseSpace:pTHat} settings. \n In order to scan the desired parameter space in discrete bins of \\texttt{pTHat}, one should use\n multiple configuration files. Appropriate weights are saved in the output file for later recombination.\n\\item[\\xml{Eloss} $\\rightarrow$ \\xml{Matter}:] Parameters are tuned, just set \\xml{qhat0} to 0.0 and \\xml{in\\char`_vac} to 1.\n\\item[\\xml{JetHadronization}:] PYTHIA maintains color connections throughout the entire event;\n this information is only partially retained within JETSCAPE.\n For colored hadronization, the color of the initiating parton and each parton in the ensuing shower is retained.\n A beam remnant with a specific color at large rapidity is added to each shower to make it a color singlet;\n the \\xml{eCMforHadronization} tag\n controls the energy of artificially added beam remnant proxies.\n There is some freedom for this parameter, we recommend $\\sqrt{s}\/2$.\n\\item[\\xml{Random}:] Optionally, a random \\texttt{seed} can be specified here to identically recreate prior execution. \n As long as all modules use the provided \\texttt{GetMt19937Generator()} functionality, results will be reproducible throughout the framework.\n For batch execution, this parameter should be unique for every job, alternatively it can be set to 0 which will choose \n a seed based on the current date and time.\n\\end{description}\n\nA technical side note: Internally, the \\texttt{PythiaGun} module initiates individual showers for all particles with status code 62 to\naccount for MPI. If you wish to change this behavior, to for example only use the two hardest partons (status -23) when turning off MPI,\nit will be necessary to modify, or better yet rename and modify, the physics module itself at \\texttt{initialstate\/Pythiagun.cc}.\n\nAfter configuration and compilation, execute the wrapper with the following command:\n\\begin{lstlisting}\n $ .\/bin\/PythiaGun\n\\end{lstlisting}\nFor practical purposes, it may be advisable to modify this wrapper to \naccept command line arguments and be more amenable to running the necessary jobs \nfor all desired \\texttt{pTHat} bins within a given cluster farm.\n\nTwo examples are provided to process the created output.\nThe simplest way is shown in \\linebreak[5]\n \\texttt{examples\/FinalStateHadrons.cc} which extracts final state hadrons\nfrom the full shower and writes them into a text file for further analysis with a chosen histogramming \npackage.\nA more advanced example can be found in \\texttt{examples\/readerTest.cc} where FastJet is directly run on the extracted particles. \nIn this example, we only use the included lightweight \\texttt{fjcore} library, but the full FastJet package and other software such as ROOT\ncan also be used. Note that \\texttt{cmake} automatically recognizes an existing ROOT installation, and the top level file \\texttt{CMakeLists.txt}\ncontains commented-out examples that demonstrate how to link against these libraries.\nFor weighting according to \\texttt{pTHat}, the generated cross section (and its uncertainty) is saved for every event.\nThis value updates throughout the generation process, so it is recommended to only use the last one which can be obtained \nfrom the output file for example via:\n\\begin{lstlisting}\n $ zgrep sigma test_out.dat.gz|tail -n 2\n # sigmaGen 8.35147e-06\n # sigmaErr 3.2343e-07\n\\end{lstlisting}\n\n\n\\section{Next Steps and Outlook}\n\\label{sec:outlook}\n\nUsers will naturally want to explore energy loss within a realistic expanding medium next,\nand all provided physics modules in the current release are fully functional to do just that.\nExamples provided in \\texttt{examples\/MUSICTest.cc} and \\texttt{examples\/freestream-milneTest.cc}\nshow how to interface with the (3+1)-dimensional viscous hydrodynamics from MUSIC~\\cite{music}\n(currently only in 2+1 dimensions), the former with an additional freeze-out surface sampler to\ncreate complete events comprised of bulk and shower hadrons, the latter with a free-streaming\nmodule between initial state and hydro evolution. \n\nAlso of note is the ability to combine multiple energy loss modules, for example by \nadding \n\\begin{lstlisting}\n auto martini = make_shared (); jloss->Add(martini);\n\\end{lstlisting}\nto any example wrapper. \nThe use of multiple modules requires the user to specify well defined boundaries,\nso that a given parton at one space-time point is not acted upon by multiple energy loss modules.\nThe prescribed method for MATTER+MARTINI or MATTER+LBT is to use \nparton virtuality and a switching point at $1.0~\\text{GeV}\/c^2$.\nThis feature of multi-stage energy loss~\\cite{Majumder:2010qh,Cao:2017zih}, where \ndistinct models are responsible only in their region of applicability,\nand the ability to add more modules and modify their boundaries remains one of the unique features of the JETSCAPE framework.\nthe implementation of unambiguous boundaries is left to the discretion of the user.\nA framework-level implementation that is at the same time user-friendly and flexible enough\nto handle arbitrarily-shaped multi-dimensional parameter spaces to allow for example \nswitching on virtuality, energy and surrounding medium temperature\nis a very challenging task which will require additional development.\n\nUpcoming releases in the near future will focus in two directions:\nOn the one hand, incorporation of additional physics\nsuch as hadronic rescattering with SMASH~\\cite{Weil:2016fxr} and medium recoil are a high priority.\nOn the other hand, the existing modules are in the process of being tuned both in regards\nof the interplay between initial stage and hydrodynamic evolution \nand parameters of energy loss models as well as the switching between them.\n\nJETSCAPE is community software: As such we are are appreciative of, and crucially dependent on, any and all feedback from the community,\nfrom installation and documentation issues to bug reports and suggestions. \nBugs and feature requests are best reported directly in the GitHub issue tracker~\\cite{jsrepo},\ngeneral questions and suggestions should be sent to the email provided in the contact information.\n\\\\\n\\\\\nThese proceedings are supported by the US NSF under the grant \\# 1550300.\n\n\n\n\n\n\n\\bibliographystyle{elsarticle-num}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\\subsection{Background}\n2-Calabi--Yau (2CY) categories are central objects of study in geometric representation theory, nonabelian Hodge theory, supersymmetric gauge theory and algebraic geometry, where they arise as the categories of coherent sheaves on K3 and Abelian surfaces. For $\\mathcal{A}$ a 2CY category belonging to any of these subjects, a central object of study is the moduli stack of objects $\\mathfrak{M}_{\\mathcal{A}}$. In this paper we study $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q})$, the Borel--Moore homology of this stack. \n\\smallbreak\nIn geometric representation theory this object arises as the Hall algebra of raising operators for Nakajima quiver varieties \\cite{nakajima1994instantons,nakajima1998quiver,grojnowski1996instantons}, and as such is the target of numerous morphisms from (half) quantum groups. In nonabelian Hodge theory, for \\textit{smooth} moduli spaces, this Borel--Moore homology can be identified with the cohomology of the various moduli spaces appearing on different sides of the nonabelian Hodge correspondence. In this paper we are more interested in the singular, stacky case. We prove general results linking $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q})$ with the intersection cohomology $\\ICA(\\mathcal{M}_{\\mathcal{A}})$ of coarse moduli spaces of objects in $\\mathcal{A}$, under the assumption that $\\mathcal{A}$ is \\textit{totally negative}, i.e. under the assumption that the Euler form for $\\mathcal{A}$ is strictly negative for pairs of nonzero objects. \n\\smallbreak\nWe do this by first developing the cohomological Hall algebra (CoHA) structure on $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q})$ for \\textit{general} categories of homological dimension at most 2, generalising \\cite{schiffmann2013cherednik,yang2018cohomological,sala2020cohomological,davison2020bps,kapranov2019cohomological}. We then show that in the totally negative 2CY case $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q})$ is a kind of (half) Yangian associated to the free Lie algebra generated by $\\ICA(\\mathcal{M}_{\\mathcal{A}})$; the precise statement is given by Corollary \\ref{Y_corollary} below. A key role is played by our refinement of the CoHA structure on $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q})$, for $\\mathcal{A}$ any suitably geometric Abelian category of projective homological dimension at most 2, to the structure of an algebra object in the category of constructible complexes of sheaves (or even mixed Hodge modules) on the good moduli space of objects in $\\mathcal{A}$ (see \\S \\ref{subsubsection:introrelativeCoHA} and \\S \\ref{section:relativeCoHA}).\n\nThese results have strong consequences in each of the subjects mentioned above, some of which we derive in this paper. For instance, noting that the various categories associated to a smooth complex projective curve of genus $g\\geq 2$ within nonabelian Hodge theory are totally negative, we are able to extend the classical nonabelian Hodge isomorphism for the cohomology of smooth moduli spaces to an isomorphism of Borel--Moore homology for singular stacks (see Theorem \\ref{NAHT_main_thm}). In addition, we prove the Bozec--Schiffmann positivity conjecture \\cite{bozec2019counting} for totally negative quivers, stating that the polynomials counting cuspidal functions in the constructible Hall algebra of $Q$ have positive coefficients --- a strengthening of the positivity theorem regarding the Kac polynomials of such quivers, \\cite{hausel2013positivity} (see \\S \\ref{cuspidals_sec} for an exact statement, and the link with Kac polynomials). This follows from applying our main theorem to the totally negative 2CY category $\\operatorname{Rep}(\\Pi_Q)$ of representations of the preprojective algebra of $Q$.\n\nThe categories $\\operatorname{Rep}(\\Pi_Q)$ for totally negative quivers $Q$ serve as local prototypes for \\textit{all} totally negative 2CY categories possessing good moduli spaces \\cite{davison2021purity}. Examples include deformed preprojective algebras, multiplicative preprojective algebras, local systems on Riemann surfaces, semistable Higgs bundles of fixed slope, and semistable coherent sheaves of fixed slope on K3 and Abelian surfaces. In this paper we deal with all of these examples, by reducing to the local case, and using our sheaf-theoretic refinement of the CoHA structure on $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q})$.\n\n\\subsubsection{From Bogomol'nyi--Prasad--Sommerfield algebras to Borcherds--Kac--Moody algebras}\nIn 1996 \\cite{harvey1996algebras} Harvey and Moore proposed a construction of an algebra of Bogomol'nyi--Prasad--Sommerfield (BPS) states associated to certain $N=2$ $4$-dimensional supersymmetric gauge theories. This proposal in part motivated later work of Kontsevich and Soibelman \\cite{kontsevich2010cohomological}, in which they rigorously defined a cohomological Hall algebra associated to any smooth quiver with potential, or noncommutative Landau--Ginzburg model in Physics language.\n\nAs part of the proposal in \\cite{harvey1996algebras} a strong connection between algebras of BPS states and Borcherds--Kac--Moody (BKM) algebras was posited. This connection is perhaps most easy to state (in the Kontsevich--Soibelman programme) in the case of a Dynkin ADE quiver $Q$: in this case one may consider a certain tripled quiver $\\tilde{Q}$ with cubic potential $\\tilde{W}$, such that the Kontsevich--Soibelman CoHA is the universal enveloping algebra of one half of the current algebra for the associated simple Lie algebra. In general the picture is more complicated, but at least one can say that for a \\textit{general} quiver $Q$, the CoHA $\\mathscr{A}_{\\tilde{Q},\\tilde{W}}$ built via the Kontsevich--Soibelman construction contains the universal enveloping algebra of the Kac--Moody Lie algebra associated to $Q$ \\cite{davison2020bps}. We note that via dimensional reduction \\cite{davison2017critical}, the Kontsevich--Soibelman CoHA for the pair $(\\tilde{Q},\\tilde{W})$ is isomorphic to the CoHA of $\\Pi_Q$-modules considered in this paper.\n\nIn a \\textit{generalised} Kac--Moody algebra (a.k.a. BKM algebra) one has imaginary roots, as well as the usual real simple roots of a Kac--Moody Lie algebra. These in turn come in two flavours: isotropic and hyperbolic. The salient feature of these roots, for the purposes of this introduction, are that the Lie sub-algebra generated by the positive hyperbolic roots is \\textit{free}. In \\cite{harvey1998algebras}, a proposal is given for the construction of generalised Kac--Moody Lie algebras in more general geometrically interesting cases than those captured by studying $\\Pi_Q$-modules, namely in the study of coherent sheaves on K3 surfaces $S$. Note that by Kinjo's generalisation \\cite{kinjo2022dimensional} of the dimensional reduction isomorphism, the Borel--Moore homology of $\\mathfrak{Coh}_{p(t)}^{\\sst}(S)$ (where $p(t)$ specifies the normalised Hilbert polynomial of semistable sheaves under consideration) should itself be isomorphic to an (as yet undefined) Kontsevich--Soibelman style cohomological Hall algebra of BPS states for the threefold $S\\times\\mathbf{A}^1$. One conclusion of this paper is that we can indeed rigorously construct generalised Kac--Moody Lie algebras out of CoHAs for very general $2$-Calabi--Yau categories, under a ``total negativity'' assumption that guarantees that all of the simple roots are hyperbolic, so that the expected BKM algebra is free.\n\n\\subsubsection{Mixed Hodge structures and refined invariants} The cohomological Hall algebra introduced in \\cite{kontsevich2010cohomological}, as well as providing a mathematically rigorous approach to defining the BPS algebra, is a partial categorification of the BPS\/DT invariants introduced and studied in \\cite{joyce2011theory,kontsevich2008stability}. Donaldson--Thomas (DT) invariants were introduced in \\cite{thomas2000holomorphic} via virtual fundamental classes, in order to provide enumerative invariants of moduli spaces of coherent sheaves on Calabi--Yau threefolds. It was subsequently realised \\cite{behrend2009donaldson,joyce2011theory,szendroi2008thomas,joyce2007holomorphic,kontsevich2008stability,behrend2013motivic} that DT invariants could be assigned to much more general moduli stacks of objects in 3-Calabi--Yau categories, and that $q$-refinements of these invariants could be defined via the study of mixed Hodge structures on vanishing cycle cohomology, or the Hodge realisation of the naive Grothendieck group of varieties, in the framework of \\cite{kontsevich2008stability}. In particular, in order to \\textit{define} refined BPS invariants, or Hall algebras partially categorifying them, it is important to work in the category of mixed Hodge structures (or mixed Hodge modules for the relative CoHA), as opposed to underlying vector spaces or constructible complexes. In particular, the $q$-refinement is defined by replacing Euler characteristics throughout the theory with virtual Poincar\\'e polynomials, recording the weights of mixed Hodge structures. For that reason we provide a lift of the CoHA theory to these richer categories. An added incentive for working at this level of refinement is that it means that we are able to use our results to study the weight filtration on the Borel--Moore homology of the Betti moduli stack appearing in nonabelian Hodge theory (see \\S \\ref{NAHT_sec}).\n\n\\subsection{The main results}\nWe next state our main results in a little more detail.\n\\subsubsection{Relative construction of the CoHA for 2-dimensional categories}\n\n\\label{subsubsection:introrelativeCoHA}\n\nLet $\\mathcal{A}$ be a $\\mathbf{C}$-linear Abelian category of finite length satisfying the assumptions of \\S\\ref{subsubsection:assumptionCoHAproduct}. In particular, its stack of objects $\\mathfrak{M}_{\\mathcal{A}}$ is an Artin stack and $\\mathcal{C}^{\\bullet}$, the RHom complex shifted by one on the product $\\mathfrak{M}_{\\mathcal{A}}\\times\\mathfrak{M}_{\\mathcal{A}}$, is perfect with tor-amplitude $[-1,1]$. We let $\\chi_{\\mathcal{A}}\\colon \\mathfrak{M}_{\\mathcal{A}}\\times\\mathfrak{M}_{\\mathcal{A}}\\rightarrow \\mathbf{Z}$ be the locally constant function given by the Euler form: its value on a pair $x,y$ of $\\mathbf{C}$-points of $\\mathfrak{M}_{\\mathcal{A}}$ represented by objects $M$ and $N$ of $\\mathcal{A}$ is $\\chi_{\\mathcal{A}}(x,y)=(M,N)_{\\mathcal{A}}=-\\vrank(\\mathcal{C}^{\\bullet}_{(x,y)})$, the opposite of the virtual rank of the restriction of $\\mathcal{C}^{\\bullet}$, where $(-,-)_{\\mathcal{A}}$ denotes the Euler form of the category $\\mathcal{A}$ (see \\S\\ref{subsection:grading}).\nIt need not be symmetric (for example it will not be if $\\mathcal{A}=\\mathrm{Coh}(S)$ for $S$ a non-symplectic surface). We let $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$ be the set of connected components of $\\mathfrak{M}_{\\mathcal{A}}$. It has a monoid structure induced by taking the direct sum of objects in $\\mathcal{A}$, and we may view $\\chi_{\\mathcal{A}}$ as a bilinear form $\\chi_{\\mathcal{A}}\\colon\\pi_0(\\mathfrak{M}_{\\mathcal{A}})\\times\\pi_0(\\mathfrak{M}_{\\mathcal{A}})\\rightarrow\\mathbf{Z}$. \n\nLet $(\\mathcal{M},\\oplus)$ be a monoid object in the category of schemes and let $\\varpi\\colon\\mathfrak{M}_{\\mathcal{A}}\\rightarrow\\mathcal{M}$ be a morphism of monoids splitting short exact sequences (see \\S\\ref{subsubsection:assumptionCoHAproduct}). In particular, $\\varpi(x)=\\varpi(y)\\oplus \\varpi(z)$ if $x$ is a closed $\\mathbf{C}$-point of $\\mathfrak{M}_{\\mathcal{A}}$ represented by an object $R$ of $\\mathcal{A}$ which is extension of objects $M,N$ of $\\mathcal{A}$ represented by the $\\mathbf{C}$-points $y,z$ of $\\mathfrak{M}_{\\mathcal{A}}$ respectively.\n\nWe define\n\\[\n \\mathscr{A}_{\\varpi}\\coloneqq\\varpi_*\\mathbb{D}(\\mathbf{Q}_{\\mathfrak{M}_{\\mathcal{A}}}[-\\chi_{\\mathcal{A}}]).\n\\]\nThis is a constructible complex on $\\mathcal{M}$, i.e. $\\mathscr{A}_{\\varpi}\\in \\operatorname{Ob}(\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M}))$ where $\\mathbf{Q}_{\\Mst_{\\mathcal{A}}}$ is the constant sheaf and $\\mathbb{D}$ is the Verdier duality functor. We denote $\\mathbf{Q}_{\\mathfrak{M}_{\\mathcal{A}}}^{\\mathrm{vir}}=\\mathbf{Q}_{\\mathfrak{M}_{\\mathcal{A}}}[-\\chi_{\\mathcal{A}}]$. We let $\\boxdot$ denote the symmetric monoidal structure on $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M})$ induced by the monoid structure $\\oplus\\colon\\mathcal{M}\\times\\mathcal{M}\\rightarrow \\mathcal{M}$ (see \\S\\ref{subsection:monoidalstructure}).\n\nWe make some mild assumptions on the stacks that appear in this paper, namely we assume that each connected component of $\\mathfrak{M}_{\\mathcal{A}}$ can be written as a global quotient stack. Under these assumptions, we recall in \\S \\ref{section:perversesheaves} how to upgrade $\\mathscr{A}_{\\varpi}$ to a mixed Hodge module (MHM) complex \n\\[\n\\underline{\\mathscr{A}}_{\\varpi}\\coloneqq \\varpi_*\\mathbb{D}(\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\mathcal{A}}})\n\\]\ni.e. a complex of mixed Hodge modules that recovers $\\mathscr{A}_{\\varpi}$ as its underlying constructible complex.\n\\begin{theorem}\n\\label{intro_cohaprod}\n For all $a,b\\in\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$, there exist morphisms\n \\[\n m_{\\varpi,a,b}\\colon \\mathscr{A}_{\\varpi,a}\\boxdot\\mathscr{A}_{\\varpi,b}\\rightarrow\\mathscr{A}_{\\varpi,a+b}[\\chi_{\\mathcal{A}}(b,a)-\\chi_{\\mathcal{A}}(a,b)]\n \\]\nin $\\mathcal{D}_c^+(\\mathcal{M})$ such that, combined together, these morphisms give a shifted multiplication on $\\mathscr{A}_{\\varpi}$, that is, the structure of a shifted associative algebra object in $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M})$. If $\\chi_{\\mathcal{A}}$ is even, then the above morphisms can be upgraded to morphisms\n\\[\n m_{\\varpi,a,b}\\colon\\underline{\\mathscr{A}}_{\\varpi,a}\\boxdot\\underline{\\mathscr{A}}_{\\varpi,b}\\rightarrow\\underline{\\mathscr{A}}_{\\varpi,a+b}\\otimes\\mathbf{L}^{\\chi_{\\mathcal{A}}(a,b)\/2-\\chi_{\\mathcal{A}}(b,a)\/2}\n\\]\nwhere $\\mathbf{L}\\coloneqq \\HO_c^*(\\mathbb{A}^1,\\mathbf{Q})$, endowing $\\underline{\\mathscr{A}}_{\\varpi}$ with a twisted multiplication in $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))$.\n\\end{theorem}\nBy taking derived global sections $\\HO^*(\\Msp,\\mathscr{A}_{\\varpi})$, when $\\mathcal{A}$ is the category of coherent sheaves on a surface, we recover the cohomological Hall algebra constructed by Kapranov and Vasserot in \\cite{kapranov2019cohomological}. By considering $\\HO^*(\\mathcal{M},\\underline{\\mathscr{A}}_{\\varpi})$ we lift their algebra to an algebra object in the category of mixed Hodge structures.\n\nWhen $\\mathfrak{M}_{\\mathcal{A}}$ has a good moduli space $\\mathtt{JH}\\colon\\mathfrak{M}_{\\mathcal{A}}\\rightarrow\\mathcal{M}_{\\mathcal{A}}$, the algebra with shifted multiplication in the derived category of constructible complexes on $\\mathcal{M}_{\\mathcal{A}}$ thus obtained, $\\underline{\\mathscr{A}}_{\\mathtt{JH}}$, is called \\emph{the relative cohomological Hall algebra of $\\mathcal{A}$}.\nWhen $\\mathcal{M}=\\mathrm{pt}$, we recover the \\emph{absolute cohomological Hall algebra} of $\\mathcal{A}$. When $\\mathcal{M}=\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$, and $\\varpi$ is the class map $\\mathrm{cl}\\colon\\mathfrak{M}_{\\mathcal{A}}\\rightarrow \\pi_0(\\mathfrak{M}_{\\mathcal{A}})$ sending points in $\\mathfrak{M}_{\\mathcal{A}}$ to their corresponding connected component, we recover the $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$-grading on the absolute Hall algebra, via the identification between $\\mathbf{Q}$-sheaves on the discrete space $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$ and $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$-graded $\\mathbf{Q}$-vector spaces.\n\nWhen $\\mathcal{A}$ is a $2$-Calabi--Yau Abelian category the Euler form is even and symmetric. Examples include the category of representations of the derived preprojective algebra of a quiver, of local systems over a Riemann surface of genus $\\geq 1$ or of semistable Higgs bundles over a smooth projective curve of genus $\\geq 1$. In the 2CY case the multiplication is a morphism of complexes of mixed Hodge modules\n\\[\n m_{\\varpi}\\colon\\underline{\\mathscr{A}}_{\\varpi}\\boxdot\\underline{\\mathscr{A}}_{\\varpi}\\rightarrow \\underline{\\mathscr{A}}_{\\varpi},\n\\]\nand the multiplication respects the cohomological grading. \n\n\n\n\nWhen the category $\\mathcal{A}$ considered is that of representations of the derived preprojective algebra of a quiver, and $\\varpi=\\mathtt{JH}$ is the affinization morphism, $\\underline{\\mathscr{A}}_{\\varpi}$ coincides with the relative CoHA considered in \\cite{davison2020bps}. By taking derived global sections, we get back the cohomological Hall algebra of the preprojective algebra constructed in \\cite{schiffmann2020cohomological} (see \\S\\ref{subsection:comparison_preproj}). For semistable Higgs bundles of fixed slope, we recover the semistable cohomological Hall algebra of a smooth projective curve constructed in \\cite{minets2020cohomological,sala2020cohomological}. In each of these cases, we obtain a lift of the cohomological Hall algebra to an algebra object in the category of complexes of mixed Hodge modules on $\\mathcal{M}_{\\mathcal{A}}$.\n\n\n\\subsubsection{Relative BPS algebra}\nLet $\\mathcal{A}$ be a $2$-Calabi--Yau Abelian category and let $\\varpi=\\mathtt{JH}\\colon\\mathfrak{M}_{\\mathcal{A}}\\rightarrow \\mathcal{M}_{\\mathcal{A}}$ be a good moduli space for the stack $\\mathfrak{M}_{\\mathcal{A}}$.\nThe constructible complex $\\mathscr{A}_{\\mathtt{JH}}$ is concentrated in nonnegative perverse degrees. Therefore, we obtain a multiplication on the perverse sheaf $\\pH{0}(\\mathscr{A}_{\\mathtt{JH}}) =\\ptau{\\leq 0}\\mathscr{A}_{\\mathtt{JH}}$. We define $\\mathcal{BPS}_{\\mathrm{Alg}}:=\\pH{0}(\\mathscr{A}_{\\mathtt{JH}})$. The multiplication\n\\[\n \\pH{0}(m_{\\mathtt{JH}})={\\ptau{\\leq 0}m_{\\mathtt{JH}}} \\colon\\mathcal{BPS}_{\\mathrm{Alg}}\\boxdot\\mathcal{BPS}_{\\mathrm{Alg}}\\rightarrow\\mathcal{BPS}_{\\mathrm{Alg}},\n\\]\nfits in to a commutative square\n\\[\n \\begin{tikzcd}\n\t\\mathcal{BPS}_{\\mathrm{Alg}}\\boxdot\\mathcal{BPS}_{\\mathrm{Alg}} & \\mathcal{BPS}_{\\mathrm{Alg}} \\\\\n\t{\\mathscr{A}_{\\mathtt{JH}}\\boxdot\\mathscr{A}_{\\mathtt{JH}}} & {\\mathscr{A}_{\\mathtt{JH}}}\n\t\\arrow[\"\\pH{0}(m_{\\mathtt{JH}})\", from=1-1, to=1-2]\n\t\\arrow[\"{m_{\\mathtt{JH}}}\", from=2-1, to=2-2]\n\t\\arrow[from=1-1, to=2-1]\n \\arrow[from=1-2, to=2-2]\n\\end{tikzcd}\n\\]\nwhere the vertical arrows are obtained from the adjunction morphism $\\ptau{\\leq 0}\\rightarrow \\operatorname{id}$.\n\n\nThe algebra object $\\mathcal{BPS}_{\\mathrm{Alg}}$ in the category of perverse sheaves on $\\mathcal{M}_{\\mathcal{A}}$ is called \\emph{the BPS algebra sheaf}. We define the \\textit{BPS algebra MHM} $\\tau^{\\leq 0}\\underline{\\mathscr{A}}_{\\mathtt{JH}}$ similarly, and it is an algebra object in the category of mixed Hodge modules on $\\mathcal{M}_{\\mathcal{A}}$ via the same construction. Applying the derived global sections functor we obtain the \\emph{BPS algebra} $\\aBPS_{\\mathrm{Alg}}\\coloneqq\\HO^*(\\mathcal{M}_{\\mathcal{A}},\\BPS_{\\mathrm{Alg}})$. By the decomposition theorem for 2CY categories \\cite{davison2021purity} the natural morphism of algebras to the absolute CoHA: $\\aBPS_{\\mathrm{Alg}}\\rightarrow \\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q}^{\\mathrm{vir}})$ is injective, and so the BPS algebra is a subalgebra of the \\emph{absolute} cohomological Hall algebra recalled in \\S \\ref{subsection:relativecohaproductKV}. \n\n\n\n\\subsubsection{Freeness of the BPS-algebra for totally negative quivers}\n\\label{introduction:freenesstotallynegativequiver}\nLet $Q=(Q_0,Q_1)$ be a quiver with set of vertices $Q_0$ and set of arrows $Q_1$. We let $\\Pi_Q$ be the preprojective algebra of $Q$ (defined at \\eqref{preproj_def}). We denote by $\\langle-,-\\rangle_{Q}$ the Euler form of $Q$ and by $(-,-)_{\\Pi_Q}$ the Euler form of $\\operatorname{Rep}(\\Pi_Q)$ (see \\S \\ref{subsection:notationsquivreps}).\nThe Euler form factors through the morphism $\\K(\\operatorname{Rep}(\\Pi_Q))\\rightarrow \\mathbf{Z}^{Q_0}$ taking a module to its dimension vector, and the induced bilinear form $(-,-)_{\\Pi_Q}$ on $\\mathbf{Z}^{Q_0}$ is the symmetrisation of the Euler form $\\langle-,-\\rangle_{Q}$. We say that $Q$ is totally negative if for any pair of nonzero $\\mathbf{d},\\mathbf{e}\\in\\mathbf{N}^{Q_0}$, $(\\mathbf{d},\\mathbf{e})_{\\Pi_Q}<0$ . This is equivalent to the property that $Q$ has at least two loops at each vertex and one arrow between any two distinct vertices. This class of quivers appeared for example in \\cite{bozec2019counting}.\n\nWe let $\\mathtt{JH}_{\\Pi_Q}\\colon\\mathfrak{M}_{\\Pi_Q}\\rightarrow\\mathcal{M}_{\\Pi_Q}$ be the semisimplification map from the stack of representations of $\\Pi_Q$ to the coarse moduli space. As in \\S \\ref{subsubsection:introrelativeCoHA}, we set\n\\[\n \\mathscr{A}_{\\mathtt{JH}}\\coloneqq \\mathtt{JH}_*\\mathbb{D}(\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q}}[-\\chi_{\\Pi_Q}])\n\\]\nwhere we denote by $\\chi_{\\Pi_Q}$ the locally constant function taking a point representing a $\\Pi_Q$-module $M$ to $(M,M)_{\\Pi_Q}$. The Abelian category $\\mathcal{A}=\\operatorname{Rep}(\\Pi_Q)$ and its stack of objects satisfy the Assumptions \\ref{p_assumption}-\\ref{BPS_cat_assumption} in \\S\\ref{section:modulistackobjects2CY}, so that we may define the relative cohomological Hall algebra and the BPS algebra for this category, where the ambient dg-category is the dg-category of perfect dg-modules over the derived preprojective algebra $\\mathscr{G}_2(\\mathbf{C} Q)$ (see \\S\\ref{section:thepreprojective}).\n\nThe constructible complex $\\mathscr{A}_{\\mathtt{JH}}$ carries the multiplication $m\\colon\\mathscr{A}_{\\mathtt{JH}}\\boxdot\\mathscr{A}_{\\mathtt{JH}}\\rightarrow\\mathscr{A}_{\\mathtt{JH}}$ as in \\S\\ref{subsubsection:introrelativeCoHA}. This multiplication respects the perverse filtration induced by $\\mathtt{JH}$. As in \\S\\ref{subsubsection:introrelativeCoHA} we consider $\\pH{0}(\\mathscr{A}_{\\mathtt{JH}})$, the zeroth perverse cohomology of $\\mathscr{A}_{\\mathtt{JH}}$. As above, this is an algebra object in the (non-derived) category of perverse sheaves on $\\mathcal{M}_{\\Pi_Q}$, admitting a morphism to $\\mathscr{A}_{\\mathtt{JH}}$, in the category of algebra objects of $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M}_{\\mathcal{A}})$.\n\nWe let $\\Sigma_{\\Pi_Q}\\subset\\mathbf{N}^{Q_0}$ be the set of dimension vectors $\\mathbf{d}$ such that $\\Pi_Q$ admits a simple representation of dimension vector $\\mathbf{d}$. This set admits a combinatorial description given in \\cite{crawley2001geometry}, recalled in \\S \\ref{CrBo_geom_sec}.\n\nBy \\cite[Theorem 6.6]{davison2021purity}, for any $\\mathbf{d}\\in\\Sigma_{\\Pi_Q}$, we have a natural monomorphism from the intersection complex $\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\rightarrow \\pH{0}(\\mathscr{A}_{\\mathtt{JH}})$. We let\n\\[\n\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\Pi_Q}}\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\right)\\in \\operatorname{Perv}(\\mathcal{M}_{\\Pi_Q})\n\\]\nbe the free algebra object generated by the indicated direct sum. By the universal property of free algebras, we obtain the morphism\n\\[\n \\Phi_{\\Pi_Q}\\colon \\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\Pi_Q}}\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\right)\\rightarrow \\pH{0}(\\mathscr{A}_{\\mathtt{JH}}).\n\\]\nThe following is the special case $\\mathcal{A}=\\operatorname{Rep}(\\Pi_Q)$ of our first main structural theorem on the relative CoHA (Theorem \\ref{theorem:freenesstotneg2CY}).\n\\begin{theorem}\n\\label{theorem:freenesspreprojective}\n Let $Q$ be a totally negative quiver. Then, the morphism $\\Phi_{\\Pi_Q}$ is an isomorphism of algebras in the tensor category of perverse sheaves on $\\mathcal{M}_{\\Pi_Q}$, with tensor structure defined by $\\boxdot$. The lift of $ \\Phi_{\\Pi_Q}$ to an algebra morphism in the category of $\\boxdot$-algebras in MHMs on $\\mathcal{M}_{\\Pi_Q}$ is also an isomorphism.\n\\end{theorem}\n\nWe let $\\operatorname{Free}_{\\mathrm{Alg}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\Pi_Q}}\\ICA(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\right)$ be the free algebra generated by the intersection cohomology of the moduli space of semisimple representations of $\\Pi_Q$.\nWe define $\\mathfrak{P}_{\\mathtt{JH}}^0\\!\\HO^*\\!\\!\\mathscr{A}\\coloneqq\\HO^*(\\mathcal{M}_{\\Pi_Q},\\ptau{\\leq 0}\\mathscr{A}_{\\mathtt{JH}})$: the zeroth piece of the perverse filtration on $\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\Pi_Q},\\mathbf{Q}^{\\mathrm{vir}})$ induced by the morphism $\\mathtt{JH}$. By taking the cohomology of the morphism $\\Phi_{\\Pi_Q}$, we obtain the following corollary.\n\\begin{corollary}\n\\label{corollary:BPSalgebraFree}\n Let $Q$ be a totally negative quiver. The morphism \n \\[\n \\HO^*(\\Phi_{\\Pi_Q})\\colon \\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\Pi_Q}}\\ICA(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\right)\\rightarrow \\mathfrak{P}_{\\mathtt{JH}}^0\\!\\HO^*\\!\\!\\mathscr{A}\n \\]\n is an isomorphism of algebras. The lift of this morphism to a morphism of algebra objects in the category of mixed Hodge structures is also an isomorphism.\n\\end{corollary}\n\n\n\n\n\n\\subsubsection{Freeness of the BPS-algebra for totally negative 2CY categories}\n\\label{subsubsection:freenesstotallynegative}\nTheorem \\ref{theorem:freenesspreprojective} can be generalised to more general $2$-Calabi--Yau categories satisfying some assumptions. We let $\\mathtt{JH}\\colon\\mathfrak{M}_{\\mathcal{A}}\\rightarrow\\mathcal{M}_{\\mathcal{A}}$ be a good moduli space of objects in a $2$-Calabi--Yau Abelian category $\\mathcal{A}$. We refer to \\S \\ref{section:modulistackobjects2CY} for the precise hypotheses needed.\nWe let $\\mathscr{A}_{\\mathtt{JH}}=\\mathtt{JH}_*\\mathbb{D}(\\mathbf{Q}_{\\mathfrak{M}_{\\mathcal{A}}}[-\\chi])$. This object is viewed as a constructible complex on $\\mathcal{M}_{\\mathcal{A}}$. The object $\\mathscr{A}_{\\mathtt{JH}}$ has a degree zero multiplication map since for such categories, the Euler form is symmetric (\\S \\ref{subsubsection:introrelativeCoHA}). It is graded by $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$, the monoid of connected components of $\\mathfrak{M}_{\\mathcal{A}}$ (or $\\mathcal{M}_{\\mathcal{A}}$). For $a\\in\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$, $\\mathtt{JH}_a\\colon\\mathfrak{M}_{\\mathcal{A},a}\\rightarrow\\mathcal{M}_{\\mathcal{A},a}$ denotes the restriction of $\\mathtt{JH}$.\n\nThe constructible complex $\\mathscr{A}_{\\mathtt{JH}}=\\mathtt{JH}_*\\mathbb{D}(\\mathbf{Q}_{\\mathfrak{M}_{\\mathcal{A}}}[-\\chi])$ is an algebra in the monoidal category of constructible complexes on $\\mathcal{M}_\\mathcal{A}$ and $\\pH{0}(\\mathscr{A}_{\\mathtt{JH}})$ is an algebra for the multiplication $\\pH{0}(m)$; see \\S \\ref{subsubsection:ThecohaproductKV} for details of the construction. We let $\\Sigma_{\\mathcal{A}}\\subset \\pi_0(\\mathfrak{M}_{\\mathcal{A}})$ be the set of elements $a$ of $\\pi_0(\\Mst_\\mathcal{A})$ for which $\\mathtt{JH}_a$ is a $\\mathbf{G}_m$-gerbe over a non-empty subset of $\\mathcal{M}_{\\mathcal{A},a}$. A class $a\\in\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$ is in $\\Sigma_{\\mathcal{A}}$ if and only if $\\mathcal{A}$ has a simple object of class $a$. By \\cite{davison2021purity}, for $a\\in\\Sigma_{\\mathcal{A}}$, we have a canonical monomorphism of perverse sheaves\n\\[\n \\mathcal{IC}(\\mathcal{M}_{\\mathcal{A},a})\\hookrightarrow \\pH{0}(\\mathscr{A}_{\\mathtt{JH}})= \\BPS_{\\mathrm{Alg}}.\n\\]\nThis monomorphism together with the multiplication $\\pH{0}(m)$ induces a morphism of algebra objects in the tensor category of perverse sheaves on $\\mathcal{M}$:\n\\begin{equation}\n \\Phi_{\\mathcal{A}}\\colon \\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{a\\in\\Sigma_{\\mathcal{A}}}\\mathcal{IC}(\\mathcal{M}_{\\mathcal{A},a})\\right)\\rightarrow \\BPS_{\\mathrm{Alg}}.\n\\end{equation}\n\n\n\\begin{theorem}\n\\label{theorem:freenesstotneg2CY}\n If $\\mathcal{A}$ is a totally negative 2CY category, then the morphism $\\Phi_{\\mathcal{A}}$ is an isomorphism of algebras (in the tensor category of perverse sheaves on $\\mathcal{M}_{\\mathcal{A}}$). The natural upgrade of this statement to the category $\\mathrm{MHM}(\\mathcal{M}_{\\mathcal{A}})$ also holds.\n\\end{theorem}\nTaking derived global sections, the analogue of Corollary \\ref{corollary:BPSalgebraFree} also holds.\n\n\n\\subsubsection{PBW isomorphism for the CoHA of a totally negative 2CY category}\n\\label{subsubsection:cohatotnegative}\nLet $\\mathcal{A}$ be a totally negative $2$-Calabi--Yau Abelian category admitting a stack of objects together with a good moduli space $\\mathtt{JH}\\colon\\mathfrak{M}_{\\mathcal{A}}\\rightarrow \\mathcal{M}_{\\mathcal{A}}$ satisfying the Assumptions \\ref{p_assumption}-\\ref{BPS_cat_assumption} detailed in \\S\\ref{section:modulistackobjects2CY}. \nIt will prove necessary to twist the multiplication on $\\underline{\\mathscr{A}}_{\\varpi}$ by a sign, in the 2CY case. Firstly, by the 2CY property and our assumptions, the Euler form on the category $\\mathcal{A}$ descends to a symmetric bilinear form $\\chi$ on $\\mathbf{Z}^{\\pi_0(\\mathfrak{M}_{\\mathcal{A}})}$, for which $\\chi(\\alpha,\\alpha)$ is even for all $\\alpha$. As such we can find a bilinear form $\\psi$ on $\\mathbf{Z}^{\\pi_0(\\mathfrak{M}_{\\mathcal{A}})}$ such that $\\chi$ is the symmetrisation of $\\psi$, modulo two, i.e. \n\\begin{align}\n\\label{first_psi}\n\\chi(a,b)=\\psi(a,b)+\\psi(b,a)&\\quad\\quad\\textrm{mod }2.\n\\end{align}\nThen for $a,b\\in \\pi_0(\\mathfrak{M}_{\\mathcal{A}})$ we define $m^{\\psi}_{\\mathtt{JH},a,b}=(-1)^{\\psi(a,b)}m_{\\mathtt{JH},a,b}$. We denote by $\\underline{\\mathscr{A}}_{\\mathtt{JH}}^{\\psi}$ the mixed Hodge module complex $\\mathtt{JH}_*\\mathbb{D}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\mathcal{A}}}$ with the associative product twisted by these signs.\n\n\n\nWe define\n\\begin{align*}\n\\underline{\\BPS}_{\\mathrm{Lie}}\\coloneqq &\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}\\left(\\bigoplus_{a\\in\\Sigma_{\\mathcal{A}}}\\ul{\\mathcal{IC}}(\\mathcal{M}_{\\mathcal{A},a})\\right)\\\\\n\\aBPS_{\\mathrm{Lie}} \\coloneqq&\\operatorname{Free}_{\\mathrm{Lie}}\\left(\\bigoplus_{a\\in\\Sigma_{\\mathcal{A}}}\\ICA(\\mathcal{M}_{\\mathcal{A},a})\\right).\n\\end{align*}\nUsing the algebra structure on $\\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}$ (which induces a Lie algebra structure by taking the commutator Lie bracket), the morphism $\\ul{\\mathcal{IC}}(\\mathcal{M}_{\\mathcal{A},a})\\rightarrow \\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}$ gives a morphism $\\underline{\\BPS}_{\\mathrm{Lie}}\\rightarrow \\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}$. Since the relative cohomological Hall algebra possesses a $\\HO^*(\\B\\mathbf{C}^*,\\mathbf{Q})$-action, we obtain a morphism\n\\[\n\\underline{\\BPS}_{\\mathrm{Lie}}\\otimes \\HO^*(\\B\\mathbf{C}^*,\\mathbf{Q})\\rightarrow \\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}.\n\\]\nThe algebra structure on $\\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}$ provides us now with a canonical morphism of complexes of mixed Hodge modules on $\\mathcal{M}_{\\mathcal{A}}$:\n\\[\n \\tilde{\\Phi}^{\\psi}\\colon \\Sym_{\\boxdot}\\left(\\underline{\\BPS}_{\\mathrm{Lie}}\\otimes \\HO^*(\\B\\mathbf{C}^*,\\mathbf{Q})\\right)\\rightarrow \\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}.\n\\]\n\n\\begin{theorem}\n\\label{theorem:pbwtotnegative2CY}\n The morphism $\\tilde{\\Phi}^{\\psi}$ is an isomorphism of mixed Hodge module complexes on $\\mathcal{M}$ (but not of algebra objects in general).\n\\end{theorem}\nTaking derived global sections, we deduce the following corollary\n\\begin{corollary}\n\\label{Y_corollary}\nThe PBW morphism\n\\[\n\\Sym\\left(\\aBPS_{\\mathrm{Lie}}\\otimes \\HO^*\\!(\\B\\mathbf{C}^*,\\mathbf{Q})\\right)\\rightarrow \\HO^*(\\mathcal{M}_{\\mathcal{A}},\\mathscr{A}^{\\psi}_{\\mathtt{JH}})=\\HO^{\\BoMo}_*(\\mathfrak{M}_{\\mathcal{A}},\\mathbf{Q}^{\\mathrm{vir}})\\eqqcolon\\HO^*\\!\\!\\mathscr{A}^{\\psi}\n\\]\nprovided by the absolute CoHA multiplication on $\\HO^*\\!\\!\\mathscr{A}^{\\psi}$ is an isomorphism of $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$-graded, cohomologically graded vector spaces. The same statement holds at the level of cohomologically graded mixed Hodge structures.\n\\end{corollary}\nAt the level of underlying mixed Hodge structures, there is no difference between $\\HO^*\\!\\!\\mathscr{A}$ and $\\HO^*\\!\\!\\mathscr{A}^{\\psi}$. In particular, we deduce that the \\textit{cohomological integrality conjecture} (which merely states that there is \\textit{some} isomorphism $\\HO^*\\!\\!\\mathscr{A}\\cong \\Sym(V\\otimes\\HO(\\B\\mathbf{C}^*,\\mathbf{Q}))$ with $V$ a $\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$-graded mixed Hodge structure, with finite-dimensional graded pieces) is true for $\\HO^*\\!\\!\\mathscr{A}$.\n\\subsubsection{Nonabelian Hodge theory for stacks}\nOne of our main applications is an extension of nonabelian Hodge isomorphisms to the Borel--Moore homology of singular stacks, which we now explain. Let $(r,d)\\in\\mathbf{Z}^2$ with $r>0$. Let $C$ be a smooth projective curve of genus $g$. Let $\\mathfrak{M}_{r,d}^{\\Dol}(C)$ be the Dolbeault moduli stack, that is the stack of rank $r$ and degree $d$ semistable Higgs bundles on $C$. We let $\\mathcal{M}_{r,d}^{\\Dol}(C)$ be the Dolbeault coarse moduli space. We have a morphism $p_{\\Dol}\\colon \\mathfrak{M}_{r,d}^{\\Dol}(C)\\rightarrow\\mathcal{M}_{r,d}^{\\Dol}(C)$ taking a semistable Higgs bundle to the associated polystable Higgs bundle.\n\nOn the Betti side, let $p\\in C$ be a fixed point. Let $\\zeta_r$ be a fixed primitive $r$-th root of unity. Consider $\\mathfrak{M}_{g,r,d}^{\\Betti}$ the moduli stack of local systems on $C\\setminus \\{p\\}$ whose monodromy around $p$ is given by multiplication by $\\zeta_r^d$ (the Betti moduli stack). Let $\\mathcal{M}_{g,r,d}^{\\Betti}$ be the Betti coarse moduli space. We have the semisimplification map $p_{\\Betti}\\colon\\mathfrak{M}_{g,r,d}^{\\Betti}\\rightarrow\\mathcal{M}_{g,r,d}^{\\Betti}$.\n\nClassical nonabelian Hodge theory gives a homeomorphism (actually a real-analytic isomorphism)\n\\[\n\\Psi_{r,d}\\colon \\mathcal{M}_{r,d}^{\\Dol}(C)\\rightarrow\\mathcal{M}_{g,r,d}^{\\Betti}.\n\\]\n\\begin{theorem}\n\\label{NAHT_main_thm}\nWe have a natural isomorphism\n\\[\n (\\Psi_{r,d})_*(p_{\\Dol})_*\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{r,d}^{\\Dol}(C)}^{\\mathrm{vir}}\\cong (p_{\\Betti})_*\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{g,r,d}^{\\Betti}}^{\\mathrm{vir}}\n\\]\nin $\\mathcal{D}^+_c(\\mathcal{M}_{r,d}^{\\Betti})$, and therefore, taking derived global sections and shifting, a natural isomorphism\n\\[\n \\HO^{\\BoMo}_*(\\mathfrak{M}_{r,d}^{\\Dol}(C),\\mathbf{Q})\\cong \\HO^{\\BoMo}_*(\\mathfrak{M}_{g,r,d}^{\\Betti},\\mathbf{Q}).\n\\]\n\\end{theorem}\nNote that, unlike the theorems in previous sections, there is no hope of upgrading this statement to an isomorphism of mixed Hodge module complexes, since $\\Psi_{r,d}$ is (famously) not a morphism of complex algebraic varieties. In particular, the natural mixed Hodge structure on the intersection cohomology of the domain of $\\Psi_{r,d}$ is pure, while the mixed Hodge structure on the intersection cohomology of the target is not. Furthermore, the mixed Hodge structure on $\\HO^{\\BoMo}_\\ast (\\Mst_{r,d}^{\\Dol}(C),\\mathbf{Q})$ is pure by \\cite[Theorem 7.22]{davison2021purity}, while the mixed Hodge structure on $\\HO^{\\BoMo}_{\\ast} (\\Mst_{g,r,d}^{\\Betti},\\mathbf{Q})$ is not.\n\nIn the case in which $r$ and $d$ are coprime Theorem \\ref{NAHT_main_thm} is a consequence of the existence of the homeomorphism $\\Psi_{r,d}$, and the fact that the respective moduli stacks are $\\mathbf{C}^*$-gerbes over their respective moduli schemes, and we have isomorphisms\n\\[\n\\HO^{\\BoMo}_*(\\mathfrak{M}_{r,d}^{\\bullet},\\mathbf{Q})\\cong \\HO^{\\BoMo}_*(\\mathcal{M}_{r,d}^{\\bullet},\\mathbf{Q})\\otimes\\HO^*(\\B \\mathbf{C}^*,\\mathbf{Q})\n\\]\nfor $\\bullet\\in \\{\\Betti,\\Dol\\}$, abbreviating $\\mathfrak{M}_{r,d}^{\\Dol}=\\mathfrak{M}_{r,d}^{\\Dol}(C)$ and $\\mathfrak{M}_{r,d}^{\\Betti}=\\mathfrak{M}_{g,r,d}^{\\Betti}$. The non-coprime case is totally different: although classical nonabelian Hodge theory still gives a homeomorphism $\\Psi_{r,d}$, the respective morphisms from the stacks to the moduli schemes are much messier. At the level of the stacks themselves, it seems likely that there is \\textit{no} homeomorphism to simply apply the Borel--Moore homology functor to, see \\cite[page 38]{simpson1994moduli}.\n\n\n\n\\subsection{Acknowledgements}\nAll three authors were supported by the European Research Council starter grant \"Categorified Donaldson--Thomas theory\" No. 759967. BD was in addition supported by a Royal Society University Research Fellowship. We would like to thank Camilla Felisetti, Michael Groechenig, Shivang Jindal, Tasuki Kinjo, Davesh Maulik, Andrei Okounkov and Yan Soibelman for useful conversations. \n\n\\subsection{Conventions and notations}\n\\begin{itemize}\n\\item\nWe write $\\HO_{\\mathbf{C}^{\\ast}} = \\HO^*_{\\mathbf{C}^{\\ast}}(\\mathrm{pt},\\mathbf{Q}) = \\HO^*\\!(\\B\\mathbf{C}^{\\ast},\\mathbf{Q})$. \n\\item\nIf an Abelian or triangulated category $k$-linear category $\\mathcal{A}$ is fixed, for objects $M,N$ of $\\mathcal{A}$ we denote by $(M,N)_{\\mathcal{A}}\\coloneqq\\sum_{i\\in\\mathbf{Z}}(-1)^i \\dim_k(\\operatorname{Ext}^i(M,N))$ the Euler form.\n\\item\nWe define $\\mathbf{N}=\\mathbf{Z}_{\\geq 0}$.\n\\item\nIf $\\mathcal{F}$ is a complex of sheaves or mixed Hodge modules on a variety or stack $X$, we will often abbreviate the derived global sections functor, writing $\\HO^*\\!\\mathcal{F}\\coloneqq \\HO^*(X,\\mathcal{F})$. Similarly, we write $\\HO^i\\!\\mathcal{F}\\coloneqq \\HO^i(X,\\mathcal{F})$.\n\\item\nIf $A=kQ\/\\langle R\\rangle$ is the free path algebra of a quiver $Q$ modulo relations $R$, and $i$ is a vertex of $Q$, we denote by $S_i$ the $A$-module with dimension vector $1_i$, for which all of the arrows act via multiplication by zero. If $\\mathbf{d}=(d_1,\\ldots,d_{\\lvert Q_0\\lvert})\\in \\mathbf{N}^{Q_0}$ we define $S_{\\mathbf{d}}\\coloneqq \\bigoplus_{i\\in Q_0} S_i^{\\oplus d_i}$.\n\\item If $\\heartsuit$ is an object that depends on a category $\\mathcal{A}$, then we make explicit its dependence by a subscript $\\heartsuit_{\\mathcal{A}}$. When $\\mathcal{A} = \\operatorname{Rep}(\\Pi_Q)$ is the category of representations of the preprojective algebra, then we write $\\heartsuit_{\\Pi_Q}$ instead of $\\heartsuit_{\\operatorname{Rep}(\\Pi_Q)}$.\nWe write $\\mathscr{A}_{\\mathcal{A}} = \\mathscr{A}_{\\mathtt{JH}} = \\mathscr{A}_{\\mathtt{JH}_{\\mathcal{A}}}$.\n\\item All functors are derived.\n\\item We write dga for differential graded algebra, and cdga for commutative differential graded algebra.\n\\item All stacks will be classical stacks, unless explicitly stated otherwise. Where a stack appears in bold script (e.g. $\\bs{\\mathfrak{X}}$) it is a possibly derived stack, where it appears in normal script (e.g. $\\mathfrak{X}=t_0(\\bs{\\mathfrak{X}})$) it is a classical stack. \n\\end{itemize}\n\n\\section{The preprojective algebra of a quiver}\n\\label{section:thepreprojective}\nThe preprojective algebra of a quiver and its category of representations play a central role in this paper. In this section we recall and introduce the constructions associated to this category which are used throughout the paper.\n\n\n\n\\subsection{The preprojective algebra}\n\\label{subsection:preprojectivealgebra}\n\nLet $Q=(Q_0,Q_1,s,t)$ be a quiver, i.e. a set $Q_0$ of vertices, and a set $Q_1$ of arrows, along with a pair of morphisms $s,t\\colon Q_1\\rightarrow Q_0$ taking arrows to their sources and targets respectively. Let $\\overline{Q}=(Q_0,\\overline{Q}_1,\\overline{s},\\overline{t})$ be the double of $Q$. It has the same set of vertices as $Q$ but $\\overline{Q}_1=Q_1\\sqcup Q_1^*$, where $Q_1^*$ is such that $Q^*=(Q_0,Q_1^*)$ is the opposite quiver of $Q$. If $\\alpha\\in Q_1$, the corresponding opposite arrow is $\\alpha^*\\in Q_1^*$. For a field $k$ we denote by $k Q$ the path algebra of $Q$. As a basis this has the paths in $Q$ (including paths of length zero at each $i\\in Q_0$, denoted $e_i$), with multiplication given by concatenation of paths. We let $\\Pi_Q$ be the preprojective algebra of $Q$:\n\\begin{equation}\n\\label{preproj_def}\n \\Pi_Q\\coloneqq\\mathbf{C}\\overline{Q}\/\\langle\\rho\\rangle\n\\end{equation}\nwhere $\\rho=\\sum_{\\alpha\\in Q_1}[\\alpha,\\alpha^*]$ is the preprojective relation.\n\nFor $\\mathbf{d}\\in\\mathbf{N}^{Q_0}$, we let $X_{Q,\\mathbf{d}}\\coloneqq\\bigoplus_{i\\xrightarrow{\\alpha}j\\in Q_1}\\operatorname{Hom}(\\mathbf{C}^{d_i},\\mathbf{C}^{d_j})$ be the representation space of $\\mathbf{C} Q$. It is acted on by the product of linear groups $\\mathrm{GL}_{\\mathbf{d}}\\coloneqq \\prod_{i\\in Q_0}\\mathrm{GL}_{d_i}$ by conjugation at vertices. The action of $\\mathrm{GL}_{\\mathbf{d}}$ on $\\Tan^*\\!X_{Q,\\mathbf{d}}\\cong X_{\\overline{Q},\\mathbf{d}}\\coloneqq \\bigoplus_{i\\xrightarrow{\\alpha}j\\in \\overline{Q}_1}\\operatorname{Hom}(\\mathbf{C}^{d_i},\\mathbf{C}^{d_j})$ is Hamiltonian and the quadratic moment map is\n\n\\begin{equation*}\n\\begin{split}\n\\mu_{\\vec{d}} \\colon \\Tan^*\\!X_{\\mathbf{d}} &\\longrightarrow \\mathfrak{gl}_{\\mathbf{d}} \\\\\n(x,x^*) &\\longmapsto \\sum_{\\alpha\\in Q_1}[x_{\\alpha},x_{\\alpha^*}].\n\\end{split}\n\\end{equation*}\n\nThe stack of $\\mathbf{d}$-dimensional representations of $\\Pi_Q$ is $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}\\simeq \\mu_{\\mathbf{d}}^{-1}(0)\/\\mathrm{GL}_{\\mathbf{d}}$. We let $\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}\\coloneqq \\mu_{\\mathbf{d}}^{-1}(0)\/\\!\\!\/\\mathrm{GL}_{\\mathbf{d}}$. Its closed points parameterise semisimple $\\mathbf{d}$-dimensional representations of $\\Pi_Q$. We let $\\mathtt{JH}_{\\Pi_Q,\\mathbf{d}}\\colon\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}\\rightarrow\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}$ be the semisimplification map. It is a good moduli space for the stack $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}$ in the sense of \\cite{alper2013good}. Let \n\\[\n\\mathtt{JH}_{\\Pi_Q}=\\bigsqcup_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}\\mathtt{JH}_{\\Pi_Q,\\mathbf{d}}\\colon\\mathfrak{M}_{\\Pi_Q}=\\bigsqcup_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}\\rightarrow\\mathcal{M}_{\\Pi_Q}=\\bigsqcup_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}\n\\]\nbe the semisimplification map from the stack of all finite dimensional representations of $\\Pi_Q$ to its coarse moduli space.\n\n\\subsection{The derived preprojective algebra}\n\nThe derived preprojective algebra is a differential graded algebra that is a dg-version of the classical preprojective algebra described in \\S \\ref{subsection:preprojectivealgebra}.\n\nLet $Q=(Q_0,Q_1)$ be a quiver, $\\overline{Q}$ its double (as in \\S \\ref{subsection:preprojectivealgebra}) and $\\tilde{Q}=(Q_0,\\tilde{Q}_1)$ the tripled quiver. It is obtained from $\\overline{Q}$ by adding a loop $u_i$ at each vertex $i\\in Q_0$. We define a nonpositive grading on $\\mathbf{C}\\tilde{Q}$ by assigning the degree $0$ to arrows of $\\overline{Q}$ and degree $-1$ to the additional loops $u_i$ at vertices. We set\n\\[\n d(u_i)=e_i\\left(\\sum_{\\alpha\\in Q_1}[\\alpha,\\alpha^*]\\right)e_i=e_i\\rho e_i.\n\\]\nVia the Leibniz rule, $d$ admits a unique extension to a differential on $\\mathbf{C}\\tilde{Q}$. The \\emph{derived preprojective algebra} is the differential graded algebra\n\\[\n \\mathscr{G}_2(Q)\\coloneqq(\\mathbf{C}\\tilde{Q},d). \n\\]\nIt is by definition concentrated in nonpositive degrees and the isomorphism $\\HO^0(\\mathscr{G}_2(Q))\\cong \\Pi_Q$ induces a morphism\n\\begin{equation}\n\\label{equation:derivedpptopp}\n \\mathscr{G}_2(Q)\\rightarrow \\Pi_Q\n\\end{equation}\nof differential graded algebras, where $\\Pi_Q$ is given the zero differential.\n\nThe derived preprojective algebra is a $2$-Calabi--Yau dg-algebra, for the reason that it can be realised as the $2$-Calabi--Yau completion of the path algebra $\\mathbf{C} Q$ of $Q$, as in \\cite{keller2011deformed}. \n\nFor $A$ a differential graded algebra, we denote by $\\operatorname{Perf}_{\\dg}(A)$ the dg-category of perfect left $A$-modules, i.e. the compact objects in the dg-category $\\mathcal{D}_{\\dg}(\\mathrm{Mod}^{A})$. It follows from the 2-Calabi--Yau property of $\\mathscr{G}_2(Q)$ that $\\operatorname{Perf}_{\\dg}(\\mathscr{G}_2(Q))$ carries a \\emph{left 2CY} structure in the sense of \\cite{brav2019relative}, to which we refer the reader for more details.\n\n\\begin{remark}\n When $Q$ is non-Dynkin, the map \\eqref{equation:derivedpptopp} is a quasi-isomorphism and there is no need to appeal to the derived preprojective algebra. The ambient dg-category (appearing in \\S\\ref{subsubsection:categorical}) can be taken to be $\\operatorname{Perf}_{\\dg}(\\Pi_Q)$.\n\\end{remark}\n\n\\subsection{Derived stack of objects}\nSome elements of this paper are most efficiently written in the language of derived algebraic geometry, although we have attempted to keep this as an optional extra for the initiated reader. \n\nWe let $\\boldsymbol{\\mathfrak{M}}_{\\mathscr{G}_2(Q)}$ be the derived stack of objects of the dg-category $\\operatorname{Perf}_{\\dg}(\\mathscr{G}_2(Q))$. We let $\\boldsymbol{\\mathfrak{M}}_{\\Pi_Q}\\subset \\boldsymbol{\\mathfrak{M}}_{\\mathscr{G}_2(Q)}$ be the open substack of complexes with cohomology concentrated in cohomological degree $0$. It is $1$-Artin and its classical truncation $t_0(\\boldsymbol{\\mathfrak{M}}_{\\Pi_Q})$ is isomorphic to $\\mathfrak{M}_{\\Pi_Q}$.\n\n\n\n\n\\subsection{The direct sum map}\n\\begin{proposition}\n\\label{proposition:directsumproperpreprojective}\nThe direct sum map\n\\[\n \\oplus\\colon\\mathcal{M}_{\\Pi_Q}\\times\\mathcal{M}_{\\Pi_Q}\\rightarrow\\mathcal{M}_{\\Pi_Q}\n \\]\n is finite.\n\\end{proposition}\n\\begin{proof}\nWe have a closed immersion $\\mathcal{M}_{\\Pi_Q}\\rightarrow \\mathcal{M}_{\\overline{Q}}$ and a Cartesian square\n\\[\n \\begin{tikzcd}\n\t{\\mathcal{M}_{\\Pi_Q}\\times\\mathcal{M}_{\\Pi_Q}} & {\\mathcal{M}_{\\Pi_Q}} \\\\\n\t{\\mathcal{M}_{\\overline{Q}}\\times\\mathcal{M}_{\\overline{Q}}} & {\\mathcal{M}_{\\overline{Q}}}\n\t\\arrow[\"\\oplus\", from=1-1, to=1-2]\n\t\\arrow[\"\\oplus\", from=2-1, to=2-2]\n\t\\arrow[from=1-2, to=2-2]\n\t\\arrow[from=1-1, to=2-1]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nwhere the direct sum map $\\oplus\\colon\\mathcal{M}_{\\overline{Q}}\\times\\mathcal{M}_{\\overline{Q}}\\rightarrow\\mathcal{M}_{\\overline{Q}}$ is the direct sum morphism for semisimple $\\mathbf{C}\\overline{Q}$-modules, which is proper by \\cite[Lemma 2.1]{meinhardt2019donaldson}. The properness of $ \\oplus\\colon\\mathcal{M}_{\\Pi_Q}\\times\\mathcal{M}_{\\Pi_Q}\\rightarrow\\mathcal{M}_{\\Pi_Q}$ follows by base-change.\n\\end{proof}\n\n\\subsection{The RHom-complex}\n\n\\subsubsection{Projective resolution of the preprojective algebra}\n\\label{subsubsection:projectiveresolutionPP}\nWe let\n\\[\n P_0=\\bigoplus_{i\\in Q_0}\\Pi_Qe_i\\otimes_{\\mathbf{C}}e_i\\Pi_Q\n\\]\nand\n\\[\n P_1=\\bigoplus_{i\\xrightarrow{\\alpha}j\\in\\overline{Q}_1}\\Pi_Qe_j\\otimes_{\\mathbf{C}}e_i\\Pi_Q.\n\\]\nBy \\cite[Proposition 2.4]{crawley2022deformed}, we have an exact sequence of $\\Pi_Q$-bimodules\n\\begin{equation}\n\\label{equation:projresolutionPiQ}\n P_0\\xrightarrow{f}P_1\\xrightarrow{g} P_0\\xrightarrow{h} \\Pi_Q\\rightarrow 0\n \\end{equation}\n where $f,g$ and $h$ are as in \\cite{crawley2022deformed}. This exact sequence is not exact on the left in general but it is when $Q$ is a non-Dynkin quiver (\\cite[Theorem 2.7]{crawley2022deformed}). If $M$ is a finite-dimensional representation of $\\Pi_Q$, it induces an exact sequence of projective $\\Pi_Q$-modules\n \\begin{equation}\n \\label{equation:projresM}\n P_0\\otimes_{\\Pi_Q}M\\xrightarrow{f} P_1\\otimes_{\\Pi_Q}M\\xrightarrow{g} P_0\\otimes_{\\Pi_Q}M\\rightarrow M\\rightarrow 0.\n\\end{equation}\nIf $N$ is a finite-dimensional representation of $\\Pi_Q$, by applying the functor $\\operatorname{Hom}(-,N)$ to \\eqref{equation:projresM}, we get a short exact sequence \n\\begin{equation}\n\\label{equation:sesHomcomplexe}\n\\operatorname{Hom}_{\\Pi_Q}(P_0\\otimes_{\\Pi_Q}M,N)\\xrightarrow{g} \\operatorname{Hom}_{\\Pi_Q}(P_1\\otimes_{\\Pi_Q}M,N)\\xrightarrow{f} \\operatorname{Hom}_{\\Pi_Q}(P_0\\otimes_{\\Pi_Q}M,N)\n\\end{equation}\nWe note as in the proof of \\cite[Proposition 2.6]{crawley2022deformed} that $\\operatorname{Hom}_{\\Pi_Q}(P_0\\otimes_{\\Pi_Q}M,N)\\cong\\bigoplus_{i\\in Q_0}\\operatorname{Hom}_{\\mathbf{C}}(e_iM,e_iN)$ and $\\operatorname{Hom}_{\\Pi_Q}(P_1\\otimes_{\\Pi_Q}M,N)\\cong\\bigoplus_{i\\xrightarrow{\\alpha}j\\in\\overline{Q}_1}\\operatorname{Hom}_{\\mathbf{C}}(e_iM,e_jN)$. \nIn particular, these $\\Pi_Q$-bimodules only depend on the minimal subquiver of $Q$ supporting the dimension vectors of the representations $M$ and $N$. By their definitions, the maps $g$ and $f$ in \\eqref{equation:sesHomcomplexe} also only depend on the minimal subquiver $Q$ supporting the dimension vectors of the representations $M$ and $N$. Therefore, by enlarging the quiver $Q$ so that it is a non-Dynkin quiver, we can assume that \\eqref{equation:projresolutionPiQ} is exact on the left, so that \\eqref{equation:projresM} is also exact on the left and gives a projective resolution of $M$ and the zeroth, first and second cohomology spaces of \\eqref{equation:sesHomcomplexe} respectively give $\\operatorname{Hom}_{\\Pi_Q}(M,N)$, $\\operatorname{Ext}_{\\Pi_Q}^1(M,N)$ and $\\operatorname{Ext}_{\\Pi_Q}^2(M,N)$.\n\n\\subsubsection{The RHom complex for preprojective algebras}\n\\label{subsubsection:rhompreprojectivealgebra}\nBy performing the construction of \\S \\ref{subsubsection:projectiveresolutionPP} over $\\mathfrak{M}_{\\Pi_Q}\\times\\mathfrak{M}_{\\Pi_Q}$, we get a presentation of the RHom complex as a strictly $[-1,1]$-perfect complex. I.e. we give an explicit presentation of the RHom complex on $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ for $\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}\\in\\mathbf{N}^{Q_0}$ by a three term complex of vector bundles.\n\nLet $V_{\\mathbf{d}^{(j)}}=\\mu_{\\mathbf{d}^{(j)}}^{-1}(0)\\times \\mathbf{C}^{\\mathbf{d}^{(j)}}$ ($j=1,2$) be the $\\mathrm{GL}_{\\mathbf{d}^{(j)}}$-equivariant $Q_0$-graded vector bundles with fiber $\\mathbf{C}^{\\mathbf{d}^{(j)}}$ on $\\mu_{\\mathbf{d}^{(j)}}^{-1}(0)$. We let $\\operatorname{Hom}(V_{\\mathbf{d}^{(2)}},V_{\\mathbf{d}^{(1)}})=\\bigoplus_{i\\in Q_0}\\operatorname{Hom}((V_{\\mathbf{d}^{(2)}})_i,(V_{\\mathbf{d}^{(1)}})_i)$ be the $\\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$-equivariant vector bundle on $\\mu^{-1}_{\\mathbf{d}^{(1)}}(0)\\times\\mu^{-1}_{\\mathbf{d}^{(2)}}(0)$ of $Q_0$-graded morphisms from $V_{\\mathbf{d}^{(2)}}$ to $V_{\\mathbf{d}^{(1)}}$. We define a complex of vector bundles on $\\mu^{-1}_{\\mathbf{d}^{(1)}}(0)\\times \\mu^{-1}_{\\mathbf{d}^{(2)}}(0)$:\n\\begin{equation}\n\\label{equation:RHompreprojective}\n \\operatorname{Hom}(V_{\\mathbf{d}^{(2)}},V_{\\mathbf{d}^{(1)}})\\xrightarrow{d}\\bigoplus_{i\\xrightarrow{\\alpha}j\\in \\overline{Q}_1}\\operatorname{Hom}((V_{\\mathbf{d}^{(2)}})_i,(V_{\\mathbf{d}^{(1)}})_j)\\xrightarrow{\\mu} \\operatorname{Hom}(V_{\\mathbf{d}^{(2)}},V_{\\mathbf{d}^{(1)}}).\n\\end{equation}\nLet $x=(x_{\\alpha})_{\\alpha\\in \\overline{Q}_1}\\in\\mu_{\\mathbf{d}^{(1)}}^{-1}(0)$ and $y=(y_{\\alpha})_{\\alpha\\in \\overline{Q}_1}\\in\\mu_{\\mathbf{d}^{(2)}}^{-1}(0)$. For $z\\in\\operatorname{Hom}(V_{\\mathbf{d}^{(2)}},V_{\\mathbf{d}^{(1)}})_{(x,y)}=\\operatorname{Hom}(\\mathbf{C}^{\\mathbf{d}^{(2)}},\\mathbf{C}^{\\mathbf{d}^{(1)}})$, we define\n\\[\n d_{(x,y)}z=(z_jy_{\\alpha}-x_{\\alpha}z_i)_{i\\xrightarrow{\\alpha} j\\in\\overline{Q}_1}\n\\]\nand\nfor $t=(t_{\\alpha},t_{\\alpha^*})_{\\alpha\\in Q_1}\\in \\left(\\bigoplus_{i\\xrightarrow{\\alpha}j\\in \\overline{Q}_1}\\operatorname{Hom}((V_{\\mathbf{d}^{(2)}})_i,(V_{\\mathbf{d}^{(1)}})_j)\\right)_{(x,y)}$, we define\n\\[\n \\mu_{(x,y)}(t)=\\sum_{\\alpha\\in Q_1}[x_{\\alpha}+y_{\\alpha}+t_{\\alpha},x_{\\alpha^*}+y_{\\alpha^*}+t_{\\alpha^*}]\n\\]\nwhere for $\\alpha\\in \\overline{Q}_1$, $x_{\\alpha}, y_{\\alpha}, t_{\\alpha}$ are seen as endomorphisms of $\\mathbf{C}^{\\mathbf{d}^{(1)}+\\mathbf{d}^{(2)}}$. As these maps are $\\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$-equivariant, the complex \\eqref{equation:RHompreprojective} induces a $3$-term complex $\\mathcal{C}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ of vector bundles on $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$.\n\n\\begin{proposition}\n The $3$-term complex $\\mathcal{C}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ obtained from \\eqref{equation:RHompreprojective} is a complex of vector bundles quasi-isomorphic to the RHom complex on $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ introduced in general in \\S \\ref{subsubsection:categorical}.\n\\end{proposition}\n\n\\section{Perverse sheaves and mixed Hodge modules}\n\\label{section:perversesheaves}\nWe assume the reader is comfortable with the formalism of the constructible derived categories and perverse sheaves and has a working familiarity with mixed Hodge modules, for instance by having read \\cite{saito1989introduction}. We nonetheless give some reminders of basic constructions in the theory here.\n\\subsection{Tensor structure on the constructible derived category of a monoid object of schemes}\n\\label{subsection:monoidalstructure}\nRecall that a monoid $(\\mathcal{M},\\oplus,\\eta)$ in a monoidal category $\\mathscr{C}$ is the data of an object $\\mathcal{M}$ of $\\mathscr{C}$, a morphism $\\oplus\\colon\\mathcal{M}\\otimes\\mathcal{M}\\rightarrow \\mathcal{M}$ and a morphism $\\eta\\colon\\mathbf{1}_{\\mathscr{C}}\\rightarrow \\mathcal{M}$ satisfying the compatibility conditions of an associative algebra. We frequently omit $\\eta$ from the notation. Let $(\\mathcal{M},\\oplus)$ be a monoid object in the category of complex schemes (with monoidal structure given by Cartesian product) such that $\\pi_0(\\oplus)\\colon \\pi_0(\\mathcal{M})^{\\times 2}\\rightarrow \\pi_0(\\mathcal{M})$ has finite fibres. We allow $\\mathcal{M}$ to have infinitely many connected components.\n\nWe define $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M})$ to be the full subcategory of the derived category of constructible complexes on $\\mathcal{M}$ that have bounded below cohomological amplitude on each connected component of $\\mathcal{M}$. The category $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M})$ has a monoidal structure $\\boxdot$ defined by\n\\[\n \\mathscr{F}\\boxdot\\mathscr{G}\\coloneqq\\oplus_*(\\mathscr{F}\\boxtimes\\mathscr{G}).\n\\]\nIf $\\oplus$ is finite, the same formula gives a monoidal product on $\\operatorname{Perv}(\\mathcal{M})$, the category of perverse sheaves on $\\mathcal{M}$. The monoidal unit is given by $\\eta_*\\mathbf{Q}$, where $\\eta$ is the unit morphism for $\\mathcal{M}$.\n\\smallbreak\nLet us moreover assume that $\\mathcal{M}$ is a commutative monoid, i.e. if $s\\colon \\Msp\\times \\Msp\\rightarrow \\Msp\\times\\Msp$ is the morphism swapping the factors, then $\\oplus\\circ s=\\oplus$. Then $\\boxdot$ carries the natural structure of a symmetric monoidal functor.\n\n\\begin{definition}\n\\label{ma_alg_def}\nA \\emph{$\\boxdot$-algebra} in $\\operatorname{Perv}(\\mathcal{M})$ (or $\\mathcal{D}_{\\mathrm{c}}^{+}(\\mathcal{M})$) is a monoid in the respective tensor (monoidal) category, with monoidal structure given by $\\boxdot$. I.e. it is a triple $(\\mathcal{F},m\\colon\\mathcal{F}\\boxdot\\mathcal{F}\\rightarrow \\mathcal{F},\\iota\\colon\\eta_*\\mathbf{Q}\\rightarrow \\mathcal{F})$, with $\\mathcal{F}\\in \\operatorname{Perv}(\\mathcal{M})$ or $\\mathcal{F}\\in\\mathcal{D}^+_{\\mathrm{c}}(\\mathcal{M})$, such that $m$ and $\\iota$ satisfy the usual commutativity properties demanded of an associative algebra.\nIf $(\\mathcal{M},\\oplus)$ is a commutative monoid, then a \\emph{$\\boxdot$-Lie algebra} in $\\operatorname{Perv}(\\mathcal{M})$ (or $\\mathcal{D}^+_{\\mathrm{c}}(\\mathcal{M})$) is a pair $(\\mathcal{F},c\\colon \\mathcal{F}\\boxdot \\mathcal{F}\\rightarrow \\mathcal{F})$ with $\\mathcal{F}\\in \\operatorname{Perv}(\\mathcal{M})$ or $\\mathcal{F}\\in\\mathcal{D}^+_{\\mathrm{c}}(\\mathcal{M})$, and $c$ antisymmetric and satisfying the Jacobi identity.\n\\end{definition}\n\n\n\\subsection{Mixed Hodge modules}\n\\label{MHM_sec}\n\nIf $\\mathcal{M}$ is a separated, reduced complex scheme we define as in \\cite{saito1990mixed} the bounded derived category $\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\mathcal{M}))$ of algebraic mixed Hodge modules on $\\mathcal{M}$. There is a faithful functor $\\rat\\colon\\mathrm{MHM}(\\mathcal{M})\\rightarrow \\operatorname{Perv}(\\mathcal{M})$ taking a mixed Hodge module to its underlying perverse sheaf.\n\nA mixed Hodge module $\\mathcal{F}\\in\\mathrm{MHM}(\\mathcal{M})$ carries an ascending weight filtration $W_{\\bullet}\\mathcal{F}$, and we say that $\\mathcal{F}$ is pure of weight $n$ if $W_{n-1}\\mathcal{F}=0$ and $W_{n}\\mathcal{F}=\\mathcal{F}$. An object $\\mathcal{F}\\in\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\mathcal{M}))$ is called \\emph{pure} if $\\mathcal{H}^i(\\mathcal{F})$ is pure of weight $i$ for every $i$. By Saito's theory, pure mixed Hodge modules (of fixed weight) form a semisimple category, and pure objects of $\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\mathcal{M}))$ are preserved by taking direct image along projective morphisms.\n\n\nWe define $\\mathbf{L}$ to be equal to $\\HO_c(\\mathbf{A}^1_{\\mathbf{C}},\\mathbf{Q})$, with its canonical pure mixed Hodge structure. I.e. $\\mathbf{L}$ is a cohomologically graded mixed Hodge structure, concentrated in cohomological degree $2$, and the second cohomology mixed Hodge structure of $\\mathbf{L}$ is pure, of weight 2. We denote by $\\mathbf{L}^n$ the $n$th tensor power of $\\mathbf{L}$ in the category of cohomologically graded mixed Hodge structures, and we allow $n\\leq 0$, since $\\mathbf{L}$ is invertible in this tensor category. If $X$ is a variety, there is a natural upgrade of $\\mathbf{Q}_X$ to a mixed Hodge module complex on $X$, namely $(X\\rightarrow \\mathrm{pt})^*\\mathbf{L}^0$, which we denote $\\underline{\\mathbf{Q}}_X$. \n\\begin{lemma}\n\\label{Homs_Lem}\nLet $X$ be a separated, reduced complex scheme, then the natural morphisms\n\\[\n\\operatorname{Hom}_{\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(X))}(\\underline{\\mathbf{Q}}_X,\\underline{\\mathbf{Q}}_X)\\xrightarrow{\\alpha=\\rat}\\operatorname{Hom}_{\\mathcal{D}^{\\mathrm{b}}(\\operatorname{Perv}(X))}(\\mathbf{Q}_X,\\mathbf{Q}_X)\\xrightarrow{\\beta}\\mathbf{Q}^{\\pi_0(X)}\n\\]\nare isomorphisms.\n\\end{lemma}\n\\begin{proof}\nIt is clear that $\\beta$ is an isomorphism: if $X$ is connected then $\\operatorname{Hom}_{\\mathcal{D}^{\\mathrm{b}}(\\operatorname{Perv}(X))}(\\mathbf{Q}_X,\\mathbf{Q}_X)\\cong\\mathbf{Q}$. Also, $\\beta\\alpha$ has a right-inverse $\\gamma$, since for any object $\\mathcal{F}$ in the tensor category $\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(X))$ there is an embedding $\\mathbf{Q}\\hookrightarrow \\operatorname{Hom}(\\mathcal{F},\\mathcal{F})$, and we may write \n\\[\n\\underline{\\mathbf{Q}}_X\\cong \\bigoplus_{X'\\in\\pi_0(X)}\\underline{\\mathbf{Q}}_{X'}.\n\\]\nSo all that remains is to show that $\\beta\\alpha$ is injective, and this reduces to the case in which $X$ is connected, which we now assume. By adjunction we have\n\\[\n\\operatorname{Hom}_{\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(X))}(\\underline{\\mathbf{Q}}_X,\\underline{\\mathbf{Q}}_X)\\cong \\operatorname{Hom}_{\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\mathrm{pt}))}\\left(\\mathbf{L}^0,a_*\\underline{\\mathbf{Q}}_X\\right)\\cong \\operatorname{Hom}_{\\mathrm{MHM}(\\mathrm{pt})}(\\mathbf{L}^0,\\HO^0(X,\\underline{\\mathbf{Q}}))\n\\]\nwhere $a\\colon X\\rightarrow \\mathrm{pt}$ is the structure morphism, and we are done.\n\\end{proof}\n\n\nIf $X$ is an even-dimensional integral scheme, and $X^{\\mathrm{sm}}$ is its smooth locus, there is a unique extension of the pure weight zero mixed Hodge module $\\underline{\\mathbf{Q}}_{X^{\\mathrm{sm}}}\\otimes\\mathbf{L}^{-\\dim(X)\/2}$ on $X^{\\mathrm{sm}}$ to a simple pure weight zero mixed Hodge module on $X$, denoted $\\underline{\\mathcal{IC}}(X)$. Then $\\rat(\\underline{\\mathcal{IC}}(X))=\\mathcal{IC}(X)$, the intersection complex on $X$.\n\n\\subsubsection{Unbounded complexes}\n\\label{unbounded_cplx_sec}\nAs in \\cite{davison2020bps} we work in the bigger category $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))$ of locally bounded below complexes of mixed Hodge modules on $\\mathcal{M}$. If $\\mathcal{M}$ is connected, this is defined to be the limit of the diagram of categories $\\mathcal{D}_n$ for $n\\in \\mathbf{Z}$, with $\\mathcal{D}_n=\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\mathcal{M}))$ for all $n$, and arrows from $\\mathcal{D}_n$ to $\\mathcal{D}_{n'}$ provided by the truncation functors $\\tau^{\\leq n'}$. For general $\\mathcal{M}$ we define $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))\\coloneqq \\prod_{\\mathcal{N}\\in\\pi_0(\\mathcal{M})}\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{N}))$. By Saito's theory, pure objects of $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))$ are preserved by taking direct image along projective morphisms. See \\cite[Sec.2.1.4]{davison2020bps} for the detailed construction, and proofs.\n\n\n\\subsubsection{Mixed Hodge modules on stacks}\n\\label{MHMs_on_stacks}\nThe full six-functor formalism for derived categories of mixed Hodge modules on stacks has not been developed. Here we remind the reader of the standard workaround for this fact.\n\\begin{definition}\n\\label{acyclic_cover_def}\nGiven a finite type Artin stack $\\mathfrak{X}$, we say that $\\mathfrak{X}$ has an \\textit{acyclic cover} if for all $N$ there is a morphism $f_N\\colon X_N\\rightarrow \\mathfrak{X}$ such that \n\\begin{enumerate}\n\\item\neach $f_N$ is smooth\n\\item\nAs $N\\to \\infty$, the minimum $i$ such that $\\pH{i}(\\mathrm{cone}(\\mathbb{D}\\mathbf{Q}_{\\mathfrak{X}}\\rightarrow f_{N,*}\\mathbb{D}\\mathbf{Q}_{X_N}[-2\\dim f_N]))\\neq 0$ tends to infinity.\n\\end{enumerate}\n\\end{definition}\nIt is easy to check that if $\\mathfrak{X}$ has an acyclic cover, and $\\mathfrak{Y}$ is finite type and representable over $\\mathfrak{X}$, then $\\mathfrak{Y}$ has an acyclic cover (provided by varieties $\\mathfrak{Y}\\times_{\\mathfrak{X}} X_N)$). If $\\mathfrak{X}$ has an acyclic cover, and $a\\colon \\mathfrak{X}\\rightarrow \\mathcal{X}$ is a morphism to a variety, we define $a_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{X}}$ by setting \n\\begin{align*}\n\\tau^{\\leq i}a_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{X}}=\\tau^{\\leq i}(af_N)_*(\\mathbb{D}\\underline{\\mathbf{Q}}_{X_N}\\otimes \\mathbf{L}^{\\dim(f_N)}) && \\text{for $N \\gg 0$}.\n\\end{align*}\nThen there is a natural isomorphism $\\rat(\\tau^{\\leq i}a_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{X}})\\cong \\ptau{\\leq i}a_*\\mathbb{D}\\mathbf{Q}_{\\mathfrak{X}}$. Likewise, if $\\bs{\\mathfrak{X}}=t_0(\\mathfrak{X})$ is the underlying classical stack of a derived stack with $\\mathbb{L}_{\\bs{\\mathfrak{X}}}$ a perfect complex, with even virtual rank, and $\\mathfrak{X}$ has an acyclic cover, we define $a_*\\mathbb{D}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{X}}$ by setting\n\\begin{align*}\n\\tau^{\\leq i}a_*\\mathbb{D}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{X}}=\\tau^{\\leq i}(af_N)_*(\\mathbb{D}\\underline{\\mathbf{Q}}_{X_N}\\otimes \\mathbf{L}^{\\dim(f_N)+\\vrank(\\mathbb{L}_{\\bs{\\mathfrak{X}}})\/2}) &&\\text{for $N \\gg 0$}.\n\\end{align*}\nIt is well known that if $\\mathfrak{X}=X\/ G$ is a global quotient of a variety by a linear algebraic group, then $\\mathfrak{X}$ has an acyclic cover provided by approximations to the Borel construction. See \\cite{davison2020bps} for more details.\n\n\n\\subsubsection{Monoids}\nIf $(\\mathcal{M},\\oplus)$ is a monoid object in the category of complex schemes such that $\\pi_0(\\oplus)$ has finite fibres, the formulas of \\S \\ref{subsection:monoidalstructure} define monoidal structures on $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))$, and also on $\\mathrm{MHM}(\\mathcal{M})$ if $\\oplus$ is moreover finite.\n\nThe forgetful functor $\\rat\\colon\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))\\rightarrow \\mathcal{D}^+_c(\\mathcal{M})$ is monoidal, as is $\\rat\\colon \\mathrm{MHM}(\\mathcal{M})\\rightarrow\\operatorname{Perv}(\\mathcal{M})$ if $\\oplus$ is finite. They are moreover symmetric monoidal in case $\\mathcal{M}$ is a symmetric monoid; see \\cite{maxim2011symmetric} and \\cite[Sec.3.2]{davison2020cohomological} for details. We define $\\boxdot$-algebras and $\\boxdot$-Lie algebras in $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))$ and $\\mathrm{MHM}(\\mathcal{M})$ as in Definition~\\ref{ma_alg_def}.\n\n\\subsection{Restriction to submonoids}\n\\label{strict_mf_sec}\nLet $\\imath\\colon(\\mathcal{N},\\oplus)\\rightarrow (\\mathcal{M},\\oplus)$ be a morphism of monoids in the category of schemes. We assume $\\mathcal{N}$ is a full submonoid, in the sense that the diagram\n\\begin{equation}\n \\label{equation:diagrampullbackmonoidal}\n \\begin{tikzcd}\n\t{\\mathcal{N}\\times\\mathcal{N}} & {\\mathcal{N}} \\\\\n\t{\\mathcal{M}\\times \\mathcal{M}} & {\\mathcal{M}.}\n\t\\arrow[\"\\imath\\times\\imath\"', from=1-1, to=2-1]\n\t\\arrow[\"\\oplus\", from=1-1, to=1-2]\n\t\\arrow[\"\\oplus\", from=2-1, to=2-2]\n\t\\arrow[\"\\imath\", from=1-2, to=2-2]\n\\end{tikzcd}\n\\end{equation}\nis Cartesian.\n\n\\begin{lemma}\n\\label{lemma:strictmonoidalfunctor}\nThe exceptional pull-back functors\n\\begin{align*}\n \\imath^!\\colon& \\mathcal{D}_c^+(\\mathcal{M})\\rightarrow \\mathcal{D}_c^+(\\mathcal{N})\\\\\n &\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))\\rightarrow \\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{N}))\n\\end{align*}\nare strict monoidal functors.\n\\end{lemma}\n\\begin{proof}\n This is the base-change isomorphism $\\oplus_*(\\imath\\times\\imath)^!\\cong \\imath^!\\oplus_*$ for the Cartesian diagram \\eqref{equation:diagrampullbackmonoidal}. See \\cite[(4.4.3)]{saito1990mixed} for the lift to mixed Hodge modules.\n\\end{proof}\n\n\n\n\\subsection{Free algebras}\nLet $(\\mathcal{M},\\oplus)$ be a monoid object in the category of complex schemes. The free $\\boxdot$-algebra $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\mathcal{F})$ generated by an object $\\mathcal{F} \\in \\mathcal{D}^+_c(\\mathcal{M})$ (if it exists) is the initial $\\boxdot$-algebra amongst morphisms from $\\mathcal{F}$ to $\\boxdot$-algebras.\nAs an object in $\\mathcal{D}_c^{+}(\\mathcal{M})$ we have \n\\begin{equation}\n\\label{equation:freealgdirectsum}\n\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{i \\in I} \\mathcal{F}_i\\right) = \\bigoplus_{n \\geq 0} \\bigoplus_{(i_1,\\ldots,i_n) \\in I^{n}} \\oplus_{\\ast}\\left(\\mathcal{F}_{i_1}\\boxtimes \\cdots\\boxtimes \\mathcal{F}_{i_n} \\right).\n\\end{equation}\nIf $\\mathcal{F}\\in\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}))$ is a complex of mixed Hodge modules, we define the free algebra generated by it analogously.\n\\begin{proposition}\n\\label{proposition:FreeSemiSimp}\nAssume that $\\oplus$ is finite. If $\\mathcal{F} \\in \\operatorname{Perv}(\\mathcal{M})$ is a semisimple perverse sheaf, then so is $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\mathcal{F})$. If $\\mathcal{F}\\in\\mathrm{MHM}(\\mathcal{M})$ is pure of weight zero, then so is $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\mathcal{F})$.\n\\end{proposition}\n\\begin{proof}\nSince $\\oplus$ is finite, $\\oplus_\\ast$ sends (semisimple) perverse sheaves to (semisimple) perverse sheaves. The categories of semisimple perverse sheaves are closed under direct sum and external products. The lemma now follows from \\eqref{equation:freealgdirectsum}. The proof for mixed Hodge modules is identical, noting that $\\oplus$ preserves purity since it is finite.\n\\end{proof}\n\n\n\n\\begin{corollary}\nLet $\\mathcal{A}$ be a totally negative 2CY category and let $\\Msp_\\mathcal{A}$ be the good moduli space of objects as in \\S\\ref{section:modulistackobjects2CY}. In particular, we assume that $\\oplus$ is finite. The perverse sheaf $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}} \\mathcal{IC}(\\Msp_{\\mathcal{A},a})\\right)$ on $\\Msp_{\\mathcal{A}}$ is semisimple. The mixed Hodge module $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}} \\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a})\\right)$ is pure.\n\\end{corollary}\n\\begin{proof}\nBy Proposition~\\ref{proposition:geometryofgms}, for each $a \\in \\Sigma_{\\mathcal{A}}$ the good\nmoduli space $\\Msp_{\\mathcal{A},a}$ is irreducible, and so the perverse sheaf\n$\\mathcal{IC}(\\Msp_{\\mathcal{A},a})$ is simple, as it is the intermediate extension of the simple\nlocal system $\\mathbf{Q}_{\\Msp^{\\mathrm{sm}}_{\\mathcal{A},a}}[\\dim(\\Msp_{\\mathcal{A},a})]$. Similarly, the mixed Hodge module $\\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a})$ is pure of weight zero. The statement now follows from Proposition~\\ref{proposition:FreeSemiSimp}.\n\\end{proof}\n\n\n\\section{Virtual pullbacks and quasi-smooth morphisms}\n\\label{vpb_section}\n\nThis section develops the core technical material required for the construction of the product of the cohomological Hall algebras considered in this paper. We introduce a class of morphisms, closed under composition, along which we can define virtual pullback morphisms of mixed Hodge modules that satisfy desirable properties.\n\n\n\\subsection{Refined Gysin morphisms}\n\\label{subsubsection:refinedGysinmorphism}\nLet $k$ be a field of coefficients. We will later only be interested in the case $k=\\mathbf{Q}$. Let $\\mathfrak{X}$ be an Artin stack and $\\mathcal{E}$ be a vector bundle of rank $r$ on $\\mathfrak{X}$. Let $\\mathfrak{E}=\\operatorname{Tot}_{\\mathfrak{X}}(\\mathcal{E})$ be the total space of $\\mathcal{E}$ and $\\pi\\colon\\mathfrak{E}\\rightarrow\\mathfrak{X}$ be the projection. Let $s\\colon\\mathfrak{X}\\rightarrow \\mathfrak{E}$ be a section of $\\mathcal{E}$. We let $0_{\\mathfrak{E}}$ be the zero section of $\\mathfrak{E}$. Consider the pull-back diagram\n\\begin{equation}\n \\label{equation:refinedpullback}\n \\begin{tikzcd}\n\t{\\mathfrak{X}_s} & {\\mathfrak{X}} \\\\\n\t{\\mathfrak{X}} & {\\mathfrak{E}}\n\t\\arrow[\"s\", from=1-2, to=2-2]\n\t\\arrow[\"{0_{\\mathfrak{E}}}\"', from=2-1, to=2-2]\n\t\\arrow[\"{i_s}\", from=1-1, to=1-2]\n\t\\arrow[\"{i_s}\"', from=1-1, to=2-1]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\end{equation}\nwhere $\\mathfrak{X}_s$ is the zero locus of $s$. We will define the refined Gysin morphism as a morphism of sheaves\n\\begin{equation}\n\\label{equation:refinedGysinmorphism}\nv_s\\colon \\mathbb{D} k_{\\mathfrak{X}}\\rightarrow(i_s)_*\\mathbb{D} k_{\\mathfrak{X}_s}[2r].\n\\end{equation}\nWe have the natural isomorphism\n\\[\ns^*\\mathbb{D} k_{\\mathfrak{E}}\\cong \\mathbb{D} k_{\\mathfrak{X}}[2r].\n\\]\nIndeed, since $\\pi$ is smooth of relative complex dimension $r$, we have $\\pi^!=\\pi^*[2r]$ and $\\pi\\circ s=\\operatorname{id}_{\\mathfrak{X}}$, so\\footnote{Here and throughout the rest of the paper, where we write the potentially ambiguous $\\mathbb{D} k_{X}[d]$, we mean $(\\mathbb{D} k_{X})[d]$, and not $\\mathbb{D}(k_{X}[d])$.} $s^*\\mathbb{D} k_{\\mathfrak{E}}=\\mathbb{D} (s^!k_{\\mathfrak{E}})\\cong\\mathbb{D} (s^!\\pi^!k_{\\mathfrak{X}}[-2r])=\\mathbb{D} k_{\\mathfrak{X}}[2r]$. By the adjunction $(s^*,s_*)$, we obtain a morphism $\\mathbb{D} k_{\\mathfrak{E}}\\rightarrow s_*\\mathbb{D} k_{\\mathfrak{X}}[2r]$. By applying $0_{\\mathfrak{E}}^!$ and using the base-change isomorphism $0_{\\mathfrak{E}}^!s_*\\cong (i_s)_*i_s^!$, we obtain the morphism \n\\[\n\\mathbb{D} k_{\\mathfrak{X}}\\rightarrow (i_s)_* \\mathbb{D} k_{\\mathfrak{X}_s}[2r].\n\\]\nThis is the refined Gysin morphism \\eqref{equation:refinedGysinmorphism}. \n\\smallbreak\nLet $\\mathfrak{X}$ be a scheme. At the level of functors between mixed Hodge module complexes, we have the canonical isomorphism $\\pi^!\\cong \\pi^{\\ast}\\otimes \\mathbf{L}^{-r}$, from which we define the morphism\n\\[\n\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{X}}\\rightarrow (i_s)_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{X}_s}\\otimes\\mathbf{L}^{-r}\n\\]\nin similar fashion.\n\n\\subsubsection{Functoriality of the refined Gysin morphism for morphisms of vector bundles}\n\\label{subsubsection:functorialityGysin}\n\n\nLet $f\\colon \\mathfrak{Y}\\rightarrow\\mathfrak{X}$ be a morphism of stacks, $\\mathcal{E}$ a rank $r$ vector bundle on $\\mathfrak{X}$ and $s$ a section of $\\mathcal{E}$. We obtain the vector bundle $f^*\\mathcal{E}$ on $\\mathfrak{Y}$ together with the section $f^*s$.\n\nWe have a pullback square\n\\begin{equation}\n\\label{Gysin_pb_diagram}\n \\begin{tikzcd}\n\t{\\mathfrak{Y}_{f^*s}} & {\\mathfrak{X}_s} \\\\\n\t{\\mathfrak{Y}} & {\\mathfrak{X}}\n\t\\arrow[\"{f_s}\", from=1-1, to=1-2]\n\t\\arrow[\"{i_{f^*s}}\"', from=1-1, to=2-1]\n\t\\arrow[\"{i_s}\", from=1-2, to=2-2]\n\t\\arrow[\"f\"', from=2-1, to=2-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\end{equation}\nand functoriality of the refined Gysin morphism:\n\n\\begin{proposition}\n\\label{proposition:functorialityvirtualpullback}\n Let $v_s\\colon \\mathbb{D} k_{\\mathfrak{X}}\\rightarrow (i_s)_*\\mathbb{D} k_{\\mathfrak{X}_s}[2r]$ be the refined Gysin morphism for $(\\mathcal{E},s)$ and let $v_{f^*s}\\colon \\mathbb{D} k_{\\mathfrak{Y}}\\rightarrow (i_{f^*s})_*\\mathbb{D} k_{\\mathfrak{Y}_{f^*s}}[2r]$ be the refined Gysin morphism for $(f^*\\mathcal{E},f^*s)$. Then, $v_{f^*s}=f^!v_s$ using the canonical identification given by the base-change isomorphism $f^!(i_s)_*\\cong (i_{f^*s})_*f_s^!$. If $\\mathfrak{X}$ is a scheme, the same result holds at the level of morphisms of complexes of mixed Hodge modules.\n\\end{proposition}\n\\begin{proof}\n This follows by base-change along $\\overline{f}$ in the following diagram:\n \\[\n \\begin{tikzcd}\n\t{\\mathfrak{Y}_{f^*s}} && {\\mathfrak{Y}} \\\\\n\t& {\\mathfrak{Y}} & {} & {f^*\\mathfrak{E}} \\\\\n\t{\\mathfrak{X}_s} & {} & {\\mathfrak{X}} \\\\\n\t& {\\mathfrak{X}} && {\\mathfrak{E}}\n\t\\arrow[\"{i_{f^*s}}\", from=1-1, to=1-3]\n\t\\arrow[\"{f_s}\"', from=1-1, to=3-1]\n\t\\arrow[\"\"{name=0, anchor=center, inner sep=0}, \"f\"'{pos=0.7}, from=2-2, to=4-2]\n\t\\arrow[\"{0_{\\mathfrak{E}}}\", from=4-2, to=4-4]\n\t\\arrow[\"{0_{f^*\\mathfrak{E}}}\"{pos=0.7}, from=2-2, to=2-4]\n\t\\arrow[\"{\\overline{f}}\", from=2-4, to=4-4]\n\t\\arrow[\"{i_s}\"{pos=0.3}, from=3-2, to=3-3]\n\t\\arrow[no head, from=1-3, to=2-3]\n\t\\arrow[\"f\", from=2-3, to=3-3]\n\t\\arrow[\"{f^*s}\", from=1-3, to=2-4]\n\t\\arrow[\"{i_{f^*s}}\", from=1-1, to=2-2]\n\t\\arrow[\"{i_s}\"', from=3-1, to=4-2]\n\t\\arrow[\"s\", from=3-3, to=4-4]\n\t\\arrow[bend left=10,\"{\\pi_{\\mathfrak{E}}}\", from=4-4, to=4-2]\n\t\\arrow[bend left=10, \"{\\pi_{f^*\\mathfrak{E}}}\"{pos=0.7}, from=2-4, to=2-2]\n\t\\arrow[shorten >=7pt, no head, from=3-1, to=0]\n\\end{tikzcd}\n \\]\n\n\\end{proof}\nThe next corollary follows similarly by base change:\n\\begin{corollary}\n\\label{bc_Gysin}\nIn the diagram \\eqref{Gysin_pb_diagram}, define $g=i_s\\circ f_s$.\n\\begin{enumerate}\n\\item\nAssume that $f$ is proper. Then the diagram (in which the horizontal maps are obtained by adjunction)\n\\[\n\\begin{tikzcd}\ng_\\ast\\mathbb{D} k_{\\mathfrak{Y}_{f^*s}}[2r] & (i_s)_{\\ast}\\mathbb{D} k_{\\mathfrak{X}_s}[2r]\n\\\\\nf_{\\ast}\\mathbb{D} k_{\\mathfrak{Y}} & \\mathbb{D} k_{\\mathfrak{X}}\n\\arrow[from=2-1,to=1-1,\"f_{\\ast}v_{f^*s}\"]\n\\arrow[from=2-2,to=1-2,\"v_{s}\"]\n\\arrow[from=1-1,to=1-2]\n\\arrow[from=2-1,to=2-2]\n\\end{tikzcd}\n\\]\ncommutes.\n\\item\nAssume that $f$ is smooth. Then the diagram (in which the horizontal maps are obtained by adjunction)\n\\[\n\\begin{tikzcd}\ng_*\\mathbb{D} k_{\\mathfrak{Y}_{f^*s}}[2r] & (i_s)_{\\ast}\\mathbb{D} k_{\\mathfrak{X}_s}[2r+2\\dim(f)]\n\\\\\nf_*\\mathbb{D} k_{\\mathfrak{Y}} & \\mathbb{D} k_{\\mathfrak{X}}[2\\dim(f)]\n\\arrow[from=2-1,to=1-1,\"f_*v_{f^*s}\"]\n\\arrow[from=2-2,to=1-2,\"v_{s}\"]\n\\arrow[from=1-2,to=1-1]\n\\arrow[from=2-2,to=2-1]\n\\end{tikzcd}\n\\]\ncommutes.\n\\end{enumerate}\nIf $\\mathfrak{X}$ is a scheme, the same results hold at the level of mixed Hodge modules.\n\\end{corollary}\n\n\\subsubsection{Composition and direct sum of vector bundles}\nLet $\\mathfrak{X}$ be an Artin stack, let $\\mathcal{E}'$ and $\\mathcal{E}''$ be vector bundles on $\\mathfrak{X}$, with sections $s'$ and $s''$ of $\\mathcal{E}'$ and $\\mathcal{E}''$ respectively. We define $\\mathcal{E}=\\mathcal{E}'\\oplus \\mathcal{E}''$. We define $\\mathfrak{E},\\mathfrak{E}',\\mathfrak{E}''$ to be the total spaces of $\\mathcal{E},\\mathcal{E}',\\mathcal{E}''$ respectively. There is a commutative diagram of projections\n\\[\n\\begin{tikzcd}\n\\mathfrak{E}&\\mathfrak{E}'\\\\\n\\mathfrak{E}''&\\mathfrak{X}.\n\\arrow[from=1-1,to=1-2,\"p'\"]\n\\arrow[from=1-1,to=2-1,\"p''\"']\n\\arrow[from=1-2,to=2-2,\"\\pi'\"]\n\\arrow[from=2-1,to=2-2,\"\\pi''\"]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\n\\begin{proposition}\n\\label{sum_comp}\nWith notation as above, we denote by $t$ the restriction of $s''$ to $\\mathfrak{X}_{s'}$. Then the following diagram of virtual Gysin morphisms commutes\n\\[\n\\xymatrix{\n\\mathbb{D} k_{\\mathfrak{X}}\\ar[r]^-{v_{s'}}\\ar[dr]_{v_{s'\\boxplus s''}}& (i_{s'})\\mathbb{D} k_{\\mathfrak{X}_{s'}}\\ar[d]^{(i_{s'})_*v_{t}}[2\\operatorname{rank}(\\mathcal{E}')]\\\\\n&(i_{s'\\boxplus s''})_*\\mathbb{D} k_{\\mathfrak{X}_{s'\\boxplus s''}}[2\\operatorname{rank}(\\mathcal{E})].\n}\n\\]\nIf $\\mathfrak{X}$ is a scheme, the same statement is true at the level of mixed Hodge module complexes.\n\\end{proposition}\n\\begin{proof}\nSet $r=\\pi''^*s'$, a section of $\\pi''^*\\mathcal{E}'$. Then we consider the following commutative diagram in which all squares are Cartesian:\n\\[\n\\begin{tikzcd}\n{\\mathfrak{X}_{s'\\boxplus s''}}\\arrow[r]\\arrow[d,\"i_t\"]\\arrow[dd, bend right=35, \"i_{s'\\boxplus s''}\" ']\n&{\\mathfrak{X}_{s''}}\\arrow{r}\\arrow[d, \"i_{s''}\"]\n&{\\mathfrak{X}}\\arrow{d}[swap]{s''}\\arrow[dd, bend left=35, \"s'\\boxplus s''\"]\\\\\n{\\mathfrak{X}_{s'}}\\arrow{r}{f=i_{s'}}\\arrow{d}{i_{s'}}\n&{\\mathfrak{X}}\\arrow{r}\\arrow{d}{s'}\\arrow[r,\"0_{\\mathcal{E}''}\"]\n&{\\mathfrak{E}''}\\arrow{d}[swap]{r}\\\\\n{\\mathfrak{X}}\\arrow{r}{0_{\\mathcal{E}'}}\\arrow[rr, bend right=35, \"0_{\\mathcal{E}}\"]\n&{\\mathfrak{E}'}\\arrow{r}{0_{\\pi'^*\\mathcal{E}''}}&{\\mathfrak{E}.}\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-2, to=2-3]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=2-1, to=3-2]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=2-2, to=3-3]\n\\end{tikzcd}\n\\]\nBy Proposition \\ref{proposition:functorialityvirtualpullback} there are equalities of morphisms $v_{s'}=(0_{\\mathcal{E}'})^!v_r$ and $(i_{s'})_*v_{t}=(i_{s'})_*f^!v_{s''}$ and the proposition follows.\n\\end{proof}\n\\subsection{Pullback along l.c.i. morphisms}\n\\label{lci_pb_sec}\nLet $f\\colon X\\rightarrow Y$ be a complete intersection, i.e. we assume that we can write $f$ as a composition $ba$ where $b\\colon U\\rightarrow Y$ is smooth of dimension $d$, and $a\\colon X\\rightarrow U$ is a regular embedding of codimension $c$. The condition on $b$ results in a canonical isomorphism $b^!\\underline{\\mathbf{Q}}_Y\\cong \\underline{\\mathbf{Q}}_U\\otimes\\mathbf{L}^{-d}$, while the condition on $a$ yields a canonical isomorphism $a^!\\underline{\\mathbf{Q}}_U\\cong \\underline{\\mathbf{Q}}_X\\otimes \\mathbf{L}^{c}$. Composing, we obtain the isomorphism\n\\[\n\\alpha\\colon f^!\\underline{\\mathbf{Q}}_Y=(ba)^!\\underline{\\mathbf{Q}}_Y\\cong \\underline{\\mathbf{Q}}_X\\otimes\\mathbf{L}^{c-d}.\n\\]\nApplying adjunction and Verdier duality, we thus define the \\textit{pullback morphism}\n\\[\n\\mathbb{D}\\underline{\\mathbf{Q}}_Y\\xrightarrow{\\cong}p_*\\mathbb{D}\\underline{\\mathbf{Q}}_X\\otimes\\mathbf{L}^{d-c}.\n\\]\nLet $b'\\colon U'\\rightarrow Y$, $a'\\colon X\\rightarrow U'$ be a different choice of decomposition exhibiting $f$ as a complete intersection. We construct in the same way an isomorphism\n\\[\n\\beta\\colon f^!\\underline{\\mathbf{Q}}_Y=(b'a')^!\\underline{\\mathbf{Q}}_Y\\cong \\underline{\\mathbf{Q}}_X\\otimes\\mathbf{L}^{c-d}.\n\\]\nWe claim that $\\beta\\alpha^{-1}=\\operatorname{id}$. This is equivalent to the claim that $\\zeta=\\beta\\alpha^{-1}\\otimes\\mathbf{L}^{d-c}=\\operatorname{id}$, which by Lemma \\ref{Homs_Lem} can be checked in the category of constructible sheaves. Moreover, by the same lemma, it is sufficient to check that $\\rat(\\zeta)\\colon\\mathbf{Q}_X\\rightarrow \\mathbf{Q}_X$ is the identity at a single point of $X$. We can therefore reduce to the following situation: $X=\\mathbf{A}^{m}\\times\\mathbf{A}^{m'}$, $U=\\mathbf{A}^m\\times\\mathbf{A}^{m'}\\times\\mathbf{A}^n\\times\\mathbf{A}^{n'}$ and $Y=\\mathbf{A}^m\\times\\mathbf{A}^n$ with $a$ and $b$ the natural inclusion and projection, and the claim is easy to verify.\n\nWe will make occasional use of the following lemma, comparing pullback along l.c.i. morphisms with trivial excess intersection bundle.\n\\begin{lemma}\n\\label{zei_lemma}\nLet \n\\[\n\\begin{tikzcd}\nX&Y\\\\\nZ&W\n\\arrow[\"f\",from=1-1,to=1-2]\n\\arrow[\"a\",from=1-1,to=2-1]\n\\arrow[\"b\",from=1-2,to=2-2]\n\\arrow[\"g\",from=2-1,to=2-2]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nbe a Cartesian diagram of morphisms of schemes, and assume that $f$ and $g$ are l.c.i. morphisms of the same relative dimension $r$. Then the isomorphisms \n\\begin{align*}\n\\mathbb{D}\\underline{\\mathbf{Q}}_Y\\rightarrow f_*\\mathbb{D}\\underline{\\mathbf{Q}}_X\\otimes\\mathbf{L}^r\\\\\nb^!(\\mathbb{D}\\underline{\\mathbf{Q}}_W\\rightarrow g_*\\mathbb{D}\\underline{\\mathbf{Q}}_Z\\otimes\\mathbf{L}^r)\n\\end{align*}\nare equal, after making the natural identifications $b^!\\mathbb{D}\\underline{\\mathbf{Q}}_W=\\mathbb{D}\\underline{\\mathbf{Q}}_Y$ and $b^!g_*\\mathbb{D}\\underline{\\mathbf{Q}}_Z=f_*a^!\\mathbb{D}\\underline{\\mathbf{Q}}_Z=f_*\\mathbb{D}\\underline{\\mathbf{Q}}_X$.\n\\end{lemma}\n\\begin{proof}\nAgain, we use Lemma \\ref{Homs_Lem} to reduce to the same statement, but for constructible sheaves, and then reduce to checking at a single point. We may therefore assume that the morphisms are all composed out of inclusions and projections of affine spaces of appropriate dimensions, at which point the claim is easy to check.\n\\end{proof}\n\\subsection{Global presentations of quasi-smooth morphisms}\n\\label{GPres_sec}\nFor maximum flexibility, we express the following construction in the language of derived stacks. The reader who is put off by this development is encouraged to skip forward to \\S \\ref{3t_sec}.\n\nLet $\\bs{p}\\colon \\bs{\\mathfrak{M}}\\rightarrow \\bs{\\mathfrak{N}}$ be a morphism of 1-Artin derived stacks. We say that $\\bs{p}$ is \\textit{quasi-smooth} if its cotangent complex $\\mathbb{L}_{\\bs{p}}$ is a perfect complex, and has tor-amplitude $(-\\infty,1]$. At the level of the derived category of constructible sheaves, pullback along quasi-smooth morphisms is well-understood, and utilised for example in \\cite{kapranov2019cohomological}. In order to work at the level of derived categories of mixed Hodge modules, we will focus on quasi-smooth morphisms that can be presented in a particularly nice way, which we describe next. \n\n\nFor $\\bs{\\mathfrak{M}}$ a 1-Artin derived stack, we say that a perfect complex $\\mathcal{C}^{\\bullet}=\\bigoplus_{i\\in\\mathbf{Z}}\\mathcal{C}^i$ is \\textit{graded} if each $\\mathcal{C}^i$ is isomorphic to $V_i[-i]$ for some vector bundle $V_i$, i.e. $V_i$ is a perfect complex that becomes a classical vector bundle after restriction to any classical scheme.\n\nLet $\\bs{\\mathfrak{M}}$ be a 1-Artin derived stack, let $\\mathcal{C}^{\\bullet}$ be a graded perfect complex with $\\mathcal{C}^i=0$ for $i\\geq 2$. Since $\\mathcal{C}^{\\bullet}$ is perfect, $\\mathcal{C}^i=0$ for $i \\ll 0$. Let $Q\\in \\Der_{\\bs{\\mathfrak{M}}}(\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}(\\mathcal{C}^{\\bullet}))$ be a degree one derivation that vanishes on the zero section, and satisfies $[Q,Q]=0$. Together, $\\mathcal{C}^{\\bullet}$ and $Q$ define a quasi-smooth stack over $\\bs{\\mathfrak{M}}$, which we now describe.\n\nLet $\\bs{A}=(A,d_A)$ be a cdga concentrated in nonpositive degrees. For each $\\operatorname{Spec}(\\bs{A})$-point $f\\colon \\operatorname{Spec}(\\bs{A})\\rightarrow \\bs{\\mathfrak{M}}$, the derivation $f^*Q$ is given by the data of $A$-linear degree one morphisms $m^{\\vee}_n\\colon f^*(\\mathcal{C}^{\\bullet})^{\\vee}\\rightarrow \\Sym_{\\bs{A}}^n(f^*(\\mathcal{C}^{\\bullet})^{\\vee})$, which vanish for $n\\gg0$. The vanishing at the origin means that $m^{\\vee}_0 = 0$. The condition $[Q,Q]=0$ implies $(m_1^{\\vee})^2=0$ and so $f^*(\\mathcal{C}^{\\bullet})^{\\vee}$ inherits a differential $f^*d_{\\mathcal{C}}\\coloneqq m_1^{\\vee}$.\nWe define the dg algebra\n\\[\n\\bs{B}=(\\Sym_{\\bs{A}}((f^{*}\\mathcal{C}^{\\bullet})^{\\vee}),d_{A}+Q ).\n\\]\nWe define the (higher) stack $\\operatorname{Tot}^Q_{\\bs{\\mathfrak{M}}}(\\mathcal{C}^{\\bullet})$ over $\\bs{\\mathfrak{M}}$, sending $(f\\colon \\operatorname{Spec}(\\bs{A})\\rightarrow \\bs{\\mathfrak{M}})$ to $\\operatorname{Spec}(\\bs{B})$. Here the spectrum of a cdga (not necessarily negatively graded) is as defined and discussed in \\cite{toen2006champs,ben2012loop}. The functor $\\operatorname{Spec}$ from commutative differential graded algebras to derived stacks is the right adjoint to the derived global sections functor on derived stacks \\cite[Proposition~3.1]{ben2012loop} and if $\\bs{B}$ is concentrated in nonnegative degrees, then $\\operatorname{Spec}(\\bs{B})$ is an ordinary higher stack. Note that although $\\operatorname{Spec}(\\bs{A})$ is a derived affine scheme, $\\operatorname{Spec}(\\bs{B})$ may not be, since if $\\mathcal{C}^i\\neq 0$ for $i<0$ then $\\bs{B}$ is not concentrated in nonpositive degrees. There is a natural quasi-isomorphism\n\\begin{equation}\n\\label{cotan_gp}\n\\mathbb{L}_{\\operatorname{Tot}^Q_{\\bs{\\mathfrak{M}}}(\\mathcal{C}^{\\bullet})\/\\bs{\\mathfrak{M}}}\\simeq ((f^*\\mathcal{C}^{\\bullet})^{\\vee},f^*d_{\\mathcal{C}}).\n\\end{equation}\n\\begin{definition}\n\\label{gpres_morphisms}\nAssume that for all commutative algebras $A$, and all $\\bs{\\mathfrak{M}}$-points $f\\colon \\operatorname{Spec}(A)\\rightarrow \\bs{\\mathfrak{M}}$, the complex $(f^*\\mathcal{C}^{\\bullet},f^*d_{\\mathcal{C}})$ has tor-amplitude $[-1,1]$. In particular, this implies that the projection $\\operatorname{Tot}^Q_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet})\\rightarrow \\bs{\\mathfrak{M}}$ is a quasi-smooth morphism of 1-Artin derived stacks. We say that the quasi-smooth morphism $\\bs{\\pi}\\colon \\operatorname{Tot}^Q_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet})\\rightarrow \\bs{\\mathfrak{M}}$ is \\textit{globally presented}. A \\textit{global presentation} of a quasi-smooth morphism of 1-Artin stacks $\\bs{f}\\colon \\bs{\\mathfrak{N}}\\rightarrow \\bs{\\mathfrak{N}}'$ is a commutative diagram of 1-Artin stacks in which the vertical arrows are equivalences of stacks\n\\[\n\\xymatrix{\n\\bs{\\mathfrak{N}}\\ar[r]^{\\bs{f}}\\ar[d]&\\bs{\\mathfrak{N}}'\\ar[d]\\\\\n\\operatorname{Tot}^Q_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet})\\ar[r]^-{\\bs{\\pi}}& \\bs{\\mathfrak{M}}.\n}\n\\]\n\\end{definition}\n\\subsubsection{Global equivalences}\n\\label{GE_sec}\n\\begin{definition}\nLet $(\\mathcal{C} ^{\\bullet},Q_{\\mathcal{C} })$ and $(\\mathcal{C}'^{\\bullet},Q_{\\mathcal{C}'})$ be global presentations of quasi-smooth morphisms, with both $\\mathcal{L}^{\\bullet}$ and $\\mathcal{E}^{\\bullet}$ graded vector bundles over the same stack $\\bs{\\mathfrak{M}}$. Let\n\\[\n\\bs{f}\\colon \\operatorname{Tot}_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet})\\rightarrow \\operatorname{Tot}_{\\bs{\\mathfrak{M}}}(\\mathcal{C}'^{\\bullet})\n\\]\nbe a morphism over $\\bs{\\mathfrak{M}}$ such that $Q_{\\mathcal{C}}=\\bs{f}^* Q_{\\mathcal{C}' }$, and such that the induced morphism of complexes $((\\mathcal{C}^{\\bullet})^{\\vee},d_{\\mathcal{C}})\\rightarrow ((\\mathcal{C}'^{\\bullet})^{\\vee},d_{\\mathcal{C}'})$ is a quasi-isomorphism. We deduce from \\eqref{cotan_gp} that $\\mathbb{L}_{\\bs{f}}=0$. Thus $\\bs{f}$ is \\'etale, with connected fibres, and so $\\bs{f}$ induces an equivalence of derived stacks, which we also denote \n\\begin{align}\n\\label{dtqis}\n\\bs{f}\\colon \\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^{Q_{\\mathcal{C} }}(\\mathcal{C} ^{\\bullet})\\rightarrow \\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^{Q_{\\mathcal{C}'}}(\\mathcal{C}'^{\\bullet}).\n\\end{align}\nWe call an equivalence defined via such an $\\bs{f}$ a \\textit{global equivalence}.\n\n\\end{definition}\n\n\\subsubsection{Composition and pullback}\nLet $\\bs{f}\\colon\\bs{\\mathfrak{N}}\\rightarrow \\bs{\\mathfrak{M}}$ be a morphism of derived stacks, and assume that we are given a graded vector bundle $\\mathcal{C}^{\\bullet}$ on $\\bs{\\mathfrak{M}}$ along with a derivation $Q\\in\\Der_{\\bs{\\mathfrak{M}}}(\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}(\\mathcal{C}^{\\bullet}))$ vanishing on the zero section. Then we obtain a Cartesian diagram\n\\[\n\\begin{tikzcd}\n\\operatorname{Tot}_{\\bs{\\mathfrak{N}}}^{\\bs{f}^*Q}(\\bs{f}^*\\mathcal{C}^{\\bullet}) &\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^{Q}(\\mathcal{C}^{\\bullet})\n\\\\\n\\bs{\\mathfrak{N}}& \\bs{\\mathfrak{M}}\n\\arrow[from=1-1,to=1-2]\n\\arrow[from=1-1,to=2-1]\n\\arrow[from=1-2,to=2-2]\n\\arrow[\"\\bs{f}\",from=2-1,to=2-2]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nIn particular, globally presented quasi-smooth morphisms are stable under pullback.\n\nA crucial feature of globally presented quasi-smooth morphisms of stacks is that they are closed under composition. We only need a very weak version of this claim. Let $\\bs{\\mathfrak{M}},\\mathcal{C} ^{\\bullet},Q$ be as above. Let $\\mathcal{E}^{\\bullet}$ be a graded complex on $\\bs{\\mathfrak{M}}$, which we pull back to a graded complex $\\pi_{\\bs{\\mathfrak{M}}}^*\\mathcal{E}^{\\bullet}$ on $\\bs{\\mathfrak{T}}=\\operatorname{Tot}^Q_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet})$. Let $Q'$ be a degree one element of $\\Der_{\\bs{\\mathfrak{T}}}(\\operatorname{Tot}_{\\bs{\\mathfrak{T}}}(\\pi_{\\bs{\\mathfrak{M}}}^*\\mathcal{E}^{\\bullet}))$, vanishing on the zero-section $\\bs{\\mathfrak{T}}$, and satisfying $[Q',Q']=0$. Set $K$ to be the image of $Q'$ under $\\Der_{\\bs{\\mathfrak{T}}}(\\operatorname{Tot}_{\\bs{\\mathfrak{T}}}(\\pi_{\\bs{\\mathfrak{M}}}^*\\mathcal{E}^{\\bullet}))\\rightarrow \\Der_{\\bs{\\mathfrak{M}}}(\\operatorname{Tot}_{\\bs{\\mathfrak{T}}}(\\pi_{\\bs{\\mathfrak{M}}}^*\\mathcal{E}^{\\bullet}))$. The above equation, along with $[Q,Q]=0$, yields\n\\begin{align*}\n[\\pi_{\\bs{\\mathfrak{M}}}^*Q+K,\\pi_{\\bs{\\mathfrak{M}}}^*Q+K]=0.\n\\end{align*}\nIn particular, there is an equivalence\n\\[\n\\operatorname{Tot}_{\\bs{\\mathfrak{T}}}^K(\\pi_{\\bs{\\mathfrak{M}}}^*\\mathcal{E}^{\\bullet})\\simeq \\operatorname{Tot}^{Q+K}_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet}\\oplus\\mathcal{E}^{\\bullet})\n\\]\nalong with a natural projection \n\\[\n\\pi_{\\bs{\\mathfrak{T}}}\\colon\\operatorname{Tot}^{Q+K}_{\\bs{\\mathfrak{M}}}(\\mathcal{C} ^{\\bullet}\\oplus\\mathcal{E}^{\\bullet})\\rightarrow \\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^Q(\\mathcal{C}^{\\bullet})\n\\]\n\\begin{definition}\n\\label{mthfl_def}\nWe call morphisms $\\pi_{\\bs{\\mathfrak{T}}}$ constructed as above \\textit{projections of globally presented quasi-smooth $\\bs{\\mathfrak{M}}$-stacks}.\n\\end{definition}\n\\begin{definition}\n\\label{gpres_cat}\nFor a fixed stack $\\bs{\\mathfrak{M}}$ we define the category $\\GPres_{\\bs{\\mathfrak{M}}}$ to be the 2-category having as objects the global presentations $\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^Q(\\mathcal{C}^{\\bullet})\\rightarrow \\bs{\\mathfrak{M}}$, 1-morphisms given by projections of globally presented quasi-smooth $\\bs{\\mathfrak{M}}$-stacks (Definition \\ref{mthfl_def}), and 2-morphisms defined by global equivalences as in \\S\\ref{GE_sec}. \n\\end{definition}\nWe have shown that composition of 1-morphisms is well-defined, and it is obviously associative. We will not need any of the other compatibility conditions of this 2-category, and so we leave their verification to the interested reader.\n\n\\subsubsection{Total space of a perfect complex}\n\\label{3t_sec}\nWe describe a special case of the above construction; in fact for most of the paper it is sufficient to understand this special case. Recall that a complex $\\mathcal{C}^{\\bullet}$ on a classical stack $\\mathfrak{M}$ is called strictly $[-1,1]$-perfect if it can be represented by a complex of vector bundles\n\\[\n\\mathcal{C}^{-1}\\xrightarrow{d_{-1}}\\mathcal{C}^0\\xrightarrow{d_0}\\mathcal{C}^1\n\\]\nin cohomological degrees $-1,0,1$. Given such a complex, the dual morphism $d^{\\vee}$ yields a degree 1 derivative $Q=d^{\\vee}$ on $\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}(\\mathcal{C}^{\\bullet})$ satisfying $[Q,Q]=0$ since $d^2=0$, and so we may define the derived stack $\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet})$ as above. If the derivative $Q=d^{\\vee}$ is induced as above from a differential on the complex $\\mathcal{C}^{\\bullet}$, we will often abuse notation and write\n\\[\n\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet})\\coloneqq \\operatorname{Tot}^{d^\\vee}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet}).\n\\]\nWe describe $t_0(\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet}))$ explicitly, and show that it admits a description sheared of all mention of derived stacks. Let $A$ be a commutative algebra, and let $f\\colon \\operatorname{Spec}(A)\\rightarrow \\mathfrak{M}$ be an $A$-point of $\\mathfrak{M}$, where we assume that the pullback $f^*\\mathcal{C}^{\\bullet}$ is trivialised. Then \n\\[\n\\operatorname{Spec}(A)\\times_{\\mathfrak{M}}^{h}\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet})\\simeq\\operatorname{Spec}((A[\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}],Q))\n\\]\nwhere $\\bs{x}_n=x_{n,1},\\ldots x_{n,r_{n}}$ is a set of generators in cohomological degree $n$, $r_n=\\operatorname{rank}(\\mathcal{C}^{-n})$, and $Q$ is the derivation determined by the dual $d^{\\vee}$. We consider the homotopy coCartesian diagram of cdgas \n\\[\n\\begin{tikzcd}\n(A[\\bs{x}_{-1},\\bs{x}_0],d') &(A[\\bs{y}_{0},\\bs{x}_0,\\bs{x}_{-1}],d'')\n\\\\\n(A[\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}],Q)& (A[\\bs{y}_0,\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}],d''').\n\\arrow[from=1-1,to=1-2]\n\\arrow[from=2-1,to=1-1]\n\\arrow[from=2-1,to=2-2]\n\\arrow[from=2-2,to=1-2]\n\\arrow[\"\\llcorner\"{anchor=center, pos=0.125}', draw=none, from=1-2, to=2-1]\n\\end{tikzcd}\n\\]\nThe differentials are defined as follows: $d'$ is the differential induced by $Q$ in the quotient ring $A[\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}]\/(\\bs{x}_{1})$, $d'''$ is the extension of $Q$ defined by setting $d'''(\\bs{y}_{0,j})=\\bs{x}_{1,j}$ and $d''$ is the differential induced by $d'''$ in the quotient ring $A[\\bs{y}_0,\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}]\/(\\bs{x}_1)$. Set $B=A[\\bs{x}_0]\/(Q\\bs{x}_{-1})\\simeq \\tau^{\\geq 0}((A[\\bs{y}_0,\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}],d'''))$ Since $\\operatorname{Spec}$ and the classical truncation functor $t_0$ preserve limits, we obtain a Cartesian square\n\\[\n\\begin{tikzcd}\n\\operatorname{Spec}(B)& \\operatorname{Spec}(B[\\bs{y}_0])\\cong \\operatorname{Spec}(B)\\times\\mathbb{A}^{r_{-1}}\n\\\\\nt_0(\\operatorname{Spec}((A[\\bs{x}_{-1},\\bs{x}_0,\\bs{x}_{1}],Q))) &\\operatorname{Spec}(B).\n\\arrow[from=1-1,to=2-1]\n\\arrow[\"p\"',from=1-2,to=1-1]\n\\arrow[\"a\",from=1-2,to=2-2]\n\\arrow[from=2-2,to=2-1]\n\\arrow[\"\\llcorner\"{anchor=center, pos=0.125}', draw=none, from=1-2, to=2-1]\n\\end{tikzcd}\n\\]\nHere, $p$ is the projection, and $a$ is defined by the action of $\\mathcal{C}^{-1}$ on the total space $\\operatorname{Tot}_{\\mathfrak{M}}(\\ker(d_0))$. Globally, we find that $t_0(\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet}))$ is the classical quotient stack of $\\operatorname{Tot}_{\\mathfrak{M}}(\\ker(d_{0}))$ by the action of $\\mathcal{C}^{-1}$.\n\nThe above analysis can be repeated with minor modification for the case of a longer complex of vector bundles\n\\[\n\\mathcal{C}^{-n}\\xrightarrow{d_{-n}}\\mathcal{C}^{-n+1}\\xrightarrow{d_{-n+1}}\\ldots \\xrightarrow{d_0}\\mathcal{C}^{1}\n\\]\nunder the assumption that $\\mathcal{C}^{\\bullet}$ has tor-amplitude $[-1,1]$.\n\\subsection{Virtual pullbacks for globally presented morphisms}\n\\label{virt_pb_sec}\n\n\\subsubsection{Definition of virtual pullback}\n\\label{vpb_sec}\nWe begin with the definition of virtual pullback at the level of mixed Hodge module complexes, for which we assume that the underlying classical stack $\\mathfrak{M}=t_0(\\bs{\\mathfrak{M}})$ has an acyclic cover in the sense of Definition \\ref{acyclic_cover_def}. We assume that we are given a morphism $a\\colon \\mathfrak{M}\\rightarrow \\mathcal{M}$ to a quasiprojective scheme. Under our assumptions, $\\mathfrak{E}\\coloneqq t_0(\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^Q(\\mathcal{C} ^{\\bullet}))$ has an acyclic cover. We seek to define a virtual pullback morphism\n\\[\na_*v_{\\mathcal{C}}\\colon a_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}}\\rightarrow a_*(\\pi_{\\mathfrak{M}})_{*}\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{E}}\\otimes\\mathbf{L}^{\\vrank(\\mathcal{C} ^{\\bullet})}.\n\\]\nSince $\\mathfrak{M}$ has an acyclic cover, we may pull back to a scheme and assume that $\\mathfrak{M}$ is itself a scheme, which we will label $X$. We define the category $\\mathcal{D}^+(\\mathrm{MHM}(X))$ as in \\S\\ref{MHM_sec}. Consider the following commutative diagram\n\\[\n\\begin{tikzcd}\n&\\operatorname{Tot}_Y(V)&Y\n\\\\\nX&Y\\coloneqq t_0(\\operatorname{Tot}_X^Q(\\mathcal{C} ^{\\leq 0})) &Z\\coloneqq t_0(\\operatorname{Tot}^Q_X(\\mathcal{C} ^{\\bullet}))\\\\\n&\\mathcal{M}\n\\arrow[\"\\ulcorner\"{anchor=center, pos=0.125}', draw=none, from=2-3, to=1-2]\n\\arrow[\"0_{V}\",hookrightarrow, from=2-2, to=1-2]\n\\arrow[\"\\pi_X\"',from=2-2,to=2-1]\n\\arrow[\"s\"',from=1-3,to=1-2]\n\\arrow[from=2-3,to=2-2]\n\\arrow[from=2-3,to=1-3]\n\\arrow[\"a\"', from=2-1, to = 3-2]\n\\arrow[\"b\",from=2-2,to=3-2]\n\\arrow[\"c\",from=2-3,to=3-2]\n\\end{tikzcd}\n\\]\nin which $V=\\pi_{X}^*\\mathcal{C} ^1$ and $s$ is the section induced by the sum of the morphisms of coherent sheaves\n\\[\nm_i^{\\vee}\\colon (\\mathcal{C} ^1)^{\\vee}\\rightarrow \\Sym_{\\mathcal{O}_X}((\\mathcal{C} ^0)^{\\vee}).\n\\]\nThe morphism $\\pi_X$ is the projection of an affine stack fibration, so that there is a natural isomorphism\n\\[\nl\\colon \\mathbb{D}\\underline{\\mathbf{Q}}_X\\rightarrow (\\pi_{X})_{*}\\mathbb{D}\\underline{\\mathbf{Q}}_Y\\otimes \\mathbf{L}^{\\vrank(\\mathcal{C} ^{\\leq 0})}.\n\\]\nWe define the morphism $v_s\\colon \\mathbb{D}\\underline{\\mathbf{Q}}_Y\\rightarrow \\mathbb{D}\\underline{\\mathbf{Q}}_Z\\otimes\\mathbf{L}^{\\operatorname{rank}(\\mathcal{C} ^1)}$\nvia refined Gysin pullback along $s$, and define the virtual pullback\n\\begin{equation}\n\\label{pfvp}\na_*v_{\\mathcal{C}}\\colon a_*\\mathbb{D}\\underline{\\mathbf{Q}}_X\\rightarrow c_*\\mathbb{D}\\underline{\\mathbf{Q}}_Z\\otimes \\mathbf{L}^{\\vrank(\\mathcal{C} ^{\\bullet})}\n\\end{equation}\nas the composition $(b_*v_s)\\circ (a_*l)$.\n\nAt the level of derived categories of constructible complexes, there is no need to assume that any of the above spaces are varieties, and setting $X=\\mathcal{M}=\\mathfrak{M}$ we define the virtual pullback\n\\[\nk_{X}\\rightarrow c_*k_Z[-2\\vrank(\\mathcal{C}^{\\bullet})]\n\\]\nas in \\eqref{pfvp}.\n\\subsubsection{Base change} \n\\begin{proposition}\n\\label{vpb_bchange}\nLet $\\bs{f}\\colon \\bs{\\mathfrak{N}}\\rightarrow \\bs{\\mathfrak{M}}$ be a representable morphism of derived stacks, let $\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^Q(\\mathcal{C}^{\\bullet})\\rightarrow \\bs{\\mathfrak{M}}$ be a globally presented quasi-smooth morphism, so we have the Cartesian diagram of stacks\n\\[\n\\begin{tikzcd}\nX=t_0(\\operatorname{Tot}_{\\bs{\\mathfrak{N}}}^{f^*Q}(f^*\\mathcal{C}^{\\bullet})) &Y=t_0(\\operatorname{Tot}_{\\bs{\\mathfrak{M}}}^{Q}(\\mathcal{C}^{\\bullet}))\n\\\\\n\\mathfrak{N}& \\mathfrak{M}.\n\\arrow[\"g\",from=1-1,to=1-2]\n\\arrow[\"\\pi_{\\mathfrak{N}}\",from=1-1,to=2-1]\n\\arrow[\"\\pi_{\\mathfrak{M}}\",from=1-2,to=2-2]\n\\arrow[\"f\",from=2-1,to=2-2]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nSet $h=\\pi_{\\mathfrak{M}}\\circ g$.\n\\begin{enumerate}\n\\item\nAssume that $f$ is proper. Then the following diagram (in which the horizontal morphisms are provided by adjunction) commutes\n\\[\n\\begin{tikzcd}\nh_*\\mathbb{D} k_X[-2\\vrank(\\mathcal{C}^{\\bullet})] &(\\pi_{\\mathfrak{M}})_*\\mathbb{D} k_{Y}[-2\\vrank(\\mathcal{C}^{\\bullet})]\n\\\\\nf_*\\mathbb{D} k_{\\mathfrak{N}}& \\mathbb{D} k_{\\mathfrak{M}}.\n\\arrow[from=1-1,to=1-2]\n\\arrow[from=2-1,to=1-1,\"f_{\\ast}v_{f^{\\ast}\\mathcal{C}^\\bullet}\"]\n\\arrow[from=2-2,to=1-2]\n\\arrow[from=2-1,to=2-2]\n\\end{tikzcd}\n\\]\n\\item\nAssume that $f$ is smooth of relative dimension $d$. Then the following diagram (in which the horizontal morphisms are provided by adjunction) commutes\n\\[\n\\begin{tikzcd}\nh_*\\mathbb{D} k_X[-2\\vrank(\\mathcal{C}^{\\bullet})] &(\\pi_{\\mathfrak{M}})_*\\mathbb{D} k_{Y}[-2\\vrank(\\mathcal{C}^{\\bullet})+2d]\n\\\\\nf_*\\mathbb{D} k_{\\mathfrak{N}}& \\mathbb{D} k_{\\mathfrak{M}}[2d].\n\\arrow[from=1-2,to=1-1]\n\\arrow[from=2-1,to=1-1,\"f_{\\ast}v_{f^{\\ast}\\mathcal{C}^\\bullet}\"]\n\\arrow[from=2-2,to=1-2]\n\\arrow[from=2-2,to=2-1]\n\\end{tikzcd}\n\\]\n\\end{enumerate}\nIf $\\mathfrak{M}=t_0(\\bs{\\mathfrak{M}})$ has an acyclic cover, the same statements are true at the level of mixed Hodge module complexes.\n\\end{proposition}\n\\begin{proof}\nFollows from Corollary \\ref{bc_Gysin}.\n\\end{proof}\n\\subsubsection{Virtual pullbacks done classically}\n\\label{cvpb_sec}\nLet $\\mathcal{C}^{-1}\\xrightarrow{d_{-1}}\\mathcal{C}^0\\xrightarrow{d_0} \\mathcal{C}^1$ be a three term complex of vector bundles on a classical stack $\\mathfrak{M}$. As in \\S \\ref{3t_sec}, the differential induces a derivation $Q$ on $\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet})$ satisfying $[Q,Q]=0$ and so we may define the stack $t_0(\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet}))$. As in \\S \\ref{3t_sec} the stack $\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})$ is just the quotient of $\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^0)$ by the action of $\\operatorname{Tot}_{\\mathfrak{M}}^Q(\\mathcal{C}^{-1})$. We have a diagram of stacks \n\\[\n\\begin{tikzcd}\n&\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^0).\n\\\\\n\\mathfrak{M}&&\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})\n\\arrow[from=1-2,to=2-1,\"\\pi_1\"]\n\\arrow[from=1-2,to=2-3,\"\\pi_2\"']\n\\arrow[from=2-3,to=2-1,\"\\pi\"]\n\\end{tikzcd}\n\\]\nAs $\\pi_1$ and $\\pi_2$ are smooth representable morphisms of stacks, and moreover affine fibrations, we obtain isomorphisms\n\\begin{align*}\n\\alpha\\colon &\\mathbb{D} k_{\\mathfrak{M}}\\rightarrow (\\pi_{1})_*\\mathbb{D} k_{\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^0)}[-2\\operatorname{rank}(\\mathcal{C}^0)]\\\\\n\\beta\\colon &\\mathbb{D} k_{\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})}\\rightarrow (\\pi_2)_*\\mathbb{D} k_{\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^0)}[-2\\operatorname{rank}(\\mathcal{C}^{-1})]\\\\\n\\gamma=(\\pi_{\\ast}\\beta^{-1}[-2\\vrank(\\mathcal{C}^{\\leq 0})])\\circ \\alpha\\colon &\\mathbb{D} k_{\\mathfrak{M}}\\rightarrow \\pi_*\\mathbb{D} k_{\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})}[-2\\vrank(\\mathcal{C}^{\\leq 0})].\n\\end{align*}\nThe differential $d_0\\colon \\mathcal{C}^0\\rightarrow \\mathcal{C}^1$ defines a section $s$ of $\\pi^*\\mathcal{C}^1$. We define the refined Gysin morphism \n\\[\n\\pi_*\\mathbb{D} k_{\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})}[-2\\vrank(\\mathcal{C}^{\\leq 0})]\\rightarrow \\pi_*(i_s)_*\\mathbb{D} k_{\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})_s}[-2\\vrank(\\mathcal{C}^{\\bullet})]\n\\]\nas in \\S \\ref{subsubsection:refinedGysinmorphism}. Composing with $\\gamma$, we obtain the virtual pullback $v_{\\mathcal{C}}$. In particular, this refined pullback is defined without any essential reference to derived algebraic geometry.\n\nWe have an isomorphism\n\\[\nt_0(\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet}))\\cong\\operatorname{Tot}_{\\mathfrak{M}}(\\mathcal{C}^{\\leq 0})_s\n\\]\nand under this isomorphism the refined Gysin morphism we have just defined agrees with \\S\\ref{vpb_sec}.\n\n\n\n\\subsubsection{Composing virtual pullbacks}\nThe following will play a crucial role in the proof of associativity of the relative Hall algebra product of \\S \\ref{subsubsection:ThecohaproductKV}.\n\\begin{proposition}\n\\label{gpres_assoc}\nLet $\\mathfrak{M}$ be a classical stack, and let\n\\[\n\\xymatrix{\n\\bs{\\mathfrak{F}}=\\operatorname{Tot}_{\\bs{\\mathfrak{T}}}^K(\\pi_{\\mathfrak{M}}^*\\mathcal{E}^{\\bullet})\\simeq \\operatorname{Tot}^{Q+K}_{\\mathfrak{M}}(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\bullet})\\ar[r]^-{\\pi_{\\bs{\\mathfrak{T}}}}&\\bs{\\mathfrak{T}}=\\operatorname{Tot}_{\\mathfrak{M}}^Q(\\mathcal{L}^{\\bullet})\\ar[r]^-{\\pi_{\\mathfrak{M}}}&\\mathfrak{M}\n}\n\\]\nbe a composition in $\\GPres_{\\mathfrak{M}}$. Then there is an equality of morphisms of constructible complexes\n\\begin{equation}\n\\label{comp_vpb}\n(((\\pi_{\\mathfrak{M}})_*v_{\\pi_{\\mathfrak{M}}^*\\mathcal{E}}[-2\\vrank(\\mathcal{L}^{\\bullet})]))\\circ v_{\\mathcal{L}}=v_{\\mathcal{L}\\oplus\\mathcal{E}}\\colon \\mathbb{D} k_{\\mathfrak{M}}\\rightarrow (\\pi_{\\mathfrak{M}}\\circ \\pi_{\\mathfrak{T}})_*(\\mathbb{D} k_{\\mathfrak{F}})[-2\\vrank(\\mathcal{L}^{\\bullet}\\oplus \\mathcal{E}^{\\bullet})].\n\\end{equation}\nAssume moreover that $\\mathfrak{M}$ is an Artin stack with an acyclic cover, and that we have a commutative diagram of morphisms of stacks where $\\mathcal{M}$ is a scheme\n\\[\n\\xymatrix{\n\\ar[dr]^{\\alpha}\\mathfrak{F}\\ar[r]^{ \\pi_{\\mathfrak{T}}}&\\ar[d]^{\\beta}\\mathfrak{T}\\ar[r]^-{\\pi_{\\mathfrak{M}}}&\\mathfrak{M}\\ar[dl]_{\\gamma}\\\\\n&\\mathcal{M}.\n}\n\\]\nThen there is an equality of morphisms of complexes of mixed Hodge modules\n\\begin{align*}\n\\beta_*v_{\\pi^*_{\\mathfrak{M}}\\mathcal{E}}\\otimes \\mathbf{L}^{\\vrank (\\mathcal{L}^{\\bullet})}\\circ \\gamma_*v_{\\mathcal{L}}=\\gamma_*v_{\\mathcal{L}\\oplus \\mathcal{E}}\\colon \\gamma_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}}\\rightarrow \\alpha_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{F}}\\otimes\\mathbf{L}^{\\vrank(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\bullet})}.\n\\end{align*}\nIn words, virtual pullback is functorial for global compositions.\n\\end{proposition}\n\\begin{proof}\nWe prove the result in the category of constructible complexes, the mixed Hodge module proof is identical. Denote by \n\\begin{align*}\na&\\colon \\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{L}^{\\leq 0})\\rightarrow \\mathfrak{M}\\\\\nd&\\colon t_0(\\operatorname{Tot}^{Q+K}_{\\mathfrak{M}}(\\mathcal{L}^\\bullet \\oplus \\mathcal{E}^{\\leq 0}))\\rightarrow \\mathfrak{M}\n\\end{align*}\nthe natural projections, and set\n\\begin{align*}\nX&=\\operatorname{Tot}_{\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{L}^{\\leq 0})}(a^*\\mathcal{L}^1)\\\\\nY&=\\operatorname{Tot}_{t_0(\\operatorname{Tot}^{Q+K}_{\\mathfrak{M}}(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\leq 0}))}(d^*\\mathcal{E}^1).\n\\end{align*}\nConsider the following commutative diagram\n\\[\n\\begin{tikzcd}\n& {X}& \\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{L}^{\\leq 0})&\\\\\n\\mathfrak{M}& A=\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{L}^{\\leq 0})&B=t_0(\\operatorname{Tot}^Q_{\\mathfrak{M}}(\\mathcal{L}^{\\bullet}))\\\\\n&C=\\operatorname{Tot}^{Q+K}_{\\mathfrak{M}}((\\mathcal{L}\\oplus\\mathcal{E})^{\\leq 0})&D=t_0(\\operatorname{Tot}^{Q+K}_{\\mathfrak{M}}(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\leq 0}))& Y\\\\\n&&t_0(\\operatorname{Tot}_{\\mathfrak{M}}^{Q+K}(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\bullet}))&t_0(\\operatorname{Tot}^{Q+K}_{\\mathfrak{M}}(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\leq 0}))\n\\arrow[\"s\"',from=1-3,to=1-2]\n\\arrow[\"0_{a^*\\mathcal{L}^1}\",from=2-2,to=1-2]\n\\arrow[from=2-3,to=1-3]\n\\arrow[\"a\",from=2-2,to=2-1]\n\\arrow[from=2-3,to=2-2]\n\\arrow[\"\\pi\",from=3-2,to=2-2]\n\\arrow[from=3-3,to=2-3]\n\\arrow[from=3-3,to=3-2]\n\\arrow[\"0_{d^*\\mathcal{E}^1}\",from=3-3,to=3-4]\n\\arrow[\"s'\",from=4-4,to=3-4]\n\\arrow[from=4-3,to=3-3]\n\\arrow[from=4-3,to=4-4]\n\\arrow[\"\\ulcorner\"{anchor=center, pos=0.125}, draw=none, from=2-3, to=1-2]\n\\arrow[\"\\ulcorner\"{anchor=center, pos=0.125}, draw=none, from=3-3, to=2-2]\n\\arrow[\"\\urcorner\"{anchor=center, pos=0.125}, draw=none, from=4-3, to=3-4]\n\\end{tikzcd}\n\\]\nWe denote by $a,b,c,d$ the morphisms from $A,B,C,D$, respectively, to $\\mathfrak{M}$. Then the central square of the above diagram yields the diagram\n\\[\n\\begin{tikzcd}\na_*\\mathbb{D} k_A[-2\\vrank(\\mathcal{L}^{\\leq 0})]&b_* \\mathbb{D} k_B[-2\\vrank(\\mathcal{L}^{\\bullet})]\\\\\nc_*\\mathbb{D} k_C[-2\\vrank((\\mathcal{L}\\oplus\\mathcal{E})^{\\leq 0}]&d_* \\mathbb{D} k_D[-2\\vrank(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\leq 0})]\n\\arrow[from=1-1,to=1-2]\n\\arrow[from=1-1,to=2-1]\n\\arrow[from=1-2,to=2-2]\n\\arrow[from=2-1,to=2-2]\n\\end{tikzcd}\n\\]\nin which all arrows are given by pullback or refined Gysin pullback. This diagram commutes by Proposition~\\ref{vpb_bchange}. So the left hand side of the claimed equality in \\eqref{comp_vpb} is given by composing pullback along $a\\pi$ in the following diagram with refined Gysin pullbacks along $(a\\pi)^*s$ and $s'$:\n\\[\n\\begin{tikzcd}\n&\\operatorname{Tot}_C((a\\pi)^*\\mathcal{L}^1)&C\n\\\\\n\\mathfrak{M}&C&D&t_0(\\operatorname{Tot}_{\\mathfrak{M}}^{Q+K}(\\mathcal{L}^{\\bullet}\\oplus\\mathcal{E}^{\\bullet}))\\\\\n&&Y&D.\n\\arrow[\"(a\\pi)^*s\"',from=1-3,to=1-2]\n\\arrow[\"a\\pi\",from=2-2,to=2-1]\n\\arrow[from=2-3,to=2-2]\n\\arrow[from=2-3,to=1-3]\n\\arrow[\"0_{(a\\pi)^*\\mathcal{L}^1}\",from=2-2,to=1-2]\n\\arrow[from=2-4,to=2-3]\n\\arrow[\"0_{d^*\\mathcal{E}^1}\",from=2-3,to=3-3]\n\\arrow[from=2-4,to=3-4]\n\\arrow[from=3-4,to=3-3]\n\\arrow[\"s'\",from=3-4,to=3-3]\n\\arrow[\"\\ulcorner\"{anchor=center, pos=0.125}, draw=none, from=2-3, to=1-2]\n\\arrow[\"\\llcorner\"{anchor=center, pos=0.125}, draw=none, from=2-4, to=3-3]\n\\end{tikzcd}\n\\]\nThe result then follows from Proposition \\ref{sum_comp}.\n\\end{proof}\n\\subsubsection{Functoriality under global equivalences}\n\\begin{proposition}\n\\label{gqe_prop}\nAssume we are given the following commutative diagram\n \\[\n \\begin{tikzcd}\n\t{\\bs{\\mathfrak{N}} = \\operatorname{Tot}^{Q_{\\mathcal{C}}}_{\\bs{\\mathfrak{M}}}(\\mathcal{C}^{\\bullet})}& \\bs{\\mathfrak{M}}\\\\\n\t{\\bs{\\mathfrak{N}}'=\\operatorname{Tot}^{Q_{\\mathcal{C}'}}_{\\bs{\\mathfrak{M}}}(\\mathcal{C}'^{\\bullet})}& \n\t\\arrow[\"\\bs{\\pi}\", from=1-1, to=1-2]\n\t\\arrow[\"{\\bs{f}}\", from=1-1, to=2-1]\n\t\\arrow[\"{\\bs{\\pi'}}\"', from=2-1, to=1-2]\n\\end{tikzcd}\n \\]\nin which $\\bs{\\pi},\\bs{\\pi}'$ are globally presented quasi-smooth morphisms and $\\bs{f}$ is a global equivalence between them. As usual we write $\\mathfrak{M} = t_0(\\bs{\\mathfrak{M}})$, $\\mathfrak{N} = t_0(\\bs{\\mathfrak{N}})$, $\\mathfrak{N}' = t_0(\\bs{\\mathfrak{N}}')$. Then the following diagram commutes. \n\\[\n\\begin{tikzcd}\nk_{\\mathfrak{M}}&\\pi_* k_{\\mathfrak{N}}[-2\\vrank(\\mathcal{C}^{\\bullet})]\\\\\n&\\pi'_{\\ast}k_{\\mathfrak{N}'}[-2\\vrank(\\mathcal{C}^{\\bullet})]\n\\arrow[\"v_{\\mathcal{C}}\",from=1-1,to=1-2]\n\\arrow[\"v_{\\mathcal{C}'}\"',from=1-1,to=2-2]\n\\arrow[\"\\cong\",from=1-2,to=2-2]\n\\end{tikzcd}\n\\]\nwhere the vertical isomorphism is induced by the isomorphism $f=t_0(\\bs{f})$. Assume, in addition, that $\\mathfrak{M}$ has an acyclic cover, and we are given a morphism $a\\colon\\mathfrak{M}\\rightarrow \\mathcal{M}$ to a scheme. Then the following diagram commutes\n \\[\n\\begin{tikzcd}\n{a_*\\underline{\\mathbf{Q}}_{\\mathfrak{M}}}\\arrow{dr}[swap]{a_*v_{\\mathcal{C}'}}&{a_*\\pi_*\\underline{\\mathbf{Q}}_{\\mathfrak{N}}}\\otimes\\mathbf{L}^{\\vrank(\\mathcal{C}^{\\bullet})}\\\\\n&{a_*\\pi'_*\\underline{\\mathbf{Q}}_{\\mathfrak{N}'}}\\otimes\\mathbf{L}^{\\vrank(\\mathcal{C}^{\\bullet})}.\n\\arrow[\"{a_*v_{\\mathcal{C}}}\", from=1-1, to=1-2]\n\\arrow[\"{\\cong}\", from=1-2, to=2-2]\n\\end{tikzcd}\n\\]\n\n\\end{proposition}\n\\begin{proof}\nWe prove the constructible complex version of the theorem, the mixed Hodge module version is proved in the same way. We have a commutative diagram\n \\[\n \\begin{tikzcd}\n\t{\\mathfrak{M}} & {\\operatorname{Tot}(\\mathcal{C}'^{\\leq 0})} & {\\operatorname{Tot}(\\mathcal{C}^{\\leq 0})} & Z \\\\\n\t& {\\operatorname{Tot}(\\pi'^*\\mathcal{C}^1)} & {\\operatorname{Tot}(\\pi^*\\mathcal{C}^1)} & {\\operatorname{Tot}(\\mathcal{C}^{\\leq 0})} \\\\\n\t& {\\operatorname{Tot}(\\pi'^*\\mathcal{C}'^1)} & {} & {\\operatorname{Tot}(\\mathcal{C}'^{\\leq 0})}\n\t\\arrow[\"{\\pi'}\", from=1-2, to=1-1]\n\t\\arrow[\"{f^{\\leq 0}}\", from=1-3, to=1-2]\n\t\\arrow[\"q\",from=1-4, to=1-3]\n\t\\arrow[\"u\", from=1-2, to=2-2]\n\t\\arrow[\"{\\pi'^*f^1}\", from=2-2, to=3-2]\n\t\\arrow[\"{s_{d'^1}}\"', from=3-4, to=3-2]\n\t\\arrow[\"0\"', from=1-3, to=2-3]\n\t\\arrow[\"q\",from=1-4, to=2-4]\n\t\\arrow[\"{s_{d^1}}\"', from=2-4, to=2-3]\n\t\\arrow[\"v\"', from=2-3, to=2-2]\n\t\\arrow[\"{f^{\\leq 0}}\", from=2-4, to=3-4]\n\t\\arrow[\"\\pi\"', bend right=30, from=1-3, to=1-1]\n\t\\arrow[\"0\"', bend right=70, from=1-2, to=3-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-3, to=2-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-4, to=2-3]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.025, rotate=-90}, draw=none, from=2-4, to=3-2]\n\\end{tikzcd}\n \\]\nwhere all the squares are Cartesian (since $f$ is a quasi-isomorphism), and we have left out some subscripts in order to reduce clutter. In particular, $Z=t_0(\\operatorname{Tot}^{Q_{\\mathcal{C}}}_{\\mathfrak{M}}(\\mathcal{C}^{\\bullet}))\\cong t_0(\\operatorname{Tot}^{Q_{\\mathcal{C}'}}_{\\mathfrak{M}}(\\mathcal{C}'^{\\bullet}))$. The maps out of $Z$ are the natural inclusions, the map $v$ is the natural morphism induced by $f^0$ coming from the identification $\\operatorname{Tot}(\\pi^*\\mathcal{C}^1)\\cong \\operatorname{Tot}((f^{\\leq 0})^*\\pi'^*\\mathcal{C}^1)$. The map $u$ is the zero-section of the vector bundle $\\operatorname{Tot}(\\pi'^*\\mathcal{C}^1)\\rightarrow \\operatorname{Tot}(\\mathcal{C}'^{\\leq 0})$. The maps in this diagram satisfy the following additional properties:\n\\begin{enumerate}\n \\item The maps $f^{\\leq 0}$ and $v$ are l.c.i. of codimension $\\vrank(\\mathcal{C}'^{\\leq 0})-\\vrank(\\mathcal{C}^{\\leq 0})$,\n \\item The map $s_{d^1}$ is l.c.i. of codimension $\\operatorname{rank}(\\mathcal{C}^1)$,\n \\item The map $s_{d'^1}$ is l.c.i. of codimension $\\operatorname{rank}(\\mathcal{C}'^1)$.\n\\end{enumerate}\n\nSince $\\mathcal{C}^{\\bullet}$ and $\\mathcal{C}'^{\\bullet}$ are quasi-isomorphic, we have in particular $\\vrank(\\mathcal{C}^{\\bullet})=\\vrank(\\mathcal{C}'^{\\bullet})$, which means that $v\\circ s_{d^1}$ and $s_{d'^1}$ are both of the same codimension, $\\operatorname{rank}(\\mathcal{C}'^{1})$. The maps $f^{\\leq 0}$ and $v$ are also of the same codimension and hence these Cartesian squares have no excess intersection bundle. Via Lemma \\ref{zei_lemma}, we obtain that the virtual pullbacks by $\\pi\\circ q$ and $\\pi'\\circ (f^{\\leq 0}\\circ q)$ coincide.\n\\end{proof}\n\\subsubsection{Derived equivalences}\n\\label{deq_sec}\nLet $\\mathfrak{M}$ be a classical stack. Let $(\\mathcal{C}^{\\bullet},d_{\\mathcal{C}})$ and $(\\mathcal{L}^{\\bullet},d_{\\mathcal{L}})$ be perfect complexes in $\\mathcal{D}(\\Coh(\\mathfrak{M}))$, with $\\mathcal{C}^i=\\mathcal{L}^i=0$ for $i\\geq 2$, and with tor-amplitude $[-1,1]$, and let us assume that there is an isomorphism between these two complexes in $\\mathcal{D}(\\Coh(\\mathfrak{M}))$. We would like to show that these two complexes determine equal virtual pullbacks.\n\nTo start with, we make a weak technical assumption on the base stack $\\mathfrak{M}$, namely that it has the \\textit{resolution property}. This is the condition that every coherent sheaf on $\\mathfrak{M}$ is the quotient of a vector bundle. In \\cite{totaro2004resolution} it is proved that having the resolution property is equivalent to being a quotient of a quasi-affine scheme by a finite type affine group scheme. In particular, it is stable under taking Cartesian products. \n\nWe recall some basic homological algebra:\n\\begin{lemma}\n\\label{perfect_bounds_lemma}\nLet $\\mathfrak{M}$ have the resolution property. Then every complex $\\mathcal{F}^{\\bullet}$ of coherent sheaves that is perfect, considered as an object in the derived category of coherent sheaves on $\\mathfrak{M}$, admits a quasi-isomorphism $\\mathcal{L}^{\\bullet}\\xrightarrow{\\simeq}\\mathcal{F}^{\\bullet}$ where $\\mathcal{L}^{\\bullet}$ is a bounded complex of vector bundles with $\\mathcal{L}^i=0$ for $i>m(\\mathcal{F}^{\\bullet})\\coloneqq \\max\\{j \\mid \\mathcal{H}^j(\\mathcal{F}^{\\bullet})\\neq 0\\}$.\n\\end{lemma}\n\\begin{proof}\nVia the quasi-isomorphism $\\tau^{\\leq m}\\mathcal{F}^{\\bullet}\\rightarrow \\mathcal{F}^{\\bullet}$ we may assume that $\\mathcal{F}^{i}=0$ for $i>m$. By the resolution property we can find a surjection $f_m\\colon\\mathcal{L}^m\\twoheadrightarrow \\mathcal{F}^m$ from a vector bundle. This defines a morphism of complexes $\\mathcal{L}^{\\bullet}\\rightarrow \\mathcal{F}^{\\bullet}$, with $\\mathcal{L}^{\\bullet}$ concentrated in degree $m$. Let $\\mathcal{G}^{\\bullet}$ be the resulting double complex. Then $m(\\mathcal{G}^{\\bullet})\\sum_{j=1}^sp(a_j)$. Finally, we let $\\mathcal{M}_{\\mathcal{A},a}^s$ be the open locus of $\\mathcal{M}_{\\mathcal{A},a}$ over which $\\mathtt{JH}_a$ is a $\\mathbf{C}^*$-gerbe. It parameterises simple objects of $\\mathcal{A}$ of class $a$.\n\n\\begin{proposition}\n\\label{proposition:geometryofgms}\nLet $a\\in\\pi_0(\\mathcal{M}_{\\mathcal{A}})$. We have the following properties:\n\\begin{enumerate}\n \\item The set $\\Sigma_{\\mathcal{A}}$ is the set of $a\\in\\pi_0(\\mathcal{M}_{\\mathcal{A}})$ for which $\\mathtt{JH}_a$ is generically a $\\mathbf{C}^*$-gerbe,\n \\item If $a\\in\\Sigma_{\\mathcal{A}}$, then $\\mathcal{M}_{\\mathcal{A},a}$ is irreducible of dimension $p(a)$ and its smooth locus is $\\mathcal{M}_{\\mathcal{A},a}^s$,\n \\item If $\\underline{\\mathcal{F}}$ is a $\\Sigma$-collection in $\\mathcal{A}$ and $Q_{\\underline{\\mathcal{F}}}$ a half of the Ext-quiver of $\\underline{\\mathcal{F}}$, then $\\psi_{\\underline{\\mathcal{F}}}^{-1}(\\Sigma_{\\mathcal{A}})= \\Sigma_{\\Pi_{Q_{\\underline{\\mathcal{F}}}}}$.\n\\end{enumerate}\n\\end{proposition}\n\\begin{proof}\n The proof is straightforward, combining Theorem \\ref{theorem:neighbourhood} and \\cite[Theorem 1.2]{crawley2001geometry} together with the compatibility of Euler forms with $\\imath_{\\underline{\\mathcal{F}}}$, defined in \\S\\ref{subsubsection:extquiver}.\n\\end{proof}\n\n\n\n\\section{2-dimensional categories from geometry and algebra}\nThe categories conforming to the geometric setup of \\S \\ref{subsubsection:gsetup} and \\S \\ref{subsubsection:assumptionCoHAproduct} that we consider in this paper come from two constructions, and are of geometric or algebraic origin. In this section we explain these two constructions, and check that the various assumptions of \\S \\ref{subsubsection:gsetup} and \\S \\ref{subsubsection:assumptionCoHAproduct} are met.\n\\subsection{Geometry}\n\\label{geometry_constr_sec}\nLet $X$ be a complex projective variety. To start with we do not make any assumption on the smoothness or dimension of $X$.\n\\subsubsection{The moduli stack of semistable coherent sheaves}\n\\label{subsubsection:propernessp}\nWe fix an embedding $X\\rightarrow \\mathbf{P}^N$ of $X$ in some projective space, so that we have a distinguished choice of a very ample line bundle $\\mathcal{O}_X(1)$ on $X$ obtained as the restriction to $X$ of $\\mathcal{O}_{\\mathbf{P}^N}(1)$. For $\\mathcal{F}$ a coherent sheaf on $X$ we write $\\mathcal{F}(n)\\coloneqq \\mathcal{F}\\otimes\\mathcal{O}_X(1)^{\\otimes n}$.\n\nLet $\\mathcal{F}$ be a coherent sheaf on $X$. We say that $\\mathcal{F}$ is strongly generated by $\\mathcal{O}_X(n)$ if the natural map\n\\[\n \\operatorname{Hom}(\\mathcal{O}_X(n),\\mathcal{F})\\otimes_{\\mathbf{C}}\\mathcal{O}_X(n)\\rightarrow\\mathcal{F}\n \\]\nis an epimorphism of coherent sheaves and\n\\[\n \\operatorname{Ext}^i(\\mathcal{O}_X(n),\\mathcal{F})=\\HO^i(X,\\mathcal{F}(-n))=0\n \\]\n for $i>0$.\n\n Let $P(t)\\in\\mathbf{Q}[t]$ be a polynomial and $\\mathfrak{Coh}_{n,P(t)}(X)$ be the substack of $\\mathfrak{Coh}_{P(t)}(X)$ parameterising coherent sheaves on $X$ with Hilbert polynomial $P(t)$, strongly generated by $\\mathcal{O}_X(-n)$. As the conditions of being an epimorphism and of vanishing of cohomology are open conditions, this is an open substack of $\\mathfrak{Coh}_{P(t)}(X)$. It can be realised as the global quotient of an open subscheme $Q_X(n,P(t))$ of the Quot-scheme $\\operatorname{Quot}_X(n,P(t)):=\\operatorname{Quot}_X(\\mathcal{O}_X(-n)\\otimes\\mathbf{C}^{P(n)},P(t))$ of quotients $\\mathcal{O}_X(-n)^{P(n)}\\xrightarrow{\\varphi}\\mathcal{F}$ where $\\mathcal{F}$ has Hilbert polynomial $P(t)$. The open subscheme \n \\[\n Q_X(n,P(t))\\subset \\operatorname{Quot}_X(n,P(t))\n \\]\n consists of epimorphisms $\\mathcal{O}_X(-n)\\otimes\\mathbf{C}^{P(n)}\\xrightarrow{\\varphi}\\mathcal{F}$ such that $\\mathcal{F}$ is strongly generated by $\\mathcal{O}_X(-n)$ and $\\varphi$ induces an isomorphism $\\mathbf{C}^{P(n)}\\rightarrow \\HO^0(X,\\mathcal{F}(n))$. \n\n There is a natural action of $\\mathrm{GL}_{P(n)}$ on $Q_X(n,P(t))$, via the action on the factor $\\mathbf{C}^{P(n)}$ of $\\mathcal{O}_X(-n)\\otimes\\mathbf{C}^{P(n)}$. We have\n \\[\n \\mathfrak{Coh}_{n,P(t)}(X)\\simeq Q_X(n,P(t))\/\\mathrm{GL}_{P(n)}.\n \\]\nIt is known (see \\cite[Sec.2]{huybrechts2010geometry}) that the $\\mathrm{GL}_{P(n)}$ action on $\\operatorname{Quot}_X(n,P(t))$ admits a linearisation, from which it follows that the $\\mathrm{GL}_{P(n)}$-quotient $\\mathfrak{Coh}_{n,P(t)}(X)$ satisfies the resolution property.\n\n\n\\subsubsection{Projectivity}\n Let $P(t)$ and $R(t)$ be polynomials. We let $\\operatorname{Quot}_X(n,P(t),R(t))$ be the Quot-scheme parameterising quotients $\\mathcal{O}_X(-n)^{P(n)}\\xrightarrow{\\varphi}\\mathcal{F}\\xrightarrow{\\psi}\\mathcal{G}$ where $\\mathcal{F}$ (resp. $\\mathcal{G}$) has Hilbert polynomial $P(t)$ (resp. $R(t)$). We let $Q_X(n,P(t),R(t))$ be the open subscheme of such quotients for which $\\mathcal{F}$ is strongly generated by $\\mathcal{O}_X(-n)$ and $\\varphi$ induces an isomorphism $\\mathbf{C}^{P(n)}\\rightarrow \\HO^0(X,\\mathcal{F}(n))$. The action of $\\mathrm{GL}_{P(n)}$ on $\\mathcal{O}_X(-n)\\otimes\\mathbf{C}^{P(n)}$ induces an action of $\\mathrm{GL}_{P(n)}$ on $Q_X(n,P(t),R(t))$. Then,\n \\[\n Q_{X}(n,P(t),R(t))\/\\mathrm{GL}_{P(n)}\\simeq \\mathfrak{Exact}_{n,P(t),R(t)}(X),\n \\]\n where $\\mathfrak{Exact}_{n,P(t),R(t)}(X)$ is the stack of short exact sequences $0\\rightarrow\\mathcal{F}\\rightarrow\\mathcal{H}\\rightarrow\\mathcal{G}\\rightarrow0$ where $\\mathcal{H}$ is strongly generated by $\\mathcal{O}_X(-n)$, $\\mathcal{H}$ has Hilbert polynomial $P(t)$ and $\\mathcal{G}$ has Hilbert polynomial $R(t)$. We have a map $\\operatorname{Quot}_X(n,P(t),R(t))\\rightarrow \\operatorname{Quot}_X(n,P(t))$ forgetting the map $\\psi$, and a similar map obtained by restriction $\\operatorname{Quot}_X(n,P(t),R(t))\\rightarrow \\operatorname{Quot}_X(n,R(t))$.\n\n The map $\\operatorname{Quot}_X(n,P(t),R(t))\\rightarrow \\operatorname{Quot}_X(n,P(t))$ is projective as both $\\operatorname{Quot}_X(n,P(t),R(t))$ and $\\operatorname{Quot}_X(n,P(t))$ are projective schemes over $\\mathbf{C}$.\n \nBy definition, we have a Cartesian square\n\\[\n\\begin{tikzcd}\n\t{Q_X(n,P(t),R(t))} & {Q_{X}(n,P(t))} \\\\\n\t{\\operatorname{Quot}_X(n,P(t),R(t))} & {\\operatorname{Quot}_X(n,P(t))}.\n\t\\arrow[from=1-1, to=2-1]\n\t\\arrow[from=2-1, to=2-2]\n\t\\arrow[from=1-1, to=1-2]\n\t\\arrow[from=1-2, to=2-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd} \n\\]\n\n By base change, the morphism $Q_X(n,P(t),R(t))\\rightarrow Q_X(n,P(t))$ is projective.\n\n\n\\begin{proposition}\n\\label{gl_pr}\nThe morphism of stacks\n\\begin{align*}\np_{P(t),R(t)}\\colon\\mathfrak{Exact}_{n,P(t),R(t)}(X)&\\longrightarrow\\mathfrak{Coh}_{n,P(t)}(X)\\\\\n(0\\rightarrow\\mathcal{F}\\rightarrow\\mathcal{H}\\rightarrow\\mathcal{G}\\rightarrow0)&\\longmapsto\\mathcal{H}\n\\end{align*}\nis a representable projective morphism of stacks. In particular, $p_{P(t),R(t)}$ satisfies Assumption \\ref{p_assumption} from \\S\\ref{subsubsection:gsetup}.\n\\end{proposition}\n\\begin{proof}\nThis morphism is obtained from the quotient by $\\mathrm{GL}_{P(n)}$ of the natural projective morphism $Q_X(n,P(t),R(t))\\rightarrow Q_X(n,P(t))$ between schemes, so it is representable and proper.\n\\end{proof}\n\n\nWe define the set of \\textit{reduced polynomials} by imposing the equivalence relation on $\\mathbf{Q}[t]$: $P(t)\\sim Q(t)$ if $P(t)=\\lambda Q(t)$ for some $\\lambda\\in\\mathbf{Q}\\setminus\\{0\\}$. We denote equivalence classes by lowercase letters $p(t)\\in\\mathbf{Q}[t]\/\\sim$. For $p(t)\\in\\mathbf{Q}[t]\/\\sim $ we denote by $\\mathfrak{Coh}^{\\sst}_{p(t)}(X)$ the stack of coherent sheaves which are either the zero sheaf, or semistable with reduced Hilbert polynomial $p(t)$. We denote by $\\mathfrak{Exact}^{\\sst}_{p(t)}(X)$ the stack of short exact sequences of semistable coherent sheaves with reduced Hilbert polynomial $p(t)$.\n\n\\begin{corollary}\nLet $p(t)\\in\\mathbf{Q}[t]\/\\sim$ be a reduced polynomial. The morphism of stacks\n\\[\n \\mathfrak{Exact}^{\\sst}_{p(t)}(X)\\rightarrow\\mathfrak{Coh}^{\\sst}_{p(t)}(X)\n\\]\nmapping a short exact sequence of Gieseker semistable coherent sheaves on $X$ to the middle term is representable and projective, i.e. $\\mathfrak{Coh}^{\\sst}_{p(t)}(X)$ satisfies Assumption \\ref{p_assumption} from \\S\\ref{subsubsection:gsetup}.\n\\end{corollary}\n\\begin{proof}\nFix a polynomial $P(t)$ in the equivalence class $p(t)$. Since the leading term of any $Q(t)$ for which $\\mathfrak{Coh}_{Q(t)}(X)$ is nonempty is a positive integer divided by $\\deg(p(t))!$, there are finitely may $R(t)\\sim P(t)$ for which $p_{P(t),R(t)}^{-1}(\\mathfrak{Coh}_{n,P(t)}(X))$ is nonempty.\nIf $j\\colon \\mathcal{G}\\hookrightarrow\\mathcal{F}$ is a monomorphism of sheaves having the same reduced Hilbert polynomial where $\\mathcal{F}$ is semistable, then $\\mathcal{G}$ and $\\operatorname{coker}(j)$ are semistable. By boundedness of the moduli stack \\cite{huybrechts2010geometry}, for sufficiently large $n$ \n \\[\n \\mathfrak{Coh}^{\\sst}_{P(t)}(X)\\subset \\mathfrak{Coh}_{n,P(t)}(X).\n \\]\nProjectivity of $\\mathfrak{Exact}^{\\sst}_{p(t)}(S)\\rightarrow\\mathfrak{Coh}_{p(t)}^{\\sst}(X)$ then follows from Proposition \\ref{gl_pr} by base change.\n\\end{proof}\n\\subsubsection{Resolving RHom}\nFix a reduced Hilbert polynomial $p(t)$. So far we have placed few constraints on the projective variety $X$. In order for the stack $\\mathfrak{M}=\\mathfrak{Coh}^{\\sst}_{p(t)}(X)$ to satisfy all of the assumptions detailed in \\S\\ref{subsubsection:gsetup}, we next assume that $S=X$ has dimension at most 2 and is smooth.\n\nFix a polynomial $P(t)$ in the equivalence class $p(t)$. We denote by $\\mathfrak{M}_{P(t)}\\subset \\mathfrak{M}$ the substack of coherent sheaves with Hilbert polynomial $P(t)$. Let $\\mathcal{U}\\in\\Coh(\\mathfrak{M}_{P(t)}\\times S)$ be the universal coherent sheaf. By boundedness of the moduli space $\\mathfrak{M}_{P(t)}$ we can pick $n_1\\gg 0$ such that $\\mathcal{U}_{y}$ is strongly generated by $\\mathcal{O}_S(-n_1)$ for every sheaf $\\mathcal{U}_y$ corresponding to a point $y$ of $\\mathfrak{M}_{P(t)}$. Let \n\\[\n\\mathcal{L}^1=\\mathcal{H} om_{\\mathfrak{M}_{P(t)}\\times S}(\\pi_2^*\\mathcal{O}_S(-{n_1}),\\mathcal{U})\\otimes \\pi_2^*\\mathcal{O}_S(-{n_1}),\n\\]\nand define $\\mathcal{K}$ to be the kernel of the adjunction morphism $\\mathcal{L}^1\\rightarrow \\mathcal{U}$. By boundedness again, there is a $n_2\\gg n_1$ such that all sheaves $\\mathcal{K}_y$ parameterised by points $y$ of $\\mathfrak{M}_{P(t)}$ are strongly generated by $\\mathcal{O}_S(-n_2)$ and we define $\\mathcal{L}^2=\\mathcal{H} om_{\\mathfrak{M}_{P(t)}\\times S}(\\pi_2^*\\mathcal{O}_S(-{n_2}),\\mathcal{K})\\otimes \\pi_2^*\\mathcal{O}_S(-{n_2})$. Let $\\mathcal{L}^3$ be the kernel of the adjunction morphism $\\mathcal{L}^2\\rightarrow \\mathcal{L}^1$. The following is well-known\n\\begin{lemma}\nThe coherent sheaf $\\mathcal{L}^3$ is a flat family of vector bundles on $S$.\n\\end{lemma}\n\\begin{proof}\nLet $y$ be a $K$-point of $\\mathfrak{M}_{P(t)}$ for some field $K\\supset \\mathbf{C}$ and let $x$ be a point of $S_K$. Then $\\operatorname{Ext}_{S_K}^i(\\mathcal{L}_y^3,\\mathcal{O}_x)\\cong \\operatorname{Ext}_{S_K}^{i+2}(\\mathcal{U}_y,\\mathcal{O}_x)=0$ if $i\\geq 1$, and the result follows.\n\\end{proof}\nWe have thus defined a global resolution $\\mathcal{L}^{\\bullet}\\rightarrow \\mathcal{U}$ of the universal sheaf by vector bundles. Since the resolution depends on numbers $n_2\\gg n_1\\gg 0$ we will denote this resolution by $\\mathcal{L}^{\\bullet}_{n_1,n_2}$ when the dependence on these numbers is significant. Fix $R(t)\\sim P(t)$. We abuse notation and also denote by $\\mathcal{L}^{\\bullet}_{n_1,n_2}$ the resolution of the universal sheaf on $\\mathfrak{M}_{R(t)}\\times S$. For the next lemma we use boundedness again:\n\n\\begin{lemma}\nPick numbers $n'_2\\gg n'_1\\gg n_2\\gg n_1\\gg 0$. Let $y,y'$ be $K$-points of $\\mathfrak{M}_{R(t)}$ and $\\mathfrak{M}_{P(t)}$ respectively for a field $K \\supset \\mathbf{C}$. Then $\\operatorname{Ext}_{S_K}^n((\\mathcal{L}^i_{n'_1,n'_2})_{y'},(\\mathcal{L}^j_{n_1,n_2})_{y})=0$ for $n\\geq 1$ and all $i,j\\in\\{1,2,3\\}$.\n\\end{lemma}\nThe lemma implies that the dimension of $((\\pi_{1,2})_*\\mathcal{H} om(\\pi_{1,3}^*\\mathcal{L}^i_{n'_1,n'_2},\\pi_{2,3}^*\\mathcal{L}^j_{n_1,n_2}))_{y''}$ is constant across all $K$-points $y''$ of $\\mathfrak{M}_{P(T)}\\times \\mathfrak{M}_{R(t)}$, from which we deduce the following\n\\begin{corollary}\nPick numbers $n'_2\\gg n'_1\\gg n_2\\gg n_1\\gg 0$, and $i,j\\in\\{1,2,3\\}$. For numbers $a\\neq b$ let $\\pi_{a,b}$ denote the projection of $\\mathfrak{M}_{P(t)}\\times\\mathfrak{M}_{R(t)}\\times S$ onto its $a$th and $b$th factors. The coherent sheaf\n\\[\n\\mathcal{V}^{i,j}_{(n'_1,n'_2),(n_1,n_2)}\\coloneqq (\\pi_{1,2})_*\\mathcal{H} om(\\pi_{1,3}^*\\mathcal{L}^i_{n'_1,n'_2},\\pi_{2,3}^*\\mathcal{L}^j_{n_1,n_2})\n\\]\nis a vector bundle on $\\mathfrak{M}_{P(t)}\\times \\mathfrak{M}_{R(t)}$.\n\\end{corollary}\n\nNote that $\\mathcal{V}^{\\bullet,\\bullet}_{(n'_1,n'_2),(n_1,n_2)}$ is a double complex, with differentials induced by the differentials on $\\mathcal{L}^{\\bullet}_{n_1,n_2}$ and $\\mathcal{L}^{\\bullet}_{n'_1,n'_2}$. We denote by $\\mathcal{R}^{\\bullet}_{(n_1,n_2),(n'_1,n'_2)}$ the resulting total complex.\n\\begin{corollary}\nThe complex $\\mathcal{R}^{\\bullet}_{(n_1,n_2),(n'_1,n'_2)}$ provides a five term complex of vector bundles resolving the RHom complex on $\\mathfrak{M}_{P(t)}\\times \\mathfrak{M}_{R(t)}$.\n\\end{corollary}\n\\subsubsection{Stacks of extensions}\n\\label{new_exts_sec}\nSet $\\mathfrak{X}=t_0(\\operatorname{Tot}_{\\mathfrak{M}_{P(t)}\\times\\mathfrak{M}_{R(t)}}(\\mathcal{R}^{\\bullet}_{(n_1,n_2),(n'_1,n'_2)}))\\times S$. We denote by $\\pi'_{a,b}$ the projection of $\\mathfrak{X}$ onto the $a$th and $b$th factors of $\\mathfrak{M}_{P(t)}\\times\\mathfrak{M}_{R(t)}\\times S$. By construction, $\\mathfrak{X}$ carries a universal cone double complex\n\\[\n\\begin{tikzcd}\n&\\pi'^*_{2,3}\\mathcal{L}^3_{n_1,n_2}\n\\\\\n\\pi'^*_{1,3}\\mathcal{L}^3_{n'_1,n'_2}&\\pi'^*_{2,3}\\mathcal{L}^2_{n_1,n_2}\n\\\\\n\\pi'^*_{1,3}\\mathcal{L}^2_{n'_1,n'_2}&\\pi'^*_{2,3}\\mathcal{L}^1_{n_1,n_2}\n\\\\\n\\pi'^*_{1,3}\\mathcal{L}^1_{n'_1,n'_2}\n\\arrow[from=1-2,to=2-2]\n\\arrow[from=2-1,to=2-2]\n\\arrow[from=2-1,to=3-1]\n\\arrow[from=2-2,to=3-2]\n\\arrow[from=3-1,to=3-2]\n\\arrow[from=3-1,to=4-1]\n\\end{tikzcd}\n\\]\nThe first column is the pullback of the universal resolution $\\mathcal{L}^{\\bullet}_{n'_1,n'_2}$ along the projection to $\\mathfrak{M}_{P(t)}\\times S$, the second column is the pullback of the universal resolution $\\mathcal{L}^{\\bullet}_{n_1,n_2}$ along the projection to $\\mathfrak{M}_{R(t)}\\times S$, and the horizontal morphisms are determined by the fibre of the projection to $\\mathfrak{M}_{P(t)}\\times\\mathfrak{M}_{R(t)}\\times S$. We denote the total complex by $\\mathcal{E}^{\\bullet}$. Then since $\\mathcal{E}^i=0$\nfor $i>0$ there is a morphism of complexes\n\\[\n\\mathcal{E}^{\\bullet}\\rightarrow \\mathcal{H}^0(\\mathcal{E}^{\\bullet})\n\\]\nwhich is moreover a quasi-isomorphism, defining a morphism $q'\\colon \\mathfrak{X}\\rightarrow \\mathfrak{M}_{a+b}$ and a tautological morphism\n\\begin{equation}\n\\label{taut_out_morph}\nT\\colon \\mathcal{E}^{\\bullet}\\rightarrow q'^*\\mathcal{U}.\n\\end{equation}\nWe obtain the standard\n\\begin{proposition}\n\\label{cone_prop}\nThere is an equivalence of stacks\n\\[\nt_0(\\operatorname{Tot}_{\\mathfrak{M}_{P(t)}\\times\\mathfrak{M}_{R(t)}}(\\mathcal{R}^{\\bullet}_{(n_1,n_2),(n'_1,n'_2)}))\\simeq \\mathfrak{Exact}^{sst}_{P(t),R(t)}(S).\n\\]\n\\end{proposition}\n\\begin{remark}\n\\label{3t_complex}\nThe complex $\\mathcal{R}^{\\bullet}_{(n_1,n_2),(n'_1,n'_2)}$ is situated in cohomological degrees $[-2,2]$. There is a more economical presentation of the RHom complex, that will suffice for defining the relative CoHA product. We define \n\\[\n\\mathcal{R}^{i}_{(n_1,n_2),-}\\coloneqq (\\pi_{1,2})_*\\mathcal{H} om(\\pi_{1,3}^*\\mathcal{L}^i_{n_1,n_2},\\pi_{2,3}^*\\mathcal{U}),\n\\]\nFor $n_2 \\gg n_1\\gg0$ this defines a complex of vector bundles, in cohomological degrees $[0,2]$, and for $n_2 \\gg n_1\\gg n'_2\\gg n'_1\\gg 0$ the quasi-isomorphism $\\mathcal{L}^j_{n'_1,n'_2}\\rightarrow \\mathcal{U}$ induces a quasi-isomorphism $\\mathcal{R}^{\\bullet}_{(n_1,n_2),(n'_1,n'_2)}\\rightarrow \\mathcal{R}^{\\bullet}_{(n_1,n_2),-}$. \n\\end{remark}\nIn particular we obtain the following (well-known) proposition:\n\\begin{proposition}\nFix two non-zero polynomials $P(t),R(t)$ with the same reduction (i.e. differing by scalar multiplication). Fix numbers $n_2\\gg n_1\\gg 0$. Then the RHom complex on $ \\mathfrak{Coh}^{\\sst}_{P(t)}(S)\\times \\mathfrak{Coh}^{\\sst}_{R(t)}(S)$ is resolved by the three-term complex of vector bundles $\\mathcal{R}^{\\bullet}_{(n_1,n_2),-}$. In particular, Assumption \\ref{q_assumption1} is satisfied by the morphism $\\bs{q}\\colon \\operatorname{Tot}_{\\mathfrak{M}_{P(t)}\\times\\mathfrak{M}_{R(t)}}(\\mathcal{R}^{\\bullet}_{(n_1,n_2),-})\\rightarrow \\mathfrak{Coh}^{\\sst}_{P(t)}(S)\\times \\mathfrak{Coh}^{\\sst}_{R(t)}(S)$.\n\\end{proposition}\n\n\\subsubsection{Three-step filtrations}\nFix non-zero polynomials $P_m(t)$, with $m=1,2,3$, such that all three polynomials have the same reduction. We denote $\\mathfrak{M}_i=\\mathfrak{Coh}_{P_m(t)}^{\\sst}(S)$. We fix $n^{(1)}_2\\gg n^{(1)}_1\\gg n^{(2)}_2\\gg n^{(2)}_1\\gg n^{(3)}_2\\gg n^{(3)}_1\\gg 0$ and define vector bundle complexes\n\\begin{align*}\n\\mathcal{C}^{i,j}_{a,b}\\coloneqq (\\pi_{1,2,3})_*\\mathcal{H} om(\\pi_{a,4}^*\\mathcal{L}^i_{n^{(a)}_1,n^{(a)}_2},\\pi_{b,4}^*\\mathcal{L}^j_{n^{(b)}_1,n^{(b)}_2})[1]\n\\end{align*}\non $\\mathfrak{M}_1\\times\\mathfrak{M}_2\\times\\mathfrak{M}_3\\times S$ for each pair $a,b\\in\\{1,2,3\\}$ with $a}[r]^j&\\mathcal{C}\\!oh^{\\sst}_{p(t)}(\\overline{X})\\times\\mathcal{C}\\!oh^{\\sst}_{p(t)}(\\overline{X})\\ar[d]^{\\overline{\\oplus}}\\\\\n\\mathrm{Spec}(k)\\ar[r]^{r}&\\mathrm{Spec}(R)\\ar[r]^l&\\mathcal{C}\\!oh^{\\sst}_{p(t)}(X)\\ar@{^{(}->}[r]^{j'}&\\mathcal{C}\\!oh^{\\sst}_{p(t)}(\\overline{X})\n}\n\\]\nthere is a unique morphism $\\mathrm{Spec}(R)\\rightarrow \\mathcal{C}\\!oh^{\\sst}_{p(t)}(\\overline{X})\\times\\mathcal{M}^{\\sst}_{p(t)}(\\overline{X})$ making the whole diagram commute. This lift factors through $j$ if the induced morphism $\\alpha\\colon \\mathrm{Spec}(k)\\rightarrow \\mathcal{C}\\!oh^{\\sst}_{p(t)}(\\overline{X})\\times\\mathcal{C}\\!oh^{\\sst}_{p(t)}(\\overline{X})$ does. But this morphism corresponds to a direct sum decomposition of the coherent sheaf $\\mathcal{F}$ corresponding to the morphism $j'lr$. Since this morphism factors through $j'$, $\\mathcal{F}$ is supported on $X$, and so in any direct sum decomposition $\\mathcal{F}\\cong \\mathcal{F}'\\oplus\\mathcal{F}''$ both $\\mathcal{F}'$ and $\\mathcal{F}''$ are supported on $X$. It follows that $\\alpha$ factors through $j$.\n\\end{proof}\n\n\n\nFor $S$ a smooth quasi-projective surface, the only remaining assumption that will go into the construction of the BPS Lie algebra is Assumption \\ref{BPS_cat_assumption}. In order to satisfy this assumption we will either restrict to coherent sheaves on smooth quasi-projective $S$ with $\\mathcal{O}_S\\cong K_S$, or consider coherent sheaves on smooth quasi-projective $S$ with zero-dimensional support.\n\n\\subsection{Algebra}\n\\label{algebra_constr_sec}\nFor categories of representations over algebras, checking that the assumptions \\ref{p_assumption}-\\ref{ds_fin} of \\S \\ref{section:modulistackobjects2CY} hold is much more straightforward. Nonetheless, we spell out some of the details below.\n\\subsubsection{A class of quiver algebras}\nLet $B$ be an algebra, and let us assume that we have presented $B$ in the form \n\\begin{align}\n\\label{standard_pres}\nB=A\/\\langle R\\rangle.\n\\end{align}\nHere, $A$ is the universal localisation (as in \\cite{schofield1985representations}) of the free path algebra of a quiver $kQ$, obtained by formally inverting a finite set of elements $b_1,\\ldots,b_l$, where each $b_i$ is a linear combination of cyclic paths with the same start-points. We assume that $R=\\{r_1,\\ldots,r_e\\}$ is a finite set of relations in $A$, and without loss of generality we assume that each $r_i$ is a linear combination of paths with the same starting point, and the same ending point. We define the dimension vector $(M_i\\coloneqq e_i\\cdot M)_{i\\in Q_0}\\in \\mathbf{N}^{Q_0}$ of a $B$-module $M$ in the usual way.\n\\subsubsection{Good moduli spaces}\nFor $\\mathbf{d}\\in Q_0$ the stack $\\mathfrak{M}_{B,\\mathbf{d}}$ of $\\mathbf{d}$-dimensional $B$-modules is a global quotient of an affine scheme, and thus satisfies the resolution property. The coarse moduli space $\\mathcal{M}_{B,\\mathbf{d}}$ is the affinization of $\\mathfrak{M}_{B,\\mathbf{d}}$, and the morphism\n\\[\n\\mathtt{JH}\\colon \\mathfrak{M}_{B,\\mathbf{d}}\\rightarrow \\mathcal{M}_{B,\\mathbf{d}}\n\\]\nis a good moduli space for $\\mathfrak{M}_{B,\\mathbf{d}}$, i.e. $\\mathfrak{M}_B$ satisfies Assumption \\ref{gms_assumption}. The following is proved in exactly the same way as Proposition \\ref{proposition:directsumproperpreprojective}:\n\\begin{proposition}\nThe direct sum map $\\oplus\\colon\\mathcal{M}_{B}\\times \\mathcal{M}_B\\rightarrow \\mathcal{M}_B$ is finite. In particular, the category of finite-dimensional $B$-modules satisfies Assumption \\ref{ds_fin}.\n\\end{proposition}\nWe have shown that the geometric assumptions \\ref{gms_assumption} and \\ref{ds_fin} in \\S \\ref{BPS_assumptions_sec} that go into the definition of the BPS algebra are always met for $B\\lmod$. In the rest of this section we check Assumptions \\ref{p_assumption}-\\ref{q_assumption2}.\n\\subsubsection{Properness}\nBase changing from the stack of $Q$-representations also deals with Assumption \\ref{p_assumption}:\n\\begin{proposition}\nLet $\\mathfrak{Exact}_B$ denote the stack of short exact sequences of finite-dimensional $B$-modules. Then the forgetful morphism $p\\colon \\mathfrak{Exact}_B\\rightarrow \\mathfrak{M}_B$ taking a short exact sequence to its central term is a projective representable morphism of stacks. In particular, the category of finite-dimensional $B$-modules satisfies Assumption \\ref{p_assumption}.\n\\end{proposition}\n\\begin{proof}\nWe have a Cartesian square of stacks\n\\[\n\\begin{tikzcd}\n\\mathfrak{Exact}_B& \\mathfrak{M}_B\\\\\n\\mathfrak{Exact}_{kQ}&\\mathfrak{M}_{ kQ}\n\\arrow[hookrightarrow,from=1-1,to=2-1]\n\\arrow[hookrightarrow,from=1-2,to=2-2]\n\\arrow[\"p\",from=1-1,to=1-2]\n\\arrow[\"p'\",from=2-1,to=2-2]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}', draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nin which $p'$ is easily shown to be representable and proper. The result follows by base-change.\n\\end{proof}\n\\subsubsection{Derived enhancement of $B$}\n\\label{Dalg_sec}\nOur explicit presentation of $B$ determines a derived enhancement of it. If $R=\\{r_1,\\ldots,r_e\\}$ is a finite set of relations on the localised path algebra $A$, and each $r_i$ is a linear combination of paths with the same starting point and ending point, we first define the graded quiver $\\tilde{Q}$ by setting\n\\begin{align*}\n\\tilde{Q}_0&=Q_0\\\\\n(\\tilde{Q}_1)^0&=Q_1\\\\\n(\\tilde{Q}_1)^{-1}&=x_1,\\ldots ,x_e\\\\\n(\\tilde{Q}_1)^i&=\\emptyset &\\textrm{if }i\\neq 0,-1.\n\\end{align*}\nWe set $t(x_i)=t(r_i)$ and $s(x_i)=s(r_i)$. Then we localise $k\\tilde{Q}$ with respect to the same localising set as $A$, and denote by $\\tilde{A}$ the resulting graded algebra. Finally we set $\\tilde{B}=(\\tilde{A},d)$, where $d$ is determined by the Leibniz rule and by setting $d(x_i)=r_i$. Then $\\tilde{B}$ is a dga, concentrated in nonpositive degrees, with $\\HO^0(\\tilde{B})\\cong B$, which we call the \\textit{derived enhancement} of $B$. We remark that $\\tilde{B}$ depends on a presentation of $B$, and not just $B$ itself.\n\nWe will be particularly interested in examples in which the natural morphism of dgas $\\tilde{B}\\rightarrow B$ is a quasi-isomorphism.\n\\begin{example}\nFor $Q$ a quiver, $\\overline{Q}$ its double, $A=k \\overline{Q}$ and $R=\\{e_i\\sum_{a\\in Q_1}[a,a^*]e_i\\lvert i\\in Q_0\\}$, $B=\\Pi_Q$ is the preprojective algebra, while $\\tilde{B} = \\mathscr{G}_{2}(Q)$ is the derived preprojective algebra.\n\\end{example}\n\\subsubsection{Bimodule resolution}\nConsider the complex of $\\tilde{A}$-bimodules\n\\[\n0\\rightarrow \\ker(m')\\xrightarrow{i} \\bigoplus_{i\\in Q_0}\\tilde{A}e_i\\otimes e_i \\tilde{A}\\xrightarrow{m'} \\tilde{A}\\rightarrow 0.\n\\]\nThis is in fact a double complex, since each term carries an internal differential induced by $d$. \n\\begin{lemma}\n\\label{A_bimod_lemma}\nThere is an isomorphism of $\\tilde{A}$-bimodules\n\\[\n\\ker(m')\\cong\\bigoplus_{a\\in \\tilde{Q}_1}\\tilde{A}e_{t(a)}\\otimes e_{s(a)} \\tilde{A}\n\\]\nand under this isomorphism $i$ is sent to the morphism $\\iota$ sending $e_{t(a)}\\otimes e_{s(a)}$ to $a\\otimes 1-1\\otimes a$. \n\\end{lemma}\nWe introduce some preparation for the proof of this lemma.\n\\begin{definition}\nAn algebra $C$ is called \\textit{formally smooth} if and only if it satisfies the two equivalent properties\n\\begin{enumerate}\n\\item\nFor any algebra $D$ with two-sided nilpotent ideal $I$, any morphism $C\\rightarrow D\/I$ lifts to a morphism $C\\rightarrow D$.\n\\item\nThe bimodule $\\ker(C\\otimes C\\xrightarrow{m} C)$ is a projective $C$-bimodule.\n\\end{enumerate}\n\\end{definition}\n\\begin{lemma}\n\\label{prep_lemma}\nLet $C$ be a formally smooth algebra, and let $C'$ be the universal localisation at a set of elements $c_1,\\ldots,c_i$. Then $C'$ is formally smooth.\n\\end{lemma}\n\\begin{proof}\nBy the universal property of universal localisation, for any algebra $D$ there is an embedding\n\\[\n\\operatorname{Hom}_{\\mathrm{Alg}}(C',D)\\subset \\operatorname{Hom}_{\\mathrm{Alg}}(C,D)\n\\]\nas the subset of homomorphisms sending $c_i$ to units in $D$. Let $C'$ be as in the statement of the Lemma. Let $f\\in \\operatorname{Hom}_{\\mathrm{Alg}}(C',D\/I)$. It is sufficient to show that $f$ lifts to a homomorphism in $\\operatorname{Hom}_{\\mathrm{Alg}}(C',D\/I^2)$. By formal smoothness of $C$ there is a $g\\in\\operatorname{Hom}_{\\mathrm{Alg}}(C,D\/I^2)$ inducing $f$ under restriction. By assumption, for every $c\\in C$ there is a $d\\in D\/I^2$ such that $f(c)d=1+n$, where $n\\in I$. But then $f(c)d(1-n)=1+n'$ where $n'\\in I^2$, and so $f\\in\\operatorname{Hom}_{\\mathrm{Alg}}(C,D\/I^2)$.\n\\end{proof}\n\\begin{proof}[Proof of Lemma \\ref{A_bimod_lemma}]\nFor the purposes of the proof, we may forget the cohomological grading on $\\tilde{A}$, and we denote the resulting ungraded algebra $\\tilde{A}_{\\ungr}$. For the special case $\\tilde{A}_{\\ungr}=k\\tilde{Q}_{\\ungr}$ it is known that\n\\[\n0\\rightarrow \\bigoplus_{a\\in \\tilde{Q}_1}k\\tilde{Q}_{\\ungr}e_{t(a)}\\otimes e_{s(a)} k\\tilde{Q}_{\\ungr}\\xrightarrow{\\iota'}\\bigoplus_{i\\in Q_0}k \\tilde{Q}_{\\ungr}e_i\\otimes e_ik\\tilde{Q}_{\\ungr}\\xrightarrow{m'} k\\tilde{Q}_{\\ungr}\\rightarrow 0\n\\]\nis exact. Since \n\\[\n\\ker(m)\\cong \\ker(m')\\oplus\\bigoplus_{\\substack{i,j\\in Q_0\\\\ i\\neq j}} k\\tilde{Q}_{\\ungr}e_i\\otimes e_jk\\tilde{Q}_{\\ungr}\n\\]\nwe deduce that $k\\tilde{Q}_{\\ungr}$ is formally smooth, and so $\\tilde{A}$ is by Lemma \\ref{prep_lemma}.\n\nSince the image of $\\iota$ lies in the kernel of $m$, and $\\tilde{A}_{\\ungr}\\otimes_{k\\tilde{Q}_{\\ungr}}-$ and $-\\otimes_{k\\tilde{Q}_{\\ungr}}\\tilde{A}_{\\ungr}$ are right exact, we obtain the split surjection of projective bimodules\n\\[\np\\colon \\bigoplus_{a\\in \\tilde{Q}_1}\\tilde{A}_{\\ungr}e_{t(a)}\\otimes e_{s(a)} \\tilde{A}_{\\ungr}\\rightarrow \\ker(m').\n\\]\nEach of the summands appearing in the domain are indecomposable: since each summand $P$ is a cyclic $\\tilde{A}\\otimes\\tilde{A}^{\\mathrm{op}}$-module, an endomorphism is provided by an element $p=p'\\otimes p''\\in P$, which is a projection if and only if $p'p'=p'$ and $p''p''=p''$: this forces $p'=e_{t(a)}$ and $p''=e_{s(a)}$. We deduce that there is a subset $\\Omega\\subset \\tilde{Q}_1$ such that \n\\[\n\\bigoplus_{a\\in \\Omega}\\tilde{A}e_{t(a)}\\otimes e_{s(a)} \\tilde{A}\\cong \\ker(m').\n\\]\nBy assumption we localised at linear combinations of cyclic paths with the same start points, hence for every $i\\in Q_0$ there is an $\\tilde{A}$-module $N_i$ of dimension $1_i$. Let $i,j\\in Q_0$. Then we may calculate $\\operatorname{Ext}^n_{k\\tilde{Q}_{\\ungr}}(N_i,N_j)$ as the $n$th cohomology of the Hom complex\n\\[\n\\operatorname{Hom}\\left(\\left(\\bigoplus_{a\\in \\tilde{Q}_1}k\\tilde{Q}_{\\ungr}e_{t(a)}\\otimes e_{s(a)} k\\tilde{Q}_{\\ungr}\\xrightarrow{\\iota'}\\bigoplus_{i\\in Q_0}k \\tilde{Q}_{\\ungr}e_i\\otimes e_ik\\tilde{Q}_{\\ungr}\\right)\\otimes_{k\\tilde{Q}_{\\ungr}} N_i,N_j\\right)\n\\]\nand we find that $\\operatorname{ext}^1_{k\\tilde{Q}_{\\ungr}}(N_i,N_j)$ is the number of arrows $i\\rightarrow j$. The same calculation gives that $\\operatorname{ext}^1_{\\tilde{A}}(N_i,N_j)$ is the number of such arrows belonging to $\\Omega$. By \\cite[Thm.4.7]{schofield1985representations} we have the equality $\\operatorname{ext}^1_{k\\tilde{Q}_{\\ungr}}(N_i,N_j)=\\operatorname{ext}^1_{\\tilde{A}}(N_i,N_j)$ and so $\\Omega=\\tilde{Q}_1$ and the result follows.\n\\end{proof}\nWe consider $\\ker(m')\\xrightarrow{i} \\bigoplus_{i\\in Q_0}\\tilde{B}e_i\\otimes e_i\\tilde{B}\\xrightarrow{m'}\\tilde{B}$ as a double complex, with the differential $d$ on $\\tilde{B}$ inducing the second differential. This double complex has exact rows by Lemma \\ref{A_bimod_lemma}, the total complex of the double complex of $\\tilde{B}$-modules $\\ker(m')\\xrightarrow{i} \\tilde{B}\\otimes\\tilde{B}$ provides a resolution of the diagonal bimodule $\\tilde{B}$ by perfect $\\tilde{B}$-bimodules. The following corollaries of this construction are immediate.\n\\begin{corollary}\nThere is a fully faithful embedding of categories $B\\lmod\\rightarrow \\operatorname{Perf}(\\tilde{B})$ from the category of finite-dimensional $B$-modules to the perfect derived category of $\\tilde{B}$-modules.\n\\end{corollary}\n\\begin{proof}\nIf $M$ is a finite-dimensional $B$-module, we may consider it as a finite-dimensional $\\tilde{B}$-module via the canonical morphism $\\tilde{B}\\rightarrow \\HO^0(\\tilde{B})\\cong B$. Then \n\\[\n\\left(\\ker(m')\\xrightarrow{i} \\bigoplus_{i\\in Q_0}\\tilde{B}e_i\\otimes e_i\\tilde{B}\\right)\\otimes_{\\tilde{B}} M\\rightarrow \\tilde{B}\\otimes_{\\tilde{B}} M \n\\]\nprovides a resolution of $M$ by perfect $\\tilde{B}$-modules.\n\\end{proof}\nLet $\\pi\\colon \\ker(m)\\rightarrow \\ker(m')$ be the natural projection. For the next corollary, we first define\n\\begin{align*}\nD\\colon &\\tilde{A}\\rightarrow \\ker(m')\\\\\n&\\alpha\\mapsto \\pi(\\alpha\\otimes 1-1\\otimes \\alpha).\n\\end{align*}\nGiven an element $\\alpha\\otimes \\alpha'\\in \\tilde{A}e_{t(a)}\\otimes e_{s(a)} \\tilde{A}$, $\\tilde{A}$-modules $M,N$, and a homomorphism $f_a\\colon \\operatorname{Hom}_k(N_{s(a)},M_{t(a)})$ we define the evaluation $(M,f,N)(\\alpha\\otimes \\alpha')=M(\\alpha)\\circ f_a\\circ N(\\alpha')$.\n\\begin{corollary}\n\\label{dalg_dhom}\nLet $M$ and $N$ be two finite-dimensional $B$-modules. Then the cohomology of the complex\n\\begin{align}\n\\label{dhom_cmplx}\n0\\leftarrow \\bigoplus_{r\\in R} \\operatorname{Hom}_k(M_{s(r)},N_{t(r)})\\xleftarrow{\\alpha} \\bigoplus_{a\\in Q_1}\\operatorname{Hom}_k(M_{s(a)},N_{t(a)}) \\xleftarrow{\\beta} \\bigoplus_{i\\in Q_0}\\operatorname{Hom}_k(M_i,M_j)\\leftarrow 0\n\\end{align}\ncalculates $\\operatorname{Ext}^n_{\\tilde{B}}(M,N)$, where we define\n\\begin{align*}\n\\alpha((f_a)_{a\\in Q_1})&=((M,f,N)(Dr))_{r\\in R}\\\\\n\\beta((f_i)_{i\\in Q_0})&=(N(a)f_{s(a)}-f_{t(a)}M(a))_{a\\in Q_1}.\n\\end{align*}\nIn particular, Assumption \\ref{q_assumption1} holds for $\\mathfrak{M}_{B}$, considered as a substack of $t_0(\\bs{\\mathfrak{M}}_{\\tilde{B}})$. \n\\end{corollary}\n\\begin{remark}\nIf $B=\\HO^0(\\tilde{B})$ it follows that the complex \\eqref{dhom_cmplx} calculates $\\operatorname{Ext}^n_B(M,N)$.\n\\end{remark}\nThe following proposition is a result of the well-known explicit presentation of $\\mathfrak{Filt}$ over $\\mathfrak{M}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)},\\mathbf{d}^{(3)}}$. Since its proof is strictly easier than the analogous statement for coherent sheaves, provided in \\S \\ref{geometry_constr_sec}, we omit it.\n\\begin{proposition}\nAssumption \\ref{q_assumption2} holds for the stack $\\mathfrak{M}_B$.\n\\end{proposition}\nIn conclusion, \\textit{all} of the geometric assumptions (Assumptions \\ref{p_assumption}-\\ref{q_assumption2}) from \\S \\ref{subsubsection:assumptionCoHAproduct} that will be required in \\S \\ref{subsubsection:ThecohaproductKV} to define the CoHA structure on (an appropriate shift of) $\\mathtt{JH}_*\\mathbb{D} k_{\\mathfrak{M}_{B,\\mathbf{d}}}$ hold for arbitrary $B$ presented in the general form \\eqref{standard_pres}. Moreover, the geometric conditions (Assumptions \\ref{gms_assumption} and \\ref{ds_fin}) in \\S \\ref{BPS_assumptions_sec} are also met. So as long as $\\tilde{B}$ is a 2-Calabi--Yau algebra, we may define the BPS algebra for $B\\lmod$ as in \\S \\ref{section:lessperverse} below.\n\n\\section{Totally negative $2$-Calabi--Yau categories}\nIn this paper, we are interested in certain $2$-Calabi--Yau Abelian categories $\\mathcal{A}$ that arise in the general context described in \\S\\ref{subsubsection:gsetup}-\\S\\ref{BPS_assumptions_sec}, which we call \\emph{totally negative}. Namely, we say that $\\mathcal{A}$ is \\emph{totally negative} if for any pair of nonzero objects $M,N$ of $\\mathcal{A}$, $( M,N)_{\\mathcal{A}}<0$.\n\n\\subsection{The preprojective algebra of a totally negative quiver}\n\nLet $Q=(Q_0,Q_1)$ be a quiver. Following Bozec--Schiffmann \\cite[Section 1.2]{bozec2019counting}, we say that $Q$ is \\emph{totally negative} if its symmetrised Euler form $(\\mathbf{d},\\mathbf{e})_{\\Pi_Q}=\\langle\\mathbf{d},\\mathbf{e}\\rangle_Q+\\langle\\mathbf{e},\\mathbf{d}\\rangle_Q$ is totally negative, that is $(\\mathbf{d},\\mathbf{e})_{\\Pi_Q}<0$ for any $\\mathbf{d},\\mathbf{e}\\in\\mathbf{N}^{Q_0}\\setminus\\{0\\}$. Unraveling the definition of the Euler form, this is equivalent to the requirement that any vertex of $Q$ carries at least two loops and any two vertices are connected by at least one arrow. The category of representations of $\\Pi_Q$ is then a totally negative $2$-Calabi--Yau category, as its Euler form is $(-,-)_{\\Pi_Q}$. These totally negative $2$-Calabi--Yau categories constitute the building blocks of more general totally negative $2$-Calabi--Yau categories, by the local neighbourhood theorem (Theorem \\ref{theorem:neighbourhood}) and the following proposition. \n\n\\begin{proposition}\n\\label{proposition:totnegextquiv}\nThe Ext-quiver of any $\\Sigma$-collection in a totally negative $2$-Calabi--Yau Abelian category $\\mathcal{A}$ is the double of a totally negative quiver.\n\\end{proposition}\n\\begin{proof}\n Let $\\underline{\\mathcal{F}}=\\{\\mathcal{F}_1,\\hdots,\\mathcal{F}_r\\}$ be a $\\Sigma$-collection in $\\mathcal{A}$ and let $\\overline{Q}$ be the Ext-quiver of $\\underline{\\mathcal{F}}$. Then, for any $i\\neq j$, $\\operatorname{ext}^1(\\mathcal{F}_i,\\mathcal{F}_j)=\\hom(\\mathcal{F}_i,\\mathcal{F}_j)+\\operatorname{ext}^2(\\mathcal{F}_i,\\mathcal{F}_j)-(\\mathcal{F}_i,\\mathcal{F}_j)=-(\\mathcal{F}_i,\\mathcal{F}_j)>0$ so $\\overline{Q}$ has an arrow from $\\mathcal{F}_i$ to $\\mathcal{F}_j$. Furthermore, for any $1\\leq i\\leq r$, $\\operatorname{ext}^1(\\mathcal{F}_i,\\mathcal{F}_i)=2-(\\mathcal{F}_i,\\mathcal{F}_i)>2$ and since $\\mathcal{A}$ is a $2$-Calabi--Yau category, $\\operatorname{ext}^1(\\mathcal{F}_i,\\mathcal{F}_i)$ is even. Therefore, $\\overline{Q}$ has at last $4$ loops at each vertex.\n\\end{proof}\n\n\n\\subsection{Representations of the fundamental group of a surface}\n\n\\subsubsection{The stack of representations of the fundamental group of a surface}\nLet $\\Sigma_g$ be a closed orientable topological surface without boundary, of genus $g$. We fix a point $p\\in \\Sigma_g$. Let $r,d$ be integers with $r>0$. If $d\\neq 0$, we write $r=\\underline{r}\\gcd(r,d)$ and $d=\\underline{d}\\gcd(r,d)$, fix throughout a primitive $\\underline{r}$th root of unity $\\zeta_{\\ul{r}}$, and set $\\lambda=\\zeta_{\\underline{r}}^{\\underline{d}}$. If $d=0$ we set $\\lambda=1$. The fundamental group of $\\Sigma_g\\setminus\\{p\\}$ is\n\\[\n \\pi_1(\\Sigma_g\\setminus\\{p\\})=\\left\\langle l,x_i,y_i,1\\leq i\\leq g\\mid l\\prod_{i=1}^g(x_iy_ix_i^{-1}y_i^{-1})=1\\right\\rangle.\n\\]\nIts group algebra $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\})]$ is the algebra generated by $l,x_i,y_i$ for $1\\leq i\\leq g$, localised at $x_i,y_i$, with the relation $l\\prod_{i=1}^gx_iy_ix_i^{-1}y_i^{-1}=1$.\n\nWe are interested in local systems on $\\Sigma_g\\setminus\\{p\\}$ whose monodromy around $p$ is given by the multiplication by $\\lambda$ and therefore in representations of the algebra $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda)]=\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\})]\/\\langle l-\\lambda\\rangle$. Note that the rank of any such local system is divisible by $\\underline{r}$ if $d\\neq 0$.\n\nWe denote by \n\\[\nZ^{\\Betti}_{g,r,d}\\subset \\mathrm{GL}_{r}^{\\times 2g}\n\\]\nthe variety cut out by the matrix valued equation $\\prod_{i=1}^g(A_i,B_i)=\\lambda\\cdot \\Id_{r\\times r}$. Then set\n\\[\n\\mathcal{M}^{\\Betti}_{g,r,d}\\coloneqq\\operatorname{Spec}\\left(\\Gamma(Z^{\\Betti}_{g,r,d})^{\\mathrm{GL}_r}\\right).\n\\]\nWe define $\\mathfrak{M}^{\\Betti}_{g,r,d}$ to be the stack of $r$-dimensional representations of $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda]$. There is an equivalence of stacks $\\mathfrak{M}^{\\Betti}_{g,r,d}\\simeq Z^{\\Betti}_{g,r,d}\/\\mathrm{GL}_r$. In particular, $\\Msp^{\\Betti}_{g,r,d}$ is the affinization of $\\mathfrak{M}^{\\Betti}_{g,r,d}$, and the affinization morphism $\\mathtt{JH}\\colon \\mathfrak{M}^{\\Betti}_{g,r,d}\\rightarrow \\mathcal{M}^{\\Betti}_{g,r,d}$ is a good moduli space.\n\n\n\n\n\\subsubsection{The dg-category of representations of the fundamental group of a surface}\n\\label{subsubsection:dgrepfundgroup}\nRecall that a topological space $M$ is called \\textit{acyclic} if its universal cover is contractible.\n\\begin{theorem}[{\\cite[Corollary 6.2.4]{davison2012superpotential}}]\n Let $M$ be a compact orientable acyclic manifold of dimension $d$ without boundary. Then the fundamental group algebra $\\mathbf{C}[\\pi_1(M)]$ is a $d$-Calabi--Yau algebra.\n \\end{theorem}\n As an immediate corollary, we obtain the following.\n\n \\begin{corollary}\n \\label{RS_CY}\n For any $g\\geq 1$, the group algebra $\\mathbf{C}[\\pi_1(\\Sigma_g)]$ of the fundamental group of a Riemann surface of genus $g$,\n\\[\n \\pi_1(\\Sigma_g)=\\left\\langle x_i,y_i,1\\leq i\\leq g\\mid \\prod_{i=1}^gx_iy_ix_i^{-1}y_i^{-1}=1\\right\\rangle\n\\]\n is a $2$-Calabi--Yau algebra.\n \\end{corollary}\n\\begin{proof}\n Such a surface is compact, orientable, and acyclic.\n\\end{proof}\n\n The cohomological Hall algebra of representations of the fundamental group algebra of a Riemann surface was defined and studied in terms of brane tiling algebras in \\cite{davison2016cohomological}, where it was shown that it satisfies the cohomological integrality theorem (regardless of genus). It is shown in \\cite{mistry2022cohomological} that the CoHA defined this way agrees with the more direct construction analogous to the Schiffmann--Vasserot definition of the CoHA of compactly supported sheaves on $\\mathbf{A}^2$, and thus (adapting the arguments of \\S \\ref{subsection:comparison_preproj}) to the CoHA defined in this paper in terms of the RHom complex. This Hall algebra appears also in \\cite{porta2022two}. \n\nThe analogue of Corollary \\ref{RS_CY} is expected to be true for $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda]$ with $g\\geq 1$, although we have not been able to locate a precise reference. We use instead the fact that these algebras are localizations of multiplicative preprojective algebras, which are known to be $2$-Calabi--Yau algebras (\\cite{kaplan2019multiplicative}).\n\n\n\nLet $Q=(Q_0,Q_1)=S_g$ be the quiver with one vertex and $g$ loops $\\alpha_1,\\hdots,\\alpha_g$. The doubled quiver $\\overline{Q}$ has arrows $\\alpha_i,\\alpha_i^*$, $1\\leq i\\leq g$. Let $A$ be the universal localisation of $\\mathbf{C} \\overline{Q}$ with respect to the elements $1+\\alpha_i\\alpha_i^*$ and $1+\\alpha_i^*\\alpha_i$ for $1\\leq i\\leq g$. We let\n\\[\n \\Lambda^{\\lambda}(Q)\\coloneqq A\\Big\/\\left\\langle\\prod_{i=1}^g(1+\\alpha_i\\alpha_i^*)(1+\\alpha_i^*\\alpha_i)^{-1}-\\lambda\\right\\rangle\n\\]\nbe the corresponding multiplicative preprojective algebra. Since we have an explicit presentation of $\\Lambda^{\\lambda}(Q)$ as a quotient of a localised quiver algebra by a set of relations, we may define the derived multiplicative preprojective algebra $\\tilde{\\Lambda}^{\\lambda}(Q)$ as in \\S\\ref{Dalg_sec}. This is the same as the derived multiplicative preprojective algebra defined in \\cite{kaplan2019multiplicative}. The stack of finite-dimensional representations of $\\tilde{\\Lambda}^{\\lambda}(Q)$ satisfies Assumptions \\ref{p_assumption}-\\ref{ds_fin} by \\S \\ref{algebra_constr_sec}, and so all that remains is to consider the 2CY property.\n\nWe let $\\Lambda^{\\lambda}(Q)'$ be the universal localisation of $\\Lambda^{\\lambda}(Q)$ at $\\alpha_i$, $1\\leq i\\leq g$.\n\n\\begin{proposition}[{\\cite[Proposition 2]{crawley2013monodromy}}]\n\\label{proposition:fundamentalgrouppreprojec}\n We have an isomorphism of algebras\n \\[\n \\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda]\\cong \\Lambda^{\\lambda}(Q)'.\n\\]\n\\end{proposition}\n\\begin{proof}\n Crawley-Boevey only states that these two algebras are Morita equivalent, i.e. that the category $\\operatorname{Rep}(\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda])$ is equivalent to the category $\\operatorname{Rep}(\\Lambda^{\\lambda}(Q)')$. But the arguments of his proof give an isomorphism of the algebras. The map sends $x_i$ to $\\alpha_i$ and $y_i$ to $\\alpha_i^{-1}+\\alpha_i^*$. \n\\end{proof}\n\n\nThanks to this proposition, we can realise the stack of finite-dimensional representations of $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus \\{p\\}),\\lambda]$ as an open substack of the stack of finite-dimensional representations of $\\Lambda^{\\lambda}(Q)$. Letting $\\mathscr{D}=\\operatorname{Perf}_{\\dg}(\\Lambda^{\\lambda}(Q)')$ be the dg-category of perfect $\\Lambda^{\\lambda}(Q)'$-modules, we have a fully faithful localisation functor\n\\[\n \\mathscr{D}\\rightarrow \\mathscr{C},\n\\]\nand $\\mathscr{D}$ is quasi-equivalent to $\\operatorname{Perf}_{\\dg}(\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\},\\lambda)])$. We can therefore rely on the favourable properties of the multiplicative preprojective algebra $\\Lambda^{\\lambda}(Q)$:\n\\begin{proposition}[{\\cite[Theorem 1.2+Proposition 4.4]{kaplan2019multiplicative}}]\n$\\Lambda^{\\lambda}(Q)$ is a (left) $2$-Calabi--Yau algebra, and the natural morphism of dgas $\\tilde{\\Lambda}^{\\lambda}(Q)\\rightarrow \\Lambda^{\\lambda}(Q)$ is a quasi-isomorphism.\n\\end{proposition}\nBy \\cite{brav2019relative} it follows that the full subcategory containing any collection of simple $\\Lambda^{\\lambda}(Q)$-modules carries a right 2CY structure, and so the category of $\\Lambda^{\\lambda}(Q)$-modules satisfies Assumption \\ref{BPS_cat_assumption}. Restricting to collections of simple objects arising from $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda]$-modules via Proposition \\ref{proposition:fundamentalgrouppreprojec} we deduce that the category of $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda]$-modules also satisfies Assumption \\ref{BPS_cat_assumption}\n\n\n\n\n\n\n\n\n\\subsubsection{The RHom-complex}\nWe have an explicit projective resolution of the multiplicative preprojective algebra $\\Lambda^{\\lambda}(Q)$ as a $\\Lambda^{\\lambda}(Q)$-bimodule and it gives an explicit presentation of the RHom-complex (\\S\\ref{subsubsection:categorical}) on the square $\\mathfrak{M}_{\\Lambda^{\\lambda}(Q)}\\times\\mathfrak{M}_{\\Lambda^{\\lambda}(Q)}$ of the stack of finite-dimensional representations of $\\Lambda^{\\lambda}(Q)$. By considering the fully faithful embedding $\\mathscr{D}\\rightarrow\\mathscr{C}$, the RHom complex on $\\mathfrak{M}^{\\Betti}_{g,r,d}\\times\\mathfrak{M}^{\\Betti}_{g,r,d}$ is the restriction to $\\mathfrak{M}^{\\Betti}_{g,r,d}\\times\\mathfrak{M}^{\\Betti}_{g,r,d}$ of the RHom-complex on $\\mathfrak{M}_{\\Lambda^{\\lambda}(Q)}\\times\\mathfrak{M}_{\\Lambda^{\\lambda}(Q)}$. The latter can be described explicitly thanks to the $3$-term projective resolution of $\\Lambda^{\\lambda}(Q)$ as a $\\Lambda^{\\lambda}(Q)$-bimodule, $P_{\\bullet}=P_0\\xrightarrow{\\alpha}P_1\\xrightarrow{\\beta} P_0$ given in \\cite[Proposition 3.12]{kaplan2019multiplicative} (since $Q=S_g$ contains a cycle, see \\cite{kaplan2019multiplicative}). \nIt is the same as the three term complex from Corollary \\ref{dalg_dhom} calculating $\\operatorname{Ext}^i_{\\tilde{\\Lambda}^{\\lambda}(Q)}(M,N)$.\n\n\n\\subsubsection{The Euler form}\nBy Proposition \\ref{proposition:fundamentalgrouppreprojec} and the discussion following it (\\S\\ref{subsubsection:dgrepfundgroup}), we have a fully faithful functor from the derived category of representations of the deformed fundamental group algebra $\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\}),\\lambda]$ to the derived category of representations of the multiplicative preprojective algebra $\\Lambda^{\\lambda}(Q)$.\n\nWe determine the Euler form of the multiplicative preprojective algebra. \n\n\\begin{lemma}\nThe Euler form of $\\operatorname{Rep}(\\Lambda^{\\lambda}(Q))$ is given by\n\\begin{equation}\n\\label{equation:eulerformfundamentalgroup}\n \\begin{split}\n \\mathbf{Z}\\times\\mathbf{Z}&\\longrightarrow\\mathbf{Z}\\\\\n (d,e)&\\longmapsto 2(1-g)de\n \\end{split}\n\\end{equation}\n\\end{lemma}\n\\begin{proof}\nThis follows from Corollary \\ref{dalg_dhom}.\n\\end{proof}\n\n\\begin{corollary}\n The Euler form of the category of finite-dimensional representations of the deformed fundamental group algebra $\\mathbf{C}[\\pi(\\Sigma_g\\setminus\\{p\\}),\\lambda]$ is given by \\eqref{equation:eulerformfundamentalgroup}. In particular, if $g\\geq 2$ this category is a totally negative 2CY category.\n\\end{corollary}\n\\begin{proof}\nThis is an immediate consequence of the fully faithful embedding $\\mathscr{D}\\rightarrow\\mathscr{C}$ which induces a fully faithful embedding of the triangulated categories $\\mathcal{D}^{\\bdd}(\\operatorname{Rep}(\\mathbf{C}[\\pi_1(\\Sigma_g\\setminus\\{p\\},\\lambda)]))\\rightarrow \\mathcal{D}^{\\bdd}(\\operatorname{Rep}(\\Lambda^{\\lambda}(Q)))$.\n\\end{proof}\n\n\n\n\n\\subsection{Semistable Higgs bundles}\n\\label{Higgs_background_sec}\n\n\\subsubsection{The stack of Higgs sheaves}\nLet $C$ be a complex smooth projective curve. A \\emph{Higgs sheaf} on $C$ is a pair $(\\mathcal{F},\\theta)$ of a coherent sheaf $\\mathcal{F}$ on $C$ together with an $\\mathcal{O}_C$-linear map $\\theta\\colon\\mathcal{F}\\rightarrow \\mathcal{F}\\otimes K_C$ (the \\emph{Higgs field}) where $K_C$ is the canonical bundle of $C$. The rank $r$ and degree $d$ of a Higgs sheaf are defined to be the rank and degree of the underlying coherent sheaf, while the slope $\\mu(\\mathcal{F},\\theta)=\\mu(\\mathcal{F})$ is likewise defined to be $d\/r$. We let $\\mathbf{Z}^{2,+}=\\{(r,d)\\in \\mathbf{Z}^2\\mid r>0 \\text{ or }(r=0 \\text{ and }d\\geq 0)\\}$. We let $\\mathbf{Higgs}(C)$ be the (Abelian) category of Higgs sheaves on $C$ and let $\\mathfrak{Higgs}(C)=\\bigsqcup_{(r,d)\\in\\mathbf{Z}^{2,+}}\\mathfrak{Higgs}_{(r,d)}(C)$ be the stack of Higgs sheaves on $C$. \n\n\n\\subsubsection{Semistable Higgs sheaves}\nLet $(\\mathcal{F},\\theta)$ be a Higgs sheaf. It is called semistable if for any subsheaf $\\mathcal{G}\\subset \\mathcal{F}$ such that $\\theta(\\mathcal{G})\\subset \\mathcal{G}\\otimes K_C$, we have the inequality of slopes\n\\[\n \\mu(\\mathcal{G})=\\frac{\\mathrm{deg}(\\mathcal{G})}{\\mathrm{rank}(\\mathcal{G})}\\leq \\mu(\\mathcal{F})=\\frac{\\mathrm{deg}(\\mathcal{F})}{\\mathrm{rank}(\\mathcal{F})}.\n\\]\nFor $\\theta\\in \\mathbf{Q}\\cup\\{\\infty\\}$, we denote by $\\mathbf{Higgs}^{\\sst}_{\\theta}(C)$ the full subcategory of the category of Higgs sheaves, containing those Higgs sheaves that are semistable of slope $\\theta$, along with the zero Higgs sheaf. It is an Abelian subcategory of $\\mathbf{Higgs}(C)$, the category of all Higgs sheaves. The stack of semistable Higgs sheaves of rank $r$ and degree $d$, $\\Mst^{\\Dol}_{r,d}(C)$, is an open substack of $\\mathfrak{Higgs}(C)$. It is of finite type and can be realised as a global quotient stack. We spell this out in the next section.\n\n\n\n\n\\subsubsection{The BNR correspondence}\n\\label{subsubsection:BNRcorrespondence}\nWe may consider the category of Higgs sheaves as a subcategory of the category of coherent sheaves on a quasiprojective surface via the BNR-correspondence \\cite{beauville1989spectral,schaub1998courbes}. Let $S=\\Tan^*\\!C$ and $\\overline{S}=\\mathbf{P}_C(\\mathcal{O}_C\\oplus K_C)$. The projective surface $\\overline{S}$ is a smooth compactification of $S$. We let $D_{\\infty}$ be the complement of the open immersion $S\\subset\\overline{S}$. We let $\\pi\\colon \\Tan^*\\!C\\rightarrow C$ and $\\overline{\\pi}\\colon \\overline{S}\\rightarrow C$ be the natural projections.\n\nThere is an equivalence of categories between the category of coherent sheaves $\\mathcal{F}$ on $S$ for which $\\pi_*\\mathcal{F}=R^0\\pi_*\\mathcal{F}$ is coherent and the category of Higgs sheaves on $C$. Therefore, the category of Higgs sheaves on $C$ is equivalent to the category of coherent sheaves on $\\overline{S}$ whose support does not intersect $D_{\\infty}$. Furthermore, semistability of the corresponding Higgs bundle is equivalent to Gieseker-semistability for the polarization of $\\overline{S}$ given by an arbitrary choice of very ample class. Via the BNR correspondence, we consider $\\Mst^{\\Dol}_{r,d}(C)$ an open substack of the stack of semistable coherent sheaves on $\\overline{S}$. Likewise, we consider the coarse moduli space $\\mathcal{M}^{\\Dol}_{r,d}(C)$ as an open subscheme of the coarse moduli scheme of semistable sheaves on $\\overline{S}$.\n\n\n\\subsubsection{A dg-enhancement of the category of Higgs sheaves}\nWe let $\\mathcal{D}^{\\mathrm{b}}_{\\dg}(\\Coh(\\overline{S}))$ be the dg-enhancement of the derived category of coherent sheaves on $\\overline{S}$ (classically constructed as the dg-quotient of the pretriangulated dg-category of complexes in $\\Coh(\\overline{S})$ by the full pretriangulated dg-subcategory of acyclic complexes). We define $\\mathcal{D}_{\\dg}^{\\mathrm{b}}(\\mathbf{Higgs}(C))$ as the full pretriangulated dg-subcategory of $\\mathcal{D}^{\\mathrm{b}}_{\\dg}(\\Coh(S))$ of bounded complexes whose cohomology sheaves are coherent after applying $\\pi_*$. \n\\begin{proposition}\nFix a slope $\\theta\\in\\mathbf{Q}$. The category $\\mathbf{Higgs}^{\\sst}_{\\theta}(C)$, considered as a subcategory of the dg-category $\\mathcal{D}_{\\dg}^{\\mathrm{b}}(\\mathbf{Higgs}(C))$, along with its stack of objects, satisfy Assumptions \\ref{p_assumption}-\\ref{BPS_cat_assumption} from \\S \\ref{section:modulistackobjects2CY}.\n\\end{proposition}\n\\begin{proof}\nThis follows, via the BNR correspondence, from the statement for semistable coherent sheaves on $S$, which is established in \\S \\ref{geometry_constr_sec} (using that $K_S\\cong \\mathcal{O}_S$ for Assumption \\ref{BPS_cat_assumption}).\n\\end{proof}\n \n \n\n \n \n\\subsubsection{The Euler form}\n \nThe Euler form of the category of Higgs sheaves on a smooth projective curve factors through the numerical Grothendieck group of the curve\n\\begin{equation*}\n\\begin{split}\n\\K(\\mathbf{Higgs}(C))&\\longrightarrow \\mathbf{Z}^2\\\\\n \\overline{\\mathcal{F}}=[(\\mathcal{F},\\theta)]&\\longmapsto(\\operatorname{rank}(\\mathcal{F}),\\deg(\\mathcal{F})).\n\\end{split}\n\\end{equation*}\nIt is given by\n\\begin{equation}\n\\label{equation:EulerformHiggs}\n (\\overline{\\mathcal{F}},\\overline{\\mathcal{G}}):=\\sum_{i\\in\\mathbf{Z}}(-1)^i\\operatorname{ext}^i(\\overline{\\mathcal{F}},\\overline{\\mathcal{G}})=2(1-g)\\mathrm{rank}(\\overline{\\mathcal{F}})\\mathrm{rank}(\\overline{\\mathcal{G}}).\n\\end{equation}\n\n\\begin{proposition}\n\\label{g_t_n}\n For any $g\\geq 2$, the Abelian category $\\mathbf{Higgs}^{\\sst}_{\\theta}(C)$ of semistable Higgs bundles of fixed finite slope on a smooth projective curve of genus $\\geq 2$ is totally negative.\n\\end{proposition}\n\\begin{proof}\nImmediate from \\eqref{equation:EulerformHiggs}.\n\\end{proof}\n\n \n\n\n\n\n\\subsection{Semistable sheaves on symplectic surfaces}\nLet $S$ be a smooth projective symplectic surface, i.e., $S$ is a K3 or Abelian surface. Let $\\mathcal{O}_S(1)$ be an ample line bundle on $S$. \nWe explain the usual setup for moduli spaces on such a surface.\nWe endow $\\HO^*(S,\\mathbf{Z})$ with the quadratic form \n\\begin{equation*}\n(v_0,v_1,v_2)(w_0,w_1,w_2) = v_1w_1 - v_0w_2 - v_2w_0\\text{, for $v_i,w_i \\in \\HO^{2i}(S,\\mathbf{Z})$.}\n\\end{equation*}\nThe Mukai vector of a coherent sheaf $\\mathcal{F}$ is defined to be \n\\begin{equation*}\nv(\\mathcal{F}) = (\\operatorname{rank}(\\mathcal{F}),\\mathrm{c}_1(\\mathcal{F}),\\mathrm{ch}_2(\\mathcal{F})+\\operatorname{rank}(\\mathcal{F})) = \\mathrm{ch}(\\mathcal{F}) \\cdot \\sqrt{\\operatorname{td}(S)} \\in \\HO^*(S,\\mathbf{Z}).\n\\end{equation*}\nFor any two coherent sheaves $\\mathcal{E},\\mathcal{F} \\in \\Coh(S)$ the Euler form is given by\nRiemann--Roch\n\\begin{equation}\n\\label{eq:EFsurface}\n\\chi(\\mathcal{E},\\mathcal{F}) = - v(\\mathcal{E})v(\\mathcal{F}) = -\\mathrm{c}_1(\\mathcal{E})\\mathrm{c}_1(\\mathcal{F}) + 2\\operatorname{rank}(\\mathcal{E})\\operatorname{rank}(\\mathcal{F}) + \\operatorname{rank}(\\mathcal{E})\\mathrm{ch}_2(\\mathcal{F}) + \\mathrm{ch}_2(\\mathcal{E})\\operatorname{rank}(\\mathcal{F}).\n\\end{equation}\n\nThus the Mukai vector $v=v(\\mathcal{F})$ of a coherent sheaf $\\mathcal{F}$ determines its Hilbert polynomial which we denote by $P_{v}(t)$. As in \u00a7\\ref{subsubsection:propernessp} we define Gieseker semistable sheaves on $S$ with respect to $\\mathcal{O}_S(1)$. Let $\\mathfrak{Coh}^{\\sst}_{v}(S) \\subset \\mathfrak{Coh}^{\\sst}_{P_v(E)}(S)$ be the open and closed substack of Gieseker semistable coherent sheaves on $S$ with Mukai vector $v$. \n\n\nLet $v_0 \\in \\HO^*(S,\\mathbf{Z})$ be a primitive Mukai vector and suppose that $\\mathcal{O}_S(1)$ is $v_0$-generic (i.e., such that all Gieseker semistable sheaves with Mukai vector $v_0$ are automatically stable). Let $\\Coh^{\\sst}(S,v_0) \\subset \\Coh(S)$ be the full Abelian subcategory of pure dimension 1 Gieseker semistable sheaves with Mukai vector a multiple of $v_0$. \nWe call $\\Coh^{\\sst}(S,v_0)$ the category of \\emph{one dimensional semistable sheaves of slope $v_0$}.\nSince we demand sheaves in $\\Coh^{\\sst}(S,v_0)$ to be pure of dimension one, the category $\\Coh^{\\sst}(S,v_0)$ can be nonzero only if $v_0= (0,\\beta,\\chi)$ for $0 \\neq \\beta \\in H^2(S)$\n\\begin{proposition}\nLet $v_0 \\in \\HO^2(S)$ be a Mukai vector for which $\\mathcal{O}_S(1)$ is $v_0$-generic. Suppose $v_0^2 > 0$, then the category of one dimensional semistable sheaves of slope $v_0$ is totally negative.\n\\end{proposition}\nAn example of such a Mukai vector $v_0$ is constructed as follows. Suppose the general smooth curve in the linear system $\\abs{\\mathcal{O}_{S}(1)}$ has genus $g\\geq 2$. Then the Mukai vector $v_0=(0,[C],\\chi)$ for a smooth curve $C \\in \\abs{\\mathcal{O}_S(1)}$ and $\\chi \\in \\mathbf{Z}$ satisfies $v_0^2 = 2g-2 > 0.$ \n\n\n\\section{Cohomological Hall algebras for preprojective algebras}\n\\label{section:relativeCoHA}\n\n\n\n\\subsection{Notations for quiver representations}\n\\label{subsection:notationsquivreps}\n\nLet $Q=(Q_0,Q_1)$ be a quiver and let $ \\Pi_Q\\coloneqq \\mathbf{C}\\overline{Q}\/\\langle\\rho\\rangle$ be the associated preprojective algebra. \n\nWe establish the notation for the rest of the section, following on from \\S \\ref{subsection:preprojectivealgebra}: \n\n\\begin{enumerate}\n \n\\item The representation space of $\\mathbf{d}$-dimensional representations of the preprojective algebra is $X_{\\Pi_Q,\\mathbf{d}}=\\mu^{-1}_{\\mathbf{d}}(0)$. We have a closed immersion $i_{\\mathbf{d}}\\colon X_{\\Pi_Q,\\mathbf{d}}\\rightarrow X_{\\overline{Q},\\mathbf{d}}$. The stack of $\\mathbf{d}$-dimensional representations of the preprojective algebra is denoted $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}\\simeq\\mu^{-1}_{\\mathbf{d}}(0)\/\\mathrm{GL}_{\\mathbf{d}}$. The scheme parameterising semisimple $\\mathbf{d}$-dimensional representations of $\\Pi_Q$ is denoted $\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}\\cong\\mu_{\\mathbf{d}}^{-1}(0)\/\\!\\!\/ \\mathrm{GL}_{\\mathbf{d}}$. The semisimplification map is $\\mathtt{JH}_{\\mathbf{d}}\\colon \\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}\\rightarrow\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}$.\n \n\\item For $\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}\\in\\mathbf{N}^{Q_0}$, we fix a $Q_0$-graded $ \\mathbf{d}\\coloneqq \\mathbf{d}^{(1)}+\\mathbf{d}^{(2)}$-dimensional $Q_0$-graded complex vector space $\\mathbf{C}^{\\mathbf{d}^{(1)}+\\mathbf{d}^{(2)}}$ and a $\\mathbf{d}^{(2)}$-dimensional subspace $\\mathbf{C}^{\\mathbf{d}^{(2)}}$.\n\n\\item \n\\label{Pequivstr}\nWe let $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\subset \\mathrm{GL}_{\\mathbf{d}}$ be the stabiliser of the subspace $\\mathbf{C}^{\\mathbf{d}^{(1)}}$. It is a parabolic subgroup. Its unipotent radical is $U_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ and its Levi quotient is $\\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$. Its Lie algebra is denoted by $\\mathfrak{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ and the nilpotent radical of $\\mathfrak{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is $\\mathfrak{n}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$. The Lie algebra of the Levi subgroup is $\\mathfrak{l}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=\\mathfrak{gl}_{\\mathbf{d}^{(1)}}\\times\\mathfrak{gl}_{\\mathbf{d}^{(2)}}$. We have a $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$-equivariant quotient map\n\\[\nl\\colon \\mathfrak{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathfrak{l}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}.\n\\]\nwhere $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ acts on the target via the quotient morphism $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$ and the conjugation map. We give $\\mathfrak{n}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\coloneqq \\ker(l)$ the induced $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$-equivariant structure.\n\n\\item We set \n\\[\n\\overline{\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}}\\coloneqq (X_{\\overline{Q},\\mathbf{d}^{(1)}}\\times X_{\\overline{Q},\\mathbf{d}^{(2)}})\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\]\nwhere $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ acts on $X_{\\overline{Q},\\mathbf{d}^{(1)}}\\times X_{\\overline{Q},\\mathbf{d}^{(2)}}$ via the quotient $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$.\n\n\\item \\label{item:extensionoverlineQ} We let $F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ be the closed subvariety of $X_{\\overline{Q},\\mathbf{d}}$ consisting of elements preserving the subspace $\\mathbf{C}^{\\mathbf{d}^{(1)}}\\subset\\mathbf{C}^{\\mathbf{d}}$. It is acted on by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ and we set $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$. This is the stack of short exact sequences of $\\overline{Q}$-representations where the subrepresentation has dimension vector $\\mathbf{d}^{(1)}$ and the quotient $\\mathbf{d}^{(2)}$. There is a closed immersion \n$\n\\overline{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow X_{\\overline{Q},\\mathbf{d}}.\n$\nWe also denote by \n\\[\\overline{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}+\\mathbf{d}^{(2)}}\\]\nthe induced map between the stacks. We denote by \n\\[\n\\overline{q}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow X_{\\overline{Q},\\mathbf{d}^{(1)}}\\times X_{\\overline{Q},\\mathbf{d}^{(2)}}.\n\\]\nthe projection. It induces a vector bundle $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\overline{\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}}$ and a vector bundle stack $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}$.\n\n\\item \\label{item:extensionsPi_Q} We let $F_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ be the closed subvariety of $X_{\\Pi_{Q},\\mathbf{d}}$ of elements preserving the subspace $\\mathbf{C}^{\\mathbf{d}^{(1)}}\\subset\\mathbf{C}^{\\mathbf{d}}$. It is acted on by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ and we let $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=F_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$. This is the stack of short exact sequences of $\\Pi_Q$-representations where the subrepresentation has dimension vector $\\mathbf{d}^{(1)}$ and the quotient has dimension vector $\\mathbf{d}^{(2)}$. We let \n\\[\nq_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon F_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow X_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times X_{\\Pi_Q,\\mathbf{d}^{(2)}}\n\\]\nbe the natural projection and denote by $p_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon F_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow X_{\\Pi_Q,\\mathbf{d}}$ the inclusion. We still denote by $p_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}+\\mathbf{d}^{(2)}}$ the map between the stacks. It is proper and representable.\n\n\\item \\label{item:extensionoverlineQPiQ} We set $\\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=\\overline{q}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}^{-1}(\\mu_{\\mathbf{d}^{(1)}}^{-1}(0)\\times \\mu_{\\mathbf{d}^{(2)}}^{-1}(0))$. We have closed immersions \n\\[\nF_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\xrightarrow{i'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\xrightarrow{i_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\]\nand the projection $q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}'\\colon \\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow X_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times X_{\\Pi_Q,\\mathbf{d}^{(2)}}$ induced by $\\overline{q}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$. The stack $\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=\\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is the stack of short exact sequences of $\\overline{Q}$-representations such that the subobject and the quotient are representations of $\\Pi_Q$, respectively of dimension $\\mathbf{d}^{(1)}$ and $\\mathbf{d}^{(2)}$. The morphism $q'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ induces a morphism $\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$, still denoted $q'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$.\n\n\\item We let\n\\[\\overline{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}=(X_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times X_{\\Pi_Q,\\mathbf{d}^{(2)}})\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\]\nwhere $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ acts on $X_{\\Pi_{Q},\\mathbf{d}^{(1)}}\\times X_{\\Pi_{Q},\\mathbf{d}^{(1)}}$ via the quotient $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$.\n\n\\item We still denote by $q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ the map $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow\\overline{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}$ obtained from the map $q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ of \\eqref{item:extensionsPi_Q} after quotient by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$.\n\n\\item We let $\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=Z_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ where $Z_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\subset X_{\\overline{Q},\\mathbf{d}^{(1)}}\\times X_{\\overline{Q},\\mathbf{d}^{(2)}}\\times\\mathfrak{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is the space of triples $(\\rho^{(1)},\\rho^{(2)},g)$ defined by the condition $\\mu_{\\mathbf{d}^{(1)}}(\\rho^{(1)})\\times \\mu_{\\mathbf{d}^{(1)}}(\\rho^{(2)})=l(g)$. We have a closed immersion \n$\n\\overline{i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}}:=(i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}\\times \\{0\\})\\colon X_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times X_{\\Pi_Q,\\mathbf{d}^{(2)}}\\rightarrow Z_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}.\n$\nWe still denote by \n\\[\n\\overline{i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}}\\colon \\overline{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}\\rightarrow \\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\]\nthe morphism obtained after quotient by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$. We denote by\n\\[\n\\overline{q}'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow Z_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\]\nthe morphism taking $\\rho\\mapsto (q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}(\\rho),\\mu_{\\mathbf{d}}(\\rho))$, and we denote by the same symbol the induced morphism of $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$-quotients.\n\n\n\\item \\label{item:vectorbundlesection} We let $\\overline{\\mathfrak{Z}}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=\\overline{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ where\n$\n\\overline{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\subset F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\times\\mathfrak{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n$\nis the subspace of pairs $(\\rho,g)$ such that $(\\mu_{\\mathbf{d}^{(1)}}\\times\\mu_{\\mathbf{d}^{(2)}})q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}(\\rho)=l(g)$, with its natural $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$-equivariant structure. The moment map induces a section $s_{\\mu}\\colon F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\overline{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$, defined by $s_{\\mu}(x)=(x,\\mu_{\\mathbf{d}}(x))$. By taking the quotient by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$, we obtain a morphism\n\\[\nr\\colon \\overline{\\mathfrak{Z}}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\]\nwith a section still denoted $s_{\\mu}$. \n\nWe let $\\mathfrak{F}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}=(\\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\times\\mathfrak{n}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}})\/P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$. The morphism $r$ restricts to the projection of the total space of the vector bundle \n\\[\n\\mathfrak{F}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\n\\] \nwith a section denoted by $s'_{\\mu}$. Note that $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is precisely the vanishing locus of this section.\n\n\n\n\n\n\\item We let $\\tilde{q}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon \\overline{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}\\rightarrow\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ be the map induced by the group homomorphism $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$. It is smooth of dimension $-\\mathbf{d}^{(1)}\\cdot\\mathbf{d}^{(2)}=-\\sum_{i\\in Q_0}(\\mathbf{d}^{(1)})_i(\\mathbf{d}^{(2)})_i$.\n\n\\end{enumerate}\n\\subsection{The relative cohomological Hall algebra product for a preprojective algebra}\n\\label{subsection:cohaproductpreproj}\nIn this section, we recall how the relative cohomological Hall algebra product is defined for the stack of representations of the preprojective algebra of a quiver, following \\cite{schiffmann2013cherednik,yang2018cohomological,davison2020bps}.\n\n\nLet $\\underline{\\mathscr{A}}_{\\Pi_Q}\\coloneqq (\\mathtt{JH}_{\\Pi_Q})_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}_{\\Pi_Q}}^{\\mathrm{vir}}$. The relative cohomological Hall algebra is an algebra structure on the object $\\underline{\\mathscr{A}}_{\\Pi_Q}$ of $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}_{\\Pi_Q}))$, i.e. a map\n\\[\n m\\colon \\underline{\\mathscr{A}}_{\\Pi_Q}\\boxdot\\underline{\\mathscr{A}}_{\\Pi_Q}\\rightarrow \\underline{\\mathscr{A}}_{\\Pi_Q}\n\\]\nas in Definition \\ref{ma_alg_def} and \\S \\ref{unbounded_cplx_sec}.\n\n\\subsubsection{Construction at the sheaf level}\nLet $\\mathbf{d}^{(1)}, \\mathbf{d}^{(2)}\\in\\mathbf{N}^{Q_0}$ and $\\mathbf{d}=\\mathbf{d}^{(1)}+\\mathbf{d}^{(2)}$. Consider the following commutative diagram.\n\n \\begin{equation}\n \\label{equation:cohadiagram}\n\\begin{tikzcd}\n\t{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}} & {\\overline{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}} & {\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}} \\\\\n\t& {\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\mathfrak{M}_{\\overline{Q},\\mathbf{d}}}\n\t\\arrow[\"\\tilde{q}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\"', from=1-2, to=1-1]\n\t\\arrow[\"{\\overline{i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}}}\"', from=1-2, to=2-2]\n\t\\arrow[\"{i_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\", from=1-3, to=2-3]\n\t\\arrow[\"{i_{\\mathbf{d}}}\", from=1-4, to=2-4]\n\t\\arrow[\"{\\overline{p}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\"', from=2-3, to=2-4]\n\t\\arrow[\"{\\overline{q}'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\", from=2-3, to=2-2]\n\t\\arrow[\"q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\"', from=1-3, to=1-2]\n\t\\arrow[\"p_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\", from=1-3, to=1-4]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-3, to=2-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-3, to=2-4]\n\\end{tikzcd}\n \\end{equation}\nwhere both the squares are Cartesian. The vertical arrows are closed immersions. In the sequel, we drop the indices $\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}$ for horizontal maps since the dimension vectors $\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}$ are fixed.\n\nThe map $p=p_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is proper and representable so that we have a morphism of complexes\n\\begin{equation}\n\\label{equation:pushforward}\n\\alpha_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon p_*\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\\rightarrow \\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}} \n\\end{equation}\nobtained by dualizing the canonical adjunction map $\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}}\\rightarrow p_*\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}$.\n\nSince $\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ and $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ are smooth, the map $\\overline{q}'=\\bar{q}'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is l.c.i., and therefore there exists a refined pullback by $q=q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ which we recall at the level of constructible complexes (see also \\S \\ref{lci_pb_sec}). The map $\\overline{q}'=\\overline{q}'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ induces the adjunction map\n\\begin{equation}\n\\label{equation:adjunctionqbar}\n\\mathbf{Q}_{\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\\rightarrow \\overline{q}'_*\\mathbf{Q}_{\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \\end{equation}\nwhich dualizes as\n\\begin{equation}\n \\label{equation:dualadjunctionqbar}\n \\overline{q}'_!\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\\rightarrow \\mathbb{D}\\mathbf{Q}_{\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}.\n\\end{equation}\nSince for a smooth stack $\\mathfrak{X}$ , we have $\\mathbb{D}\\mathbf{Q}_{\\mathfrak{X}}=\\mathbf{Q}_{\\mathfrak{X}}[2\\dim\\mathfrak{X}]$, we can rewrite \\eqref{equation:dualadjunctionqbar} as\n\\begin{equation}\n \\label{equation:dualadjunctionqbarrewritten}\n\\overline{q}'_!\\mathbf{Q}_{\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}[2\\dim\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}]\\rightarrow \\mathbf{Q}_{\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}[2\\dim\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}].\n\\end{equation}\nApplying $(\\overline{i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}})^*$ to \\eqref{equation:dualadjunctionqbarrewritten} together with the base-change isomorphism $(\\overline{i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}})^*\\overline{q}'_!\\cong q_!i_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}^*$, we get\n\\begin{equation}\n \\label{equation:basechange}\n q_!\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}[2\\dim\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}]\\rightarrow\\mathbf{Q}_{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}[2\\dim\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}].\n\\end{equation}\nDualizing \\eqref{equation:basechange}, we get the morphism\n\\begin{equation}\n \\label{equation:virtualpullback}\n(\\mathbb{D}\\mathbf{Q}_{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}})[-2\\dim\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}]\\rightarrow q_*(\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}})[-2\\dim \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}]\n\\end{equation}\nwhich is the virtual pullback by $q$ at the sheaf level.\n\nThe map $\\tilde{q}$ is smooth so that denoting by $\\dim \\tilde{q}$ its relative dimension, we may identify $(\\tilde{q})^!= (\\tilde{q})^* [2\\dim \\tilde{q}]$. Using this identity, the inverse of the isomorphism $(\\tilde{q})^*\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}\\rightarrow \\mathbf{Q}_{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}$ can be rewritten\n\\begin{equation}\n\\mathbf{Q}_{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\\rightarrow(\\tilde{q})^!\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}[-2\\dim \\tilde{q}].\n\\end{equation}\nBy the adjunction $((\\tilde{q})_!,(\\tilde{q})^!)$, we get a map\n\\begin{equation}\n (\\tilde{q})_!\\mathbf{Q}_{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\\rightarrow\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}[-2\\dim \\tilde{q}].\n\\end{equation}\nwhose Verdier dual is the pull-back by $\\tilde{q}$:\n\\begin{equation}\n \\label{equation:pullbackqprime}\n (\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}})[2\\dim \\tilde{q}]\\rightarrow (\\tilde{q})_*\\mathbb{D}\\mathbf{Q}_{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}.\n\\end{equation}\n\nBy composing \\eqref{equation:pullbackqprime} shifted by $2(\\dim\\mathfrak{M}_{\\overline{Q}\\,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}-\\dim\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}})$ with $(\\tilde{q})_*$ applied to \\eqref{equation:virtualpullback} shifted by $2\\dim\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$, we get the morphism\n\\begin{equation}\n \\label{equation:pullbackqqprime}\nv_{\\mathbf{d}',\\mathbf{d}''}\\colon \\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}[2(\\dim \\tilde{q}+\\dim\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}-\\dim\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}})]\\rightarrow (\\tilde{q})_*q_*\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \n\\end{equation}\nwhich is the virtual pullback by $\\tilde{q}\\circ q$.\n\\begin{lemma}\n\\label{lemma:shifts}\n We have the equalities\n \\[\n \\begin{aligned}\n \\dim \\tilde{q}+\\dim\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}-\\dim\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}&=-\\langle\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}\\rangle_{Q}-\\langle\\mathbf{d}^{(2)},\\mathbf{d}^{(1)}\\rangle_{Q}\\\\\n &=-\\frac{1}{2}(\\mathbf{d},\\mathbf{d})_{\\Pi_Q}+\\frac{1}{2}(\\mathbf{d}^{(1)},\\mathbf{d}^{(1)})_{\\Pi_Q}+\\frac{1}{2}(\\mathbf{d}^{(2)},\\mathbf{d}^{(2)})_{\\Pi_Q}.\n \\end{aligned}\n \\]\n \\end{lemma}\n \\begin{proof}\n This is a straightforward calculation.\n \\end{proof}\n\nRecall that we define $\\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}}^{\\mathrm{vir}}\\coloneqq \\mathbf{Q}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}}[-(\\mathbf{d},\\mathbf{d})_{\\Pi_Q}]$. We now introduce the coarse moduli space of the preprojective algebra with the first row of the diagram \\eqref{equation:cohadiagram} as in the following commutative diagram:\n\\begin{equation}\n\\label{equation:diagramcoarsemodspace}\n \\begin{tikzcd}\n\t{{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}} & {{\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}} & {{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}} & {{\\mathfrak{M}_{\\Pi_Q\\mathbf{d}}}} \\\\\n\t{\\mathcal{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathcal{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}} &&& {\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}.}\n\t\\arrow[\"{\\tilde{q}}\"', from=1-2, to=1-1]\n\t\\arrow[\"q\"', from=1-3, to=1-2]\n\t\\arrow[\"p\", from=1-3, to=1-4]\n\t\\arrow[\"\\oplus\"', from=2-1, to=2-4]\n\t\\arrow[\"{\\mathtt{JH}_{\\mathbf{d}}}\", from=1-4, to=2-4]\n\t\\arrow[\"{\\mathtt{JH}_{\\mathbf{d}^{(1)}}\\times\\mathtt{JH}_{\\mathbf{d}^{(2)}}}\"', from=1-1, to=2-1]\n\\end{tikzcd}\n\\end{equation}\nBy composing $\\oplus_{*}(\\mathtt{JH}_{\\mathbf{d}^{(1)}}\\times\\mathtt{JH}_{\\mathbf{d}^{(2)}})_*$ applied to \\eqref{equation:pullbackqqprime} shifted by $(\\mathbf{d},\\mathbf{d})_{\\Pi_Q}$ with $\\mathtt{JH}_{*}$ applied to $\\eqref{equation:pushforward}$ shifted by $(\\mathbf{d},\\mathbf{d})_{\\Pi_Q}$ and using that \\eqref{equation:diagramcoarsemodspace} commutes, we get the map\n\\[\n m_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon \\oplus_*(\\mathtt{JH}_{\\mathbf{d}^{(1)}}\\times\\mathtt{JH}_{\\mathbf{d}^{(2)}})_*\\mathbb{D}\\mathbf{Q}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}\\rightarrow(\\mathtt{JH}_{\\mathbf{d}})_*\\mathbb{D}\\mathbf{Q}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}}\n\\]\nwhich is the $(\\mathbf{d}^{(1)},\\mathbf{d}^{(2)})$-graded piece of the relative CoHA product. \n\\subsubsection{Upgrade to mixed Hodge modules}\n\nSince each $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}$ is a global quotient stack, we can upgrade the morphisms $m_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ in the standard way recalled in \\S \\ref{unbounded_cplx_sec}. The pull-back of \\eqref{equation:pullbackqqprime} along a smooth morphism $j\\colon U_N\\rightarrow \\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ admits a canonical upgrade to the category of mixed Hodge modules on $U$, which we then apply $\\oplus_{*}(\\mathtt{JH}_{\\mathbf{d}^{(1)}}\\times\\mathtt{JH}_{\\mathbf{d}^{(2)}})_*j_*$ to. Picking $U_N$ the schemes appearing in an acyclic cover of $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ enables us to upgrade the morphisms $\\ptau{\\leq n}v_{\\mathbf{d}',\\mathbf{d}''}$ to morphisms of mixed Hodge module complexes, yielding a morphism $\\ul{v}_{\\mathbf{d}',\\mathbf{d}''}$ in $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M}_{\\Pi_Q})$. We upgrade $\\mathtt{JH}_*\\alpha_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ the same way, and composing the resulting morphisms, we define the Hall algebra multiplication on $\\underline{\\mathscr{A}}_{\\Pi_Q}$. We generalise this Hall algebra, defined in the category of complexes of mixed Hodge modules, to arbitrary categories satisfying Assumptions \\ref{p_assumption} to \\ref{q_assumption2} in the next section.\n\n\\subsection{A hierarchy of cohomological Hall algebras}\n\\label{subsection:hierarchy}\nIt is often profitable to consider the Hall algebra on the Borel--Moore homology of the stack of representations in a Serre subcategory of the category of representations for a given algebra. This turns out to be especially true for preprojective algebras, where we will prove our main theorem by considering three different Serre subcategories.\n\\subsubsection{The full cohomological Hall algebra}\nWe obtain the \\emph{full cohomological Hall algebra} by taking derived global sections.\n\\[\n\\HO^*\\!\\!\\!\\underline{\\mathscr{A}}_{\\Pi_Q}\\coloneqq \\HO^*\\!(\\mathtt{JH}_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}_{\\mathcal{A}}}^{\\mathrm{vir}})\\cong \\HO^{\\BoMo}_*\\!(\\Mst_{\\Pi_Q},\\underline{\\mathbf{Q}}^{\\mathrm{vir}}).\n\\]\nIn this case the Serre subcategory of the category of finite-dimensional $\\Pi_Q$-representations is the entire category. This special case is the subject of Corollary \\ref{corollary:BPSalgebraFree}.\n\n\\subsubsection{The cohomological Hall algebra of the strictly seminilpotent locus}\n\\label{subsubsection:cohaSSN}\nLet $\\mathcal{M}^{\\mathcal{SSN}}_{\\Pi_Q}$ be the closed subvariety of $\\mathcal{M}_{\\Pi_Q}$ parameterising semisimple representations of $\\Pi_Q$ such that the only arrows acting possibly non-trivially are the loops $\\alpha\\in Q_1\\subset \\overline{Q}_1=Q_1\\sqcup Q_1^*$. \n\nThen, we have a pull-back square\n\\[\n \\begin{tikzcd}\n\t{\\mathfrak{M}^{\\mathcal{SSN}}_{\\Pi_Q}} & {\\mathfrak{M}_{\\Pi_Q}} \\\\\n\t{\\mathcal{M}^{\\mathcal{SSN}}_{\\Pi_Q}} & {\\mathcal{M}_{\\Pi_Q}}\n\t\\arrow[\"\\mathtt{JH}_{\\Pi_Q}^{\\mathcal{SSN}}\"',from=1-1, to=2-1]\n\t\\arrow[from=1-1, to=1-2]\n\t\\arrow[\"i\",from=2-1, to=2-2]\n\t\\arrow[\"\\mathtt{JH}_{\\Pi_Q}\",from=1-2, to=2-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nwhere $\\mathfrak{M}^{\\mathcal{SSN}}_{\\Pi_Q}$ parameterises strongly seminilpotent representations of $\\Pi_Q$. It is called the \\emph{strongly seminilpotent stack} and its $\\mathbf{C}$-points parameterise the seminilpotent representations of $\\Pi_Q$. These are representations $M$ of $\\Pi_Q$ such that there exists a flag $0=M_0\\subset M_1\\subset \\hdots\\subset M_r=M$ with $M_i\/M_{i-1}$ supported at a single vertex for $1\\leq i\\leq r$, $x_{\\alpha}M_i\\subset M_i$ and $x_{\\alpha^*}M_i\\subset M_{i-1}$ for $\\alpha\\in Q_1$.\n\nThe algebra structure $i^!m$ obtained on $\\underline{\\mathscr{A}}_{\\Pi_Q}^{\\mathcal{SSN}}:=(\\mathtt{JH}_{\\Pi_Q}^{\\mathcal{SSN}})_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}_{\\Pi_Q}^{\\mathcal{SSN}}}^{\\mathrm{vir}}=i^!(\\mathtt{JH}_{\\Pi_Q})_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}_{\\Pi_Q}}^{\\mathrm{vir}}$ is the relative strongly seminilpotent Hall algebra. The strongly seminilpotent Hall algebra $\\HO^*\\!\\!\\underline{\\mathscr{A}}_{\\Pi_Q}^{\\mathcal{SSN}}$, is obtained by applying the derived global sections functor to the algebra object $\\underline{\\mathscr{A}}_{\\Pi_Q}^{\\mathcal{SSN}}$.\n\nThis algebra plays a crucial role in our proofs, because it is precisely the (degree zero part of this) algebra that is described (via \\cite{bozec2016quivers} and then \\cite{hennecart2022geometric} for the translation into cohomology) as a generalised Kac--Moody Lie algebra.\n\n\\subsubsection{The cohomological Hall algebra of the nilpotent locus}\nLet $\\mathcal{M}_{\\Pi_Q}^{\\mathrm{nil}}$ be the closed subvariety of $\\mathcal{M}_{\\Pi_Q}$ parameterising semisimple representations of $\\Pi_Q$ such that all arrows act via the zero morphism. I.e. for each dimension vector $\\mathbf{d}$ the inclusion $\\iota_{\\mathbf{d}}\\colon \\mathcal{M}_{\\Pi_Q}^{\\mathrm{nil}}\\hookrightarrow \\mathcal{M}_{\\Pi_Q}$ is a single point, corresponding to the nilpotent module $S_{\\mathbf{d}}$. Then we define the \\textit{fully nilpotent CoHA} of $\\Pi_Q$\n\\[\n\\underline{\\mathscr{A}}_{\\Pi_Q}^{\\mathrm{nil}}\\coloneqq \\HO^*(\\mathcal{M}_{\\Pi_Q}^{\\mathrm{nil}},\\iota^!\\underline{\\mathscr{A}}_{\\Pi_Q}).\n\\]\nThis algebra also plays a key role in our proofs; although $\\{S_i \\in\\Pi_Q\\lmod\\mid i\\in Q_0\\}$ is a specific $\\Sigma$-collection, this CoHA models the CoHA of an \\textit{arbitrary} $\\Sigma$-collection: see Corollary \\ref{corollary:CoHAcompatibiltiySigmacoll} for the precise statement. This is as close as we come in this paper to upgrading the analytic neighbourhood theorem (Theorem \\ref{theorem:neighbourhood}) to a statement incorporating Hall algebra products, and is as close as we need to come in order to prove our main theorems.\n\n\n\\section{Cohomological Hall algebras of 2-dimensional categories}\n\\label{subsection:relativecohaproductKV} \n\n\\subsection{The CoHA product}\n\\label{subsubsection:ThecohaproductKV}\nIn this section, we define the CoHA product, generalising the one given in \\cite{kapranov2019cohomological}. We let $\\mathscr{C}$, $\\mathcal{A}$, $\\varpi\\colon \\mathfrak{M}\\rightarrow \\mathcal{M}$ be as in \\S \\ref{subsubsection:categorical}. Then we define as in the introduction\n\\begin{align*}\n\\mathscr{A}_{\\varpi}&\\coloneqq\\bigoplus_{\\mathcal{M}_a\\in\\pi_0(\\mathcal{M})}\\varpi_*\\mathbb{D}\\mathbf{Q}_{\\mathfrak{M}_{\\mathcal{A},a}}[(a,a)_{\\mathscr{C}}]\n\\\\\n\\underline{\\mathscr{A}}_{\\varpi}&\\coloneqq \\bigoplus_{\\mathcal{M}_{a} \\in \\pi_{0}(\\mathcal{M})} \\varpi_{\\ast} \\mathbb{D} \\mathbf{Q}_{\\Mst_{\\mathcal{A},a}} \\otimes \\mathbf{L}^{(a,a)_{\\mathscr{C}}\/2}\n.\n\\end{align*}\nWe assume that the assumptions stated in \\S \\ref{subsubsection:assumptionCoHAproduct}, which we briefly recall, are satisfied. Firstly, we require that the forgetful morphism $p\\colon \\mathfrak{Exact}\\rightarrow \\mathfrak{M}$ from the stack of short exact sequences of objects parameterised by points of $\\mathfrak{M}$, to $\\mathfrak{M}$, which remembers only the middle term in the sequence, is representable and proper (Assumption \\ref{p_assumption}). Secondly, we assume that Diagram \\eqref{filt_forget} is the classical truncation of a diagram in a certain category of globally presented derived stacks over $\\mathfrak{M}^{\\times 3}$: see Assumptions \\ref{q_assumption1} and \\ref{q_assumption2} and \\S \\ref{GPres_sec} for details.\n\n\n\nPick $a,b\\in\\pi_0(\\mathcal{M})$ and let $a+b\\in \\pi_0(\\mathcal{M})$ denote the connected component containing $\\pi_0(\\oplus)(a,b)$. By Assumption \\ref{q_assumption1} we can present the morphism $q\\colon \\mathfrak{Exact}_{b,a}\\rightarrow \\mathfrak{M}_a\\times \\mathfrak{M}_b$ as the truncation of a globally presented quasi-smooth morphism\n\\[\n\\operatorname{Tot}_{\\mathfrak{M}_a\\times\\mathfrak{M}_b}^Q(\\mathcal{C}_{a,b}^{\\bullet})\\rightarrow \\mathfrak{M}_a\\times \\mathfrak{M}_b.\n\\]\nRecall that $\\mathcal{C}_{a,b}$ is quasi-isomorphic to the RHom complex shifted by one on $\\mathfrak{M}_a\\times\\mathfrak{M}_b$ for $a,b\\in\\pi_0(\\mathfrak{M}_{\\mathcal{A}})$. As such we have the equality\n\\[\n(a,b)_{\\mathscr{C}}=-\\vrank(\\mathcal{C}^{\\bullet}_{a,b}).\n\\]\nWe recall that as part of our starting data (\\S\\ref{base_monoid_sec}) we have the commutative diagram\n\\begin{equation}\n \\begin{tikzcd}\n\t{\\mathfrak{M}_a\\times\\mathfrak{M}_b} & {t_0(\\operatorname{Tot}^Q_{\\mathfrak{M}\\times\\mathfrak{M}}(\\mathcal{C}^{\\bullet}_{a,b}))\\simeq \\mathfrak{Exact}_{b,a}} & {\\mathfrak{M}_{a+b}} \\\\\n\t{\\mathcal{M}_a\\times\\mathcal{M}_b} && {\\mathcal{M}_{a+b}}.\n\t\\arrow[\"{\\varpi_a\\times\\varpi_b}\"', from=1-1, to=2-1]\n\t\\arrow[\"{\\varpi_{a+b}}\", from=1-3, to=2-3]\n\t\\arrow[\"{p_{a,b}}\", from=1-2, to=1-3]\n\t\\arrow[\"{ q_{a,b}}\"', from=1-2, to=1-1]\n\t\\arrow[\"\\oplus\"', from=2-1, to=2-3]\n\\end{tikzcd}\n\\end{equation}\nWe define the morphism\n\\begin{equation}\n\\label{vfornow}\n(\\varpi_a\\times\\varpi_b)_*v_{\\mathcal{C}_{a,b}}\\colon(\\varpi_a\\times\\varpi_b)_* \\mathbb{D} \\underline{\\mathbf{Q}}_{\\mathfrak{M}_a\\times\\mathfrak{M}_b}\\rightarrow (\\varpi_a\\times\\varpi_b)_*(q_{a,b})_*\\mathbb{D} \\underline{\\mathbf{Q}}_{\\mathfrak{Exact}_{b,a}} \\otimes \\mathbf{L}^{\\vrank(\\mathcal{C}^{\\bullet}_{a,b})}\n\\end{equation}\nas the virtual pullback along $\\mathcal{C}^{\\bullet}_{a,b}$ defined in \\S \\ref{virt_pb_sec}. Using Assumption \\ref{p_assumption} (properness of $p$) we define the morphism\n\\[\n(\\varpi_{a+b})_*\\beta\\colon (\\varpi_{a+b})_*(p_{a,b})_*\\mathbb{D} \\underline{\\mathbf{Q}}_{\\mathfrak{Exact}_{b,a}}\\rightarrow (\\varpi_{a+b})_*\\mathbb{D} \\underline{\\mathbf{Q}}_{\\mathfrak{M}_{a+b}}\n\\]\nas the direct image of the pullback\\footnote{Recall that we pull back to a scheme smoothly approximating the stack so that this morphism has a lift to MHM complexes.} to an acyclic cover of the Verdier dual of the adjunction $\\underline{\\mathbf{Q}}_{\\mathfrak{M}_{a+b}}\\rightarrow (p_{a,b})_* \\underline{\\mathbf{Q}}_{\\mathfrak{Exact}_{b,a}}$.\n We define the relative CoHA multiplication on $\\underline{\\mathscr{A}}_{\\varpi}$, restricted to $\\mathcal{M}_a\\times \\mathcal{M}_b$, to be given by\n\\begin{align*}\nm_{a,b}=&((\\varpi_{a+b})_*\\beta \\otimes \\mathbf{L}^{(-(a+b,a+b)_{\\mathscr{C}}\/2})\\circ (\\oplus_*(\\varpi_a\\times\\varpi_b)_*v_{\\mathcal{C}_{a,b}}\\otimes \\mathbf{L}^{(-(a,a)_{\\mathscr{C}}-(b,b)_{\\mathscr{C}})\/2}).\n\\end{align*}\n\n\\subsubsection{Associativity}\n\\begin{proposition}\nThe above algebra structure on $\\underline{\\mathscr{A}}_{\\varpi}$ is associative.\n\\end{proposition}\n\\begin{proof}\nThe proof of associativity follows by a standard argument, since we have Assumption \\ref{q_assumption2} in place. We repeat it for convenience, and so that the reader can see what role the material in \\S \\ref{vpb_section} plays in ensuring associativity. We consider the MHM version: the version at the level of constructible complexes is proved exactly the same way.\n\nWe consider the commutative diagram\n\\[\n\\begin{tikzcd}\n\\mathfrak{Filt}_{c,b,a}&\\mathfrak{Exact}_{b+c,a} & \\mathfrak{M}_{a+b+c}\n\\\\\n\\mathfrak{M}_a\\times\\mathfrak{Exact}_{c,b} & \\mathfrak{M}_a\\times\\mathfrak{M}_{b+c}\n\\\\\n\\mathfrak{M}_a\\times\\mathfrak{M}_b\\times\\mathfrak{M}_c.\n\\arrow[from=1-1,to=1-2]\n\\arrow[from=1-2,to=1-3]\n\\arrow[\"\\beta\",from=1-1,to=2-1]\n\\arrow[\"q_{a,b+c}\",from=1-2,to=2-2]\n\\arrow[\"\\operatorname{id}\\times p_{a,b}\",from=2-1,to=2-2]\n\\arrow[from=2-1,to=3-1]\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}', draw=none, from=1-1, to=2-2]\n\\arrow[\"q_{a,b,c}\"', bend right=70, from=1-1, to=3-1]\n\\arrow[\"p_{a,b,c}\", bend left=20, from=1-1, to=1-3]\n\\end{tikzcd}\n\\]\nBy Assumption \\ref{q_assumption1} $q_{a,b+c}$ is the truncation of a globally presented quasi-smooth morphism, for which the pullback is isomorphic to $\\beta$, by Assumption \\ref{q_assumption2}. So we can write $\\mathfrak{Filt}_{c,b,a}=t_0(\\operatorname{Tot}_{\\mathfrak{M}_a\\times\\mathfrak{M}_b\\times\\mathfrak{M}_c}^Q(\\mathcal{E}^{\\bullet}))$ for some perfect complex $\\mathcal{E}^{\\bullet}$. Combining Propositions \\ref{vpb_bchange} and \\ref{gpres_assoc} we deduce that the composition\n\\[\nm_{a,b+c}\\circ (\\operatorname{id}\\boxdot m_{b,c})\\colon \\oplus_*\\varpi^{\\times 3}_*\\left(\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_a}\\boxdot\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_b}\\boxdot \\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_c}\\right)\\rightarrow \\varpi_*\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{a+b+c}}\n\\]\nis given by the composition of the virtual pullback along $\\delta\\beta$ in Diagram \\eqref{filt_forget}:\n\\[\n\\oplus_*\\varpi^{\\times 3}_*v_{\\mathcal{E}}\\colon \\oplus_*\\varpi^{\\times 3}_*\\left(\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_a}\\boxdot\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_b}\\boxdot \\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_c}\\right)\\rightarrow (q_{a,b,c})_*\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{Filt}_{c,b,a}}\\otimes \\mathbf{L}^{s\/2}\n\\]\nand\n\\[\n\\varpi_*\\!\\left(p_*\\mathbb{D} \\underline{\\mathbf{Q}}_{\\mathfrak{Filt}_{c,b,a}}\\otimes \\mathbf{L}^{s\/2}\\rightarrow \\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{a+b+c}}\\right).\n\\]\nHere,\n\\begin{align*}\ns\/2=&-(a,a)\/2-(b,b)\/2-(c,c)\/2+\\vrank(\\mathcal{E}^{\\bullet})\\\\\n=&-(a,a)\/2-(b,b)\/2-(c,c)\/2-(a,b)-(a,c)-(b,c)\\\\\n=&-(a+b+c,a+b+c)\/2.\n\\end{align*}\nBy Assumption \\ref{q_assumption2} and Proposition \\ref{gqe_prop}, the virtual pullback $v_{\\mathcal{E}}$ is equal to the virtual pullback along $\\gamma\\alpha$, and the result follows. \n\\end{proof}\n\\subsubsection{CoHA associated to a submonoid}\nWe assume, as in \\S \\ref{strict_mf_sec} that we are given an inclusion of monoids $\\imath\\colon(\\mathcal{N},\\oplus)\\rightarrow (\\mathcal{M},\\oplus)$ such that the diagram \\eqref{equation:diagrampullbackmonoidal} is Cartesian. Then by Lemma \\ref{lemma:strictmonoidalfunctor}, the constructible complex $\\imath^!\\underline{\\mathscr{A}}_{\\varpi}$ inherits an algebra structure from the algebra structure on $\\underline{\\mathscr{A}}_{\\varpi}$. Precisely, we define the morphism\n\\[\n\\imath^!\\underline{\\mathscr{A}}_{\\varpi}\\boxdot\\imath^!\\underline{\\mathscr{A}}_{\\varpi}\\rightarrow \\imath^!\\underline{\\mathscr{A}}_{\\varpi}\n\\]\nas the composition of the natural isomorphism\n\\[\n\\imath^!\\underline{\\mathscr{A}}_{\\varpi}\\boxdot\\imath^!\\underline{\\mathscr{A}}_{\\varpi}\\cong \\imath^!(\\underline{\\mathscr{A}}_{\\varpi}\\boxdot\\underline{\\mathscr{A}}_{\\varpi})\n\\]\nand $\\iota^!m$.\n\\subsection{Comparison of the products for preprojective CoHAs}\n\\label{subsection:comparison_preproj}\nIf $\\mathfrak{M}_{\\Pi_Q}$ is the moduli stack of representations of the preprojective algebra of a quiver, the constructions of \\S\\ref{subsection:cohaproductpreproj} and \\S\\ref{subsubsection:ThecohaproductKV} provide us with two a priori different products on $\\underline{\\mathscr{A}}_{\\varpi}=\\varpi_*\\mathbb{D} \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}}$. In this section, we show that these two products coincide.\n\n\n\\subsubsection{Total space of the RHom complex for the doubled quiver}\n\nWe give an explicit presentation of the RHom complex on $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}$ for $\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}\\in\\mathbf{N}^{Q_0}$.\n\nLet $V_{\\mathbf{d}^{(j)}}$, $j=1,2$ be trivial $\\mathbf{N}^{Q_0}$-graded vector bundles on $X_{\\overline{Q},\\mathbf{d}^{(j)}}$ of rank $\\mathbf{d}^{(j)}$. We have a $2$-term complex of vector bundles on $X_{\\overline{Q},\\mathbf{d}^{(1)}}\\times X_{\\overline{Q},\\mathbf{d}^{(2)}}$, situated in cohomological degrees $-1$ and $0$:\n\\[\n \\mathcal{C}_{\\overline{Q}}=\\left(\\bigoplus_{i\\in Q_0}\\operatorname{Hom}_{\\mathbf{C}}((V_{\\mathbf{d}^{(1)}})_i,(V_{\\mathbf{d}^{(2)}})_i)\\xrightarrow{d}\\bigoplus_{i\\xrightarrow{\\alpha}j\\in \\overline{Q}_1}\\operatorname{Hom}_{\\mathbf{C}}((V_{\\mathbf{d}^{(1)}})_i,(V_{\\mathbf{d}^{(2)}})_j)\\right).\n\\]\nLet $x=(x_{\\alpha})_{\\alpha\\in \\overline{Q}_1}\\in X_{\\overline{Q},\\mathbf{d}^{(1)}}$ and $y=(y_{\\alpha})_{\\alpha\\in \\overline{Q}_1}\\in X_{\\overline{Q},\\mathbf{d}^{(2)}}$. For $z\\in\\bigoplus_{i\\in Q_0}\\operatorname{Hom}_{\\mathbf{C}}((V_{\\mathbf{d}^{(1)}})_i,(V_{\\mathbf{d}^{(2)}})_i)$, we have\n\\[\n d_{(x,y)}z=(z_jy_{\\alpha}-x_{\\alpha}z_i)_{i\\xrightarrow{\\alpha} j\\in\\overline{Q}_1}.\n\\]\nWe have a natural $\\mathrm{GL}_{\\mathbf{d}^{(1)}}\\times\\mathrm{GL}_{\\mathbf{d}^{(2)}}$-equivariant structure on $\\mathcal{C}_{\\overline{Q}}$ so that we can consider $\\mathcal{C}_{\\overline{Q}}$ as a $2$-term complex on $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}$. The following is easy and well-known.\n\n\\begin{proposition}\n The $2$-term complex $\\mathcal{C}_{\\overline{Q}}$ on $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}$ is quasi-isomorphic to the RHom complex shifted by one.\n\\end{proposition}\n\n\\begin{corollary}\n The total space of $\\mathcal{C}_{\\overline{Q}}$ is isomorphic as a vector bundle stack over $\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}$ to the map\n \\[\n \\pi_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\colon\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(2)}}\n \\]\n given in \\eqref{item:extensionoverlineQ}.\n\\end{corollary}\n\n\n\\subsubsection{Total space of the RHom complex for preprojective algebras}\nRecall the explicit presentation of the RHom complex for preprojective algebras given in \\eqref{equation:RHompreprojective}. From the definitions of the complexes $\\mathcal{C}_{\\Pi_Q}$ and $\\mathcal{C}_{\\overline{Q}}$, the following three lemmas are immediate.\n\n\n\n\\begin{lemma}\n The restriction of $\\mathcal{C}_{\\overline{Q}}$ to $\\mathfrak{M}_{\\Pi_{Q},\\mathbf{d}^{(1)}}\\times \\mathfrak{M}_{\\Pi_{Q},\\mathbf{d}^{(2)}}$ is equal to $\\mathcal{C}_{\\Pi_Q}^{\\leq 0}$.\n\\end{lemma}\n\n\\begin{lemma}\n The total space $\\operatorname{Tot}(\\mathcal{C}_{\\Pi_Q}^{\\leq 0})$ is isomorphic as a vector bundle stack over $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ to the map $\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}$ defined in \\eqref{item:extensionoverlineQPiQ}.\n\\end{lemma}\n\n\\begin{lemma}\n The vector bundle $V=\\pi_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}^*\n \\mathcal{C}^1$ on $\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is isomorphic to the vector bundle $\\mathfrak{F}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\rightarrow\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ defined in \\eqref{item:vectorbundlesection}. The section of this vector bundle induced by $\\mu$ is the section $s_{\\mu}$ described in \\eqref{item:vectorbundlesection}.\n\\end{lemma}\n\n\\subsubsection{The comparison diagram}\n\nWe have the following commutative diagram with Cartesian squares.\n\n\\[\n\\begin{tikzcd}\n\t{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}} & {\\overline{\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(2)}}}} & {\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \\\\\n\t&& {\\mathfrak{F}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\overline{\\mathfrak{M}}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \\\\\n\t& {\\mathfrak{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\overline{\\mathfrak{Z}}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\mathfrak{M}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\n\t\\arrow[from=1-2, to=3-2]\n\t\\arrow[from=1-3, to=2-3,\"0_V\"]\n\t\\arrow[from=2-3, to=3-3]\n\t\\arrow[from=3-3, to=3-2]\n\t\\arrow[from=1-3, to=1-2]\n\t\\arrow[from=1-4, to=1-3]\n\t\\arrow[from=1-4, to=2-4]\n\t\\arrow[from=2-4, to=3-4]\n\t\\arrow[from=3-4, to=3-3,\"s_{\\mu}\"]\n\t\\arrow[from=2-4, to=2-3, \"s'_{\\mu}\"]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-3, to=3-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-4, to=2-3]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=2-4, to=3-3]\n\t\\arrow[from=1-2, to=1-1]\n\\end{tikzcd}\n\\]\nThis diagram (without the left-most map) comes from the quotient by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ of the following diagram:\n\\[\n \\begin{tikzcd}\n\t{X_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times X_{\\Pi_Q,\\mathbf{d}^{(2)}}} & {\\overline{F}_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {F_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \\\\\n\t& {\\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\times\\mathfrak{n}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\overline{F}_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \\\\\n\t{Z_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {\\overline{Z}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\n\t\\arrow[\"{q'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\"', from=1-2, to=1-1]\n\t\\arrow[\"{i_{\\mathbf{d}^{(1)}}\\times i_{\\mathbf{d}^{(2)}}\\times 0}\"', from=1-1, to=3-1]\n\t\\arrow[\"0_V\"', from=1-2, to=2-2]\n\t\\arrow[\"{i_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}\\times \\operatorname{id}}\"', from=2-2, to=3-2]\n\t\\arrow[\"{q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\", from=3-2, to=3-1]\n\t\\arrow[\"{s_{\\mu}}\", from=3-3, to=3-2]\n\t\\arrow[\"{i'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\"', from=1-3, to=1-2]\n\t\\arrow[\"{s'_{\\mu}}\"', from=2-3, to=2-2]\n\t\\arrow[\"{i'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\", from=1-3, to=2-3]\n\t\\arrow[\"{i_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\", from=2-3, to=3-3]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-2, to=3-1]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-3, to=2-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=2-3, to=3-2]\n\\end{tikzcd}\n\\]\nThe outer square\n\\[\n \\begin{tikzcd}\n\t{X_{\\Pi_Q,\\mathbf{d}^{(1)}}\\times X_{\\Pi_Q,\\mathbf{d}^{(2)}}} & {F_{\\Pi_Q,\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} \\\\\n\t{Z_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}} & {F_{\\overline{Q},\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}}\n\t\\arrow[from=1-2, to=1-1]\n\t\\arrow[from=1-1, to=2-1]\n\t\\arrow[from=1-2, to=2-2]\n\t\\arrow[from=2-2, to=2-1]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125, rotate=-90}, draw=none, from=1-2, to=2-1]\n\\end{tikzcd}\n\\]\nis the left-most Cartesian square of \\eqref{equation:cohadiagram} (before quotienting by $P_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$) used to defined the refined pull-back in the relative version of the cohomological Hall algebra product of Schiffmann--Vasserot. The top-right square together with the top-left arrow is the diagram used to define the relative version of the cohomological Hall algebra in \\S \\eqref{subsubsection:ThecohaproductKV}.\n\nThe map $q'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ is smooth, so in particular l.c.i. and so that the leftmost square has no excess intersection bundle ($q'_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ and $q_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ are both of codimension $-\\sum_{\\i\\xrightarrow{\\alpha}j\\in\\overline{Q}_1}(\\mathbf{d}^{(1)})_i(\\mathbf{d}^{(2)})_j$). The morphisms $s_{\\mu}$, $s'_{\\mu}$ are also l.c.i. (as sections of vector bundles) of the same codimension (that equals $\\dim\\mathfrak{n}_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$). By Lemma \\ref{zei_lemma} we obtain the identification of the two Hall algebra products constructed in \\S\\ref{subsection:cohaproductpreproj} and \\S\\ref{subsection:relativecohaproductKV}, yielding the following theorem:\n\n\\begin{theorem}\n For any $\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}\\in\\mathbf{N}^{Q_0}$, the morphisms $m_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ defined in \\S\\ref{subsection:cohaproductpreproj} and $m_{\\mathbf{d}^{(1)},\\mathbf{d}^{(2)}}$ defined in \\S\\ref{subsubsection:ThecohaproductKV} (for the stack of representations of a preprojective algebra) coincide.\n\\end{theorem}\n\n\n\n\n\n\n\n\\subsection{The cohomological algebra of a $\\Sigma$-collection}\n\\label{subsubsection:cohaSigmacollection}\nLet $\\underline{x}=\\{x_1,\\hdots,x_r\\}$ be pairwise distinct closed $\\mathbf{C}$-points of $\\mathcal{M}$ represented by a set $\\underline{\\mathcal{F}}=\\{\\mathcal{F}_1,\\hdots,\\mathcal{F}_r\\}$ of simple objects of $\\mathcal{A}$, where the full subcategory containing $x_1,\\ldots, x_r$ carries a right 2CY structure, and these objects form a $\\Sigma$-collection. Let $\\mathcal{M}_{\\underline{x}}\\subset\\mathcal{M}_{\\Pi_Q}$ be the submonoid generated by $\\underline{x}$. We have a Cartesian square\n\\[\n\\begin{tikzcd}\n\t{\\mathfrak{M}_{\\underline{x}}} & {\\mathfrak{M}_{\\Pi_Q}} \\\\\n\t{\\mathcal{M}_{\\underline{x}}} & {\\mathcal{M}_{\\Pi_Q}}\n\t\\arrow[\"{\\mathtt{JH}_{\\Pi_Q}}\", from=1-2, to=2-2]\n\t\\arrow[\"{i_{\\underline{x}}}\"', from=2-1, to=2-2]\n\t\\arrow[\"{\\mathtt{JH}_{\\Pi_Q}^{\\underline{x}}}\"', from=1-1, to=2-1]\n\t\\arrow[from=1-1, to=1-2]\n\t\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\]\nwhere $\\mathfrak{M}_{\\underline{x}}$ parameterises $\\Pi_Q$-modules whose simple subquotients are in $\\underline{\\mathcal{F}}$.\n\nThe cohomological Hall algebra of $\\mathfrak{M}_{\\underline{x}}$ is defined to be $\\underline{\\mathscr{A}}_{\\underline{x}}:=(\\mathtt{JH}_{\\Pi_Q}^{\\underline{x}})_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}_{\\underline{x}}}\\otimes \\mathbf{L}^{\\chi\/2}\\cong i_{\\underline{x}}^!(\\mathtt{JH}_{\\Pi_Q})_*\\mathbb{D}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\Pi_Q}}$, with the multiplication $i_{\\underline{x}}^!m$.\n\nLet $Q=(Q_0,Q_1)$ be a quiver and let $\\Pi_Q$ be its preprojective algebra. We let $\\mathrm{Nil}$ be the $\\Sigma$-collection of one-dimensional nilpotent $\\Pi_Q$-modules, so that $\\underline{x}=\\{S_i \\mid i\\in Q_0\\}$. The cohomological Hall algebra of $\\mathrm{Nil}$ is called \\emph{the fully nilpotent cohomological Hall algebra} of $\\Pi_Q$.\n\nWe now identify the cohomological Hall algebra of a $\\Sigma$-collection.\n\n\\begin{lemma}[{\\cite[Proof of Theorem 5.11]{davison2021purity}}]\n Let $\\underline{\\mathcal{F}}=\\{\\mathcal{F}_1,\\hdots,\\mathcal{F}_r\\}$ be a $\\Sigma$-collection in $\\mathscr{C}$, and assume that the full subcategory of $\\mathscr{C}$ containing $\\mathcal{F}_1,\\ldots,\\mathcal{F}_r$ carries a right 2CY structure. Let $Q_{\\underline{\\mathcal{F}}}$ be a half of the Ext-quiver of $\\mathcal{\\underline{F}}$. Then the full dg-subcategory of $\\mathscr{C}$ generated under extensions by $\\underline{\\mathcal{F}}$ is quasi-equivalent to the full dg-subcategory of $\\mathcal{D}^{\\bdd}_{\\dg}(\\mathrm{mod}^{\\mathscr{G}_2(Q_{\\underline{\\mathcal{F}}})})$ generated under extensions by nilpotent one-dimensional modules.\n\\end{lemma}\n\n\\begin{corollary}\n\\label{corollary:comparisonCoHAfiber}\n Let $\\underline{\\mathcal{F}}=\\{\\mathcal{F}_1,\\hdots,\\mathcal{F}_r\\}$ be a $\\Sigma$-collection in $\\mathcal{A}$, and assume that the full subcategory of $\\mathscr{C}$ containing $\\mathcal{F}_1,\\ldots,\\mathcal{F}_r$ carries a right 2CY structure. Let ${\\mathfrak{M}}_{\\underline{\\mathcal{F}}}$ be the closed substack of ${\\mathfrak{M}}_{\\mathcal{A}}$ parameterising objects whose simple subquotients are in $\\underline{\\mathcal{F}}$. Let $Q$ be a half of the Ext-quiver of $\\underline{\\mathcal{F}}$. Let ${\\mathfrak{M}}_{\\Pi_Q}^{\\mathrm{nil}}$ be the closed substack of ${\\mathfrak{M}}_{\\Pi_Q}$ parameterising nilpotent representations of $\\Pi_Q$. We have an isomorphism $\\Phi_{\\underline{\\mathcal{F}}}\\colon\\mathfrak{M}_{\\Pi_Q}^{\\mathrm{nil}}\\rightarrow\\mathfrak{M}_{\\underline{\\mathcal{F}}}$ such that if $\\mathcal{C}^{\\bullet}_{\\underline{\\mathcal{F}}}$ is the restriction of the shifted RHom complex over $\\mathfrak{M}_{\\mathcal{A}}\\times\\mathfrak{M}_{\\mathcal{A}}$ to $\\mathfrak{M}_{\\underline{\\mathcal{F}}}\\times\\mathfrak{M}_{\\underline{\\mathcal{F}}}$ and $\\mathcal{C}_{\\Pi_Q}^{\\mathrm{nil},\\bullet}$ is the restriction of the RHom complex over $\\mathfrak{M}_{\\Pi_Q}\\times\\mathfrak{M}_{\\Pi_Q}$ to $\\mathfrak{M}_{\\Pi_Q}^{\\mathrm{nil}}\\times\\mathfrak{M}_{\\Pi_Q}^{\\mathrm{nil}}$, then $\\Phi_{\\underline{\\mathcal{F}}}^*\\mathcal{C}^{\\bullet}_{\\underline{\\mathcal{F}}}$ is quasi-isomorphic to $\\mathcal{C}_{\\Pi_Q}^{\\mathrm{nil},\\bullet}$.\n\\end{corollary}\n\n\\begin{corollary}\n\\label{corollary:CoHAcompatibiltiySigmacoll}\n The isomorphism of stacks $\\Phi_{\\underline{\\mathcal{F}}}\\colon\\mathfrak{M}_{\\Pi_Q}^{\\mathrm{nil}}\\rightarrow\\mathfrak{M}_{\\underline{\\mathcal{F}}}$ induces an isomorphism of cohomological Hall algebras\n \\[\n \\Phi_{\\underline{\\mathcal{F}}}^*\\colon \\underline{\\mathscr{A}}_{\\underline{\\mathcal{F}}}\\rightarrow \\underline{\\mathscr{A}}_{\\Pi_Q}^{\\mathrm{nil}}.\n \\]\n\\end{corollary}\n\\begin{proof}\n This is a consequence of Corollary \\ref{corollary:comparisonCoHAfiber}, since the cohomological Hall algebra of the $\\Sigma$-collection $\\underline{\\mathcal{F}}$ only depends on the stack $\\mathfrak{M}_{\\underline{\\mathcal{F}}}$ together with the (shifted) RHom-complex $\\mathcal{C}^{\\bullet}_{\\underline{\\mathcal{F}}}$ over $\\mathfrak{M}_{\\underline{\\mathcal{F}}}\\times\\mathfrak{M}_{\\underline{\\mathcal{F}}}$ up to quasi-isomorphism, by Propositions \\ref{gqe_prop} and \\ref{glob_res_prop}.\n\\end{proof}\n\n\n\\section{BPS algebras}\n\\label{section:lessperverse}\nWe introduce the BPS algebra of a 2-Calabi--Yau category. The BPS algebra is a smaller, more manageable, algebra than the cohomological Hall algebra. The general expectation from cohomological DT theory is that the cohomological Hall algebra should be (half) of a Yangian-type algebra associated to a Lie algebra, while what we define as the BPS algebra will be the universal enveloping algebra of this Lie algebra. We recall important facts about BPS algebras.\n\n\\subsection{The BPS algebra of a $2$-Calabi--Yau category}\nLet $\\mathcal{A}$ and $\\mathtt{JH}\\colon\\mathfrak{M}\\rightarrow\\mathcal{M}$ be as in \\S \\ref{BPS_assumptions_sec}. Recall that this means that as well as Assumptions \\ref{p_assumption}, \\ref{q_assumption1} and \\ref{q_assumption2}, we require that there be a good moduli space $\\mathtt{JH}\\colon\\mathfrak{M}\\rightarrow \\mathcal{M}$, that the direct sum morphism $\\oplus\\colon\\mathcal{M}\\times\\mathcal{M}\\rightarrow \\mathcal{M}$ is finite, and a 2CY condition on categories generated by simple objects (Assumptions \\ref{gms_assumption}, \\ref{ds_fin} and \\ref{BPS_cat_assumption}).\n\nThe relative cohomological Hall algebra is defined in \\S\\ref{section:relativeCoHA} as an algebra structure on the complex of mixed Hodge modules $\\underline{\\mathscr{A}}_{\\mathtt{JH}}\\coloneqq\\mathtt{JH}_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}}^{\\mathrm{vir}}\\in \\mathcal{D}^+(\\mathrm{MHM}(\\Msp))$. As in the introduction, we also make a choice of bilinear form $\\psi$ on $\\mathbf{Z}^{\\pi_0(\\mathfrak{M})}$, and define $\\underline{\\mathscr{A}}^{\\psi}_{\\mathtt{JH}}$ to be the same underlying object as $\\underline{\\mathscr{A}}_{\\mathtt{JH}}$ but with the $\\psi$-twisted multiplication \n\\begin{equation}\n\\label{psi_twist_def}\nm^{\\psi}_{a,b}=(-1)^{\\psi(a,b)}m_{a,b}.\n\\end{equation}\nWe write $\\underline{\\mathscr{A}}_{\\mathtt{JH}}^{(\\psi)}$ in statements to indicate that the statement is true whether we include the $\\psi$-twist or not. This $\\psi$-twist is crucial for Theorems~\\ref{theorem:degree0SSN} and \\ref{theorem:pbwtotnegative2CY}.\n\n\\begin{lemma}\n\\label{lemma:nonnegativeperverse}\n The mixed Hodge module complex $\\underline{\\mathscr{A}}_{\\mathtt{JH}}^{(\\psi)}$ is concentrated in nonnegative degrees: $\\mathcal{H}^i(\\underline{\\mathscr{A}}^{(\\psi)}_{\\mathtt{JH}})=0$ for $i<0$.\n\\end{lemma}\n\\begin{proof}\nThis is part of \\cite[Theorem B]{davison2021purity}. The statement is independent of whether we give $\\underline{\\mathscr{A}}_{\\mathtt{JH}}$ the $\\psi$-twisted multiplication or not.\n\\end{proof}\n\n\n\\begin{corollary}\n\\label{corollary:bpsalgissubalg}\n The map $\\mathcal{H}^{0}(m^{(\\psi)})\\colon \\mathcal{H}^{0}(\\underline{\\mathscr{A}}_{\\mathtt{JH}})\\boxdot \\mathcal{H}^{0}(\\underline{\\mathscr{A}}_{\\mathtt{JH}})\\rightarrow \\mathcal{H}^{0}(\\underline{\\mathscr{A}}_{\\mathtt{JH}})$ yields an algebra in the tensor category $(\\mathrm{MHM}(\\mathcal{M}),\\boxdot)$.\n\\end{corollary}\n\\begin{proof}\n This comes from the fact that $\\underline{\\mathscr{A}}_{\\mathtt{JH}}$ is concentrated in nonnegative degrees (Lemma \\ref{lemma:nonnegativeperverse}) and for any two mixed Hodge modules $\\mathcal{F},\\mathcal{G}$ on $\\mathcal{M}$, $\\operatorname{Hom}_{\\mathcal{D}^+(\\mathrm{MHM}(\\Msp))}(\\mathcal{F},\\mathcal{G}[-n])=0$ if $n>0$.\n\\end{proof}\n\n\n\\begin{definition}\nWe define $\\underline{\\BPS}_{\\mathrm{Alg}}^{(\\psi)}$ to be the mixed Hodge module $\\mathcal{H}^{0}(\\underline{\\mathscr{A}}^{(\\psi)}_{\\mathtt{JH}})$ with the multiplication $\\mathcal{H}^{0}(m^{(\\psi)})$. We denote by $\\mathcal{BPS}^{(\\psi)}_{\\mathrm{Alg}}=\\pH{0}(\\mathscr{A}^{(\\psi)}_{\\mathtt{JH}})$ the underlying perverse sheaf of $\\underline{\\BPS}_{\\mathrm{Alg}}$, along with its induced $\\boxdot$-algebra structure $\\rat(\\mathcal{H}^0(m^{(\\psi)}))$. By abuse of terminology we call both \\emph{the BPS algebra sheaf}. Its cohomology is denoted $\\aBPS_{\\mathrm{Alg}}:=\\mathbf{H}(\\mathcal{BPS}_{\\mathrm{Alg}})$ and called \\emph{the BPS algebra}.\n\n\\end{definition}\n\n\\begin{lemma}\n\\label{lemma:BPSsemisimple}\n The mixed Hodge module $\\underline{\\BPS}^{(\\psi)}_{\\mathrm{Alg}}$ is semisimple.\n\\end{lemma}\n\\begin{proof}\nAgain, the statement is independent of whether we consider the $\\psi$-twisted multiplication or not. This is a consequence of the decomposition theorem for 2-Calabi--Yau categories \\cite[Theorem B]{davison2021purity}.\n\\end{proof}\n \n\n\n\\subsection{Primitive summands}\n\\label{primitives_sec}\n\\begin{lemma}[{\\cite{davison2021purity}}]\n\\label{lemma:ICintoBPSAlg}\n Let $a\\in \\Sigma_{\\mathcal{A}}$ be a class such that $\\mathcal{A}$ has simple objects of class $a$.\nThen, we have a canonical monomorphism of mixed Hodge modules\n\\[\n\\phi_a\\colon \\underline{\\mathcal{IC}}(\\mathcal{M}_a)\\rightarrow\\underline{\\BPS}_{\\mathrm{Alg}}.\n\\]\nIt induces a morphism of complexes of mixed Hodge modules via the natural $\\HO_{\\mathbf{C}^{\\ast}}$-action on the target\n \\[\n \\underline{\\mathcal{IC}}(\\mathcal{M}_a)\\otimes \\HO_{\\mathbf{C}^{\\ast}}\\rightarrow \\underline{\\mathscr{A}}_{\\mathtt{JH}}.\n \\]\n\\end{lemma}\n\\begin{proof}\n Let $a$ be as in the lemma. The scheme $\\mathcal{M}_a$ is irreducible with smooth locus $\\mathcal{M}_a^s$, the locus of simple objects. Over this locus, $\\mathtt{JH}$ is a $\\mathbf{C}^*$-gerbe. Therefore, $(\\underline{\\mathscr{A}}_{\\mathtt{JH}})_{|\\mathcal{M}_a^s}\\cong \\underline{\\mathcal{IC}}(\\mathcal{M}_a^s)\\otimes \\HO_{\\mathbf{C}^{\\ast}}$. Since $\\underline{\\mathscr{A}}_{\\mathtt{JH}}$ has a $\\HO_{\\mathbf{C}^{\\ast}}$-action coming from the determinant bundle on $\\mathfrak{M}_a$, we obtain the second statement.\n\\end{proof}\n\nBy the universal property of free algebras in monoidal categories, the morphisms $\\phi_{a}\\colon \\underline{\\mathcal{IC}}(\\Msp_{a}) \\hookrightarrow \\underline{\\BPS}_{\\mathrm{Alg}}$ induce $\\boxdot$-algebra morphisms\n\\begin{equation}\n\\label{equation:mainiso}\n\\Phi_{\\mathcal{A}}^{(\\psi)}\\colon \\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left( \\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}}\\underline{\\mathcal{IC}}(\\Msp_{a}) \\right) \\longto \\underline{\\BPS}_{\\mathrm{Alg}}^{(\\psi)}.\n\\end{equation}\n\n\n\\begin{lemma}\n\\label{lemma:ICPreprojPrimitive}\nThe summands $\\underline{\\mathcal{IC}}(\\Msp_{a}) \\subset \\underline{\\BPS}^{(\\psi)}_{\\mathrm{Alg}}$ for $a \\in \\Sigma_{\\mathcal{A}}$ are primitive subobjects of $\\underline{\\BPS}^{(\\psi)}_{\\mathrm{Alg}}$ as a $\\boxdot$-algebra,\ni.e. if $\\mathcal{I}_{a}$ is the image by $\\mathcal{H}^{0}(m^{(\\psi)})$ of $\\bigoplus_{\\substack{b+c=a\\\\b,c\\neq 0}}\\underline{\\BPS}^{(\\psi)}_{\\mathrm{Alg},b}\\boxtimes\\underline{\\BPS}^{(\\psi)}_{\\mathrm{Alg},c}$, the composition $\\underline{\\mathcal{IC}}(\\Msp_{a})\\rightarrow \\underline{\\BPS}^{(\\psi)}_{\\mathrm{Alg},a}\/\\mathcal{I}_{a}$ is non-zero.\n\\end{lemma}\n\\begin{proof}\nThis follows by the proof of \\cite[Theorem 7.35]{davison2021purity}, and is immediate by support considerations: the supports of all simple direct summands of $\\mathcal{I}_a$ are included in $\\mathcal{M}_{\\mathcal{A},a}\\setminus\\mathcal{M}_{\\mathcal{A},a}^s$.\n\\end{proof}\n\n\n\n\n\\subsection{Borcherds--Bozec algebra of a quiver}\nLet $Q=(Q_0,Q_1)$ be a quiver. Following Bozec's definition in \\cite{bozec2015quivers} we consider a Borcherds Lie algebra associated to this datum generalising the Kac-Moody Lie algebra of a loop-free quiver.\n\nWe decompose the set of vertices $Q_0=Q_0^{\\real}\\sqcup Q_0^{\\iso}\\sqcup Q_0^{\\hyp}$ where the set of \\emph{real} vertices $Q_0^{\\real}$ is the set of vertices carrying no loops, the set of \\emph{isotropic} vertices $Q_0^{\\iso}$ is the set of vertices carrying exactly one loop and the set of \\emph{hyperbolic} vertices $Q_0^{\\hyp}$ is the set of vertices carrying at least two loops. The set of isotropic and hyperbolic vertices $Q_0^{\\imag}=Q_{0}^{\\iso}\\sqcup Q_0^{\\hyp}$ is the set of \\emph{imaginary} vertices.\n\nThe set of simple roots of the Borcherds--Bozec algebra of $Q$, $\\mathfrak{g}_Q$, is\n\\[\n I_{\\infty}=(Q_0^{\\real}\\times \\{1\\})\\sqcup(Q_0^{\\imag}\\times \\mathbf{Z}_{>0}).\n\\]\nThere is a natural projection\n\\begin{align*}\np\\colon\\mathbf{Z}^{(I_{\\infty})}&\\longrightarrow\\mathbf{Z}^{Q_0}\\\\\n(f\\colon I_{\\infty}\\rightarrow\\mathbf{Z})&\\longmapsto\\left(pf\\colon i'\\mapsto\\sum_{(i',n)\\in I_{\\infty}}nf(i',n)\\right).\n\\end{align*}\nThe lattice $\\mathbf{Z}^{Q_0}$ has a bilinear form given by the symmetrized Euler form, $(-,-)$. We endow $\\mathbf{Z}^{(I_{\\infty})}$ with the bilinear form $p^*(-,-)$ obtained by pulling-back the Euler form, and by abuse of notation we also denote this form on $\\mathbf{Z}^{(I_{\\infty})}$ by $(-,-)$. In explicit terms,\n\\[\n (1_{(i',n)},1_{(j',m)})=mn(1_{i'},1_{j'})=mn(\\langle 1_{i'},1_{j'}\\rangle_Q+\\langle 1_{j'},1_{i'}\\rangle_Q).\n\\]\nThere is a Borcherds algebra associated to the data $(\\mathbf{Z}^{(I_{\\infty})},p^*(-,-))$. It is the Lie algebra over $\\mathbf{Q}$ with generators $h_{i'},e_i,f_i$, with $i'\\in Q_0$, $i\\in I_{\\infty}$, satisfying the following set of relations.\n\\begin{equation}\n\\label{equation:relations}\n \\begin{aligned}\n{[h_{i'},h_{j'}]}&=0 &\\text{ for $i',j'\\in Q_0$}\\\\\n [h_{j'},e_{(i',n)}]&=n(1_{j'},1_{i'})e_{(i',n)}&\\text{ for $j'\\in Q_0$ and $(i',n)\\in I_{\\infty}$}\\\\\n [h_{j'},f_{(i',n)}]&=-n(1_{j'},1_{i'})f_{(i',n)}&\\text{ for $j'\\in Q_0$ and $(i',n)\\in I_{\\infty}$} \\\\\n \\operatorname{ad}(e_j)^{1-(j,i)}(e_i)=\\operatorname{ad}(f_j)^{1-(j,i)}(f_i)&=0&\\text{ for $j\\in Q_0^{\\real}\\times \\{1\\}$, $i\\neq j$}\\\\\n [e_i,e_j]=[f_i,f_j]&=0 &\\text{ if $(i,j)=0$}\\\\\n [e_i,f_j]&=\\delta_{i,j}nh_{i'} &\\text{ for $i=(i',n)$.}\n \\end{aligned}\n\\end{equation}\nThe Lie algebra $\\mathfrak{g}_{Q}$ has a triangular decomposition\n\\[\n\\mathfrak{g}_Q=\\mathfrak{n}_Q^-\\oplus\\mathfrak{h}\\oplus\\mathfrak{n}_Q^+ \n\\]\nwhere $\\mathfrak{n}_Q^-$ (resp. $\\mathfrak{n}_Q^+$, resp. $\\mathfrak{h}$) is the Lie subalgebra generated by $e_i, i\\in I_{\\infty}$ (resp. $f_i, i\\in I_{\\infty}$, resp. $h_{i'}, i'\\in Q_0$) and we will only be interested in its positive part $\\mathfrak{n}_Q^{+}$. It is generated by $e_i, i\\in I_{\\infty}$ with Serre relations\n\\[\n \\begin{aligned}\n \\operatorname{ad}(e_j)^{1-(j,i)}(e_i)&=0&\\text{ for $j\\in Q_0^{\\real}\\times \\{1\\}$, $i\\neq j$}\\\\\n [e_i,e_j]&=0 &\\text{ if $(i,j)=0$}.\n \\end{aligned}\n\\]\nIf $Q$ is a totally negative quiver, then it has no real vertex and $(i,j)<0$ for every $i,j\\in I_{\\infty}$, so $I_{\\infty}$ is the \\textit{free} Lie algebra generated by $e_i, i\\in I_{\\infty}$.\n\nBy considering the \\emph{associative} algebra generated by $e_{i}, f_{i}$, $i\\in I_{\\infty}$ and $h_{i'}$, $i'\\in Q_0$ subject to the relations \\eqref{equation:relations}, one obtains an algebra $\\UEA(\\mathfrak{g}_Q)$.\nIt is the enveloping algebra of $\\mathfrak{g}_Q$ and it admits a triangular decomposition\n\\[\n \\UEA(\\mathfrak{g}_Q)=\\UEA(\\mathfrak{n}_Q^-)\\otimes \\UEA(\\mathfrak{h})\\otimes \\UEA(\\mathfrak{n}_Q^+).\n\\]\n\n\n\n\n\\subsection{The degree $0$ BPS algebra of the strictly seminilpotent stack}\n\n\\subsubsection{The cohomological Hall algebra of the strictly seminilpotent stack}\n\nThe absolute cohomological Hall algebra of the category of strictly seminilpotent representations of $Q$ is\n\\[\n \\HO^*\\!\\!\\!\\mathscr{A}_{\\Pi_Q}^{\\mathcal{SSN}}:=\\bigoplus_{\\mathbf{d}\\in \\mathbf{N}^{Q_0}}\\HO_*^{\\BoMo}(\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}^{\\mathcal{SSN}},\\mathbf{Q}^{\\mathrm{vir}}),\n\\]\nand has been defined in \\S \\ref{subsubsection:cohaSSN}. We denote by $ \\HO^*\\!\\!\\!\\mathscr{A}_{\\Pi_Q}^{\\psi,\\mathcal{SSN}}$ the same algebra, with the multiplication twisted by the sign $(-1)^{\\psi(-,-)}$, for some choice of bilinear form $\\psi$ satisfying $\\psi(a,b)+\\psi(b,a)=(a,b)_{\\Pi_Q}$ modulo 2. For concreteness the reader may like to choose $\\psi(a,b)=\\langle a,b\\rangle_Q$.\n\nThe seminilpotent stack $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}^{\\mathcal{SSN}}$ is a Lagrangian substack of $\\mathfrak{M}_{\\Pi_Q,\\mathbf{d}}$. Therefore, its irreducible components are of dimension $-\\langle\\mathbf{d},\\mathbf{d}\\rangle$. By \\cite[Theorem 1.15]{bozec2016quivers}, for $\\mathbf{d}=1_{i'}$, where $i'\\in Q_0$ is a vertex with $g_{i'}$ loops, the irreducible components of $\\Mst^{\\mathcal{SSN}}_{\\Pi_Q,\\mathbf{d}}$ are parameterised by\n\\begin{enumerate}\n \\item $\\{\\star\\}$ if $g_{i'}=0$,\n \\item \\label{isotropicvertex}The set of partitions $(n_1,\\hdots,n_r)$ of $n$ if $g_{i'}=1$,\n \\item \\label{hyperbolicvertex}The set of tuples $(n_1,\\hdots,n_r)$ with $n_j>0$ and $\\sum_{j}n_j=n$ if $g_{i'}>1$.\n\\end{enumerate}\n\nIn the cases \\eqref{isotropicvertex} and \\eqref{hyperbolicvertex}, the partition\/tuple can be described explicitly. Let $I_r\\subset \\Pi_Q$ be the ideal generated by paths in $\\overline{Q}$ containing at least $r$ arrows of $Q_1^*$. Let $\\mathfrak{M}_{\\mathbf{d},c}^{\\mathcal{SSN}}$ be an irreducible component of $\\mathfrak{M}_{\\mathbf{d}}^{\\mathcal{SSN}}$ and $\\rho$ a $\\Pi_Q$--module corresponding to a general point in $\\mathfrak{M}_{\\mathbf{d},c}^{\\mathcal{SSN}}$. Let $r$ be the smallest integer such that $I_r\\rho=0$. We have a sequence of inclusions\n\\[\n 0=I_r\\rho\\subset I_{r-1}\\rho \\subset\\hdots\\subset I_0\\rho=\\rho.\n\\]\nThen, $n_i=\\dim I_{i-1}\\rho\/I_i\\rho$ for $1\\leq i\\leq r$.\n\nWe let $\\HO^0\\!\\!\\!\\mathscr{A}_{\\Pi_Q}^{\\mathcal{SSN}}$ be the \\emph{degree zero strictly seminilpotent cohomological Hall algebra}.\nIt has a combinatorial basis given by fundamental classes of irreducible components of $\\mathfrak{M}_{\\Pi_Q}^{\\mathcal{SSN}}$, $[\\mathfrak{M}^{\\mathcal{SSN}}_{\\Pi_Q,\\mathbf{d},c}]$. This algebra is identified with the enveloping algebra of the Borcherds--Bozec Lie algebra. This is proven in detail in \\cite[Theorem 1.3]{hennecart2022geometric}:\n\n\\begin{theorem}\n\\label{theorem:degree0SSN}\n There is an isomorphism of algebras\n \\[\n \\UEA(\\mathfrak{n}_Q^+)\\rightarrow \\HO^0\\!\\!\\!\\mathscr{A}_{\\Pi_Q}^{\\psi,\\mathcal{SSN}}\n \\]\n sending $e_{(i',n)}$ to $[\\mathfrak{M}^{\\mathcal{SSN}}_{n1_{i'},(n)}]$.\n\n\\end{theorem}\nLet $i\\colon\\mathcal{M}_{\\Pi_Q}^{\\mathcal{SSN}}\\hookrightarrow\\mathcal{M}_{\\Pi_Q}$ be the natural inclusion.\n\n\n\n\\begin{lemma}\n The natural map $\\ptau{\\leq 0}\\mathscr{A}^{(\\psi)}_{\\Pi_Q}\\rightarrow \\mathscr{A}^{(\\psi)}_{\\Pi_Q}$ induces a map $i^!\\ptau{\\leq 0}\\mathscr{A}^{(\\psi)}_{\\Pi_Q}\\rightarrow i^!\\mathscr{A}^{(\\psi)}_{\\Pi_Q}=:\\mathscr{A}_{\\Pi_Q}^{(\\psi),\\mathcal{SSN}}$ which induces an isomorphism\n \\[\n \\mathbf{H}^0(i^!\\ptau{\\leq 0}\\mathscr{A}^{(\\psi)}_{\\Pi_Q})\\rightarrow \\mathbf{H}^0(i^!\\mathscr{A}^{(\\psi)}_{\\Pi_Q}).\n \\]\n\\end{lemma}\n\\begin{proof}\n This appears in \\cite[Section 6.4]{davison2020bps}. Again, the proof is independent of whether we include the sign twist $\\psi$ or not.\n\\end{proof}\n\n\n\\begin{corollary}\n\\label{corollary:degree0SSN}\nLet $Q$ be a totally negative quiver. The morphism \n\\[\n \\HO^{0}(i^!\\Phi^{(\\psi)}_{\\Pi_Q})\\colon \\HO^{0}\\!\\left(i^!\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\Pi_Q}}\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\right)\\right)\\rightarrow \\HO^{0}\\!\\left(\\mathscr{A}_{\\Pi_Q}^{(\\psi),\\mathcal{SSN}}\\right)\n\\]\nis an isomorphism.\n\\end{corollary}\n\\begin{proof}\nWe consider the $\\psi$-twisted version of the statement: then the untwisted version will follow from Lemma \\ref{free_signs}. The functor $i^!$ is strict monoidal, so it commutes with the operator $\\operatorname{Free}$. By \\S\\ref{section:lessperverse}, the subobject $\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q})\\coloneqq\\bigoplus_{\\mathbf{d}\\in\\Sigma_Q}\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}})\\rightarrow \\mathcal{BPS}^{\\psi}_{\\mathrm{Alg}}=\\ptau{\\leq 0}\\mathscr{A}_{\\Pi_Q}$ admits a direct sum complement $\\mathcal{BPS'}\\subset \\mathcal{BPS}_{\\mathrm{Alg}}$ such that the multiplication map $m\\colon \\mathcal{BPS}^{\\psi}_{\\mathrm{Alg},a}\\boxtimes\\mathcal{BPS}^{\\psi}_{\\mathrm{Alg},b}\\rightarrow \\mathcal{BPS}^{\\psi}_{\\mathrm{Alg},a+b}$ for $a,b\\neq 0$ factors through the inclusion $\\mathcal{BPS}'\\subset\\mathcal{BPS}^{\\psi}_{\\mathrm{Alg}}$. Consequently, the multiplication map $\\HO^{0}(i^!m^{\\psi})\\colon\\HO^{0}(\\mathscr{A}_{\\Pi_Q}^{\\psi,\\mathcal{SSN}})\\otimes\\HO^{0}(\\mathscr{A}_{\\Pi_Q}^{\\psi,\\mathcal{SSN}})\\rightarrow\\HO^{0}(\\mathscr{A}_{\\Pi_Q}^{\\psi,\\mathcal{SSN}})$ factors through $\\HO^{0}(i^!\\mathcal{BPS}')$. \n\nIf $\\mathbf{d}=ne_{i'}$ for some $i'\\in Q_0$, $n\\geq 1$, then, $\\HO^{0}(i^!\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,ne_{i'}}))=\\mathbf{Q} e_{i',n}$ is one-dimensional (\\cite[101)]{davison2021purity}). By Theorem \\ref{theorem:degree0SSN}, if $\\mathbf{d}\\neq ne_{i'}$ for $i'\\in Q_0$, $n\\geq 1$, then $\\HO^{0}(i^!\\mathcal{BPS}'_{\\mathbf{d}})=\\HO^{0}(\\mathscr{A}_{\\Pi_Q,\\mathbf{d}}^{\\psi,\\mathcal{SSN}})$. For such $\\mathbf{d}$, $\\HO^{0}(i^!\\mathcal{IC}(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}))$ is a direct summand of $\\HO^{0}(\\mathscr{A}_{\\Pi_Q,\\mathbf{d}}^{\\psi,\\mathcal{SSN}})$ with complement $\\HO^{0}(i^!\\mathcal{BPS}'_{\\mathbf{d}})$. It therefore vanishes. The LHS in the corollary is then equal to $\\HO^{0}\\!\\left(\\operatorname{Free}_{\\mathrm{Alg}}\\left(\\bigoplus_{i\\in I_{\\infty}}\\mathbf{Q} e_i\\right)\\right)$. By Theorem \\ref{theorem:degree0SSN}, $\\HO^{0}(i^!\\Phi^{\\psi}_{\\Pi_Q})$ is an isomorphism.\n\\end{proof}\n\n\nWe finish this section by collecting some elementary lemmas regarding $\\psi$-twisted algebras.\n\\begin{lemma}\n\\label{free_signs}\nLet $\\mathcal{B}$ be a $L$-graded algebra, where $L$ is some Abelian group. Let $\\psi$ be a bilinear form on $L$, and define $\\mathcal{B}^{\\psi}$ via $m_{a,b}^{\\psi}=(-1)^{\\psi(a,b)}m_{a,b}$, where $m_{a,b}$ is the restriction of the multiplication in $\\mathcal{B}$ to the $a$th and $b$th graded pieces, and $m_{a,b}^{\\psi}$ is the same restriction, for $\\mathcal{B}^{\\psi}$. If $\\mathcal{B}$ is the free algebra generated by the graded subspace $V\\subset \\mathcal{B}$, then $\\mathcal{B}^{\\psi}$ is freely generated by the same subspace $V\\subset \\mathcal{B}^{\\psi}$.\n\\end{lemma}\n\\begin{proof}\nLet $S$ be a homogeneous basis for $V$. Given a (possibly empty) word $w$ in the letters $S$, we write $m^{(\\psi)}(w)$ for the evaluation of the products on $w$, setting this to be the unit if $w$ is empty. Then $m(w)=\\pm m^{\\psi}(w)$. Let $W$ be the set of words in $S$. Then $\\{m(w)\\;\\lvert\\; w\\in W\\}$ is a basis for $\\mathcal{B}$ if and only if $\\{m^{\\psi}(w)\\;\\lvert\\; w\\in W\\}$ is.\n\\end{proof}\n\\begin{lemma}\nLet $\\mathcal{B}$ be a $L$-graded algebra, where $L$ is some Abelian group. Let $\\psi,\\psi'$ be bilinear forms on $L$ such that\n\\begin{align*}\n\\psi(a,b)+\\psi(b,a)=\\psi'(a,b)+\\psi'(b,a)&\\quad \\mathrm{mod }\\;2.\n\\end{align*}\nLet $V\\subset \\mathcal{B}$ be a $L$-graded subspace of $\\mathcal{B}$. We consider $\\mathcal{B}$ as a Lie algebra in two different ways: firstly for the commutator Lie bracket $[-,-]_{\\psi}$ defined by the $\\psi$-twisted multiplication, secondly for $[-,-]_{\\psi'}$ defined with respect to the $\\psi'$-twisted multiplication. Let $\\mathfrak{g}$ be the Lie subalgebra generated by $V$ under the first Lie bracket, let $\\mathfrak{g}'$ be the Lie algebra generated under the second. Then as vector subspaces of $\\mathcal{B}$, we have $\\mathfrak{g}=\\mathfrak{g}'$.\n\\end{lemma}\n\\begin{proof}\nIf $\\alpha$ and $\\beta$ are homogeneous, the conditions imply that $[\\alpha,\\beta]_{\\psi}=\\pm [\\alpha,\\beta]_{\\psi'}$.\n\\end{proof}\n\n\\section{Some examples}\nThe framework of \\S \\ref{subsection:relativecohaproductKV} concerns very general 2-dimensional categories satisfying the assumptions of \\S \\ref{subsubsection:assumptionCoHAproduct}. In subsequent sections, we first restrict ourselves to categories with a left 2-Calabi--Yau structure satisfying the additional assumptions of \\S \\ref{BPS_assumptions_sec} in order to define the BPS algebra of \\S \\ref{section:lessperverse}, and then restrict further to totally negative 2-Calabi--Yau categories, in order to prove our main results. Before making these restrictions, we discuss general examples of 2-dimensional categories that the above Hall algebra construction applies to, as well as example applications of our main theorems for totally negative 2CY categories.\n\n\n\n\\subsection{Degree zero sheaves on surfaces}\nWe use our constructions to generalise a PBW result concerning the CoHA of zero-dimensional support coherent sheaves on a smooth surface $S$ from \\cite{kapranov2019cohomological} to mixed Hodge structures, and further to the level of mixed Hodge modules on the coarse moduli spaces $\\Sym^n(S)$. \n\nLet $S$ be a smooth quasiprojective complex surface. We do not require that $S$ is projective, or that there is an isomorphism $K_S\\cong\\mathcal{O}_S$, or that $S$ is cohomologically pure. We denote by $\\mathfrak{M}_n(S)$ the stack of coherent sheaves on $S$ with zero-dimensional support, and length $n$. Denoting by $\\varpi_n \\colon \\mathfrak{M}_n(S) \\to \\mathcal{M}_n(S)$ the good moduli space, there is an isomorphism $\\mathcal{M}_n(S)\\cong \\Sym^n(S)$. We drop the subscripts and superscripts $n$ when considering all possible lengths at once. Let $\\Delta_n\\colon S\\rightarrow \\Sym^n(S)$ be the inclusion of the small diagonal. Then one shows as in \\cite[Appendix A]{davison2021nonabelian} that there is an injection of mixed Hodge modules\n\\[\n(\\Delta_n)_*\\underline{\\mathcal{IC}}_S\\hookrightarrow \\tau^{\\leq 0}\\underline{\\mathscr{A}}_n\\coloneqq\\ulrelBPSalg{n}\n\\]\nwhere $\\underline{\\mathscr{A}}=\\varpi_*\\mathbb{D} \\underline{\\mathbf{Q}}_{\\mathfrak{M}(S)}$ and $\\underline{\\mathscr{A}}_n$ is the restriction of $\\underline{\\mathscr{A}}$ to $\\Sym^n(S)$. Furthermore, the BPS algebra is commutative: since perverse sheaves form a stack, this is a local calculation, and follows from the case $S=\\mathbf{A}^2$. The resulting morphism of algebra objects in $\\mathrm{MHM}(\\Sym(S))$\n\\[\n\\Sym_{\\boxdot}\\left(\\bigoplus_{n\\geq 1}(\\Delta_n)_*\\underline{\\mathcal{IC}}_S\\right)\\rightarrow \\BPS_{\\mathrm{Alg}}^{\\mathrm{MHM}}\n\\]\nis an isomorphism of algebra objects: again, this is a local calculation, and is shown in the local case $S=\\mathbf{A}^2$ in \\cite[Appendix A]{davison2021nonabelian}.\n\nThe algebra $\\underline{\\mathscr{A}}$ carries the usual $\\HO_{\\mathbf{C}^*}$-action given by the morphism $\\det\\colon \\mathfrak{M}(S)\\rightarrow \\B\\mathbf{C}^*$, and so we obtain a morphism of complexes of mixed Hodge modules\n\\[\n\\Phi\\colon \\Sym_{\\boxdot}\\left(\\bigoplus_{n\\geq 1}(\\Delta_n)_*\\underline{\\mathcal{IC}}_S\\otimes\\HO_{\\mathbf{C}^*}\\right)\\rightarrow \\underline{\\mathscr{A}}\n\\]\ncombining the $\\HO_{\\mathbf{C}^*}$-action with the evaluation morphism given by the relative Hall algebra product.\n\\begin{proposition}\nThe morphism $\\Phi$ is an isomorphism of complexes of mixed Hodge modules. Taking derived global sections, there is an isomorphism of mixed Hodge structures\n\\[\n\\HO^*(\\Phi)\\colon\\Sym\\left(\\bigoplus_{n\\geq 1}\\HO_*^{\\BoMo}(S,\\mathbf{Q}^{\\mathrm{vir}})\\otimes\\HO_{\\mathbf{C}^*}\\right)\\cong \\HO_*^{\\BoMo}(\\mathfrak{M}(S),\\mathbf{Q}).\n\\]\n\\end{proposition}\nThe statement regarding $\\Phi$ is again a local statement, that can be checked by reducing to the case $S=\\mathbf{A}^2$. Here, it is the original PBW isomorphism of \\cite{davison2020cohomological}, using the description of the BPS sheaves found in \\cite[Section 5]{davison2016integrality}. The statement regarding $\\HO^*(\\Phi)$ at the level of graded vector spaces recovers \\cite[Thm.7.1.6]{kapranov2019cohomological}.\n\n\\subsection{Semistable coherent sheaves on surfaces}\n\nLet $S$ be a smooth quasi-projective complex surface, which for now we do not assume has a trivial canonical bundle. Let $H$ be an ample line bundle on $\\overline{S}$, a projective compactification of $S$. Let $p(t)\\in\\mathbf{Q}[t]\/\\sim$ be a reduced Hilbert polynomial. We form as in \\S \\ref{geometry_constr_sec} the moduli stack $\\mathfrak{Coh}^{\\sst}_{p(t)}(S)$ of compactly supported coherent sheaves which are either the zero sheaf or semistable with normalised Hilbert polynomial $p(t)$, and the coarse moduli space $\\mathcal{C}\\!oh^{\\sst}_{p(t)}(S)$. For simplicity, we assume that $\\chi(\\mathcal{F},\\mathcal{F})$ is even for all coherent sheaves with reduced Hilbert polynomial $p(t)$: this condition can be relaxed, at the cost of dealing with half Tate twists and some sign difficulties. By Proposition \\ref{geometry_sumup_prop}, the stack $\\mathfrak{Coh}^{\\sst}_{p(t)}(S)$ satisfies Assumptions \\ref{p_assumption}, \\ref{q_assumption1} and \\ref{q_assumption2}, and so we may form the relative CoHA \n\\[\n\\underline{\\mathscr{A}}_{p(t)}(S)\\coloneqq \\mathtt{JH}_*\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{Coh}^{\\sst}_{p(t)}(S)}^{\\mathrm{vir}}\\in\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{C}\\!oh^{\\sst}_{p(t)}(S))).\n\\]\nThis object then carries the $\\boxdot$-algebra structure provided in \\S \\ref{subsubsection:ThecohaproductKV}. Note that this structure will involve some Tate twists if $\\chi(-,-)$ is not symmetric.\n\nNow we assume that $S$ satisfies $\\mathcal{O}_S\\cong\\omega_S$. Then there are no Tate twists appearing in the product, and (see \\S \\ref{geometry_constr_sec}) Assumptions \\ref{gms_assumption}, \\ref{ds_fin} and \\ref{BPS_cat_assumption} are also satisfied, so that (possibly after picking a $\\psi$ as in \\eqref{first_psi}) we may form the BPS algebra MHM\n\\[\n\\underline{\\BPS}_{p(t),\\mathrm{Alg}}^{(\\psi)}(S)=\\tau^{\\leq 0}\\underline{\\mathscr{A}}^{(\\psi)}_{p(t)}(S).\n\\]\nFinally, we make the assumption that the category of compactly supported semistable coherent sheaves on $S$ with reduced Hilbert polynomial is totally negative. Then as special cases of Theorems \\ref{theorem:freenesstotneg2CY} and \\ref{theorem:pbwtotnegative2CY}, we deduce the following\n\\begin{theorem}\n\\label{surf_BPS_thm}\nLet $S$ be a smooth quasi-projective complex surface with $\\mathcal{O}_S\\cong \\omega_S$. Let $\\mathcal{A}$ be the category of compactly supported semistable coherent sheaves on $S$ with reduced Hilbert polynomial $p(t)$. Assume moreover that this category is totally negative. Then the natural morphism\n\\[\n\\Phi_{\\mathcal{A}}^{(\\psi)}\\colon \\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left( \\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}}\\underline{\\mathcal{IC}}(\\mathcal{C}\\!oh_{p(t)}^{\\sst}(S)_{a}) \\right) \\longto \\underline{\\BPS}_{p(t),\\mathrm{Alg}}^{(\\psi)}(S).\n\\]\nis an isomorphism of $\\boxdot$-algebras in $\\mathrm{MHM}(\\mathcal{C}\\!oh_{p(t)}^{\\sst}(S))$.\n\\end{theorem}\n\n\\begin{theorem}\nLet $S$ be a smooth quasi-projective complex surface satisfying the same conditions as Theorem \\ref{surf_BPS_thm}. Define\n\\[\n\\underline{\\BPS}_{p(t),\\mathrm{Lie}}(S)\\coloneqq \\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}\\left(\\bigoplus_{a\\in\\Sigma_{\\mathcal{A}}}\\ul{\\mathcal{IC}}(\\mathcal{C}\\!oh_{p(t)}^{\\sst}(S)_{a})\\right).\n\\]\nThen the morphism\n\\[\n\\tilde{\\Phi}^{\\psi}\\colon \\Sym_{\\boxdot}\\left(\\underline{\\BPS}_{p(t),\\mathrm{Lie}}(S)\\otimes \\HO^*(\\B\\mathbf{C}^*,\\mathbf{Q})\\right)\\rightarrow \\underline{\\mathscr{A}}^{\\psi}_{p(t)}(S)\n\\]\nis an isomorphism in $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{C}\\!oh^{\\sst}_{p(t)}(S)))$ (though not of algebra objects). Taking derived global sections, and setting $L\\subset \\mathbf{Q}[t]$ to be the monoid of polynomials in the equivalence class $p(t)$, we deduce that there is an isomorphism of $L$-graded mixed Hodge structures\n\\[\n\\Sym\\left(\\operatorname{Free}_{\\mathrm{Lie}}\\left(\\bigoplus_{a\\in\\Sigma_{\\mathcal{A}}}\\ICA(\\mathcal{C}\\!oh_{p(t)}^{\\sst}(S)_{a})\\right)\\otimes\\HO_{\\mathbf{C}^*}\\right)\\cong \\HO^{\\BoMo}_*(\\mathfrak{Coh}^{\\sst}_{p(t)}(S),\\mathbf{Q}^{\\mathrm{vir}}).\n\\]\n\\end{theorem}\n\\subsection{Semistable $B$-modules}\nLet $B$ be an algebra, which we presume is presented in the form $B=A\/\\langle R\\rangle$ as in \\eqref{standard_pres}. Recall that we assume that $A$ is the universal localisation of the path algebra $\\mathbf{C} Q$ of a quiver. We fix a stability condition $\\zeta\\in\\mathbf{Q}^{Q_0}$. Recall that the \\textit{slope} of a $B$-module $M$ is defined to be the number\n\\[\n\\mu(M)\\coloneqq \\frac{1}{\\dim_{\\mathbf{C}}(M)}\\dim_{Q_0}(M)\\cdot \\zeta\n\\]\nwhere $\\dim_{Q_0}(M)\\coloneqq (\\dim(e_i\\cdot M))_{i\\in Q_0}$. A $B$-module is called \\textit{semistable} if for all proper nonzero submodules $M'\\subset M$ we have $\\mu(M')\\leq \\mu(M)$. We denote by $\\mathfrak{M}^{\\zeta\\sst}_{B,\\mathbf{d}}$ the moduli stack of $\\mathbf{d}$-dimensional semistable $B$-modules. There is a good moduli space $\\mathfrak{M}^{\\zeta\\sst}_{B,\\mathbf{d}}\\rightarrow \\mathcal{M}^{\\zeta\\sst}_{B,\\mathbf{d}}$ constructed by King via GIT \\cite{king1994moduli} in the special case $B= \\mathbf{C} Q$, and then defined in general via base change from this special case. So Assumption \\ref{gms_assumption} is always satisfied.\n\nFix $\\theta\\in\\mathbf{Q}$. We denote by $\\mathfrak{M}^{\\zeta\\sst}_{B,\\theta}$ the disjoint union of all $\\mathfrak{M}^{\\zeta\\sst}_{B,\\mathbf{d}}$ such that $\\mathbf{d}\\cdot\\zeta\/\\lvert \\mathbf{d}\\lvert=\\theta$, and define $\\mathcal{M}^{\\zeta\\sst}_{B,\\theta}$ to be the union of $\\mathcal{M}^{\\zeta\\sst}_{B,\\mathbf{d}}$ over the same set of dimension vectors. Assumptions \\ref{p_assumption}-\\ref{q_assumption2} similarly hold for the stack $\\mathfrak{M}^{\\zeta\\sst}_{B,\\theta}$ via base change from the case $\\zeta=(0,\\ldots,0)$, i.e. the case in which we consider all $B$-modules to be semistable.\n\nFor finiteness of the direct sum map, consider the commutative diagram\n\\[\n\\begin{tikzcd}\n\\mathcal{M}^{\\zeta\\sst}_{B,\\theta}\\times\\mathcal{M}^{\\zeta\\sst}_{B,\\theta}&\\mathcal{M}^{\\zeta\\sst}_{B,\\theta}\n\\\\\n\\mathcal{M}_{B,\\theta}\\times \\mathcal{M}_{B,\\theta}& \\mathcal{M}_{B,\\theta}\n\\arrow[\"l\\times l\", from=1-1, to=2-1]\n\\arrow[\"\\oplus^{\\zeta}\", from=1-1, to=1-2]\n\\arrow[\"l\", from=1-2, to=2-2]\n\\arrow[\"\\oplus\", from=2-1, to=2-2]\n\\end{tikzcd}\n\\]\nwhere $l\\colon \\mathcal{M}^{\\zeta\\sst}_{B,\\theta}\\rightarrow \\mathcal{M}_{B,\\theta}$ is the GIT quotient map, which is projective by construction. Then $\\oplus \\circ (l\\times l)$ is projective by Assumption \\ref{ds_fin} for the category of $B$-modules, and so $\\oplus^{\\zeta}$ is proper, since properness satisfies the 2 out of 3 property. Finally, the category of semistable $B$-modules is a full subcategory of the category of $\\tilde{B}$-modules, so as long as $\\tilde{B}$ carries a left 2CY structure, Assumption \\ref{BPS_cat_assumption} is satisfied. We summarise in a theorem.\n\\begin{theorem}\nLet $B$ be an algebra presented as $B=A\/\\langle R\\rangle$ where $A$ is the localisation of a path algebra of a quiver by a finite set of linear combinations of cyclic paths with the same endpoints, and $R$ is a finite set of relations in $A$. Let $\\zeta\\in\\mathbf{Q}^{Q_0}$ be a stability condition, let $\\theta\\in\\mathbf{Q}$ be a slope, and let $\\mathtt{JH}\\colon\\mathfrak{M}^{\\zeta\\sst}_{\\theta}(B)\\rightarrow \\mathcal{M}^{\\zeta\\sst}_{\\theta}(B)$ be the morphism from the stack of $\\zeta$-semistable $B$-modules of slope $\\theta$ to the GIT moduli space. Then \n\\begin{enumerate}\n\\item\n$\\underline{\\mathscr{A}}_{B,\\theta}^{\\zeta}\\coloneqq \\mathtt{JH}_*\\mathbb{D}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}^{\\zeta\\sst}_{\\theta}(B)}$ carries a (Tate-twisted) algebra structure in $\\mathcal{D}^+(\\mathrm{MHM}(\\mathcal{M}^{\\zeta\\sst}_{\\theta}(B)))$. \n\\item\nAssume moreover that the derived enhancement $\\tilde{B}$ is a 2-Calabi--Yau algebra. Then the algebra structure on $\\underline{\\mathscr{A}}_{B,\\theta}^{\\zeta}$ is untwisted, and the subcomplex $\\ulrelBPSalg{B,\\theta}^{\\zeta}\\coloneqq\\tau^{\\leq 0}\\underline{\\mathscr{A}}_{B,\\theta}^{\\zeta}$ is a $\\boxdot$-algebra in $\\mathrm{MHM}(\\mathcal{M}^{\\zeta\\sst}_{\\theta}(B))$. \n\\item \nAssume finally that the category $\\tilde{B}\\lmod$ is a totally negative 2CY category. Then there is an isomorphism of $\\boxdot$-algebras\n\\[\n\\ulrelBPSalg{B,\\theta}^{\\zeta}\\cong \\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\theta}^{\\zeta}}\\ul\\mathcal{IC}(\\mathcal{M}_{\\mathbf{d}}^{\\zeta\\sst}(B))\\right)\n\\]\nwhere $\\Sigma^{\\zeta}_{\\theta}$ is the set of dimension vectors $\\mathbf{d}$ such that $\\mathbf{d}\\cdot\\zeta\/\\lvert \\mathbf{d}\\lvert=\\theta$ and there exists a $\\zeta$-stable $\\mathbf{d}$-dimensional $B$-module. In addition, there is a PBW isomorphism of MHM complexes\n\\[\n\\Sym_{\\boxdot}\\left(\\ulrelBPSLie{B,\\theta}^{\\zeta}\\otimes\\HO_{\\mathbf{C}^*}\\right)\\rightarrow \\underline{\\mathscr{A}}_{B,\\theta}^{\\zeta}\n\\]\nwhere\n\\[\n\\ulrelBPSLie{B,\\theta}^{\\zeta}\\coloneqq \\operatorname{Free}_{\\boxdot\\mathrm{-Lie}}\\left(\\bigoplus_{\\mathbf{d}\\in\\Sigma_{\\theta}^{\\zeta}}\\ul\\mathcal{IC}(\\mathcal{M}_{\\mathbf{d}}^{\\zeta\\sst}(B))\\right).\n\\]\n\\end{enumerate}\n\\end{theorem}\n\\section{Freeness of the BPS algebra of totally negative $2$-Calabi--Yau categories}\n\\label{section:freeness}\n\nIn this section we prove the following theorem, which determines the BPS algebra of a totally negative $2$-Calabi--Yau category.\n\\begin{theorem}[{= MHM version of Theorem~\\ref{theorem:freenesstotneg2CY}}]\n\\label{theorem:FreeAlg2CY}\nFor any totally negative $2$-Calabi--Yau category $\\mathcal{A}$ satisfying the Assumptions \\ref{p_assumption}-\\ref{BPS_cat_assumption} of \u00a7\\ref{section:modulistackobjects2CY}, \nthe morphism $\\Phi_{\\mathcal{A}}$ is an isomorphism of $\\boxdot$-algebras in $\\mathrm{MHM}(\\Msp_{\\mathcal{A}})$.\n\\end{theorem} \nSince the functor $\\rat\\colon\\mathrm{MHM}(\\mathcal{M}_{\\mathcal{A}})\\rightarrow\\operatorname{Perv}(\\mathcal{M}_{\\mathcal{A}})$ is exact, the mixed Hodge module version implies the perverse sheaf version of the theorem.\n\nThose readers who prefer to think about perverse sheaves rather than mixed Hodge modules may read the proofs in the categories of perverse sheaves\/constructible complexes. The key point is that a semisimple mixed Hodge module is sent under $\\rat$ to a semisimple perverse sheaf \\cite{deligne1987theoreme}.\\footnote{However, we issue a warning here that simple mixed Hodge modules are sent to semisimple perverse sheaves that need not be simple.}\n\nWe prove Theorem~\\ref{theorem:FreeAlg2CY} by reducing to the the case of preprojective algebras of totally negative quivers.\n\n\\begin{theorem}[{= MHM version of Theorem~\\ref{theorem:freenesspreprojective}}]\n\\label{theorem:FreeAlgPreProj}\nFor every totally negative quiver $Q$, the morphism $\\Phi_{\\Pi_Q}$ (defined in \\eqref{equation:mainiso}) is an isomorphism of $\\boxdot$-algebras in $\\mathrm{MHM}(\\Msp_{\\Pi_Q})$.\n\\end{theorem}\n\n\\subsection{Reduction to preprojective algebras of totally negative quivers}\n\\label{subsection:reductiontopreproj}\n\n\\subsubsection{Free algebra of a $\\Sigma$-collection}\n\\label{subsubsection:freealgfibre}\nLet $\\underline{\\mathcal{F}}=\\{ \\mathcal{F}_1,\\ldots,\\mathcal{F}_r \\}$ be a collection of simple objects in $\\mathcal{A}$ of classes $a_i = [\\mathcal{F}_i] \\in \\Sigma_{\\mathcal{A}}$ and for $1\\leq i\\leq r$ let $x_i \\in \\Msp_{\\mathcal{A},a_i}$ be the closed $\\mathbf{C}$-point corresponding to $\\mathcal{F}_i$. The inclusions $x_i \\hookrightarrow \\Msp_{\\mathcal{A}}$ induce a monoid morphism $\\imath_{\\underline{\\mathcal{F}}} \\colon \\mathbf{N}^{\\underline{\\mathcal{F}}} \\hookrightarrow \\Msp_{\\mathcal{A}}$ sending $1_{\\mathcal{F}_i}$ to $ x_i$.\nLet $Q$ be half of the Ext-quiver of the collection $\\underline{\\mathcal{F}}$. \nThe inclusions $\\{S_i\\} \\hookrightarrow \\Msp_{\\Pi_{Q},e_i}$ induce a monoid morphism $\\imath_{\\mathrm{Nil}} \\colon \\mathbf{N}^{\\underline{\\mathcal{F}}} \\hookrightarrow \\Msp_{\\Pi_{Q}}$ sending $1_{\\mathcal{F}_i}$ to $S_i$.\nBy Lemma~\\ref{lemma:strictmonoidalfunctor} $\\imath_{\\mathrm{Nil}}^!$ and $\\imath_{\\underline{\\mathcal{F}}}^!$ are strict monoidal.\n\nFor every $\\vec{m} \\in \\mathbf{N}^{\\underline{\\mathcal{F}}}$ pick an analytic Ext-quiver neighbourhood\n$\\mathcal{U}_{\\vec{m}}$ of the point $x_\\vec{m} \\in \\Msp_{\\mathcal{A},a_{\\vec{m}}}$\ncorresponding to the semisimple object $\\bigoplus_{i} \\mathcal{F}_i^{\\oplus m_i}$ of\nclass $a_{\\vec{m}} \\coloneqq \\sum_{i}m_ia_i$ as in Theorem \\ref{theorem:neighbourhood}. Set $\\mathcal{U} = \\bigsqcup_{\\vec{m} \\in \\mathbf{N}^{I}} \\mathcal{U}_{\\vec{m}}$.\nAs part of an analytic Ext-quiver neighbourhood we have a commutative diagram of analytic spaces \n\\begin{equation*}\n\\begin{tikzcd}\n&\\mathbf{N}^{\\underline{\\mathcal{F}}} \\ar[dl,\"\\imath_{\\mathrm{Nil}}\"',hook']\\ar[d,\"y\",hook] \\ar[dr,\"\\imath_{\\underline{\\mathcal{F}}}\",hook] & \\\\\n \\Msp_{\\Pi_Q} & \\mathcal{U} \\ar[l,\"\\jmath'\"',hook']\\ar[r,\"\\jmath\",hook] & \\Msp_{\\mathcal{A}}\n\\end{tikzcd}\n\\end{equation*}\nsuch that the horizontal morphisms $\\jmath,\\jmath'$ are analytic-open embeddings.\n\n\\begin{lemma}\n\\label{lemma:ICSigmaonfibre}\nThere is a natural isomorphism of $\\mathbf{N}^{\\underline{\\mathcal{F}}}$-graded mixed Hodge structures\n\\begin{equation*}\n(\\imath_{\\mathrm{Nil}})^!\\left(\\bigoplus_{\\vec{m} \\in \\Sigma_{\\Pi_Q}} \\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\vec{m}})\\right) \\cong \\imath_{\\underline{\\mathcal{F}}}^!\\left(\\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}} \\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a}) \\right).\n\\end{equation*}\n\\end{lemma}\n\\begin{proof}\nSince intersection complexes are stable under pullback along open embeddings, we have isomorphisms\n\\begin{equation*}\n(\\imath_{\\mathrm{Nil}})^{!} \\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\vec{m}}) \\cong y^{!}\\underline{\\mathcal{IC}}(\\mathcal{U}_{\\vec{m}}) \\cong \\imath_{\\underline{\\mathcal{F}}}^{!} \\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a_{\\vec{m}}}).\n\\end{equation*}\nNow it suffices to note that \n$\\vec{m} \\in \\Sigma_{\\Pi_Q}$ if and only if $a_\\vec{m} \\in \\Sigma_{\\mathcal{A}}$ (Proposition~\\ref{proposition:geometryofgms} \\emph{(3)}).\n\\end{proof}\n\n\\begin{corollary}\nThere is a natural isomorphism of algebras \n\\begin{equation*}\n\\gamma_{\\operatorname{Free}}\\colon (\\imath_{\\mathrm{Nil}})^{!}\\operatorname{Free}_{\\boxdot-{\\mathrm{Alg}}}\\left(\\bigoplus_{\\vec{m} \\in \\Sigma_{\\Pi_Q}} \\underline{\\mathcal{IC}}(\\Msp_{\\Pi_{Q},\\vec{m}})\\right)\n\\cong\n\\imath_{\\underline{\\mathcal{F}}}^!\\operatorname{Free}_{\\boxdot-{\\mathrm{Alg}}}\\left(\\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}} \\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a})\\right).\n\\end{equation*}\n\\end{corollary}\n\\begin{proof}\nSince $\\imath_{\\underline{\\mathcal{F}}}^!$ and $(\\imath_{\\mathrm{Nil}})^!$ are both strict monoidal, they commute with the free algebra construction. The statement now follows from Lemma~\\ref{lemma:ICSigmaonfibre}.\n\\end{proof}\n\n\n\\subsubsection{BPS algebra of a $\\Sigma$-collection}\nWe keep the notation from \u00a7\\ref{subsubsection:freealgfibre}.\n\nThe analytic Ext-quiver neighbourhoods are compatible with good moduli space morphisms in the sense that the diagram in Theorem~\\ref{theorem:neighbourhood} commutes. \nHence the canonical morphisms\n\\begin{equation}\n\\label{eq:localDTsheavesagree}\n\\mathcal{H}^{0}\\!\\left((\\jmath_{\\Pi_Q})^{\\ast}\\underline{\\mathscr{A}}_{\\Pi_Q}\\right) \\longto \\mathcal{H}^0\\!\\left(p_{\\ast}\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{U}}^{\\mathrm{vir}}\\right) \\longleftarrow \\mathcal{H}^{0}\\!\\left((\\jmath_{\\mathcal{A}})^{\\ast}\\underline{\\mathscr{A}}_{\\mathcal{A}}\\right)\n\\end{equation}\nare isomorphisms in $\\mathrm{MHM}(\\mathcal{U})$, where $p\\colon \\mathfrak{U}=\\bigsqcup_{\\vec{m}\\in \\mathbf{N}^{\\underline{\\mathcal{F}}}}\\mathfrak{U}_{\\vec{m}} \\to \\bigsqcup_{\\vec{m} \\in \\mathbf{N}^{\\underline{\\mathcal{F}}}}\\mathcal{U}_{\\vec{m}}=\\mathcal{U}$ is the good moduli space morphism over $\\mathcal{U}$. \n\nSince pullback for mixed Hodge modules by an analytic-open embedding is t-exact, the isomorphisms \\eqref{eq:localDTsheavesagree} induce an isomorphism of graded mixed Hodge structures\n\\begin{equation}\n\\label{eq:fibreBPSagree}\n\\gamma_{\\aBPS} \\colon (\\imath_{\\mathrm{Nil}})^{!}\\ulrelBPSalg{\\Pi_Q} \\longto \\imath_{\\underline{\\mathcal{F}}}^!\\ulrelBPSalg{\\mathcal{A}}.\n\\end{equation}\n\n\\begin{corollary}\n\\label{corollary:gammaisoalg}\n The isomorphism $\\gamma_{\\aBPS}$ is an isomorphism of algebras such that the diagram \n\\begin{equation}\n\\label{eq:isoonfibreagree}\n\\begin{tikzcd}\n\\imath_{\\mathrm{Nil}}^{!}\\operatorname{Free}_{\\boxdot-{\\mathrm{Alg}}}\\left(\\bigoplus_{\\vec{d} \\in \\Sigma_{\\Pi_Q}}\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_{Q},\\vec{d}})\\right) \n\\ar[r,\"\\gamma_{\\operatorname{Free}}\"] \\ar[d,\"(\\imath_{\\mathrm{Nil}})^{!}\\Phi_{\\Pi_{Q}}\"]\n&\n\\imath_{\\underline{\\mathcal{F}}}^{!}\\operatorname{Free}_{\\boxdot-{\\mathrm{Alg}}}\n\\left(\\bigoplus_{a\\in \\Sigma_{\\mathcal{A}}} \\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a})\\right)\\ar[d,\"\\imath^{!}\\Phi_{\\mathcal{A}}\"]\n \\\\\n\\imath_{\\mathrm{Nil}}^{!}\\ulrelBPSalg{\\Pi_Q} \\ar[r,\"\\gamma_{\\aBPS}\"]& \\imath_{\\underline{\\mathcal{F}}}^{!}\\ulrelBPSalg{\\mathcal{A}}\n\\end{tikzcd}\n\\end{equation}\ncommutes.\n\\end{corollary}\n\n\\begin{proof}\nBy Corollary~\\ref{corollary:CoHAcompatibiltiySigmacoll} we have the isomorphism of algebras \n$\\gamma\\colon (\\imath_{\\mathrm{Nil}})^{!}\\underline{\\mathscr{A}}_{\\Pi_Q} \\to \\imath_{\\underline{\\mathcal{F}}}^{!} \\underline{\\mathscr{A}}_{\\mathcal{A}}$. \nSince the multiplication on $\\ulrelBPSalg{\\mathcal{A}}$ and $\\ulrelBPSalg{\\Pi_Q}$ is obtained by applying $\\tau^{\\leq 0}$ to the multiplication on $\\underline{\\mathscr{A}}_{\\mathcal{A}}$ and $\\underline{\\mathscr{A}}_{\\Pi_Q}$ (\\S \\ref{section:lessperverse}), respectively, \nit follows that $\\gamma$ restricts to a morphism of algebras $\\gamma_{\\aBPS}$.\nCommutativity follows from the fact that $\\gamma_{\\aBPS}$ restricts to $\\imath_{\\underline{\\mathcal{F}}}^{!}\\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a_\\vec{m}}) \\cong (\\imath_{\\mathrm{Nil}})^{!}\\underline{\\mathcal{IC}}({\\Msp_{\\Pi_Q,\\vec{m}}})$ for $\\vec{m} \\in \\Sigma_{\\Pi_Q}$. \n\\end{proof}\n\n\n\\subsubsection{Proof that Theorem~\\ref{theorem:FreeAlgPreProj} implies Theorem~\\ref{theorem:FreeAlg2CY}}\n\\label{subsubsection:FreeAlgreductiontoPreProj} \n\n\n\\begin{lemma}\n\\label{lemma:nonvanishingcstblecomplex}\n Let $\\mathscr{B}\\in \\mathcal{D}^+_{\\mathrm{c}}(X)$ be a constructible complex on a complex algebraic variety $X$. Then, if $\\mathscr{B}\\neq 0$, there exists a $\\mathbf{C}$-point $i_x\\colon \\mathrm{pt}\\rightarrow X$ such that $i_x^!\\mathscr{B}\\neq 0$.\n\\end{lemma}\n\n\\begin{proof}\nBy Verdier duality, it suffices to prove the same result for $i_x^*$ instead of $i_x^!$. For any $\\mathbf{C}$-point $x$ of $X$, the functor $i_x^*$ is exact for the natural $t$-structures so that for any $n\\in\\mathbf{Z}$, $i_x^*\\mathcal{H}^n(\\mathscr{B})\\cong \\mathcal{H}^n(i_x^*\\mathscr{B})$. Therefore, if $i_x^*\\mathscr{B}=0$ for every $x\\in X$, the constructible complex $\\mathscr{B}$ has vanishing cohomology sheaves. By conservativity of the system of cohomology functors (\\cite[Proposition 1.3.7]{beilinson2018faisceaux}), $\\mathscr{B}$ itself vanishes.\n\\end{proof}\n\\begin{corollary}\n\\label{corollary:nonvanishingcomplexMHM}\nLet $\\underline{\\mathscr{B}} \\in \\mathcal{D}^{+}(\\mathrm{MHM}(X))$ be a complex of mixed Hodge modules on a complex algebraic variety $X$. Then, if $\\underline{\\mathscr{B}} \\neq 0$, there exists a $\\mathbf{C}$-point $i_x\\colon \\mathrm{pt} \\rightarrow X$ such that $i_x^{!}\\underline{\\mathscr{B}} \\neq 0$.\n\\end{corollary}\n\\begin{proof}\nApply Lemma~\\ref{lemma:nonvanishingcstblecomplex} to $\\rat(\\mathscr{B})$.\n\\end{proof}\n\n\\begin{lemma}\n\\label{lemma:NonIsoImpliesNonIsoforExtQuiver}\nSuppose that $\\Phi_{\\mathcal{A}}$ is not an isomorphism. \nThen there is an $x \\in \\operatorname{supp}(\\ker(\\Phi_{\\mathcal{A}}) \\oplus \\operatorname{coker}(\\Phi_{\\mathcal{A}}))$ with half Ext-quiver and dimension vector $(Q',\\vec{m})$ such that the morphism\n\\begin{equation*}\n\\imath_0^{!}\\Phi_{\\Pi_{Q'},\\vec{m}}\\colon \\imath_0^{!}\\left(\\operatorname{Free}_{\\boxdot-{\\mathrm{Alg}}}\\left(\\bigoplus_{\\vec{d} \\in \\Sigma_{\\Pi_{Q}}} \\underline{\\mathcal{IC}}(\\Msp_{\\Pi_{Q},\\vec{d}})\\right)\\right)_{\\vec{m}} \\longto \\iota^!_{0}\\underline{\\BPS}_{\\Pi_{Q},\\vec{m}}\n\\end{equation*}\nis {\\emph{not}} an isomorphism, where $\\Phi_{\\Pi_{Q},\\vec{m}}$ is the $\\vec{m}$th graded piece of $\\Phi_{\\Pi_{Q}}$ and \n $\\imath_0 \\colon \\mathrm{pt} \\hookrightarrow \\Msp_{\\Pi_{Q},\\vec{m}}$ is the inclusion of the point corresponding to the trivial $\\vec{m}$-dimensional representation $S_{\\vec{m}}$.\n\\end{lemma}\n\\begin{proof}\nWrite $\\mathcal{K}\\coloneqq \\ker(\\Phi_{\\mathcal{A}})$ and $\\mathcal{C}\\coloneqq \\operatorname{coker} (\\Phi_{\\mathcal{A}})$.\nBoth $\\mathcal{K}$ and $\\mathcal{C}$ are semisimple, because they are subquotients of semisimple mixed Hodge modules (Lemma~\\ref{lemma:BPSsemisimple} and Proposition~\\ref{proposition:FreeSemiSimp}). \nLet $x \\in \\operatorname{supp}(\\mathcal{K} \\oplus \\mathcal{C})$ be such that $\\imath_x^{!}\\mathcal{K} \\oplus \\imath_x^{!}\\mathcal{C} \\neq 0$.\nLet $(Q,\\vec{m})$ be the half Ext-quiver and dimension vector of $x$. \nBy the commutative diagram \\eqref{eq:isoonfibreagree} and an analytic Ext-quiver neighbourhood argument as above, we have $\\imath_x^{!}\\mathcal{K} \\oplus \\imath_x^{!}\\mathcal{C} = \\imath_{0}^{!}\\ker(\\Phi_{\\Pi_{Q},\\vec{m}}) \\oplus \\imath_{0}^{!}\\operatorname{coker}(\\Phi_{\\Pi_{Q},\\vec{m}})$.\n\\end{proof}\n\nBy Proposition~\\ref{proposition:totnegextquiv} every half Ext-quiver $Q$ of a collection of simples in a totally negative 2CY category must be a totally negative quiver.\nThus, if $\\Phi_{\\mathcal{A}}$ is not an isomorphism, Lemma~\\ref{lemma:NonIsoImpliesNonIsoforExtQuiver} implies that there exists a totally negative quiver $Q$, for which $\\Phi_{\\Pi_Q}$ is not an isomorphism, contradicting Theorem~\\ref{theorem:FreeAlgPreProj}.\n\\qed~\n\n\\subsection{The proof for preprojective algebras}\n\\label{subsection:proofforpreproj}\nWe turn to the proof of Theorem~\\ref{theorem:FreeAlgPreProj}.\n\n\nWe begin by restating Theorem~\\ref{theorem:FreeAlgPreProj} so that we can induct on the (cross-sum of the) dimension vector $\\vec{d}$ and reverse induct on the number of vertices of the quiver $Q$.\nThe morphism $\\Phi_{\\Pi_Q} = \\bigoplus_{\\vec{d} \\in \\mathbf{N}^{Q_0}}\\Phi_{\\Pi_Q,\\vec{d}}$ is graded by dimension vector. Thus Theorem~\\ref{theorem:FreeAlgPreProj} is equivalent to the following theorem.\n\\begin{theorem}\n\\label{theorem:FreeAlgPreProjGraded}\nFor every totally negative quiver $Q$ and dimension vector $\\vec{d} \\in \\mathbf{N}^{Q_0}$ the morphism\n\\begin{equation*}\n\\Phi_{\\Pi_Q,\\vec{d}} \\colon \\bigg(\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\bigg(\\bigoplus_{\\vec{f} \\in \\Sigma_{Q}} \\underline{\\mathcal{IC}}(\\Msp_{\\vec{f}}(\\Pi_Q)) \\bigg)\\bigg)_{\\vec{d}} \\longto \\mathcal{H}^{0}(\\mathtt{JH}_{\\vec{d},\\ast} \\mathbb{D}\\underline{\\mathbf{Q}}_{\\Mst_{\\Pi_Q,\\vec{d}}}^{\\mathrm{vir}})\n\\end{equation*}\nis an isomorphism.\n\\end{theorem}\n\nConsider the set $\\mathrm{QuivDim}$ consisting of pairs $(Q,\\vec{d})$ of quivers with dimension vectors supported on the entire quiver. \nTo formalize the simultaneous induction on the cross-sum of the dimension vectors and the reverse induction on the number of vertices we introduce the function\n\\begin{equation*}\n\\begin{split}\n\\mu\\colon \\mathrm{QuivDim} &\\longto \\mathbf{Z}_{>0} \\times \\mathbf{Z}_{<0} \\\\\n(Q,\\vec{d}) &\\longmapsto (\\abs{\\vec{d}},-\\abs{Q_0}) = \\left(\\sum_{i\\in Q_0}d_i,-\\abs{Q_0}\\right).\n\\end{split}\n\\end{equation*}\nThe induction will be with respect to the partial order on $\\mathrm{QuivDim}$ pulled back from the lexicographical order on $\\mathbf{Z}_{>0}\\times \\mathbf{Z}_{<0}$ along $\\mu$.\n\n\n\\subsubsection{The action of adding a scalar to a loop}\n\nLet $Q$ be a quiver. Let $L$ be the set of loops of $Q$ and let $\\bar{L} = L \\sqcup L^{\\ast}$ be the set of loops in the doubled quiver $\\bar{Q}$. For every loop $l \\in L$ there are two $\\mathbb{G}_a$-actions on $\\Mst_{\\Pi_Q}$ and $\\Msp_{\\Pi_Q}$ given by adding a scalar multiple of the identity to the loop $l$ or to the loop $l^*$. \nCombining both of the actions for all of the loops, we have a $\\mathbb{G}_a^{\\bar{L}}$-action on $\\Mst_{\\Pi_Q}$ which in formulas is given by\n\\begin{equation*}\n(x_l,x^*_l)_{l \\in L}(\\rho_a)_{a \\in \\overline{Q}_1} = \\left(\\left\\{\\begin{matrix}\n\\rho_l + x_l \\operatorname{id}_{e_i\\cdot \\rho},& \\text{ if $a = l\\colon i \\to i$ for $l \\in L$}\\\\\n\\rho_{l^*} + x^*_l \\operatorname{id}_{e_i\\cdot \\rho}, & \\text{ if $a = l^*\\colon i \\to i$ for $l \\in L$}\\\\\n\\rho_a & \\text{ otherwise}\n\\end{matrix}\\right\\} \\right)_{a \\in \\overline{Q}_1}\n\\end{equation*}\nfor $(x_l,x^*_l)_{l \\in L} \\in \\mathbb{G}_a^{\\bar{L}}$ and a $\\Pi_Q$-module $(\\rho_a)_{a \\in \\overline{Q}_1}$.\n\n\\begin{lemma}\n\\label{lemma:loopequivariant}\nAll summands of the pure mixed Hodge modules $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\bigoplus_{\\vec{d} \\in \\Sigma_{\\Pi_Q}} \\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\vec{d}}))$ and $\\mathcal{H}^0(\\mathtt{JH}_{\\vec{d},\\ast} \\mathbb{D}\\underline{\\mathbf{Q}}_{\\Mst_{\\Pi_Q,\\vec{d}}}^{\\mathrm{vir}})$ are $\\mathbb{G}_a^{\\bar{L}}$-equivariant.\n\\end{lemma}\n\\begin{proof}\nThe intersection complexes $\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\vec{d}})$ for $\\vec{d} \\in \\Sigma_{\\Pi_Q}$ are $\\mathbb{G}_a^{\\bar{L}}$-equivariant as they can be defined by intermediate extension of the constant variation of Hodge structure $\\underline{\\mathbf{Q}}_{\\Msp_{\\Pi_Q}^{s}}\\otimes \\mathbf{L}^{-\\dim(\\Msp_{\\Pi_Q,\\vec{d}})\/2}$ on the $\\mathbb{G}_a^{\\bar{L}}$-invariant dense open subset $\\Msp_{\\Pi_Q,\\vec{d}}^{s} \\subset \\Msp_{\\Pi_Q,\\vec{d}}$. The monoidal product $\\boxdot$ is evidently $\\mathbb{G}_a^{\\bar{L}}$-equivariant. It follows that so is $\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\bigoplus_{\\vec{d} \\in \\Sigma_{\\Pi_Q}}\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\vec{d}}))$.\n\nBy inspecting the presentation of $\\mathtt{JH}$ as in \u00a7\\ref{subsection:notationsquivreps} one sees that the good moduli space morphism $\\mathtt{JH}\\colon \\Mst_{\\Pi_Q} \\to \\Msp_{\\Pi_Q}$ is equivariant with respect to this $\\mathbb{G}_a^{\\bar{L}}$-action.\nIt follows that $\\mathcal{H}^0(\\mathtt{JH}_{\\vec{d},\\ast}\\mathbb{D}\\underline{\\mathbf{Q}}_{\\Mst_{\\Pi_Q,\\vec{d}}}^{\\mathrm{vir}})$ is $\\mathbb{G}_a^{\\bar{L}}$-equivariant. \n\\end{proof}\n\n\\subsubsection{Comparison of Ext-quivers}\n\nTo every closed point $x$ in the good moduli space $\\Msp_{\\Pi_Q}$ we associate a quiver with dimension vector $(Q'_x,\\vec{m}_x) \\in \\mathrm{QuivDim}$ given by half of the Ext-quiver and multiplicity vector of a corresponding semisimple $\\Pi_Q$-module $\\bigoplus_i \\mathcal{F}_i^{m_i}$.\n\\begin{lemma}\n\\label{lemma:ExtQuivnotworse}\nFor all $(Q,\\vec{d}) \\in \\mathrm{QuivDim}$ and for all closed points $x \\in \\Msp_{\\Pi_Q,\\vec{d}}$ we have\n\\begin{enumerate}[(i)]\n\\item $\\abs{\\vec{m}_x} \\leq \\abs{\\vec{d}}$ \n\\item $\\mu(Q'_x,\\vec{m}_x) \\leq \\mu(Q,\\vec{d})$ \n\\item The following are equivalent \n\\begin{enumerate}[(a)]\n\\item $\\mu(Q_{x}',\\vec{m}_x) = \\mu(Q,\\vec{d})$\n\\item $(Q_{x}',\\vec{m}_x) = (Q,\\vec{d})$\n\\item $x$ is in the $\\mathbb{G}_a^{\\bar{L}}$-orbit of (the point corresponding to) $S_{\\vec{d}}$.\n\\end{enumerate}\n\\end{enumerate}\n\\end{lemma}\n\\begin{proof}\nFor convenience we write $(Q',\\vec{m})$ for $(Q'_x,\\vec{m}_x)$.\nLet $\\mathcal{F} = \\bigoplus_{j\\in Q'_{0}}\\mathcal{F}_j^{\\oplus m_j}$ be the semisimple $\\Pi_Q$-module of dimension vector $\\vec{d}$ corresponding to $x$ (such that all $m_i$ are nonzero). We have for all $i \\in Q_0$\n\\begin{equation}\n\\label{eq:SemiSimpDimvsDimVec}\n\\sum_{j \\in Q'_{0}}m_j \\operatorname{\\mathbf{dim}}(\\mathcal{F}_j)_i = d_i.\n\\end{equation}\nSumming \\eqref{eq:SemiSimpDimvsDimVec} over all $i$ we have\n\\begin{equation}\n\\label{eq:totalSemiSimpDimvsDimVec}\n\\sum_{j\\in Q'_0} m_j \\abs{\\operatorname{\\mathbf{dim}}(\\mathcal{F}_j)} = \\abs{\\vec{d}}\n\\end{equation}\n\nPart \\emph{(i)} of the lemma follows immediately from $\\abs{\\operatorname{\\mathbf{dim}}(\\mathcal{F}_j)} \\geq 1$.\nWe now prove part \\emph{(ii)}.\nThe case $\\abs{\\vec{m}} > \\abs{\\vec{d}}$, is impossible because it contradicts \\eqref{eq:totalSemiSimpDimvsDimVec}.\nIf $\\abs{\\vec{m}} < \\abs{\\vec{d}}$, then by definition of $\\mu$ we have $\\mu(Q',\\vec{m}) < \\mu(Q,\\vec{d})$.\n\nOn the other hand suppose $\\abs{\\vec{m}} = \\abs{\\vec{d}}$, then we wish to show $\\abs{Q'_0} \\geq \\abs{Q_0}$. By \\eqref{eq:totalSemiSimpDimvsDimVec} we must have $\\abs{\\operatorname{\\mathbf{dim}}{(\\mathcal{F}_j)}} = 1$, hence each $\\mathcal{F}_j$ is supported at a single vertex, call it $v(j)$. By \\eqref{eq:SemiSimpDimvsDimVec} for every $i \\in Q_0$ there is a $w(i) \\in Q'_0$ such that $v(w(i)) = i$ (choose $w(i)$ so that $m_{w(i)}\\operatorname{\\mathbf{dim}}({\\mathcal{F}_{w(i)}})_i\\neq 0$). Thus $w\\colon Q_0 \\to Q'_0$ is an injective map with left inverse $v\\colon Q'_0 \\to Q_0$, showing $\\abs{Q'_0} \\geq \\abs{Q_0}$.\n\n\nIt remains to characterize the saturation of the inequality. The implications $(c) \\implies (b) \\implies (a)$ are clear. Suppose $\\mu(Q',\\vec{m}) = \\mu(Q,\\vec{d})$. By definition of $\\mu$ it is clear that we can identify the vertex sets of the quivers $Q'$ and $Q$.\nAs before, by \\eqref{eq:SemiSimpDimvsDimVec} we deduce that each $\\mathcal{F}_i$ is a 1-dimensional representation supported at the vertex $i$ and $\\vec{m} = \\vec{d}$. Thus $\\mathcal{F}_i$ is the given by the data of a scalar $x_l$ for every loop $l$ in $\\bar{Q}$ at $i$. Altogether we see that $F$ is in the $\\mathbb{G}_a^{\\bar{L}}$-orbit of $0_{\\vec{d}}$. This proves part \\emph{(iii)}.\n\\end{proof}\n\n\n\n\n\\subsubsection{The recursion}\nThe key ingredient for the recursion is the following lemma.\n\n\\begin{lemma}\n\\label{lemma:InductionStep}\nFix a totally negative quiver $Q$ and dimension vector $\\vec{d} \\in \\mathbf{N}^{Q_0}$. \nSuppose $\\Phi_{\\Pi_{Q'_x},\\vec{m}_x}$ is an isomorphism for all half Ext quivers with dimension vectors $(Q'_x,\\vec{m}_x) \\in \\mathrm{QuivDim}$ for closed points $x \\in \\Msp_{\\Pi_Q,\\vec{d}}$ such that $\\mu(Q'_x,\\vec{m}_x) < \\mu(Q,\\vec{d})$. Then $\\Phi_{\\Pi_{Q},\\vec{d}}$ is an isomorphism.\n\\end{lemma}\n\n\\begin{proof}\nSuppose $\\Phi_{\\Pi_Q,\\vec{d}}$ is not an isomorphism. The kernel $\\mathcal{K}_{\\Pi_Q,\\vec{d}}$ and cokernel $\\mathcal{C}_{\\Pi_Q,\\vec{d}}$ are semisimple mixed Hodge modules on $\\Msp_{\\Pi_Q,\\vec{d}}$.\nHence there is a simple direct summand $\\mathcal{T} \\subset \\mathcal{K}_{\\Pi_Q,\\vec{d}} \\oplus \\mathcal{C}_{\\Pi_Q,\\vec{d}}$. \nWe have the following chain of inclusions\n\\begin{align*}\n\\operatorname{supp}(\\mathcal{T}) &\\subset \\overline{ \\{ x \\in \\Msp_{\\Pi_{Q},\\vec{d}} \\mid \\Phi_{\\Pi_x,\\vec{m}_x} \\text{ is not an iso.} \\} } \n&\\qquad \\text{(by the proof of Lemma \\ref{lemma:NonIsoImpliesNonIsoforExtQuiver})}\\\\\n&\\subset \\overline{\\{ x \\in \\Msp_{\\Pi_Q,\\vec{d}} \\mid \\mu(Q_x,\\vec{m}_x) = \\mu(Q,\\mathbf{d}) \\}} \n &\\qquad \\text{(by hypothesis and Lemma~\\ref{lemma:ExtQuivnotworse} \\emph{(i)})}\\\\\n&=\\mathbb{G}_a^{\\overline{L}} \\cdot 0_{\\vec{d}} &\\qquad \\text{(by Lemma~\\ref{lemma:ExtQuivnotworse} \\emph{(iii)})}\n\\end{align*}\nIn words, the hypothesis guarantees that the support of $\\mathcal{T}$ is contained in the $\\mathbb{G}_a^{\\bar{L}}$-orbit $\\bar{Z} = \\mathbb{G}_a^{\\bar{L}}\\cdot 0_{\\vec{d}} \\cong \\mathbf{C}^{\\bar{L}}$ of $0_\\vec{d}$.\nSince $\\mathcal{T}$ is a $\\mathbb{G}_a^{\\bar{L}}$-equivariant mixed Hodge module (Lemma~\\ref{lemma:loopequivariant}), its support is $\\mathbb{G}_a^{\\bar{L}}$-stable and hence equal to the entire orbit $\\bar{Z}$. \n\n\nThe groups $\\mathbb{G}_a^{\\bar{L}}$ and $\\mathbb{G}_a^{L}$ are contractible, so are any of their orbits. Therefore taking total cohomology induces equivalences \n$\\mathrm{MHM}_{\\mathbb{G}_a^{\\bar{L}}}(\\bar{Z}) \\simeq \\mathrm{MHM}(\\mathrm{pt}) \\simeq \\mathrm{MHM}_{\\mathbb{G}_a^{L}}(Z)$\nwhere $Z$ is the $\\mathbb{G}_a^{L}$-orbit of $0_{\\vec{d}}$. Let $\\imath_{\\mathcal{SSN}}\\colon \\Msp_{\\Pi_{Q},\\vec{d}}^{\\mathcal{SSN}} \\hookrightarrow \\Msp_{\\Pi_Q,\\vec{d}}$ be the inclusion.\nWe have a Cartesian square of inclusions\n\\begin{equation*}\n\\begin{tikzcd}\n\\mathbf{C}^{L} \\cong Z \\ar[d]\\ar[r] & \\Msp_{\\Pi_Q,\\vec{d}}^{\\mathcal{SSN}} \\ar[d,\"\\iota_\\mathcal{SSN}\"] \\\\\n\\mathbf{C}^{\\bar{L}}\\cong \\bar{Z} \\ar[r] & \\Msp_{\\Pi_Q,\\vec{d}}.\n\\arrow[\"\\lrcorner\"{anchor=center, pos=0.125}, draw=none, from=1-1, to=2-2]\n\\end{tikzcd}\n\\end{equation*}\nSince $\\mathcal{T}$ is simple, we have $\\mathcal{T} = \\ul{\\mathcal{IC}}_{\\mathbb{G}_a^{\\overline{L}}}\\otimes V$ for some simple polarizable pure mixed Hodge structure $V$, and $\\imath_{\\mathcal{SSN}}^{!}\\mathcal{T} \\cong \\underline{\\mathbf{Q}}_{\\mathbb{G}_a^{L}}\\otimes V$. \n\nHence $\\HO^0({\\imath_{\\mathcal{SSN}}^!\\mathcal{T}})\\cong \\rat(V)$ is a summand of the kernel or cokernel of $\\HO^{0}(\\imath_{\\mathcal{SSN}}^{!}\\Phi_{\\Pi_Q})$ which contradicts Corollary~\\ref{corollary:degree0SSN}.\n\\end{proof}\n\n\n\n\\begin{proof}[Proof of Theorem~\\ref{theorem:FreeAlgPreProjGraded}]\nFix a quiver with dimension vector $(Q,\\vec{d}) \\in \\mathrm{QuivDim}$. Without loss of generality we assume that $\\vec{d}$ is supported on all of $Q$.\nConsider the following subset of $\\mathbf{Z}_{>0} \\times \\mathbf{Z}_{<0}$.\n\\begin{align*}\nR(Q,\\vec{d}) &\\coloneqq \\{\\mu(Q'_x,\\vec{m}_x) \\mid x \\in \\Msp_{\\Pi_Q,\\vec{d}} \\text{ and }\\mu(Q'_x,\\vec{m}_x) \\neq \\mu(Q,\\vec{d})\\}& \\\\\n&= \\{\\mu(Q'_x,\\vec{m}_x) \\mid x \\in \\Msp_{\\Pi_Q,\\vec{d}} \\text{ and }\\mu(Q'_x,\\vec{m}_x) < \\mu(Q,\\vec{d}) \\}. & (\\text{Lemma~\\ref{lemma:ExtQuivnotworse}})\n\\end{align*}\nIn order to apply Lemma~\\ref{lemma:InductionStep} we need to show that for all $(Q^{\\mathrm{new}},\\vec{d}^\\mathrm{new}) \\in \\mu^{-1}(R(Q,\\vec{d}))$ the morphism\n$\\Phi_{\\Pi_{Q^{\\mathrm{new}}},\\vec{d}^\\mathrm{new}}$ is an isomorphism. We do so inductively.\n\nFor all $(Q^{\\mathrm{new}},\\vec{d}^\\mathrm{new}) \\in \\mu^{-1}(R(Q,\\vec{d}))$\\footnote{The preimage $E(Q,\\vec{d})$ of $R(Q,\\vec{d})$ under $\\mu$ is precisely the set of ``better'' half Ext-quivers with dimension vectors appearing for $(Q,\\vec{d})$.} we have the strict inclusion of finite sets $R(Q^{\\mathrm{new}},\\vec{d}^{\\mathrm{new}}) \\subsetneqq R(Q,\\vec{d})$.\nBy Lemma~\\ref{lemma:ExtQuivnotworse} \\emph{(i)}, the set $R(Q,\\vec{d})$ is bounded hence finite. Thus, after iterating we eventually end at the case where $R(Q^{\\mathrm{fin}},\\vec{d}^{\\mathrm{fin}}) = \\emptyset$, so that the hypothesis in Lemma~\\ref{lemma:InductionStep} for $(Q^{\\mathrm{fin}},\\vec{d}^{\\mathrm{fin}})$ is vacuous.\n\nApplying Lemma~\\ref{lemma:InductionStep} recursively we deduce that $\\Phi_{\\Pi_Q,\\vec{d}}$ is an isomorphism.\n\\end{proof}\n\n\n\n\\section{PBW theorem for the CoHA of a totally negative $2$-Calabi--Yau category}\nIn this section, we prove the PBW theorem, Theorem \\ref{theorem:pbwtotnegative2CY}.\nIn the introduction we advocated for the definition the relative BPS Lie algebra sheaf of a totally negative 2CY category $\\mathcal{A}$ as the free Lie algebra object generated by the intersection complexes \n\\begin{equation*}\n\\ulrelBPSLie{\\mathcal{A}} = \\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}\\left( \\bigoplus_{a \\in \\Sigma_{\\mathcal{A}}} \\underline{\\mathcal{IC}}(\\Msp_{\\mathcal{A},a})\\right).\n\\end{equation*}\nTo justify the name BPS sheaf it must satisfy the cohomological integrality theorem, meaning that there should be \\textit{some} isomorphism as in Theorem \\ref{theorem:pbwtotnegative2CY} (not necessarily defined in terms of Hall algebras). In this section we prove Theorem~\\ref{theorem:pbwtotnegative2CY} for totally negative 2CY categories, that is, we show that the morphism\n\\begin{equation*}\n\\Sym_{\\boxdot}\\left(\\ulrelBPSLie{\\mathcal{A}} \\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right) \\longrightarrow \\underline{\\mathscr{A}}_{\\mathcal{A}}^{\\psi}\n\\end{equation*}\ndefined in terms of the relative Hall algebra product of \\S \\ref{subsubsection:ThecohaproductKV}, twisted as in \\eqref{psi_twist_def} is an isomorphism.\n\\subsection{BPS Lie algebras for preprojective algebras of totally negative quivers}\n\n\n\n\n\\label{subsubsection:3dBPSLiepreproj} \n\nAn a priori different definition of the BPS Lie algebra sheaf for preprojective algebras of quivers, which we denote by $\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d}}$, appears in \\cite[Theorem B]{davison2018purity} (see also \\cite[Theorem\/Definition~4.1]{davison2020bps}). We will show that our definition of the BPS Lie algebra agrees with this ``3d'' definition of the BPS Lie algebra. \n\\subsubsection{PBW theorem for critical CoHAs}\n\\label{general_3d_sssec}\nWe begin by recalling the definition of $\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d}}$. In \\cite{davison2020cohomological} the authors define the relative BPS Lie algebra $\\ulrelBPSLie{(Q,W)}$ for the 3-Calabi--Yau category of representations of the Jacobi algebra $\\operatorname{Jac}(Q,W)$ of a symmetric quiver with potential $(Q,W)$. To state it, we first choose a bilinear form $\\psi$ on $\\mathbf{Z}^{Q_0}$ satisfying\n\\begin{align*}\n\\psi(a,b)+\\psi(b,a)=\\langle a,a\\rangle \\langle b,b\\rangle +\\langle a,b\\rangle &\\quad\\mathrm{ mod}\\; 2\n\\end{align*}\nfor all $a,b\\in\\mathbf{Z}^{Q_0}$. We define \n\\begin{align*}\n\\underline{\\BPS}_{Q,W}\\coloneqq& \\tau^{\\leq 1}\\tilde{\\mathtt{JH}}_*\\phi_{\\Tr(W)}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{Q}}[1]\\\\\n\\mathfrak{g}_{Q,W}\\coloneqq &\\HO(\\mathcal{M}_{Q,W},\\tau^{\\leq 1}\\tilde{\\mathtt{JH}}_*\\phi_{\\Tr(W)}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{Q}})\n\\end{align*}\nwhere $\\tilde{\\mathtt{JH}}\\colon \\mathfrak{M}_{Q,W}\\rightarrow \\mathcal{M}_{Q,W}$ is the usual affinization morphism to the coarse moduli space. In \\cite{kontsevich2010cohomological} Kontsevich and Soibelman explain how to endow the vanishing cycle cohomology\n\\[\n\\mathscr{A}_{Q,W}\\coloneqq \\bigoplus_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}\\HO^*(\\mathfrak{M}_{\\mathbf{d},Q,W},\\phi_{\\Tr(W)}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{Q}})\n\\]\nwith a cohomological Hall algebra structure, defined by pushforward and pullback in vanishing cycle cohomology. We denote by $\\mathscr{A}^{\\psi}_{Q,W}$ the product obtained by multiplying the degree $(\\mathbf{d},\\mathbf{d}')$-piece of the multiplication by the sign $(-1)^{\\psi(\\mathbf{d},\\mathbf{d}')}$. Then we have the following theorem.\n\\begin{theorem}\\cite{davison2020cohomological}\nThe natural morphism $\\mathfrak{g}_{Q,W}\\rightarrow \\mathscr{A}^{\\psi}_{Q,W}$ is injective, and its image is moreover closed under the commutator Lie bracket in $\\mathscr{A}^{\\psi}_{Q,W}$. The morphism\n\\[\n\\Sym\\left(\\mathfrak{g}_{Q,W}\\otimes\\HO_{\\mathbf{C}^*}\\right)\\rightarrow \\mathscr{A}^{\\psi}_{Q,W}\n\\]\ninduced by the ($\\psi$-twisted) multiplication, and the $\\HO_{\\mathbf{C}^*}$-action on the target, is an isomorphism.\n\\end{theorem}\n\nWe denote by $\\mathfrak{g}_{Q,W}^{\\psi}$ the resulting Lie algebra; it is called the \\textit{BPS Lie algebra} associated to $(Q,W)$. We emphasize that the moduli stack $\\Mst_{(Q,W)}$ of representations of $\\operatorname{Jac}(Q,W)$ admits a global critical locus description, which makes vanishing cycle techniques especially effective.\n\n\\subsubsection{Dimensional reduction}\nThere is a specific choice of quiver with potential that is relevant to the study of $\\Pi_Q$. We first form the tripled quiver $\\tilde{Q}$ by adding a loop $\\omega_i$ to every vertex $i$ of the doubled quiver $\\overline{Q}$.\nThen we consider the canonical cubic potential $\\tilde{W}=\\sum_{i\\in Q_0} \\omega_i\\sum_{a\\in Q_1}[a,a^*]$, and consider the vanishing cycle perverse sheaf $\\phi_{\\Tr(\\tilde{W})}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\tilde{Q}}}$ on the stack of finite-dimensional $\\mathbf{C}\\tilde{Q}$-modules, which is supported on $\\mathfrak{M}_{(\\tilde{Q},\\tilde{W})}$.\nWe define $\\underline{\\BPS}_{\\tilde{Q},\\tilde{W}}[-1]=\\tau^{\\leq 1}\\tilde{\\mathtt{JH}}_*\\phi_{\\Tr(\\tilde{W})}\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathfrak{M}_{\\tilde{Q}}}$ as above. \n\nApplying this theory to the tripled quiver with potential a connection to the category of $\\Pi_Q$-representations is made in \\cite{davison2016integrality}. The category $\\operatorname{Jac}(\\tilde{Q},\\tilde{W})$ is equivalent to the category of pairs $(M,f)$ of a $\\Pi_Q$-module $M$ with an endomorphism $f\\colon M \\to M$.\nForgetting the endomorphism induces a morphism of stacks $\\Mst_{(\\tilde{Q},\\tilde{W})} \\to \\Mst_{\\Pi_Q}$. \nThe technique of dimensional reduction is used to define $\\ul{\\BPS}_{\\Pi_Q}^{\\mathrm{3d}}$ from $\\ul\\BPS_{\\tilde{Q},\\tilde{W}}$ \\cite{davison2016integrality}: we define\n\\[\n\\ul{\\BPS}_{\\Pi_Q}^{\\mathrm{3d}}=(\\mathcal{M}_{(\\tilde{Q},\\tilde{W})}\\rightarrow \\mathcal{M}_{\\Pi_Q})_*\\BPS_{\\tilde{Q},\\tilde{W},\\mathrm{Lie}}[-1].\n\\]\nThis is a mixed Hodge module (this is an application of the ``support lemma'' of \\cite{davison2020bps}), and $\\ul{\\BPS}_{\\Pi_Q}^{\\mathrm{3d}}$ is moreover closed under the commutator Lie bracket in $\\underline{\\mathscr{A}}^{\\psi}_{\\Pi_Q}$ and satisfies the cohomological integrality theorem for $\\underline{\\mathscr{A}}_{\\mathtt{JH}}$ via a PBW-type isomorphism (cf. Theorem~\\ref{theorem:pbwPiQ}). We denote by $\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d},\\psi}$ the resulting $\\boxdot$-Lie algebra.\n\nIn order to relate the $\\psi$-twists occurring in the general theory of \\S \\ref{general_3d_sssec} with the rest of this paper, we use that for all pairs of $\\mathbf{d},\\mathbf{d}'\\in\\mathbf{N}^{Q_0}$ we have\n\\begin{align}\n\\langle \\mathbf{d},\\mathbf{d}'\\rangle_{\\tilde{Q}}=(\\mathbf{d},\\mathbf{d}')_{\\Pi_Q}& \\quad\\textrm{mod } 2.\n\\end{align}\nIt follows that $\\psi(\\mathbf{d},\\mathbf{d}')\\coloneqq \\langle \\mathbf{d},\\mathbf{d}'\\rangle_Q$ is a valid choice for the bilinear form $\\psi$.\n\nFor the comparison of $\\ulrelBPSLie{\\Pi_Q}^{\\psi}$ with $\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d},\\psi}$ we use the following theorem that relates the BPS Lie algebra to the BPS algebra for preprojective algebras of quivers.\n\n\\begin{theorem}[{\\cite[Theorem~6.1]{davison2020bps}}]\n\\label{theorem:envBPSLieisBPSalg}\nLet $Q$ be a quiver. There is a canonical inclusion $\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d},\\psi} \\hookrightarrow \\ulrelBPSalg{\\Pi_Q}^{\\psi}$ of $\\boxdot$-Lie algebras which induces an isomorphism of $\\boxdot$-algebras $\\relEnv{\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d},\\psi}} \\stackrel{\\sim}{\\to} \\ulrelBPSalg{\\Pi_Q}^{\\psi}$.\n\\end{theorem}\nBy similar arguments as in the proof of Lemma~\\ref{lemma:ICintoBPSAlg}, there exist morphisms \n$\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\vec{d}}) \\to \\ulrelBPSalg{\\Pi_Q}\\subset \\mathscr{A}_{\\Pi_Q}$ which \nfactor through the inclusion $\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d}} \\hookrightarrow \\ulrelBPSalg{\\Pi_Q}$ (see \\cite[\u00a77.1.1]{davison2020bps} for details). Thus, by the universal property of free Lie algebras, they induce a morphism of Lie algebras \n\\begin{equation*}\n\\hat{\\Phi}_{\\Pi_Q}^{\\psi}\\colon \\ulrelBPSLie{\\Pi_Q} \\longto \\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d},\\psi}.\n\\end{equation*}\nBy composing universal properties, the universal enveloping algebra of a free Lie algebra is always the free\nalgebra on the same generator(s). Altogether we have the following commutative diagram.\n\\begin{equation} \\label{equation:FreeBPSLievsFreeBPSAlg}\n\\begin{tikzcd}\n\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\Sigma})) \n\\ar[d,hook] \\ar[r,\"\\hat{\\Phi}^{\\psi}_{\\Pi_Q}\"]\n& \\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d},\\psi} \\ar[d,hook]\n\\\\\n\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\Sigma}))\n\\ar[r,\"\\Phi^{\\psi}_{\\Pi_Q}\"]\n& \\ulrelBPSalg{\\Pi_Q}^{\\psi}.\n\\end{tikzcd}\n\\end{equation}\n\n\\begin{corollary} \n\\label{corollary:FreeLiePreproj}\nFor all totally negative quivers $Q$ the morphism $\\hat{\\Phi}^{\\psi}_{\\Pi_Q}$ of $\\boxdot$-Lie algebras is an isomorphism.\n\\end{corollary}\n\n\\begin{proof}\nBy the PBW theorem for Lie algebra objects in symmetric tensor categories we\nhave the equations in $\\K(\\mathrm{MHM}(\\Msp_{\\Pi_Q}))$\n\\begin{align*}\n\\left[ \\Sym_{\\boxdot}(\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\Sigma})))\\right] &= \\left[\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}(\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\Sigma}))\\right] & (\\relEnv{\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}}=\\operatorname{Free}_{\\boxdot-{\\mathrm{Alg}}}) \\\\\n&= \\left[\\ulrelBPSalg{\\Pi_Q}\\right] & (\\text{Theorem~\\ref{theorem:FreeAlgPreProj}})\\\\\n&= \\left[\\Sym_{\\boxdot}(\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d}})\\right] &(\\text{Theorem~\\ref{theorem:envBPSLieisBPSalg} = \\cite[Theorem~6.1]{davison2020bps}}).\n\\end{align*}\nIt follows that in $\\K(\\mathrm{MHM}(\\Msp_{\\Pi_Q}))$ we have $\\left[\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\Msp_{\\Pi_Q,\\Sigma}))\\right] = \\left[ \\ul{\\BPS}_{\\Pi_Q}^{\\mathrm{3d}}\\right]$. \n\nSince $\\Phi_{\\Pi_Q}$ is a monomorphism (by Theorem~\\ref{theorem:FreeAlgPreProj})\nand the diagram \\eqref{equation:FreeBPSLievsFreeBPSAlg} is commutative, it follows that $\\hat{\\Phi}_{\\Pi_Q}$ is also a monomorphism.\nThus $\\hat{\\Phi}_{\\Pi_Q}$ is a monomorphism between two semisimple mixed Hodge modules of the same class in $\\K(\\mathrm{MHM}(\\Msp_{\\Pi_Q}))$, hence\nit must be an isomorphism.\n\\end{proof}\n\n\\subsection{PBW and Cohomological integrality for totally negative 2CY categories}\n\n\nWe recall the following theorem:\n\\begin{theorem}[{\\cite{davison2016integrality}}]\n\\label{theorem:pbwPiQ}\nLet $Q$ be a quiver. The morphism $\\ulrelBPSLie{\\Pi_Q}\\otimes \\HO_{\\mathbf{C}^{\\ast}} \\to \\underline{\\mathscr{A}}_{\\Pi_Q}$ induced by the $\\HO_{\\mathbf{C}^{\\ast}}$-action on the target, along with the multiplication on the target, induces an isomorphism in $\\mathcal{D}^{+}(\\mathrm{MHM}(\\Msp_{\\Pi_Q}))$\n\\begin{equation*}\n\\tilde{\\Phi}_{\\Pi_Q}\\colon \\Sym_{\\boxdot}(\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d}} \\otimes \\HO_{\\mathbf{C}^{\\ast}}) \\stackrel{\\sim}{\\longrightarrow} \\underline{\\mathscr{A}}_{\\Pi_Q}^{\\psi}.\n\\end{equation*}\n\\end{theorem}\nWe can restrict this isomorphism to the submonoid $\\imath_{\\mathrm{Nil}}\\colon\\mathbf{N}^{Q_0}\\rightarrow\\mathcal{M}_{\\Pi_Q}$.\n\n\n\\begin{corollary}\n\\label{corollary:PBWfibre}\n We have an isomorphism\n \\[\n \\imath_{\\mathrm{Nil}}^!\\tilde{\\Phi}_{\\Pi_Q}\\colon\\Sym_{\\boxdot-\\mathrm{Alg}}\\left(\\imath_{\\mathrm{Nil}}^!(\\ulrelBPSLie{\\Pi_Q}^{\\mathrm{3d}})\\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right)\\rightarrow \\imath_{\\mathrm{Nil}}^!(\\mathscr{A}_{\\Pi_Q})=\\underline{\\mathscr{A}}_{\\Pi_Q}^{\\mathrm{nil}},\n \\]\n in the symmetric tensor category $\\mathcal{D}^+(\\mathbf{N}^{\\underline{Q_0}})$.\n\\end{corollary}\n\\begin{proof}\n The functor $\\imath^{!}\\colon \\mathcal{D}^{+}(\\mathrm{MHM}(\\Msp_{\\Pi_Q})) \\to \\mathcal{D}^+(\\mathrm{MHM}(\\mathbf{N}^{Q_0}))$ is a strict monoidal functor by Lemma \\ref{lemma:strictmonoidalfunctor}. \n\\end{proof}\n\n\n\n\n\n\n\\begin{proof}[Proof of Theorem \\ref{theorem:pbwtotnegative2CY}]\nWe want to prove that the morphism of of objects in $\\mathcal{D}^{+}(\\mathrm{MHM}(\\Msp_{\\mathcal{A}}))$ \n\\[\n \\tilde{\\Phi}\\colon \\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\mathcal{M}_{\\mathcal{A},\\Sigma}))\\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right)\\rightarrow \\underline{\\mathscr{A}}_{\\mathtt{JH}}\n\\]\ndefined via the Hall algebra product on the target is an isomorphism.\n\nLet $\\mathrm{cone}(\\tilde{\\Phi})$ be the cone of $\\tilde{\\Phi}$, so that we have a distinguished triangle\n\\[\n \\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\mathcal{M}_{\\mathcal{A},\\Sigma}))\\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right)\\xrightarrow{\\tilde{\\Phi}_{\\mathcal{A}}} \\underline{\\mathscr{A}}_{\\mathtt{JH}} \\rightarrow \\mathrm{cone}(\\tilde{\\Phi})\\rightarrow.\n\\]\nIf $i_S\\colon S\\rightarrow \\mathcal{M}$ is a subspace, we have a distinguished triangle\n \\[\n i_S^!\\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\mathcal{M}_{\\mathcal{A},\\Sigma}))\\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right)\\xrightarrow{i_S^!\\tilde{\\Phi}} i_S^!\\underline{\\mathscr{A}}_{\\mathtt{JH}}\\rightarrow i_S^!\\mathrm{cone}(\\tilde{\\Phi})\\rightarrow.\n\\]\nThe set $S$ will later be specialised to a closed discrete submonoid of $\\mathcal{M}$ corresponding to a $\\Sigma$-collection. \n\nIf by contradiction $\\mathrm{cone}(\\tilde{\\Phi})$ does not vanish, there exists a closed $\\mathbf{C}$-point $x\\in\\mathcal{M}_{\\mathcal{A}}$ such that, if $i_x$ is the inclusion of $x$ in $\\mathcal{M}_{\\mathcal{A}}$, $i_x^!\\mathrm{cone}(\\tilde{\\Phi})\\neq 0$ (by Corollary~\\ref{corollary:nonvanishingcomplexMHM}). Let $\\underline{\\mathcal{F}}=\\{\\mathcal{F}_1,\\hdots,\\mathcal{F}_r\\}$ be the $\\Sigma$-collection of simple objects of $\\mathcal{A}$ associated to $x$. We let $Q$ be a half of the Ext-quiver of $\\underline{\\mathcal{F}}$. The morphism of monoids $\\imath_{\\underline{\\mathcal{F}}}\\colon \\mathbf{N}^{\\underline{\\mathcal{F}}}\\rightarrow \\mathcal{M}_{\\mathcal{A}}$ of \\S\\ref{subsubsection:extquiver} induces a distinguished triangle\n\\[\n \\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\imath_{\\underline{\\mathcal{F}}}^!\\underline{\\mathcal{IC}}(\\mathcal{M}_{\\mathcal{A},\\Sigma}))\\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right)\\xrightarrow{\\imath_{\\underline{\\mathcal{F}}}^!\\tilde{\\Phi}} \\imath_{\\underline{\\mathcal{F}}}^!(\\underline{\\mathscr{A}}_{\\mathtt{JH}})\\rightarrow \\imath_{\\underline{\\mathcal{F}}}^!\\mathrm{cone}(\\tilde{\\Phi})\\rightarrow.\n\\]\n\nBy the compatibility of the CoHA multiplication on fibres (Corollary~\\ref{corollary:CoHAcompatibiltiySigmacoll}), and by the PBW theorem for preprojective algebras of quivers (more specifically by Corollary~\\ref{corollary:PBWfibre} and Corollary~\\ref{corollary:FreeLiePreproj}), $\\imath_{\\underline{\\mathcal{F}}}^!\\tilde{\\Phi}$ is an isomorphism. Therefore, $\\imath_{\\underline{\\mathcal{F}}}^!\\mathrm{cone}(\\tilde{\\Phi})$ vanishes and so does $i_x^!\\mathrm{cone}(\\tilde{\\Phi})$. We obtain a contradiction, proving that $\\tilde{\\Phi}$ is an isomorphism.\n\\end{proof}\n\\subsection{Comparison with the ``3d'' definition of BPS sheaves and BPS cohomology for Higgs bundles}\n\\label{KK_Higgs_sec}\nLet $C$ be a smooth projective connected curve of genus $g \\geq 2$. In \\cite{kinjo2021cohomological} Kinjo--Koseki give a definition of the BPS sheaf $\\underline{\\BPS}_\\theta^{\\Dol,\\mathrm{3d}}$ and BPS cohomology $\\aBPS_\\theta^{\\Dol,\\mathrm{3d}}$ for the categories $\\mathbf{Higgs}_{\\theta}^{\\sst}(C)$.\n\nWe recall their definition of $\\underline{\\BPS}_{\\theta}^{\\Dol,\\mathrm{3d}}(C)$.\nIn \\cite[Theorem~5.6]{kinjo2021global} the moduli stack $\\Mst_{X,\\theta} $ of 1-dimensional semistable sheaves on $X \\coloneqq \\operatorname{Tot}_{C}(K_C \\oplus \\mathcal{O}_C)$ of slope $\\theta$ is realized as a critical locus of a function $f\\colon \\Mst^{\\sst}_{\\operatorname{Tot}_{C}(K_C(p)),\\theta} \\to \\mathbf{C}$ on the moduli stack of one-dimensional semistable sheaves on $\\operatorname{Tot}_{C}(K_C(p))$ of the same slope $\\theta$, where $p \\in C$ is a closed point.\nThe BPS sheaf for 1-dimensional semistable sheaves on $X$ is defined just as in the case of symmetric quivers with potential. Let $\\Mst_{X,\\theta}^{\\sst} \\subset \\Mst_{X,\\theta}$ be the open substack of semistable sheaves of slope $\\theta$.\nConsider the vanishing cycle sheaf $\\phi_f \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\Mst^{\\sst}_{X}}$ and the good moduli space $\\tilde{\\mathtt{JH}}\\colon \\Mst^{\\sst}_{X} \\to \\Msp^{\\sst}_{X}$. Define the BPS sheaf by $\\underline{\\BPS}_{X}[-1] \\coloneqq \\tau^{\\leq 1} \\tilde{\\mathtt{JH}}_{*}\\phi_f \\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\Mst^{\\sst}_{X}}$. By pushing forward along the projection $\\Msp^{\\sst}_{X} \\to \\Msp_{\\operatorname{Tot}_C(K_C),\\theta}^{\\sst} = \\Msp^{\\Dol}_{\\theta}(C)$ we give the ``3d'' definition of the BPS sheaf \n$\\underline{\\BPS}_{\\theta}^{\\Dol,\\mathrm{3d}} \\coloneqq (\\Msp^{\\sst}_{X} \\to \\Msp^{\\Dol}_{\\theta}(C))_{\\ast} \\underline{\\BPS}_{X}$, which is a semisimple mixed Hodge module by \\cite[Proposition 5.12]{kinjo2021cohomological}.\n\n\n\nLet $\\underline{\\mathcal{IC}}(\\Msp_{\\theta}^{\\Dol}(C)) \\coloneqq \\bigoplus_{d\/r=\\theta}\\underline{\\mathcal{IC}}(\\Msp_{d,r}^{\\Dol}(C))$. Since $\\underline{\\BPS}_{\\theta}^{\\Dol,\\mathrm{3d}}$ and $\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\Msp_{\\theta}^{\\Dol}(C))$ are semisimple mixed Hodge modules, the following computation in $\\K(\\mathcal{D}^+(\\mathrm{MHM}(\\Msp_{\\theta}^{\\Dol}(C))))$ implies that they represent the same class in $\\K(\\mathrm{MHM}(\\Msp_{\\theta}^{\\Dol}(C)))$. This implies that there is some non-canonical isomorphism $\\underline{\\BPS}_{\\theta}^{\\Dol,\\mathrm{3d}}(C) \\cong \\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\Msp_{\\theta}^{\\Dol}(C)))$.\n\\begin{align*}\n[\\Sym_{\\boxdot}(\\underline{\\BPS}_{\\theta}^{\\Dol,\\mathrm{3d}}(C) \\otimes \\HO_{\\mathbf{C}^{\\ast}})] &= [\\underline{\\mathscr{A}}_{\\theta}^{\\Dol}(C)] &(\\text{\\cite[Theorem~5.16]{kinjo2021cohomological}})\\\\\n&= \\left[\\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}\\left(\\underline{\\mathcal{IC}}(\\Msp_{\\theta}^{\\Dol}(C))\\right) \\otimes \\HO_{\\mathbf{C}^{\\ast}}\\right)\\right] & (\\text{Theorem~\\ref{theorem:pbwtotnegative2CY}}).\n\\end{align*}\n\n\nUnlike for the case of quivers, the 3d-definition of the BPS sheaf $\\underline{\\BPS}_{\\theta}^{\\Dol,\\text{3d}}(C) \\subset \\underline{\\mathscr{A}}_{\\theta}^{\\Dol}(C)$ and BPS cohomology $\\aBPS_{\\theta}^{\\Dol,\\text{3d}}(C)\\subset \\HO^{*}(\\underline{\\mathscr{A}}_{\\theta}^{\\Dol}(C))$ have not been shown to be closed under the commutator bracket (although one could try to pursue a similar line of reasoning as in \\cite{davison2020cohomological}) and therefore are not obviously Lie algebra objects. Consequently, we cannot mimic \u00a7\\ref{subsubsection:3dBPSLiepreproj} to obtain a canonical morphism $\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}(\\underline{\\mathcal{IC}}(\\Msp_{\\theta}^{\\Dol}(C))) \\to \\underline{\\BPS}_{\\theta}^{\\Dol,\\mathrm{3d}}(C)$.\nHere we see the advantage of defining the BPS sheaf and BPS cohomology as we do in this paper: they automatically have the structure of a Lie algebra object.\n\n\\section{Nonabelian Hodge theory for stacks}\n\\label{NAHT_sec}\n\nLet $C$ be a smooth projective complex curve of genus $g$. For $\\theta\\in\\mathbf{Q}\\cup \\{\\infty\\}$ we recall from \\S\\ref{Higgs_background_sec} the definition of the category $\\mathbf{Higgs}^{\\sst}_{\\theta}(C)$: the full subcategory of the category of Higgs sheaves on $C$ that are either semistable of slope $\\theta$, or the zero Higgs sheaf. This category is Abelian, finite length, and closed under extensions in $\\mathbf{Higgs}(C)$.\n\nBy the classical nonabelian Hodge isomorphism \\cite{hitchin1987self,donaldson1987twisted,simpson1992higgs}, there is a homeomorphism\n\\[\n\\Psi_{r,d}\\colon \\mathcal{M}^{\\Dol}_{r,d}(C)\\xrightarrow{\\cong}\\mathcal{M}^{\\Betti}_{g,r,d}.\n\\]\nThis homeomorphism induces an isomorphism in Borel--Moore homology\n\\begin{equation}\n\\label{NAHTBoMo}\n\\Phi\\colon \\HO^{\\BoMo}_*(\\mathcal{M}^{\\Dol}_{r,d}(C),\\mathbf{Q})\\rightarrow \\HO^{\\BoMo}_*(\\mathcal{M}^{\\Betti}_{g,r,d},\\mathbf{Q}).\n\\end{equation}\nOne of our main motivations was to produce an isomorphism in Borel--Moore homology for moduli \\textit{stacks}, analogous to \\eqref{NAHTBoMo}. Note that if the genus of $C$ is zero or one, such an isomorphism is known to exist, since the Borel--Moore homology of the Dolbeault and Betti stacks can be explicitly calculated, see \\cite{davison2021nonabelian} for details. So in this paper we concentrate on the case $g\\geq 2$, i.e. the case in which $\\mathbf{Higgs}^{\\sst}_{\\theta}(C)$ is totally negative.\n\\smallbreak\nFor a nonzero rational number $\\theta$, which we may write as $\\theta=a\/b$ with $a,b\\in\\mathbf{Z}$, $a>0$ and $\\gcd(a,b)=1$, we define\n\\begin{align*}\n\\mathcal{M}^{\\Dol}_{\\theta}(C)\\coloneqq&\\coprod_{n\\in\\mathbf{Z}_{\\geq 0}}\\mathcal{M}^{\\Dol}_{na,nb}(C)\\\\\n\\mathcal{M}^{\\Betti}_{g,\\theta}\\coloneqq&\\coprod_{n\\in \\mathbf{Z}_{\\geq 0}}\\mathcal{M}^{\\Betti}_{g,na,nb}.\n\\end{align*}\nWe define $\\mathfrak{M}^{\\Dol}_{\\theta}(C)$ and $\\mathfrak{M}^{\\Betti}_{g,\\theta}$ similarly. We define \n\\begin{align}\n\\aBPS^{\\Betti}_{\\mathrm{Lie},g,\\theta}\\coloneqq &\\operatorname{Free}_{\\mathrm{Lie}}\\left(\\bigoplus_{n\\geq 0}\\ICA(\\Msp^{\\Betti}_{g,na,nb} \\label{naht_bps})\\right)\\\\\n\\aBPS^{\\Dol}_{\\mathrm{Lie},\\theta}(C)\\coloneqq &\\operatorname{Free}_{\\mathrm{Lie}}\\left(\\bigoplus_{n\\geq 0}\\ICA(\\Msp^{\\Dol}_{na,nb}(C))\\right). \\nonumber\n\\end{align}\nThe Lie algebra $\\aBPS^{\\Dol}_{\\mathrm{Lie},\\theta}(C)$ carries a bigrading (taking into account ranks and degrees), and for $r\\geq 1$ and $d\\in\\mathbf{Z}$ we define $\\aBPS^{\\Dol}_{\\mathrm{Lie},r,d}$ to be the piece of $\\aBPS^{\\Dol}_{\\mathrm{Lie},\\theta}(C)$ of bidegree $(r,d)$, where $\\theta=d\/r$. We define $\\aBPS^{\\Betti}_{\\mathrm{Lie},g,r,d}$ similarly.\n\\begin{lemma}\n\\label{Lem:monNAHT}\nLet $\\theta\\in\\mathbf{Q}$. The morphism $\\Psi\\colon \\mathcal{M}^{\\Dol}_{\\theta}(C)\\rightarrow \\mathcal{M}^{\\Betti}_{g,\\theta}$ is an isomorphism of monoid objects in the category of topological spaces.\n\\end{lemma}\n\\begin{proof}\nSince we are working in the category of topological spaces it is sufficient to show that the two morphisms\n\\[\n\\mathcal{M}^{\\Dol}_{n'a,n'b}(C)\\times \\mathcal{M}^{\\Dol}_{n''a,n''b}(C)\\rightarrow \\mathcal{M}^{\\Betti}_{g,(n'+n'')a,(n'+n'')b}\n\\]\t\ngiven by $\\Psi_{(n'+n'')a,(n'+n'')b}\\circ \\oplus$ and $\\oplus\\circ(\\Psi_{n'a,n'b}\\times\\Psi_{n''a,n''b})$ are the same at the level of points. This follows from the construction of $\\Psi$: given a polystable Higgs bundle $\\mathcal{F}=\\mathcal{F}_1\\oplus\\ldots\\oplus \\mathcal{F}_l$ the corresponding semisimple twisted $\\pi_1(C)$-module is explicitly constructed via the nonabelian Hodge isomorphism applied to the summands $\\mathcal{F}_1,\\ldots,\\mathcal{F}_l$, see \\cite{simpson1992higgs} for details.\n\\end{proof}\n\n\n\nWe denote by \n\\begin{align*}\np_{\\Dol}\\colon &\\mathfrak{M}^{\\Dol}_{\\theta}(C)\\rightarrow \\mathcal{M}^{\\Dol}_{\\theta}(C)\\\\\np_{\\Betti}\\colon &\\mathfrak{M}^{\\Betti}_{g,\\theta}\\rightarrow \\mathcal{M}^{\\Betti}_{g,\\theta}\n\\end{align*}\nthe morphisms from the moduli stacks to the moduli spaces of objects, and define $\\underline{\\mathscr{A}}^{\\Dol}_{\\theta}(C)\\coloneqq p_{\\Dol,*}\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}^{\\Dol}_{\\theta}(C)}^{\\mathrm{vir}}$ and $\\underline{\\mathscr{A}}^{\\Betti}_{g,\\theta}\\coloneqq p_{\\Betti,*}\\mathbb{D}\\underline{\\mathbf{Q}}_{\\mathfrak{M}^{\\Betti}_{g,\\theta}}^{\\mathrm{vir}}$. For the next theorems we assume that the genus of $C$ is at least $2$ so that the relevant categories of Higgs bundles and twisted representations of the fundamental group are totally negative. The following is a special case of (the MHM version of) Theorem \\ref{theorem:freenesspreprojective}.\n\\begin{theorem}\nAssume $g(C)\\geq 2$. There are isomorphisms of algebra objects in $\\mathrm{MHM}(\\Msp^{\\Dol}_{\\theta}(C))$ and $\\mathrm{MHM}(\\Msp^{\\Betti}_{g,\\theta})$ respectively:\n\\begin{align*}\n\\operatorname{Free}_{\\boxdot\\mathrm{-Alg}}\\left(\\underline{\\mathcal{IC}}(\\mathcal{M}^{\\Dol}_{\\theta}(C))\\right)\\rightarrow &\\mathcal{H}^0(\\underline{\\mathscr{A}}^{\\Dol}_{\\theta}(C))\\\\\n\\operatorname{Free}_{\\boxdot\\mathrm{-Alg}}\\left(\\underline{\\mathcal{IC}}(\\mathcal{M}^{\\Betti}_{\\theta})\\right)\\rightarrow &\\mathcal{H}^0(\\underline{\\mathscr{A}}^{\\Betti}_{g,\\theta})\n\\end{align*}\nextending the inclusions $\\underline{\\mathcal{IC}}(\\mathcal{M}^{\\Dol}_{\\theta}(C))\\hookrightarrow \\mathcal{H}^0(\\underline{\\mathscr{A}}^{\\Dol}_{\\theta}(C))$ and $\\underline{\\mathcal{IC}}(\\mathcal{M}^{\\Betti}_{g,\\theta}))\\hookrightarrow \\mathcal{H}^0(\\underline{\\mathscr{A}}^{\\Betti}_{g,\\theta})$ from \\S \\ref{primitives_sec}.\n\\end{theorem}\n\\begin{theorem}\n\\label{Thm:naFree}\nAssume $g(C)\\geq 2$. The natural morphisms of mixed Hodge structures\n\\begin{align*}\n\\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\mathrm{Lie}}(\\ICA(\\mathcal{M}^{\\Dol}_{\\theta}(C)))\\otimes\\HO_{\\mathbf{C}^{\\ast}}\\right)&\\rightarrow \\HO^*(\\underline{\\mathscr{A}}^{\\Dol}_{\\theta}(C))\\\\\n\\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\mathrm{Lie}}(\\ICA(\\mathcal{M}^{\\Betti}_{g,\\theta}))\\otimes\\HO_{\\mathbf{C}^{\\ast}}\\right)&\\rightarrow \\HO^*(\\underline{\\mathscr{A}}^{\\Betti}_{g,\\theta})\n\\end{align*}\nare isomorphisms.\n\\end{theorem}\n\n\n\nThe following theorem is proved for $g(C)\\leq 1$ in \\cite{davison2021nonabelian}. It is our version of the nonabelian Hodge isomorphism for stacks:\n\\begin{theorem}\nThere is a natural isomorphism in $\\mathcal{D}_{\\mathrm{c}}^+(\\mathcal{M}^{\\Betti}_{g,r,d})$\n\\begin{equation}\n\\label{relNAHT}\n\\Psi_*p_{\\Dol,*}\\mathbb{D}\\mathbf{Q}^{\\mathrm{vir}}_{\\mathfrak{M}^{\\Dol}_{r,d}(C)}\\cong p_{\\Betti,*}\\mathbb{D}\\mathbf{Q}^{\\mathrm{vir}}_{\\mathfrak{M}^{\\Betti}_{g,r,d}}.\n\\end{equation}\nTaking derived global sections, we deduce that there is a natural isomorphism in Borel--Moore homology between the Dolbeault and the Betti stacks:\n\\begin{equation}\n\\label{absNAHT}\t\n\\Phi\\colon\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Dol}_{r,d}(C),\\mathbf{Q})\\cong \\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r,d},\\mathbf{Q}).\n\\end{equation}\n\\end{theorem}\n\\begin{proof}\nThe intersection complex is a topological invariant \\cite{goresky1983intersection}, so since $\\Psi_{r,d}$ is a diffeomorphism there is a canonical isomorphism\n\\[\n\\Psi_{r,d,*}\\mathcal{IC}(\\mathcal{M}^{\\Dol}_{r,d}(C))\\cong \\mathcal{IC}(\\mathcal{M}^{\\Betti}_{g,r,d}).\n\\]\t\nFix $\\theta=r\/d$. By Lemma \\ref{Lem:monNAHT} there is an isomorphism\n\\begin{equation}\n\\label{ac_na}\n\\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot \\mathrm{-Lie}}(\\Psi_*\\mathcal{IC}(\\mathcal{M}^{\\Dol}_{\\theta}(C)))\\otimes\\HO_{\\mathbf{C}^*}\\right)\\cong \\Psi_*\\!\\left(\\Sym_{\\boxdot}\\left(\\operatorname{Free}_{\\boxdot \\mathrm{-Lie}}(\\mathcal{IC}(\\mathcal{M}^{\\Dol}_{\\theta}(C))\\otimes\\HO_{\\mathbf{C}^*}\\right)\\right).\n\\end{equation}\nCombining \\eqref{ac_na} with the two isomorphisms of Theorem \\ref{Thm:naFree} yields the isomorphism \\eqref{relNAHT}. Then restricting to $\\mathcal{M}^{\\Betti}_{g,r,d}$ and taking derived global sections yields the isomorphism \\eqref{absNAHT}.\n\\end{proof}\n\nWe list some immediate consequences of the construction of the isomorphism $\\Phi$:\n\\begin{enumerate}\n\\item\t\nThe isomorphism $\\Phi$ respects the perverse filtration on $\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Dol}_{r,0}(C),\\mathbf{Q})$ (respectively, $\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r},\\mathbf{Q})$) induced by the morphisms $p_{\\Dol}$ (respectively $p_{\\Betti}$). \n\\item\nThere are natural inclusions $\\ICA(\\mathcal{M}^{\\Dol}_{r,0}(C))\\subset \\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Dol}_{r,0}(C),\\mathbf{Q}^{\\mathrm{vir}})$ and $\\ICA(\\mathcal{M}^{\\Betti}_{g,r})\\subset \\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r},\\mathbf{Q}^{\\mathrm{vir}})$, and\n\\[\n\\Phi(\\ICA(\\mathcal{M}^{\\Dol}_{r,d}(C)))=\\ICA(\\mathcal{M}^{\\Betti}_{g,r,d}).\n\\]\nFurthermore the isomorphism\n\\begin{equation}\n\\label{ACI_iso}\n\\Phi\\colon \\ICA(\\mathcal{M}^{\\Dol}_{r,d}(C))\\rightarrow \\ICA(\\mathcal{M}^{\\Betti}_{g,r,d})\n\\end{equation}\nis the isomorphism induced by the homeomorphism $\\Psi_{r,d}$.\n\\end{enumerate}\n\\smallbreak\nWe recall the definition of the \\textit{Hitchin morphism}\n\\begin{align}\n\\label{hmap}\n\\mathtt{h}_{r,d}\\colon &\\Msp^{\\Dol}_{r,d}(C)\\rightarrow \\Lambda_r\\coloneqq \\prod_{i=1}^r\\HO^0(C,\\omega_C^{\\otimes i})\\\\ \\nonumber\n&(\\mathcal{F},\\eta)\\mapsto \\mathrm{char}(\\eta)= (\\Tr(\\eta),\\Tr(\\wedge^2\\eta)),\\ldots).\n\\end{align}\nThe target is a monoid: it records the supports of possible spectral curves (with multiplicity). The intersection cohomology $\\ICA(\\mathcal{M}^{\\Dol}_{r,d}(C))$ carries a perverse filtration, defined with respect to the Hitchin morphism. Precisely, we set\n\\[\n\\mathfrak{P}^i_{\\mathtt{h}}\\ICA(\\mathcal{M}^{\\Dol}_{r,d}(C))\\coloneqq \\HO^*(\\Lambda_r,{}^{\\mathfrak{p}}\\!\\tau^{\\leq i}\\mathtt{h}_{r,d,*}\\mathcal{IC}_{\\mathcal{M}^{\\Dol}_{r,d}(C)}).\n\\]\nThe PI=WI conjecture of de Cataldo and Maulik \\cite{de2018perverse} states that we have the identities\n\\[\n\\Phi(\\mathfrak{P}^i_{\\mathtt{h}}\\ICA(\\mathcal{M}^{\\Dol}_{r,d}(C)))=W^{2i}\\ICA(\\mathcal{M}^{\\Betti}_{g,r,d})\n\\]\nfor all $i$. \nBy \\cite{davison2021purity} the Borel--Moore homology $\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r,d},\\mathbf{Q}^{\\mathrm{vir}})$ carries a perverse filtration with respect to the morphism $p^{\\Betti}$, while $\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Dol}_{r,d}(C),\\mathbf{Q}^{\\mathrm{vir}})$ carries perverse filtrations with respect to $p^{\\Dol}$ and $\\mathtt{h}^{\\sta}\\coloneqq \\mathtt{h}\\circ p^{\\Dol}$ respectively. As in \\cite[Sec.1.3]{davison2021nonabelian} we define a mixed perverse filtration\n\\begin{equation}\n\\label{Comb_def}\n\\mathfrak{F}^{i}\\!\\HO^{\\BoMo}_*(\\Mst^{\\Dol}_{r,d}(C),\\mathbf{Q}^{\\mathrm{vir}})\\coloneqq\\sum_{j+k=i}\\left(\\mathfrak{P}_{p^{\\Dol}}^{2k}\\!\\HO^{\\BoMo}_*(\\Mst^{\\Dol}_{r,d}(C),\\mathbf{Q}^{\\mathrm{vir}})\\right)\\cap \\left(\\mathfrak{P}_{{\\mathtt{h}}^{\\sta}}^{j+2k}\\HO^{\\BoMo}_*(\\Mst^{\\Dol}_{r,d}(C),\\mathbf{Q}^{\\mathrm{vir}})\\right).\n\\end{equation}\nTo state the next theorem we restrict to slope zero Higgs sheaves, and (untwisted) representations of $\\pi_1(\\Sigma_g)$. In \\cite{davison2021nonabelian} it is explained how to prove the following theorem in the presence of the nonabelian Hodge isomorphism \\eqref{relNAHT}.\n\\begin{theorem}\nThe following three statements are equivalent\n\\begin{itemize}\n\\item\nThe PI=WI conjecture is true.\n\\item\nThere is an equality of filtrations of $\\mathfrak{P}_{p^{\\Betti}}^0\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r,0},\\mathbf{Q}^{\\mathrm{vir}})$\n\\[\n\\Phi\\left(\\mathfrak{P}^i_{\\mathtt{h}^{\\sta}}\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Dol}_{r,0}(C),\\mathbf{Q}^{\\mathrm{vir}})\\cap \\mathfrak{P}^0_{p^{\\Dol}}\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Dol}_{r,0}(C),\\mathbf{Q}^{\\mathrm{vir}})\\right)=W^{2i}\\mathfrak{P}^0_{p^{\\Betti}}\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r,0},\\mathbf{Q}^{\\mathrm{vir}})\n\\]\n\\item\nThere is an equality of filtrations of $\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r,0},\\mathbf{Q}^{\\mathrm{vir}})$\n\\[\n\\Phi\\left( \\mathfrak{F}^{i}\\!\\HO^{\\BoMo}_*(\\Mst^{\\Dol}_{r,0}(C),\\mathbf{Q}^{\\mathrm{vir}})\\right)=W^{2i}\\HO^{\\BoMo}_*(\\mathfrak{M}^{\\Betti}_{g,r,0},\\mathbf{Q}^{\\mathrm{vir}}).\n\\]\n\\end{itemize}\n\\end{theorem}\n\n\\subsection{$\\chi$-independence results}\n\\subsubsection{Dolbeault side}\nNote that the target of the Hitchin map $\\mathtt{h}\\colon \\mathcal{M}^{\\Dol}_{r,d}(C)\\rightarrow \\Lambda_r$ depends only on $r$ and not $d$. \nWe start by recalling the following theorem of Kinjo and Koseki:\n\\begin{theorem}\\cite{kinjo2021cohomological}\n\\label{KKthm}\nLet $C$ be a smooth complex projective curve of arbitrary genus. For all $d,d'\\in\\mathbf{Z}$ and all $r\\in\\mathbf{Z}_{>0}$ there is an isomorphism of mixed Hodge module complexes \\[\n\\mathtt{h}_*\\underline{\\BPS}_{r,d}^{\\Dol,\\mathrm{3d}}(C)\\cong \\mathtt{h}_*\\underline{\\BPS}_{r,d'}^{\\Dol,\\mathrm{3d}}(C)\n\\]\nTaking derived global sections, we deduce that there is an isomorphism \n\\[\n\\HO^*(\\mathcal{M}^{\\Dol}_{r,d}(C),\\underline{\\BPS}_{r,d}^{\\Dol,\\mathrm{3d}}(C))\\cong \\HO^*(\\mathcal{M}^{\\Dol}_{r,d'}(C),\\underline{\\BPS}_{r,d'}^{\\Dol,\\mathrm{3d}}(C))\n\\]\nrespecting the perverse filtrations induced by the Hitchin map $\\mathtt{h}$.\n\\end{theorem}\nWe give $\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\Lambda))$ the tensor structure $\\boxdot$ induced by the monoid structure $+\\colon\\Lambda\\times\\Lambda\\rightarrow \\Lambda$, i.e. we set\n\\[\n\\mathcal{F}\\boxdot\\mathcal{G}\\coloneqq +_*(\\mathcal{F}\\boxtimes\\mathcal{G}).\n\\]\nComparing $d=0,1$ in Theorem \\ref{KKthm} and applying our main theorem:\n\\begin{corollary}\n\\label{chi_cor}\nLet $C$ be a complex projective curve of genus at least two. There is an isomorphism of complexes of pure mixed Hodge modules\n\\[\n\\operatorname{Free}_{\\boxdot-\\mathrm{Lie}}\\left(\\bigoplus_{r\\geq 1}\\mathtt{h}_*\\ul{\\mathcal{IC}}_{\\mathcal{M}^{\\Dol}_{r,0}(C)}\\right)\\cong \\bigoplus_{r\\geq 1}\\mathtt{h}_*\\underline{\\mathbf{Q}}^{\\mathrm{vir}}_{\\mathcal{M}^{\\Dol}_{r,1}(C)}.\n\\]\nTaking derived global sections, there is an $\\mathbf{Z}_{\\geq 1}$-graded isomorphism\n\\begin{equation}\n\\label{mystery_Lie}\n\\operatorname{Free}_{\\mathrm{Lie}}\\left(\\bigoplus_{r\\geq 1}\\ICA(\\mathcal{M}^{\\Dol}_{r,0}(C))\\right)\\cong \\bigoplus_{r\\geq 1}\\HO^*(\\mathcal{M}^{\\Dol}_{r,1}(C),\\underline{\\mathbf{Q}}^{\\mathrm{vir}}).\n\\end{equation}\nrespecting the perverse filtrations induced by the Hitchin maps $\\mathtt{h}$ on both sides.\n\\end{corollary}\n\n\\begin{remark}\nIn particular, the cohomology of the moduli scheme of degree 1 Higgs bundles carries a Lie algebra structure via the isomorphism \\eqref{mystery_Lie}. Although there is surely a more down-to-earth way of writing it down, we are not sure what it is. \n\\end{remark}\nThe Hodge-to-Singular correspondence of Mauri and Migliorini \\cite{mauri2022hodge} (see also \\cite{mauri2022combinatorial}) asserts that (after restricting to the reduced locus in $\\Lambda$) the direct image $\\mathtt{h}_*\\mathcal{IC}(\\mathcal{M}^{\\Dol}_{r,d}(C))$ (for arbitrary $d$) decomposes into isotypic components of tensor powers of $\\mathtt{h}_*\\mathcal{M}^{\\Dol}_{r_i,0}(C)$ (for decompositions $r=(r_1,\\ldots,r_l)$). Corollary \\ref{chi_cor} gives a new interpretation of this fact, as well as showing that it extends over the whole of $\\Lambda$. We finish this subsection with a final corollary, extending \\cite[Corollary 1.9]{mauri2022hodge} over the entire Hitchin base:\n\\begin{corollary}\nLet $C$ be a complex projective curve of genus at least two. Let $r\\in\\mathbf{Z}_{\\geq 1}$ and let $d,d'$ satisfy $(r,d)=(r,d')$. Then there is an isomorphism in $\\mathcal{D}^{\\mathrm{b}}(\\mathrm{MHM}(\\Lambda_r))$:\n\\[\n(\\mathtt{h}_{r,d})_*\\ul{\\mathcal{IC}}_{\\mathcal{M}^{\\Dol}_{r,d}(C)}\\cong (\\mathtt{h}_{r,d'})_*\\ul{\\mathcal{IC}}_{\\mathcal{M}^{\\Dol}_{r,d'}(C)}.\n\\]\n\\end{corollary}\n\\begin{proof}\nWrite $(r,d)=m(\\overline{r},\\overline{d})$ and $(r,d')=m(\\overline{r},\\overline{d}')$. By Theorems \\ref{KKthm} and \\ref{theorem:freenesstotneg2CY} there is an isomorphism of complexes of mixed Hodge modules\n\\[\n\\Sym_{\\boxdot}\\left(\\bigoplus_{n\\geq 1}\\mathtt{h}_*\\underline{\\BPS}_{n\\overline{r},n\\overline{d}}^{\\Dol}(C)\\right) \\cong \\Sym_{\\boxdot}\\left(\\bigoplus_{n\\geq 1}\\mathtt{h}_*\\underline{\\BPS}_{n\\overline{r},n\\overline{d}'}^{\\Dol}(C)\\right).\n\\]\nThus there is an isomorphism of complexes of mixed Hodge modules\n\\[\n\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{n\\geq 1}\\mathtt{h}_*\\ul{\\mathcal{IC}}_{\\mathcal{M}^{\\Dol}_{n\\overline{r},n\\overline{d}}(C)}\\right)\\cong\\operatorname{Free}_{\\boxdot-\\mathrm{Alg}}\\left(\\bigoplus_{n\\geq 1}\\mathtt{h}_*\\ul{\\mathcal{IC}}_{\\mathcal{M}^{\\Dol}_{n\\overline{r},n\\overline{d}'}(C)}\\right)\n\\]\nand the result follows by comparing summands at $n=m$.\n\\end{proof}\n\\subsubsection{Betti side}\nWe record the following Betti $\\chi$-independence result\n\\begin{theorem}\n\\label{Betti_chi_thm}\nLet $g\\geq 2$. Then for $\\aBPS^{\\Betti}_{\\mathrm{Lie},r,d}$ as defined in \\eqref{naht_bps}, there is an isomorphism of cohomologically graded vector spaces\n\\[\n\\aBPS^{\\Betti}_{\\mathrm{Lie},g,r,d}\\cong \\aBPS^{\\Betti}_{\\mathrm{Lie},g,r,d'}\n\\]\nfor all $d,d'\\in\\mathbf{Z}$.\n\\end{theorem}\n\\begin{proof}\nFrom $\\aBPS^{\\Betti}_{\\mathrm{Lie},g,\\theta}=\\operatorname{Free}_{\\mathrm{Lie}}(\\ICA(\\Msp_{g,\\theta}^{\\Betti}))$, $\\aBPS^{\\Dol}_{\\mathrm{Lie},\\theta}(C)=\\operatorname{Free}_{\\mathrm{Lie}}(\\ICA(\\Msp_{\\theta}^{\\Dol}(C))$ and the nonabelian Hodge homeomorphism \\eqref{ACI_iso} it follows that\n\\begin{equation}\n\\label{BPSata}\n\\aBPS^{\\Dol}_{\\mathrm{Lie},r,d}(C)\\cong \\aBPS^{\\Betti}_{\\mathrm{Lie},g,r,d}\n\\end{equation}\n\nBy \\cite{kinjo2021cohomological} and \\S \\ref{KK_Higgs_sec} there are isomorphisms\n\\begin{equation}\n\\label{KKiso}\n\\aBPS^{\\Dol}_{\\mathrm{Lie},r,d}(C)\\cong \\aBPS^{\\Dol}_{\\mathrm{Lie},r,d'}(C)\n\\end{equation}\nfor all $d,d'$, and the result follows.\n\\end{proof}\nNote that if $(r,d)=1$, by definition \n\\[\n\\aBPS^{\\Dol}_{\\mathrm{Lie},r,d}(C)\\cong \\HO^*(\\Msp_{r,d}^{\\Dol}(C),\\mathbf{Q}^{\\mathrm{vir}}) \\quad \\quad \\aBPS^{\\Betti}_{\\mathrm{Lie},r,d}(C)\\cong \\HO^*(\\Msp_{g,r,d}^{\\Betti},\\mathbf{Q}^{\\mathrm{vir}}) \n\\]\nBy the proof of the P=W conjecture \\cite{maulik2022p, hausel2022p} if $(r,d)=1$ the isomorphism \\eqref{BPSata} carries the perverse filtration on the Dolbeault side to (twice) the weight filtration on the Betti side. Furthermore, \\cite{kinjo2021cohomological} shows that the isomorphism \\eqref{KKiso} respects the perverse filtration for all $d,d'$. It follows that for coprime $d,d'$ the isomorphism of Theorem \\ref{Betti_chi_thm} respects the weight filtration. We conjecture that this is in fact the case for \\textit{all} $d,d'$, regardless of coprimality. This would imply, amongst other things, the PI=WI conjecture (see \\cite{davison2021nonabelian} for details). Note that by \\cite{hausel2008mixed} the E-polynomials (recording weights, but taking alternating sums over cohomological degrees) of $\\aBPS^{\\Betti}_{\\mathrm{Lie},g,r,d}$ and $\\aBPS^{\\Betti}_{\\mathrm{Lie},g,r,d'}$ coincide. See \\cite{davison2016cohomological} for details.\n\n\n\\section{Cuspidal polynomials of totally negative quivers}\n\\label{cuspidals_sec}\nLet $Q=(Q_0,Q_1)$ be a quiver. Ringel and Green defined in the beginning of the 1990s in \\cite{ringel1990hall,ringel1992hall,green1995hall} the \\emph{Hall algebra} of $Q$ over a finite field $\\mathbf{F}_q$ as an algebra structure on the vector space having as basis the set of isomorphism classes of finite-dimensional representations of $Q$ over $\\mathbf{F}_q$:\n\\[\n H_{Q,\\mathbf{F}_q}:=\\bigoplus_{[M]\\in\\operatorname{Rep}_Q(\\mathbf{F}_q)\/\\sim}\\mathbf{C}[M].\n\\]\nGreen \\cite{green1995hall} defined a coproduct $\\Delta$ on $ H_{Q,\\mathbf{F}_q}$ and Xiao \\cite{xiao1997drinfeld} expressed the antipode, so that $H_{Q,\\mathbf{F}_q}$ has the structure of a twisted\\footnote{The twist is explained in Xiao's paper. It is not relevant here.} Hopf algebra. Sevenhant and Van den Bergh proved \\cite{sevenhant2001relation} that $H_{Q,\\mathbf{F}_q}$ has the structure of the quantized enveloping algebra of a Borcherds--Kac-Moody algebra with deformation parameter specialized at $\\sqrt{q}$, where the generators are given by a basis of the space of \\emph{cuspidal functions}\n\\[\n H_{Q,\\mathbf{F}_q}^{\\mathrm{cusp}}=\\{f\\in H_{Q,\\mathbf{F}_q}\\mid \\Delta(f)=f\\otimes 1+1\\otimes f\\},\n\\]\nsatisfying Serre relations\\footnote{They assume the quiver is loop-free. This assumption can be removed.}, see \\cite[Theorem 3.4]{hennecart2021isotropic} for a formulation.\n\nFor $\\mathbf{d}\\in\\mathbf{N}^{Q_0}$, let $M_{Q,\\mathbf{d}}(q)$ be the number of isomorphism classes of $\\mathbf{F}_q$--representations of $Q$ of dimension $\\mathbf{d}$; $I_{Q,\\mathbf{d}}(q)$ be the number of isomorphism classes of \\emph{indecomposable} $\\mathbf{F}_q$--representations of $Q$ of dimension $\\mathbf{d}$ and $A_{Q,\\mathbf{d}}(q)$ be the number of isomorphism classes of \\emph{absolutely indecomposable} $\\mathbf{F}_q$--representations of $Q$ of dimension $\\mathbf{d}$. By Kac \\cite{kac1983root}, these counting functions are polynomials in $q$ and moreover, by \\cite{hausel2013positivity} (or \\cite{davison2018purity,dobrovolska2016moduli} for different approaches), the coefficients of $A_{Q,\\mathbf{d}}(q)$ are nonnegative.\n\nThe graded character of the Hall algebra is given by the formula\n\\[\n \\mathrm{ch}(H_{Q,F_q})\\coloneqq\\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}M_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}}=\\Exp_{z}\\left(\\sum_{\\mathbf{d} \\neq 0}I_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}}\\right)=\\Exp_{q,z}\\left(\\sum_{\\mathbf{d} \\neq 0}A_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}}\\right),\n\\]\nwhere $\\Exp_z$ and $\\Exp_{z,t}$ denote the plethystic exponentials, see \\cite[Section 1.5]{bozec2019counting}. The second equality follows from the Krull-Schmidt property of the category of representations of the quiver and the third from Galois descent for quiver representations.\n\n\n\n\nThe space $H_{Q,\\mathbf{F}_q}^{\\mathrm{cusp}}$ is naturally graded by the dimension vector: $H_{Q,\\mathbf{F}_q}^{\\mathrm{cusp}}=\\bigoplus_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}H_{Q,\\mathbf{F}_q}^{\\mathrm{cusp}}[\\mathbf{d}]$. There has been a growing interest in understanding this space and to find a parameterisation of cuspidal functions \\cite{bozec2019counting, hennecart2021isotropic}. The first step was to compute its dimension. We have the following result.\n\n\\begin{theorem}[{\\cite[Theorem 1.1]{bozec2019counting}}]\n The dimension $\\dim_{\\mathbf{C}} H_{Q,\\mathbf{F}_q}^{\\mathrm{cusp}}[\\mathbf{d}]$ is given by a polynomial with rational coefficients $C_{Q,\\mathbf{d}}(q)\\in \\mathbf{Q}[q]$.\n\\end{theorem}\nBozec and Schiffmann combinatorially defined a new family of polynomials $(C_{Q,\\mathbf{d}}^{\\abso}(q))_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}$ from the family $(C_{Q,\\mathbf{d}}(q))_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}$, expected to enjoy more favourable properties:\n\\[\n \\left\\{\n \\begin{aligned}\n & C_{Q,\\mathbf{d}}^{\\abso}(q)=C_{Q,\\mathbf{d}}(q) \\text{ if $\\langle\\mathbf{d},\\mathbf{d}\\rangle<0$},\\\\\n &\\Exp_{z}\\left(\\sum_{l\\in\\mathbf{Z}_{>0}}C_{Q,l\\mathbf{d}}(q)z^{l \\mathbf{d}}\\right)=\\Exp_{q,z}\\left(\\sum_{l\\in\\mathbf{Z}_{>0}}C_{Q,l\\mathbf{d}}^{\\abso}(q)z^{l \\mathbf{d}}\\right) \\text{ if $\\mathbf{d}\\in(\\mathbf{N}^{Q_0})_{\\prim}$ and $\\langle\\mathbf{d},\\mathbf{d}\\rangle=0$},\\\\\n &C_{Q,\\mathbf{d}}^{\\abso}(q)=0 \\text{ else.}\n \\end{aligned}\n \\right.\n\\]\nThe definition is motivated by the fact that if there exists a $\\mathbf{N}\\times \\mathbf{N}^{Q_0}$-graded Borcherds Lie algebra $\\mathfrak{n}_{Q}^{\\mathbf{N}}$ associated with the lattice $(\\mathbf{Z}^{Q_0},(-,-))$, with graded character\n\\[\n \\mathrm{ch}(\\mathfrak{n}_Q^{\\mathbf{N}})=\\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}A_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}},\n\\]\nthen the $\\mathbf{N}\\times\\mathbf{N}^{Q_0}$-graded dimension of the space of simple roots is given by the generating series\n\\[\n \\dim_{\\mathbf{C}}\\mathfrak{n}_Q^{\\mathbf{N}}\/[\\mathfrak{n}_Q^{\\mathbf{N}},\\mathfrak{n}_Q^{\\mathbf{N}}]=\\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}C_{Q,\\mathbf{d}}^{\\abso}(q)z^{\\mathbf{d}},\n\\]\nsee \\cite{bozec2019counting}.\n\n\nFor totally negative quivers, $\\langle\\mathbf{d},\\mathbf{d}\\rangle<0$ for every dimension vector $\\mathbf{d}\\in\\mathbf{N}^{Q_0}$ so that the two families of polynomials $(C_{Q,\\mathbf{d}}(q))_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}$ and $(C_{Q,\\mathbf{d}}^{\\abso}(q))_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}$ coincide.\n\\begin{theorem}[{\\cite[Theorem 1.4, Theorem 1.6]{bozec2019counting}}]\n The polynomials $C_{Q,\\mathbf{d}}^{\\abso}(q)$ have integer coefficients. If $Q$ is a totally negative quiver, they satisfy the equality\n \\[\n 1-\\sum_{\\mathbf{d}>0}C_{Q,\\mathbf{d}}^{\\abso}(q)z^{\\mathbf{d}}=\\Exp_{q,z}\\left(-\\sum_{\\mathbf{d}>0}A_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}}\\right).\n \\]\n\n\\end{theorem}\nThe equality for totally negative quivers witnesses the fact that by the Sevenhant and Van den Bergh theorem, the Hall algebra of such a quiver is free, generated by the subspace of cuspidal functions.\n\n\n\nBozec and Schiffmann conjecture the following.\n\n\\begin{conj}[]\n\\label{conjecture:BozecSchiffmann}\n For any $\\mathbf{d}\\in\\mathbf{N}^{Q_0}$, $C_{Q,\\mathbf{d}}^{\\abso}(q)\\in\\mathbf{N}[q]$.\n\\end{conj}\nThis conjecture is known for isotropic dimension vectors \\cite{deng2003new,bozec2019counting, hennecart2021isotropic}, but open in general.\n\nWe fix now a totally negative quiver $Q$. Such quivers have no isotropic dimension vectors. As mentioned above, for such quivers the cuspidal polynomials $C_{Q,\\mathbf{d}}(q)$ and absolutely cuspidal polynomials $C_{Q,\\mathbf{d}}^{\\abso}(q)$ coincide. The case of general quivers will be the object of a subsequent paper. The theorem of Sevenhant and Van den Bergh \\cite[Theorem 1.1]{sevenhant2001relation} implies that $H_{Q,\\mathbf{F}_q}$ is the free associative algebra having $\\dim_{\\mathbf{C}} H_{Q,\\mathbf{F}_q}[\\mathbf{d}]$ generators in dimension $\\mathbf{d}$.\n\nAssuming that the coefficients of the polynomials $C_{Q,\\mathbf{d}}^{\\abso}(q)$ are nonnegative, there exists a free $\\mathbf{N}^{Q_0}\\times \\mathbf{N}$-graded Lie algebra $\\mathfrak{n}^{\\mathbf{N}}_Q$ with the dimension of the $\\mathbf{N}$-graded space of generators in dimension $\\mathbf{d}$ given by $C^{\\abso}_{Q,\\mathbf{d}}(q)$ such that \n\\begin{equation}\n\\label{equation:charnQN}\n \\mathrm{ch}(\\UEA(\\mathfrak{n}^{\\mathbf{N}}_Q))=\\Exp_{q,z}\\left(\\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}\\setminus\\{0\\}}A_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}}\\right).\n\\end{equation}\nBy the graded PBW theorem, this is equivalent to the equality\n\\begin{equation}\n \\mathrm{ch}(\\mathfrak{n}_Q^{\\mathbf{N}})=\\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}\\setminus\\{0\\}}A_{Q,\\mathbf{d}}(q)z^{\\mathbf{d}}.\n\\end{equation}\nConversely, if such a free Lie algebra $\\mathfrak{n}_Q^{\\mathbf{N}}$ exists, then the polynomials $C^{\\abso}_{Q,\\mathbf{d}}(q)$ have nonnegative coefficients: they are given by the equality\n\n\\begin{equation}\n\\label{equation:Ngraded}\n \\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}C_{Q,\\mathbf{d}}^{\\abso}(q)z^{\\mathbf{d}}=\\mathrm{ch}(\\mathfrak{n}_Q^{\\mathbf{N}}\/[\\mathfrak{n}_Q^{\\mathbf{N}},\\mathfrak{n}_Q^{\\mathbf{N}}]).\n\\end{equation}\nBy \\cite[Section 1.2]{davison2020bps}, the 3d BPS Lie algebra of \\S\\ref{subsubsection:3dBPSLiepreproj}, $\\mathfrak{g}_{\\Pi_Q}^{\\aBPS}\\coloneqq\\HO^*\\BPS_{\\Pi_Q,\\mathrm{Lie}}^{\\mathrm{3d}}$, is a $2\\mathbf{N}_{\\leq 0}$-graded Lie algebra with character\n\n \\begin{equation}\n \\label{equation:charBPS}\n \\mathrm{ch}(\\mathfrak{g}_{\\Pi_Q}^{\\aBPS})=\\sum_{\\mathbf{d}\\in\\mathbf{N}^{Q_0}}A_{Q,\\mathbf{d}}(q^{-2})z^{\\mathbf{d}}\n \\end{equation}\nwhich by Corollary \\ref{corollary:FreeLiePreproj} is isomorphic to $\\aBPS_{\\Pi_Q,\\mathrm{Lie}}$.\n\nVia this isomorphism $\\mathfrak{g}_{\\Pi_Q}^{\\aBPS}$ is identified with the free Lie algebra with graded dimension of the spaces of generators given by\n\\begin{equation}\n\\label{equation:BPSchar}\n \\mathrm{ch}(\\mathfrak{g}_{\\Pi_Q}^{\\aBPS}\/[\\mathfrak{g}_{\\Pi_Q}^{\\aBPS},\\mathfrak{g}_{\\Pi_Q}^{\\aBPS}])=\\sum_{\\vec{d}\\in\\mathbf{N}^{Q_0}}\\IP(\\mathcal{M}_{\\Pi_Q,\\mathbf{d}},q)z^{\\mathbf{d}},\n\\end{equation}\nthe intersection Poincar\\'e polynomial of $\\mathcal{M}_{\\Pi_Q,\\mathbf{d}}$.\n\\begin{theorem}\n The Conjecture \\ref{conjecture:BozecSchiffmann} is true for totally negative quivers: $C^{\\abso}_{Q,\\mathbf{d}}(q)\\in\\mathbf{N}[q]$. Moreover, for any $\\mathbf{d}\\in\\mathbf{N}^{Q_0}$, $\\mathbf{d}\\in\\Sigma_Q$,\n \\[\n C_{Q,\\mathbf{d}}(q^{-2})=\\IP(\\mathcal{M}_{Q,\\mathbf{d}},q).\n \\]\n\\end{theorem}\n\\begin{proof}\nThis comes from the comparison of Equations \\eqref{equation:Ngraded} and \\eqref{equation:BPSchar}, given that the character of the free Lie algebra $\\mathfrak{g}_{\\Pi_Q}^{\\aBPS}$ is given by Equation \\eqref{equation:charBPS}, which is \\eqref{equation:charnQN} up to the change of variables $q\\leftrightarrow q^{-2}$.\n\\end{proof}\n\n\n\\bibliographystyle{alpha}\n{\\small{","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Background and preliminaries}\n\nLet $\\mathscr{L}_A$ be the language of arithmetic with symbols $0,1,+,\\cdot,<$ and\n$\\mathrm{PA}$ the ordinary axiomatization of arithmetic in first order logic. Let\n$\\mathbb N$ be the standard model of PA and $\\omega$ be its domain, i.e., the\nset of natural numbers. If $a\\in M\\models\\mathrm{PA}$ let $I^M_{\\mathord < a}$ (or\n$I_{\\mathord < a}$ if $M$ is understood from the context) be the initial segment\n$\\set{b \\in M | M \\models b < a}$ of $M$. $I \\subseteq_e M$ means that $I$ is an\ninitial segment of $M$, i.e., $I^M_{\\mathord < a}\\subseteq I$ for all $a \\in I\n$. $I \\subseteq_e M$ is a cut if it is closed under taking successors.\nLet $x \\in y$ be a $\\Delta_0$-formula in the language of arithmetic used for\ncoding sets in $\\mathrm{I}\\Sigma_1$ (see\n\\cite{Kaye:91}).\\footnote{$\\mathrm{I}\\Sigma_1$ is PA with\nthe induction axioms restricted to $\\Sigma_1$ formulas.}\nIf $I$ is a cut in $M$\nand $a \\in M$ then $\\mathop\\mathrm{set}\\nolimits_{M\/I}(a) = \\set{b \\in I | M \\models b \\in a}$. The set\nof all coded subsets of $I$ will be denoted $\\mathop\\mathrm{Cod}\\nolimits(M\/I)= \\set{\\mathop\\mathrm{set}\\nolimits_{M\/I}(a) | a\n\\in M}$. The standard system of $M$ is $\\mathop\\mathrm{SSy}(M)=\\mathop\\mathrm{Cod}\\nolimits(M\/\\omega)$.\n\nIf $I \\subseteq M$ is a cut closed under multiplication and $\\scott X \\subseteq\n\\mathscr{P}(I)$ we can regard the structure $(I,\\scott X)$ as a second order\nstructure in the language $\\mathscr{L}_A$. The subtheories $\\mathrm{RCA}_0$, $\\mathrm{WKL}_0$ and $\\mathrm{ACA}_0$ of\nsecond order arithmetic are as defined in \\cite{Simpson:99}. A cut $I \\subseteq\nM$ is semiregular iff $(I,\\mathop\\mathrm{Cod}\\nolimits(M\/I)) \\models \\mathrm{WKL}_0$, and strong iff\n$(I,\\mathop\\mathrm{Cod}\\nolimits(M\/I)) \\models \\mathrm{ACA}_0$. \n\nWhen we write $(M,\\scott X)$ it will be understood that $(M,\\scott X)$ is a\nsecond order structure in the language $\\mathscr{L}_A$, i.e., that $M$ is equipped with\naddition and multiplication and $\\scott X \\subseteq \\mathscr{P}(M)$. $(M,\\scott X)$\nis an $\\omega$-model if $M=\\mathbb N$ is the standard model of PA. In this case\n$(\\mathbb N,\\scott X) \\models \\mathrm{WKL}_0$ iff $\\scott X$ is a Scott set. We will often\nspecify an $\\omega$-model by only specifying $\\scott X \\subseteq\n\\mathscr{P}(\\omega)$.\n\nGiven a theory $T$, in the language of arithmetic, we say that a set $A\n\\subseteq \\omega$ is represented in $T$ if there is a formula\n$\\varphi(x)$ such that $T \\vdash \\varphi(n)$ for all $n \\in A$ and $T \\vdash \\lnot\n\\varphi(n)$ for all $n \\in \\omega \\setminus A$. By $\\mathop\\mathrm{rep}(T)$ we denote the\ncollection of all sets represented in $T$. In \\cite{Scott:62} Scott proved a\nvariant of the following theorem:\n\n\\begin{thm}\\label{thm:scott}\nFor any countable $\\omega$-model $\\scott{X}$ and complete consistent theory $T\n\\supseteq \\mathrm{PA}$ the following are equivalent:\n\\begin{itemize}\n\\item[$(i)$] $\\scott{X} \\models \\mathrm{WKL}_0$ and $\\mathop\\mathrm{rep}(T) \\subseteq \\scott X$, and\n\\item[$(ii)$] there is a countable nonstandard model $M \\models T$ with\n$\\mathop\\mathrm{SSy}(M)=\\scott{X}$. \n\\end{itemize}\n\\end{thm}\n\nThis theorem could be taken a bit further: Given a Scott set $\\scott{X}$ of\ncardinality $\\aleph_1$ there is a nonstandard model of $\\mathrm{PA}$ with standard\nsystem $\\scott{X}$: \\footnote{In \\cite{Smorynski:84}, Smor\\'ynski gives\nEhrenfeucht and Jensen \\cite{Ehrenfeucht.Jensen:76} and independently Guaspari\n\\cite{Guaspari:79} the honor of the main lemma used to prove the theorem. He\nalso writes that the observation that the theorem follows from the lemma is due\nto Guaspari in \\cite{Guaspari:79}. It is not clear to us if this is correct.\nWhat is clear is that the lemma and the theorem appears explicitly in Knight and\nNadel \\cite{Knight.Nadel:82}.}\n\n\\begin{thm}\\label{union}\nFor any $\\omega$-model $\\scott{X}$ of cardinality at most $\\aleph_1$ and\ncomplete consistent theory $T \\supseteq \\mathrm{PA}$ the following are equivalent:\n\\begin{itemize}\n\\item[$(i)$] $\\scott{X} \\models \\mathrm{WKL}_0$ and $\\mathop\\mathrm{rep}(T) \\subseteq \\scott X$, and\n\\item[$(ii)$] there is a nonstandard model $M \\models T$ with\n$\\mathop\\mathrm{SSy}(M)=\\scott{X}$.\n\\end{itemize}\n\\end{thm}\n\n\nThe proof is based on a union of chains argument. It should be noted that for\nPresburger arithmetic, $\\mathrm{PR} = \\mathop\\mathrm{Th}(\\omega,+)$, this argument could be\nextended to any cardinality $\\leq 2^{\\aleph_0}$ as proved in\n\\cite{Knight.Nadel:82}.\\footnote{For models of PR we have to define the standard\nsystem to be the collection of sets recursive in a complete type realized in the\nmodel, this definition is equivalent to our definition for recursively saturated\nmodels of PA.} For PA the argument only applies for cardinalities less than or\nequal $\\aleph_1$, since models of PA does not admit the amalgamation property\nneeded, as pointed out in \\cite{Knight.Nadel:82}.\n\nFor recursively saturated models the situation is almost the same as Wilmers\nproved in \\cite{Wilmers:75}:\n\n\\begin{thm}\\label{wilmers}\nFor any $\\omega$-model $\\scott{X}$ and complete consistent theory $T \\supseteq\n\\mathrm{PA}$ the following are equivalent:\n\\begin{itemize}\n\\item[$(i)$] $T \\in \\scott X$ and there is a model $M \\models T$ with\n$\\mathop\\mathrm{SSy}(M)=\\scott{X}$, and\n\\item[$(ii)$] there is a recursively saturated model $M \\models T$ with\n$\\mathop\\mathrm{SSy}(M)=\\scott{X}$.\n\\end{itemize}\n\\end{thm}\n\nThe proof is a rather straightforward application of the arithmetized\ncompleteness theorem.\n\nObserve that if $\\scott X$ is a Scott set and $T \\in \\scott X$ then $\\mathop\\mathrm{rep}(T)\n\\subseteq \\scott X$, however it may well happen that $\\mathop\\mathrm{rep}(T) \\subseteq \\scott\nX$ and $T \\notin \\scott X$.\n\nGiven $(M,\\scott X)$ and $I \\subseteq M$ a cut, we say that $A \\subseteq I$ is\ncoded in $\\scott X$ if there is $B \\in \\scott X$ such that $A = B \\cap\nI$. Also, if $A \\subseteq I \\times J$ where $J$ also is a cut we say that $A$ is\ncoded in $\\scott X$ if there is $B \\in \\scott X$ such that $B \\cap I \\times J =\nA$.\n\nGiven a theory $T$ let $\\mathop\\mathrm{Con}_T$ be the first order theory consisting of the\nsentences $\\mathop\\mathrm{Con}_S$, where $S\\subseteq T$ ranges over all finite subtheories of\n$T$ and $\\mathop\\mathrm{Con}_S$ is the sentence saying that $\\lnot \\sigma$ is not provable in\nfirst order logic, where $\\sigma$ is the conjunction of all sentences in $S$.\n\nThe next theorem is a special version of the arithmetized completeness theorem\ntailormade for our purposes.\n\n\\begin{thm}\\label{act}\nLet $(M,\\scott X) \\models \\mathrm{ACA}_0 + \\mathop\\mathrm{Con}_T$, where $T$ is some first order theory\nextending $\\mathrm{PA}$ coded in $\\scott X$. Then there is a model $N \\models T$ with\ndomain $M$ and a set $C \\in \\scott X$ such that $N \\models \\varphi(a)$ iff\n$\\langle \\varphi, a \\rangle \\in C$. Furthermore, the canonical embedding\n$\\varrho : M \\to N$ is coded in $\\scott X$ and such that $\\varrho(M)$ is an\ninitial segment of $N$.\n\\end{thm}\n\\begin{proof}\nLet $A \\in \\scott X$ code the theory $T$, i.e., $T = A \\cap \\omega$. By the\nassumption on $(M,\\scott X)$ we have $(M,\\scott X) \\models \\mathop\\mathrm{Con}_{x \\in A \\land x\n< n}$ for every $n \\in \\omega$, where $\\mathop\\mathrm{Con}_{\\theta(x)}$ is the sentence saying\nthat there is no proof of absurdity from sentences satisfying the formula\n$\\theta(x)$. \n\nIf $M = \\mathbb N$ then clearly $(M,\\scott X) \\models \\mathop\\mathrm{Con}_{x \\in A}$ by the\ncompactness theorem. Assuming $M$ is nonstandard we can use overspill (this is\nwhere we need $(M,\\scott X)$ to satisfy $\\mathrm{ACA}_0$) to find $T \\subseteq B \\in\n\\scott X$ such that $(M,\\scott X) \\models \\mathop\\mathrm{Con}_{x \\in B}$.\n\nUsing the fact that the completeness theorem is provable in $\\mathrm{WKL}_0$ we get the\ndesired set $C$ (see \\cite{Simpson:99}).\n\\end{proof}\n\nLet $(P,<)$ be a partial order. A filter $F\\neq P$ on $P$ is an upwards\nclosed non-empty subset of $P$ such that if $x,y \\in F$ then there is $z \\in F$\nsatisfying $z \\leq x$ and $z \\leq y$. A filter $F$ is an ultrafilter if\nit is a maximal filter. \n\nGiven $(M,\\scott X)$ let $P_\\scott X$ be the partial order of all unbounded sets\nin $\\scott X$ ordered by $\\subseteq$. A filter $F$ on $P_\\scott X$ is\ncomplete if for all $f : M \\to M$ coded in $\\scott X$ with a bounded\nrange there is $A \\in F$ such that $f$ is constant on $A$. Any complete filter\non $P_\\scott X$ is a nonprincipal ultrafilter on the boolean algebra $\\scott X$.\nAlso, if $\\scott X$ is an $\\omega$-model any nonprincipal ultrafilter on $\\scott\nX$ is a complete filter on $P_\\scott X$.\n\nRecall that a filter $F$ on $P_\\scott X$ is definable if for all $A \\in \\scott\nX$ $\\set{a \\in M | (A)_a \\in U} \\in \\scott X$, where $(A)_a=\\set{b \\in M |\n\\langle a,b \\rangle \\in A}$ and $\\langle \\cdot,\\cdot \\rangle$ is some canonical\nfunction coding pairs. We will, somewhat sloppily, say that a filter $U$ on\n$P_\\scott X$ is an ultrafilter if $U$ is an ultrafilter on $\\scott X$.\n\n\\begin{lem}[{\\cite{Kirby:84}}]\\label{lem:def.ar}\nIf $(M,\\scott X) \\models \\mathrm{RCA}_0$ and there is a definable ultrafilter $U$ on\n$P_\\scott X$ then $(M,\\scott X) \\models \\mathrm{ACA}_0$. \n\\end{lem}\n\\begin{proof}\nTo see this let $B = \\set{a \\in M| M \\models \\exists x \\varphi(a,x,A)}$, where\n$A \\in \\scott X$ and $\\varphi$ is $\\Delta_0^0$. Define $C = \\set{ \\langle a,b\n\\rangle | \\exists x \\mathord< b \\ \\varphi (a,x,A)} \\in \\scott X$, then $$(C)_a\n= \\set{b\\in M | \\exists x \\mathord< b \\ \\varphi (a,x,A)}$$ and thus $B = \\set{a\n\\in M| (C)_a \\in U} \\in \\scott X$ since $U$ is definable.\n\\end{proof}\n\n\\section{The construction}\\label{sec:con}\n\nWe are now in a position to start proving the following theorem. Theorem\n\\ref{maintheorem} will follow from it.\n\n\\begin{thm}\\label{mainlemma}\nIf $(M,\\scott X) \\models \\mathrm{ACA}_0$, $P_\\scott X$ has a definable complete filter $F$\nand $T \\supseteq \\mathrm{PA}$ is coded in $\\scott X$ such that $M \\models \\mathop\\mathrm{Con}_{T}$,\nthen there is an end-extension $N \\models T$ of $M$ satisfying $\\mathop\\mathrm{Cod}\\nolimits(N\/M)=\\scott\nX$.\n\\end{thm}\n\nFirst we construct the ultrapower we will use to build the model $N$.\n\nGiven the setup of Theorem \\ref{mainlemma} let $K_0$ be the model of $T$ given\nby Theorem \\ref{act} and let $\\varrho: K \\cong K_0$ be such that $M \\subseteq_e\nK$ and $\\varrho \\upharpoonright M$ is the canonical embedding of $M$ into $K_0$.\n\nLet $\\prod_\\scott{X} K$ be the set of all functions $f: M \\to K$ such that the\nfunction $\\varrho \\circ f: M \\to M$ is coded in $\\scott X$.\n\nFor any ultrafilter $U$ on $P_\\scott{X}$ define $\\prod_\\scott{X} K \/ U$ to be\nthe set of equivalence classes of the equivalence relation $\\equiv_U$ defined on\n$\\prod_\\scott{X} K$ by $f \\equiv_U g$ iff the set where $f$ and $g$ are equal,\n$\\set{a \\in M | f(a)=g(a)}$, is in $U$. The collection $\\prod_\\scott{X} K \/ U$\nof equivalence classes can be interpreted as a structure in the language of\narithmetic by the ordinary definitions of functions and relations. Let $N$\ndenote some model of the form $\\prod_\\scott{X} K \/U$, where $U$ will be\nunderstood to be an ultrafilter on $P_\\scott X$. \n\nLet $\\sigma$ be a sentence in the language $\\mathscr{L}_A(\\prod_\\scott{X} K)$, i.e. the\nlanguage of arithmetic extended with the set $\\prod_\\scott X K$ as parameters.\nThe $\\mathscr{L}_A(K)$-sentence we get by replacing all occurrences of functions $f$ by\nthe value $f(i)$ will be denoted by $\\sigma[i]$. By $[\\sigma]$ we mean the\n$\\mathscr{L}_A(N)$-sentence we get by replacing all functions $f$ by the equivalence\nclass $[f]$.\n\nThe \\L o\\'s theorem in this setting follows:\n\n\\begin{lem}\nFor any sentence $\\sigma$ of $\\mathscr{L}_A(\\prod_\\scott{X} K)$ we have $N \\models\n[\\sigma] $ iff $$ \\set{i \\in M | K \\models \\sigma[i]} \\in U.$$ \n\\end{lem}\n\nLet us embed $K$ in $N$ via the canonical embedding $F: K \\to N$, $F(a) =\n[f_a]$, where $f_a(b)=a$ for all $b \\in M$. We will identify $a \\in K$ with\n$F(a) \\in N$ making $K$ a substructure of $N$. In fact \\L o\\'s theorem gives us\nthat that $K \\prec N$ and thus that $N \\models T$. \n\nLet us summarize. We have $M \\subseteq_e K \\prec N$, where $K \\models T$ and\nthere is a model $K_0$ with the same domain as $M$ such that $\\mathop\\mathrm{Th}(K_0,a)_{a \\in\nK_0}$ is coded in $\\scott X$ and $\\varrho : K \\to K_0$ is an isomorphism. \n\n\\begin{lem}\\label{complete}\nIf $U$ is complete then $M \\subseteq_e N$.\n\\end{lem}\n\\begin{proof}\nLet $[f] \\in N$ be such that $N \\models [f] < a$, $a \\in M$. Take $g \\in [f]$\nsuch that $g(b) < a$ for all $b \\in M$. Observe that the function $\\varrho\n\\upharpoonright M : M \\to M$ is coded in $\\scott X$ and that $g(M) \\subseteq M$.\nSince $g(M)$ is bounded in $M$ so is $\\varrho(g(M))$.\n\nNow $\\varrho \\circ g : M \\to M$ has bounded range and thus, by the completeness\nof $U$, there is $A \\in U$ such that $\\varrho (g(A))=\\set{b}$, $b \\in M$.\nTherefore $N \\models [f]=[g] = \\varrho^{-1}(b)$ and thus $[f] \\in M$.\n\\end{proof}\n\n\\begin{lem}\\label{lem2}\nFor any complete ultrafilter $U$ on $P_\\scott X$, $\\scott X \\subseteq\n\\mathop\\mathrm{Cod}\\nolimits(N\/M)$.\n\\end{lem}\n\\begin{proof}\nGiven $A \\in \\scott{X}$ we will find $[f] \\in N$ such that $[f]$ codes $A$,\ni.e., $N \\models a \\in [f]$ iff $a \\in A$, for all $a \\in M$.\n\nLet $f(a)$ be the least code in $M$ of the bounded set $A \\cap I_{\\mathord