The codifferent of a KK is

OK∨={a∈K:Tr⁡K/Q(ab)∈Z for all b∈OK}.\mathcal O_K^\vee=\{a\in K:\operatorname{Tr}_{K/\mathbb Q}(ab)\in\mathbb Z\text{ for all }b\in\mathcal O_K\}.

It is the trace-dual lattice of OK\mathcal O_K, also denoted DK−1\mathfrak D_K^{-1}.

Trace-dual basis

For an integral basis b1,…,bmb_1,\ldots,b_m, the nondegenerate trace pairing gives a unique rational basis b1∨,…,bm∨b_1^\vee,\ldots,b_m^\vee with Tr⁡(bi∨bj)=δij\operatorname{Tr}(b_i^\vee b_j)=\delta_{ij}. The codifferent is their integer span. This is the basis realization of through the trace pairing.

Clearing denominators

Integrality of traces gives OK⊆OK∨\mathcal O_K\subseteq\mathcal O_K^\vee. Since its basis lies in KK, some integer N≥1N\geq1 satisfies NOK∨⊆OKN\mathcal O_K^\vee\subseteq\mathcal O_K. These inclusions allow equivalent ergodicity tests with integral coefficients, though the complete character lattice is still the codifferent.

Gaussian integers

For K=Q(i)K=\mathbb Q(i), testing against 1,i1,i gives OK∨=12Z[i]\mathcal O_K^\vee=\tfrac12\mathbb Z[i]. The codifferent need not equal the ring of integers.

References
  1. Keith Conrad, The Different Ideal. Definition 3.2, Theorem 3.4, and §4.