I am trying to understand the details behind the so-called "distribution relations" between Heegner points on the modular curve $X_0(N)$, as given (for instance) in Gross's paper *Kolyvagin's work on modular elliptic curves*, [Proposition 3.7, (i)]. More precisely, the relation between Hecke and Galois actions on CM-points is still not clear for me. First of all let me recall in details the general settings, which the familiar reader can skip and go directly to the question.

**Settings**:
Let $N$ be a positive integer, let $K$ be an imaginary quadratic field of discriminant $D<0$ such that every rational prime divisor of $N$ splits in $K$ (the so-called Heegner hypothesis). The Heegner hypothesis implies that one can find a (non-unique) ideal $\mathcal{N}$ of $\mathcal{O}_K$ such that $\mathcal{O}_N/\mathcal{N}\simeq \mathbb{Z}/N\mathbb{Z}$.

**Edit:** As noticed by Olivier I also have to assume $D<-4$, to ensure that $\mathcal{O}_K^{\times}=\{\pm 1\}$.

For a general $n$, denote by $\mathcal{O}_n=\mathbb{Z}+n\mathcal{O}_K\subset\mathcal{O}_K$ "the" order of $K$ of conductor $n$, and let $Pic(\mathcal{O}_n)$ be the ideal class group of $\mathcal{O}_n$ (which is isomorphic to $I(n)/P(n)$, with $I(n)$ the group of ideals in $\mathcal{O}_K$ that are prime to $n$; and $P(n)$ the subgroup of principal ideals in $\mathcal{O}_K$ generated by an element congruent mod $n\mathcal{O}_K$ to some $r\in\mathbb{Z}$, $(r,n)=1$). Class-field theory provides us with an abelian extension $K_n$ of $K$ such that $\mathrm{Gal}(K_n/K)\simeq Pic(\mathcal{O}_n)$.

Let now $n$ be an integer prime to $ND$. Setting $\mathcal{N}_n:=\mathcal{N}\cap\mathcal{O}_n$, we get that $\mathcal{O}_n/\mathcal{N}_n\simeq \mathcal{O}_K/\mathcal{N}\simeq \mathbb{Z}/N\mathbb{Z}$. One can thus define a point $x_n\in X_0(N)$ by setting $$x_n=[\mathbb{C}/\mathcal{O}_n\rightarrow \mathbb{C}/\mathcal{N}_n^{-1}]$$ (here $[E\rightarrow E']$ denotes the isomorphism class of the pair $(E,E')$ of elliptic curves, with $E\rightarrow E'$ a cyclic $N$-isogeny).

If $l$ is a rational prime not dividing $ND$ nor $n$, we can mimic the previous discussion and set $$x_{nl}=[\mathbb{C}/\mathcal{O}_{nl}\rightarrow \mathbb{C}/\mathcal{N}_{nl}^{-1}]$$ The theory of complex multiplication ensures that $x_n\in X_0(N)(K_n)$ (resp. $x_{nl}\in X_0(N)(K_{nl})$ )

**Here comes my question**: assuming $l$ is inert in $K/\mathbb{Q}$, why do we have
$$\mathrm{Tr}_{K_{nl}/K_n}x_{nl}:=\sum_{\sigma\in\mathrm{Gal}(K_{nl}/K_n)}\sigma x_{nl} = T_l x_n$$
as divisors on $X_0(N)$ ?

What I "understood" is that:

- For $\sigma\in \mathrm{Gal}(K_{nl}/K)$, the action of $\sigma$ on $x_{nl}$ is given by
$\sigma x_{nl}=[\mathbb{C}/\mathfrak{a}_{\sigma}^{-1}\rightarrow \mathbb{C}/\mathfrak{a}_{\sigma}^{-1}\mathcal{N}_{nl}^{-1}]$

where $\mathfrak{a}_{\sigma}$ is any (proper) ideal of $\mathcal{O}_{nl}$ such that $[\mathfrak{a}_{\sigma}]\in Pic(\mathcal{O}_{nl})$ corresponds to $\sigma$ via the isomorphism $\mathrm{Gal}(K_{nl}/K)\simeq Pic(\mathcal{O}_{nl})$. Thus the sum $\mathrm{Tr}_{K_{nl}/K_n}x_{nl}$ rewrites as

$$\sum_{\sigma\in\mathrm{Gal}(K_{nl}/K_n)}[\mathbb{C}/\mathfrak{a}_{\sigma}^{-1}\rightarrow \mathbb{C}/\mathfrak{a}_{\sigma}^{-1}\mathcal{N}_{nl}^{-1}]$$ Here the condition $\sigma\in\mathrm{Gal}(K_{nl}/K_n)$ implies, I think, that $\mathfrak{a}_{\sigma}\mathcal{O}_n$ is a principal $\mathcal{O}_n$-ideal.

Here $\mathrm{Gal}(K_{nl}/K_n)\simeq \mathbb{F}_{l^2}^{\times}/\mathbb{F}_{l}^{\times}$, so the sum has $l+1$ terms.

- The action of the Hecke operator $T_l$ ($l$ not dividing $N$) on divisors of the modular curve $X_0(N)$ can be described (at least in characteristic $0$) as
$$T_l [E\xrightarrow{\phi} E']=\sum_{C\subset E[l], \#C=l} [E/C\rightarrow E'/\phi(C)]$$
(there are $l+1$ such $C$)
In my situation, this can be rewritten (following Gross,
*Heegner points on $X_0(N)$*, §6) as $$T_l x_n=\sum_{\mathfrak{b}\subset\mathcal{O}_n\text{lattice of index } l}[\mathbb{C}/\mathfrak{b}\rightarrow \mathbb{C}/\mathfrak{b}(\mathcal{N}_n\cap End(\mathfrak{b}))^{-1}] $$

**What I don't understand** is why the exactly the same terms should appear in both sums. I get that $(id)x_{nl}=x_{nl}$ appears in $T_l x_n$, as $\mathcal{O}_{nl}$ is a sub-lattice of order $l$ in $\mathcal{O}_n$ with $End(\mathcal{O}_{nl})=\mathcal{O}_{nl}$, but I don't see why $\mathfrak{a}_{\sigma}^{-1}$ is a sublattice of order $l$ in $\mathcal{O}_n$ if $\sigma$ fixes $K_n$.
I think this involves properties about fractional ideals of orders which I don't quite understand.

I thank everyone taking the time to read this question and trying to provide me with any help !