# Homomorphisms

## `HomsToC(A): AlgEtQ -> SeqEnum[Map]`

```magma
Precision: RngIntElt                    Default: Precision(GetDefaultRealField())
```

Returns the sequence of homomorphisms from the algebra $A$ to a complex field ${{\Bbb C}}$. The precision of ${{\Bbb C}}$ is given by the optional parameter `Precision`. The default value is 30.

## `Example: Homs To C Example (ex-58e95c)`

```magma
> _<x> := PolynomialRing(Integers());
> A := EtaleAlgebra(x^2+2);
> homs := HomsToC(A : Precision := 30);
> #homs;
2

```

## `Hom(A, B, img): AlgEtQ, AlgEtQ, SeqEnum[AlgEtQElt] -> Map`

```magma
CheckMultiplicative: BoolElt                    Default: false
CheckUnital        : BoolElt                    Default: false
ComputeInverse     : BoolElt                    Default: true
```

Given étale algebras $A$ and $B$ and a sequence `img` of elements of $B$ with length equal to the absolute dimension of $A$, returns the ${{\Bbb Q}}$-algebra homomorphism sending the `AbsoluteBasis(A)` to `img`. If `ComputeInverse` is true and the map is invertible, preimages are defined. If `CheckMultiplicative` (resp. `CheckUnital`) is `true`, multiplicativity (resp. unitality) is checked.

## `DiagonalEmbedding(K, V): AlgEtQ, AlgEtQ -> Map`

## `NaturalAction(K, V): AlgEtQ, AlgEtQ -> Map`

Let $K=K_1\times\cdots\times K_n$ be a product of distinct number fields and $V=K_1^{s_1}\times\cdots\times K_n^{s_n}$. Returns the natural component-wise diagonal embedding $K\to V$.

## `Example: Hom And Diagonal (ex-aab1bc)`

```magma
> _<x> := PolynomialRing(Integers());
> A := EtaleAlgebra((x^2+2)*(x^2+3));
> B := EtaleAlgebra(Components(A));
> // Build a hom by mapping AbsoluteBasis(A) into B component-wise
> img := [ B!Components(AbsoluteBasis(A)[i]) : i in [1..AbsoluteDimension(A)] ];
> m := Hom(A,B,img : CheckMultiplicative := false, CheckUnital := false,
> ComputeInverse := true);
> // Diagonal embedding on a suitable power algebra
> V, embs, projs := DirectProduct([A,A]);
> d := DiagonalEmbedding(A,V);
> d(One(A));
<1, 1, 1, 1>

```
