TITLE: Is the discriminant of a free (as a module) $R$-algebra always congruent to a square modulo 4?
QUESTION [12 upvotes]: Let $R$ be a commutative ring. Let $A$ be an $R$-algebra (i.e., an $R$-module
  equipped with an $R$-bilinear multiplication map that turns $A$ into a unital
  ring). We do not require $A$ to be commutative. Assume that $A$ is free as an $R$-module, with a finite basis. Let
  $\left(  e_{1},e_{2},\ldots,e_{n}\right)  $ be a basis of the $A$-module $R$.
We define a trace map $\operatorname{Tr}_{A/R}:A\rightarrow R$ as
  follows: For every $b\in A$, we let $\operatorname{Tr}_{A/R}b$ be
  the trace of the endomorphism $A\rightarrow A,\ a\mapsto ba$ of the $R$-module
  $A$. (We are using the fact that $A$ has a finite basis here.) Clearly, the
  map $\operatorname{Tr}_{A/R}$ is $R$-linear.
Let $\Delta=\det\left(  \left(  \operatorname{Tr}_{A/R}\left(
e_{i}e_{j}\right)  \right)  _{1\leq i\leq n,\ 1\leq j\leq n}\right)  \in R$.
Is it true that $\Delta=u^{2}+4v$ for some elements $u$ and $v$ of $R$ ?


The above is an elaborate generalization of Stickelberger's discriminant
theorem. Indeed, if we assume $A$ to be commutative, then $\Delta
=u^{2}+4v$ is true; this is proven in Remark 5.4 of Owen Biesel, Alberto
Gioia, A new discriminant algebra construction, arXiv:1503.05318v3,
Documenta Mathematica 21 (2016), pp. 1051--1088. (More precisely, they
prove it in the case when $n\geq2$; but the remaining case is obvious.) If we
furthermore assume that $R=\mathbb{Z}$ and $A$ is the integer ring of a number
field $K$, then $\Delta$ becomes the discriminant $\Delta_{K}$ of $K$, and the
$\Delta=u^{2}+4v$ claim becomes $\left(  \Delta_{K}\equiv0 \mod %
4\ \vee\ \Delta_{K}\equiv1 \mod 4\right)  $, which is the
classical claim of Stickelberger's discriminant theorem.
The claim does not significantly depend on the choice of basis $\left(
e_{1},e_{2},\ldots,e_{n}\right)  $, since any change of basis causes $\Delta$
to be multiplied by a square in $R$ (namely, by the square of the determinant
of the matrix responsible for the change of basis... or of its inverse,
depending on how you define that matrix).
I do not know whether to expect the conjecture to be true or not. All examples
I have tried (the complexity of computing $\Delta$ for high $n$ limits my
abilities here) satisfy $\Delta=u^{2}+4v$ for rather stupid reasons (often,
$\Delta$ will either be a square or be divisible by $4$ to begin with); but
this says more about the poverty of my examples than about the correctness of
the conjecture. For what it's worth, here are my examples:

If $A$ is the group ring of a group $G$, and $\left(e_1, e_2, \ldots, e_n\right)$ is the standard basis $G$ of $A$ (abusing notation as usual), then $\Delta = \left(-1\right)^{n\left(n-1\right)/2} n^n$. This is either of the form $4v$ or of the form $1+4v$; thus, the conjecture holds here.
If $A$ is the matrix ring $R^{m\times m}$ (so that $n=m^2$), and $\left(e_1, e_2, \ldots, e_n\right)$ is the basis consisting of the matrix units in their usual order, then $\Delta = \left(-1\right)^{m\left(m-1\right)/2} m^n$. This is either of the form $4v$ or of the form $1+4v$; thus, the conjecture holds here.
If $A$ is the (standard) quaternion algebra, then $\Delta = -4^4$; thus, the conjecture holds here. Other quaternion algebras may have different $\Delta$, but the factor $4^4$ will still be present.

Notice that the trace map $\operatorname{Tr}_{A/R}$ defined above
has a "right analogue": the map $\operatorname{Tr}_{A/R}^{\prime
}:A\rightarrow R$ sending each $b\in A$ to the trace of the endomorphism
$A\rightarrow A,\ a\mapsto ab$ of the $R$-module $A$. If we do not require
commutativity of $A$, these maps will in general not be identical (for a
specific example, extend a left-trivial semigroup by a $1$ to obtain a
monoid, then take the monoid algebra of this monoid).
I do not know whether the $\Delta$ computed via the other map will be different; this is another interesting question.

REPLY [3 votes]: I see this question is still being viewed. To avoid misleading anyone, let me put a placeholder answer here: The question has been answered positively (with a beautiful proof) by John Voight, Asher Auel and Owen Biesel, who have submitted their proof to the Amer. Math. Monthly and will probably put it on the arXiv once the refereeing process is done.