Let $X$ be an irreducible smooth projective curve of genus $g \geq 2$ over $\mathbb{C}$. Let $G$ be a connected reductive affine algebraic group over $\mathbb{C}$. Let $\mathcal{M}_{G,Higgs}^s$ (resp., $\mathcal{M}_{G,Higgs}^{ss}$) be the moduli space of stable (resp., semistable) principal $G$Higgs bundles on $X$. Is it correct that the codimension of the complement of $\mathcal{M}_{G,Higgs}^s$ inside $\mathcal{M}_{G,Higgs}^{ss}$ has codimension at least $2$? Can anyone give reference for this? Is it true that the same holds for the case of moduli stack of $G$Higgs bundles also?

$\begingroup$ Just as a word of warning, though not an answer, sometimes every semistable object is stable. This happens for example considering rank r holomorphic bundles with degree d where d and r are coprime. This concerns unitary groups, which are not affine, hence is not an answer. But, it elucidates that not fixing the degree could be a tricky point. Probably the "right" general question is about the moduli stack, but I'm not the right person to understand what codimension means in that setting... $\endgroup$ – Andy Sanders Apr 22 '19 at 16:02

$\begingroup$ @AndySanders thanks for the comment. One need to fix a topological type of $G$Higgs bundles, which are parametrized by elements of $\pi_1(G)$. $\endgroup$ – user124771 Apr 23 '19 at 7:48

$\begingroup$ @AndySanders dimension of a stack can be defined by choosing smooth atlas of the stack by schemes, note that those are representable morphisms. One need to check that this does not depend on the choice of smooth atlases! Once dimension is defined, coimension of the complement of a substack can also be defined. $\endgroup$ – user124771 Apr 23 '19 at 7:51
As far as I know this is an open problem outside the case $G=GL_n(\mathbb{C})$ or $G=SL_n(\mathbb{C})$.
In those cases, work of Simpson (Moduli of representations of the fundamental group of a smooth projective variety II, Publications Mathématiques de l'IHÉS, Volume 80 (1994), p. 579) implies the moduli spaces of Higgs bundles is normal (he proved it for $G=GL_n(\mathbb{C})$, but his proof works for $G=SL_n(\mathbb{C}$)). Hence, the singular locus is in codimension at least 2 (as is clear from the reference, I am considering the case of trivial topological type here; that is, bundles with vanishing rational Chern classes).
But in those cases I believe the stable locus is the smooth locus. It is wellknown that the stable $GL_n(\mathbb{C})$ or $SL_n(\mathbb{C})$Higgs bundles are smooth points. The converse should follow since the underlying holomorphic principal bundle is singular except in the $g=2=n$ case (and in that case the strictly polystable Higgs bundles should be seen to be singular directly).
For general complex reductive $G$, I believe that Simpson's normality result generalizes (although it is open presently). However, in general, the stable locus is not always the smooth locus (there can be orbifold singularities in the stable locus). So to establish the codimension result along the same lines as above you would have to consider the orbifold singular locus in the stable locus. But there should be a proof of the codimension result from this pointofview regardless.
In fact, I believe the following stronger result holds: the codimension of the stable locus for $G$Higgs is $\geq 2(g1)$ for a Riemann surface of genus $g\geq 2$. Here is a rough outline why:
 Let $N$ be the $G$principal bundles and $M$ the $G$Higgs and put a $*$ on each for stable subspace. The smooth locus of $N$ is open and dense and the cotangent bundle of the smooth locus is contained in $M$ as an open dense subset. So $\dim M=2\dim N$
 The complement $NN^*$ consists of polystable and not stable bundles and so correspond to a direct sum of stable subbundles. This locus is stratified by smooth subspaces and so the top strata determines the dimension. Call this strata $S$. Then the cotangent bundle of $S$ should determine the dimension of $MM^*$. Therefore, $\dim(MM^*)=2\dim(NN^*)$.
 We have by a theorem of Biswas, Hoffmann $\mathrm{codim}(NN^*) \geq g1$ which implies $\dim(N)\dim(NN^*)\geq g1$ which implies $2\dim(N)2\dim(NN^*)\geq 2(g1)$ which implies $\mathrm{codim}(MM^*) \geq 2(g1).$ And so we have the codimension is $\geq 2$ if $g\geq 2$.
Step 2 is not obvious since a strictly semistable principal bundle may admit a nonzero Higgs field which make it stable. But I believe the dimension will be right regardless (unless I am missing something Steps 1 and 3 are correct though).

$\begingroup$ Dear Prof. Sean Lawton, thanks for the steps of arguments. Yes, I also think that Step 2 will be nontrivial to proof. Is there any known description of the maximal dimensional strata S, which may be useful for dimension computation? I guess, it is not known. $\endgroup$ – user124771 Apr 23 '19 at 14:29

$\begingroup$ I think, only regularly stable locus is smooth; so stable bundle which is not regularly stable, will give orbifold singularity. $\endgroup$ – user124771 Apr 23 '19 at 14:31

$\begingroup$ If I had a reference for Step 2, I would have given it. As I hoped was clear, this is only a heuristic argument with some references. Yes, you are right that there can be orbifold singularities in the stable locus (as I mentioned). $\endgroup$ – Sean Lawton Apr 23 '19 at 15:00