Why is the index map on the Hecke algebra $\mathcal{H}(G,H,1_H)$ an algebra homomorphism? Suppose $H\leq G$ are finite groups, $k$ a splitting field for $G$, and $\mathcal{H}(G,H,1_H)=ekGe$ the corresponding Hecke algebra, where $e=\frac{1}{|H|}\sum_{h\in H}h$ is the idempotent corresponding to the trivial character $1_H$ on $H$.
Let $\{D_j\}_{j\in J}$ be the set of $(H,H)$ double cosets in $G$. It's known $\mathcal{H}$ has a standard basis $\{a_j\}$ where
$$
a_j=\frac{1}{|H|}\sum_{x\in D_j}x.
$$
The index map $\operatorname{ind}\colon\mathcal{H}\to k$ is defined by $\operatorname{ind}(a_i):=[H:H\cap x_iHx_i^{-1}]=[D_i:H]=\operatorname{ind}(x_i)$, where $x_i$ is any representative of $D_i$. This gives a $k$-linear map, but why does it also give a $k$-algebra morphism?
We have 
$$
a_ia_j=\sum_k\mu_{ijk}a_k
$$
where the structure constants are $\mu_{ijk}=|H|^{-1}|D_i\cap x_kD_j^{-1}|$.
So showing $\operatorname{ind}(a_ia_j)=\operatorname{ind}(a_i)\operatorname{ind}(a_j)$ should amount to
$$
\operatorname{ind}(x_i)\operatorname{ind}(x_j)=|H|^{-1}\sum_k|D_i\cap x_kD_j^{-1}|\operatorname{ind}(x_k)
$$
or equivalently,
$$
[D_i:H][D_j:H]=|H|^{-1}\sum_k |D_i\cap x_kD_j^{-1}|[D_k:H].
$$
Cancelling any $|H|^{-2}$ from both sides gives
$$
|D_i||D_j|=\sum_k|D_i\cap x_kD_j^{-1}||D_k|
$$
but I don't know why these equations should be true.
 A: There is a multiplication map $m\colon D_i\times D_j\to G:(d_i,d_j)\mapsto d_id_j$. Note that $|D_i\cap x_jD_j^{-1}|$ counts the number of pairs $(d_i,d_j)$ such that $d_id_j=x_k$, as this relation can be rewritten as $d_i=x_kd_j^{-1}\in D_i\cap x_kD_j^{-1}$, and any such element of $D_i\cap x_kD_j^{-1}$ gives a pair $(d_i,d_j)\in D_i\times D_j$ such that $d_id_j=x_k$. 
Also, if $h_1x_kh_2\in D_k$, and there is a pair $(d_i,d_j)$ such that $d_id_j=h_1x_kh_2$, then $(hh_1^{-1}d_i,d_jh_2^{-1}h')$ maps to 
$$
hh_1^{-1}d_id_jh_2^{-1}h'=hh_1^{-1}h_1x_kh_2h_2^{-1}h'=hx_kh'.
$$
As $hx_kh'$ is an arbitrary element of $D_k$, and $D_i$ and $D_j$ are invariant under left and right translation by elements of $H$, it follows that if the image $m$ hits any point of $D_k$, it contains all of $D_k$. 
Moreover, the number of preimages under $m$ of any point of $D_k$ is the same. For suppose $|D_i\cap x_kD_j^{-1}|=n$, and $(a_1,b_1),\dots,(a_n,b_n)$ are the $n$ preimages of $x_k$. If $hx_kh'\in D_k$, then $(ha_r,b_rh')$ are $n$ distinct preimages of $hx_kh'$, so $hx_kh'$ has at least $n$ preimages.
If $(c,d)$ is any preimage of $hx_kh'$, then $(h^{-1}c,dh'^{-1})$ is a preimage of $x_k$, hence $(h^{-1}c,dh'^{-1})=(a_r,b_r)$ for some $r$. So $c=ha_r$ and $d=b_rh'$, implying it is one of the preimages already listed above, so $hx_kh'$ also has exactly $n$ preimages. 
As the double cosets partition $G$, every pair $(d_i,d_j)$ must land in a unique $D_k$. Then each element of $D_k$ has $|D_i\cap x_kD_j^{-1}|$ preimages. From the above observations,
$$
|D_i\times D_j|=\sum_k |D_i\cap x_kD_j^{-1}||D_k|,
$$
giving the last desired equation.
