For
[Edit: Attempted to clarify arguments to facilitate comparison with Tamas' enlightening answer.]
First I would like to claim that for any proper smooth variety $X$ there's a tautological construction of group, or more generally topological space/homotopy type X,we can make a "Quillen line bundle $L_V$ on the moduli $M$ of G-local systems on over the character variety, attached to a choice of representation $V$ of G" in the following sense.Namely take Let's consider all representations of the universal G-bundle group (or local systems on X) with the product $M\times X$, which has a flat connection along condition that their Ext from the fibers of $$\pi:M\times X\to M,$$ and let $E_V$ be trivial representation (ie global cohomology/Ext from the corresponding vector bundle associated trivial local system) is a perfect complex. This certainly applies to finite rank local systems on a compact manifold, as in the principal G-bundle case in question. More generally given a group G and a representation $V$. We may now V we can consider all G-local systems with the line bundle $$L_V=\det(R\pi_\ast E_V)$$ same condition on $M$, the determinant of the relative de Rham cohomology associated local system of $E_V$. Concretely, for any fixed point vector spaces in $M$ the representation V. (ie G-local system on X) we calculate In our case we'll take the complex of cohomologies adjoint representation of $X$ with coefficients in an algebraic group and the corresponding local systems on Riemann surfaces).
Now for each such local system in representation $V$, and take we get a canonically attached line, the determinant line of this perfect complex (alternating product of top exterior products of the cohomology groups)(Ext) complex in question.
For example it's
Next, there's a natural to take $V$ to be moduli stack of local systems (or G-local systems) of theadjoint representation above form -though any otherrepresentation gives - for a line bundle which is some rational power of compact manifold this (is just the key word being "Dynkin indexassociated "of character variety", or rather the representation)underlying derived stack. In the case other words, there's a natural notion of curves you recover the Quillen line bundle (algebraic family of local systems on X or as Kevin points outrepresentations of our group. (Concretely it's characterized I believe by asking traces of monodromies to be algebraic functions).Abstractly, in the pullback G-case it's the stack $BG^X$, the derived mapping stack from X to the classifying space of stable G-bundles = compact group local systems to complex group local systems of what's usually known $G$ --- i.e., families over a base $S$ are given by maps from $$S\times X\to BG$$where it's crucial that we consider X as a homotopy type (simplicial set), not a variety!!
This is the Quillen line bundle)Betti space of X.
EDIT: I'd appreciate it if someone could help resolve The claim is the apparent contradiction between my answer and Tamas'. I can imagine there's above lines naturally form an issue of stack vs GIT algebraic line bundle on this moduli spaceor of algebraic vs analytic (or me being careless .
[There's a claim I'm not too comfortable with stacky versions that the choice of things). In any case here's what I thought I understood:
The moduli stack representaiton of flat G-bundles is a twisted cotangent our group $G$ doesn't affect the line bundle of except up to a rational power, related to the moduli stack ratio of G-bundleDynkin indices, twisted by though I don't think it's necessary for this discussion.]
Now the determinant line bundle on question is how does this compare (in the latter.
This identification holds case of a Riemann surface X - again considered just as algebraic symplectic spacesa topological space, where in fact a $K(\pi,1)$) to the formerhas Quillen construction?By the Goldman form and Riemann-Hilbert correspondence the latter above moduli stack is identified with the tautological form moduli of flat G-bundles on the algebraic curve X (as a twisted cotangent bundlederived ANALYTIC stacks), though not algebraically. (Here I'm claiming also However it seems clear that the analytic identification line bundle we defined (hopefully) above agrees with the determinant line of Betti and de Rham spacesis symplectic wrt their natural algebraic symplectic forms)cohomology of the universal connection on the moduli space times X.
The (i.e. Riemann-Hilbert preserves Ext from the trivial local system).
Moreover the de Rham space carries a holomorphic symplectic form which agrees with the one defined on a twisted cotangent bundle the Betti space by the intersection pairing on the curve.
So where is the curvature contradiction with Tamas' very clear counterexample?The symplectic form of thetautological connection on the pullback de Rham space can be described as the curvature of the twisting line bundleto , which is pulled back from the total space.
Finally determinant line bundle (and maybe here's the rub?) the pullback of the ie determinant of Dolbeault cohomologyline bundle ) on the moduli of G-bundles (the de Rham space is a twisted cotangent bundle of the latter moduli, twisted exactly by this bundle). So maybe that line bundle is NOT the same as the determinant of de Rham cohomology line bundle, as I always naivey assumed.
Otherwise it seems we've constructed an algebraic line bundle on the moduli of flat G-bundlesBetti space, identified by Riemann-Hilbert with the algebraic line bundle on the de Rham spacewhose curvature is the symplectic form... very confusing.