# Trace and Norm

Let $A$ be an étale algebra over ${{\Bbb Q}}$, with components $K_1\times\cdots\times K_n$. We define the *(absolute) trace* on $A$ as the additive map ${\rm Tr_{A/{{\Bbb Q}}}}\colon A\to {{\Bbb Q}}$ that sends an element $a\in A$ to $\sum_{i=1}^n {\rm Tr}_{K_i/{{\Bbb Q}}}(a)$. Let $m_a$ be the matrix representing the multiplication-by-$a$ on $A$ with respect to any basis of $A$ over ${{\Bbb Q}}$. Then ${\rm Tr}_{A/{{\Bbb Q}}}(a)$ equals the trace of $m_a$.

We define the *(absolute) norm* on $A$ as the multiplicative map ${\rm N}_{A/{{\Bbb Q}}}\colon A \to {{\Bbb Q}}$ by sending a unit $a \in A$ to $\prod_{i=1}^n {\rm N}_{K_i/{{\Bbb Q}}}(a)$ and every zero-divisor to $0$. We have $N_{A/{{\Bbb Q}}}(a)$ equals the determinant of the matrix $m_a$.

## `Trace(x): AlgEtQElt -> FldRatElt`

Returns the trace of the element $x$ of an étale algebra.

## `Norm(x): AlgEtQElt -> FldRatElt`

Returns the norm of the element $x$ of an étale algebra.

## `AbsoluteTrace(x): AlgEtQElt -> FldRatElt`

Returns the absolute trace of the element $x$ of an étale algebra. Since the étale algebra is over the rationals this is the same as `Trace`.

## `AbsoluteNorm(x): AlgEtQElt -> FldRatElt`

Returns the absolute norm of the element $x$ of an étale algebra. Since the étale algebra is over the rationals this is the same as `Norm`.

## `TraceDualIdeal(I): AlgEtQIdl -> AlgEtQIdl`

Returns the trace dual ideal of the ideal $I$, that is, the set of elements $x$ of the algebra such that ${\operatorname{Tr}}(x \cdot I)$ is integer-valued.

Let $I$ be an order or a fractional ideal in an étale algebra $A$ over ${{\Bbb Q}}$. We defined the *trace dual ideal* of $I$ as $I^t=\{ a\in A : {\rm Tr}_{A/{{\Bbb Q}}}(a\cdot I) \subseteq {{\Bbb Z}}\}$. For fractional ideals $I$ and $J$ and a unit $a\in A$, we have:

**(a)**
if $I \subseteq J$ then $J^t \subseteq I^t$ and $\#(J/I) = \#(I^t/J^t)$;

**(b)**
$(aI)^t = {1\over a}I^t$;

**(c)**
$(I+J)^t = I^t \cap J^t$;

**(d)**
$(I\cap J)^t = I^t + J^t$;

**(e)**
$(I:J)^t = I^t\cdot J$.

## `TraceDualIdeal(O): AlgEtQOrd -> AlgEtQIdl`

Returns the trace dual ideal of an order in an étale algebra, that is, the set of elements $x$ of the algebra such that ${\operatorname{Tr}}(x \cdot O)$ is integer-valued.
