# Complex Conjugation

Let $A$ be an étale algebra over ${{\Bbb Q}}$ with components $K_1\times\cdots\times K_n$. We say that $A$ is a *CM-étale algebra* if every component $K_i$ is a CM-field, that is, $K_i$ has an involution that acts as applying complex conjugation after applying any homomorphism to the complex numbers. If $A$ is a CM-étale algebra, then it has an involution with the same property. For this reason, we call this involution *complex conjugation* and denote it as $\overline{\cdot}$.

Given an element of $A$, an order or a fractional ideal in $A$, we say that it is *conjugate stable* if it equals its complex conjugate. An element $x$ of $A$ is called *totally real* if $x=\overline{x}$ and *totally imaginary* if $x=-\overline{x}$. A totally real element $a$ is called *totally positive* (resp. *totally negative*) if $\varphi(a) > 0$ (resp. $\varphi(a)<0$) for every homomorphism $\varphi: A \to {\Bbb C}$.

## `HasComplexConjugate(A): AlgEtQ -> BoolElt`

Returns if the algebra $A$ is the product of CM fields.

## `ComplexConjugate(x): AlgEtQElt -> AlgEtQElt`

If the algebra $A$ of the element $x$ is a product of CM fields, it returns the complex conjugate of the argument.

## `IsConjugateStable(O): AlgEtQOrd -> BoolElt, AlgEtQOrd`

Given an order $O$ in a CM-étale algebra, it returns whether $O$ is conjugate stable and the complex conjugate.

## `ComplexConjugate(O): AlgEtQOrd -> AlgEtQOrd`

Given an order $O$ in a CM-étale algebra, it returns the complex conjugate of $O$.

## `IsConjugateStable(I): AlgEtQIdl -> BoolElt, AlgEtQIdl`

Given a fractional ideal $I$ in a CM-étale algebra, it returns whether $I$ is conjugate stable and the complex conjugate. Note: if the order of $I$ is not conjugate stable, then the second output will be defined over the complex conjugate of the order.

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

If $A$ is a product of CM fields, it returns the complex conjugate of the fractional ideal $I$. Note: if the order of $I$ is not conjugate stable, then the output will be defined over the complex conjugate of the order.
