A theorem of Hecke (discussed in [this question](https://mathoverflow.net/questions/12352))
shows that if $L$ is a number field, then the image of the
different $\mathcal D\_L$ in the ideal class group of $L$ is a square.


Hecke's proof, and all other proofs that I know, establish this essentially by
evaluating all quadratic ideal class characters on $\mathcal D\_L$ and showing
that the result is trivial; thus they show that the image of $\mathcal D\_L$
is trivial in the ideal class group mod squares, but don't actually exhibit a square root
of $\mathcal D\_L$ in the ideal class group.


Is there any known construction (in general, or in some interesting cases) of an ideal
whose square can be shown to be equivalent (in the ideal class group) to $\mathcal D\_L$.


Note: One can ask an analogous question when one replaces the rings of integers by
Hecke algebras acting on spaces of modular forms, and then in some situations I know
that the answer is *yes*. (See [this paper](http://www.math.northwestern.edu/~emerton/pdffiles/two.pdf).) This gives me some hope that there might be a construction in
this arithmetic context too. (The parallel between Hecke's context (i.e. the number
field setting) and the Hecke algebra setting is something I learnt from Dick Gross.)


Added: Unknown's very interesting comment below seems to show that the answer is "no",
if one interprets "canonical" in a reasonable way.  In light of this, I am going to ask another question which is a tightening of this one. 


On second thought: Perhaps I will ask a follow-up question at some point, but I think I need more time to reflect on it. In the meantime, I wonder if there is more that one can say about this question, if not in general, then in some interesting cases.



Does (the ideal class of) the different of a number field have a canonical square root?
The following example shows that, in its strongest form, the answer to Professor Emerton's question is no. This answer is essentially an elaboration on what is already in the comments.


Let $p \equiv q \equiv 5 \pmod 8$. Let $K/\mathbb{Q}$ be a cyclic
extension of degree four totally ramified at $p$ and $q$ and unramified
everywhere else (it exists). To make life easier, suppose that the $2$-part of the class
group of $K$ is cyclic.
The Galois group of $K$ is
$G = \mathbb{Z}/4 \mathbb{Z}$.
Let $C$ denote the class group of $K$. I claim that $C^G$ is cyclic
of order two. Since the $2$-part of $C$ is cyclic, 
this is equivalent to showing that $C\_G$ is cyclic of order two.
By class field theory, $C\_G$ corresponds to a Galois extension
$L/\mathbb{Q}$ unramified everywhere over $K$ such that there is an exact sequence


$$1 \rightarrow C\_G \rightarrow \mathrm{Gal}(L/\mathbb{Q})
\rightarrow \mathbb{Z}/4 \mathbb{Z} \rightarrow 1.$$


If $\Gamma$ is any finite group with center $Z(\Gamma)$, then an easy
exercise shows that $\Gamma/Z(\Gamma)$ is cyclic only if it is trivial.
We deduce that $L$ is the genus field of $K$. 
There is a degree four extension $M/L$ contained inside the cyclotomic field
$\mathbb{Q}(\zeta\_p,\zeta\_q)$ that is unramified over $K$ at all finite
primes. However, the congruence conditions on $p$ and $q$ force $K$ to be
(totally) real and $M$ (totally) complex. Thus $M/K$ is ramified at
the infinite primes, and $C\_G = \mathbb{Z}/2\mathbb{Z}$, and the claim is established.


We note, in passing, that $L = K(\sqrt{p}) = K(\sqrt{q})$.


Suppose there
exists a *canonical* element $\theta \in C$ such that $\theta^2 = \delta\_K$,
where $\delta\_K$ is the different of $K$.
The different $\delta\_K$ is invariant under $G$. If $\theta$ is
canonical in the strongest sense then it must also be invariant under $G$. In particular,
the element $\theta \in C^G$ must have order dividing two, and hence $\theta^2 = \delta\_K$
must be trivial in $C$. We conclude that if $\delta\_K$ is not principal,
no such $\theta$ exists.


It remains to show that there exists primes $p$ and $q$ such that
$\delta\_K$ is not principal and the $2$-part of $C$ is cyclic. A computation shows this is so for
$p = 13$ and $q = 53$. For those playing at home, $K$ can be taken to be
the splitting field
of 
$$x^4 + 66 x^3 + 600 x^2 + 1088 x - 1024,$$
where $C = \mathbb{Z}/8 \mathbb{Z}$ and $\delta\_K = [4]$. $C$ is generated by (any) prime
$\mathfrak{p}$ dividing $2$, and $G$ acts on $C$ via the quotient $\mathbb{Z}/2\mathbb{Z}$, sending $\mathfrak{p}$ to $\mathfrak{p}^3$.


