# Picard Group

Let $R$ be an order in an étale algebra $A$ over ${{\Bbb Q}}$ with maximal order ${\cal O}_A$. We say that two fractional $R$-ideals $I$ and $J$ are *isomorphic* if there exists a unit $a\in A$ such that $I=aJ$. Observe that this happens if and only if $I$ and $J$ are isomorphic as $R$-modules. We refer to the isomorphism class $[I]$ of $I$ as its *ideal class*.

The set of ideal classes of invertible fractional $R$-ideals forms a group under the operation induced by ideal multiplication. This group is called the *Picard group* of $R$ and denoted ${\rm Pic}(R)$.

If $K_1\times \ldots \times K_n$ are the components of $A$ then ${\rm Pic}({\cal O}_A) = \prod_{i=1}^n{\rm Cl}({\cal O}_{K_i})$, where ${\rm Cl}({\cal O}_{K_i})$ is the class group of the number field $K_i$. Also, the unit group ${\cal O}_A^\times$ of ${\cal O}_A$ satisfies ${\cal O}_A^\times = {\cal O}_{K_1}^\times \times \ldots \times {\cal O}_{K_n}^\times$.

The Picard group and the unit group of the order $R$ can be computed using the well-known exact sequence:

$$
1 \to R^\times \to {\cal O}_A^\times \to {\left( {\cal O}_A/{\frak f} \right)^\times\over\left( R/{\frak f} \right)^\times} \to {\rm Pic}(R)\to {\rm Pic}({\cal O}_A) \to 1,
$$

where the first, second and third map are the natural maps, the fourth is induced by $a \mapsto (a{\cal O}_A \cap R)$ and the last one is induced by the extension map $I \mapsto I{\cal O}_A$.

## `ResidueRingUnits(S, I): AlgEtQOrd, AlgEtQIdl -> GrpAb, Map`

Returns the group $(S/I)^*$ and a map $(S/I)^* \rightarrow S$. The order $S$ is required to be maximal.

## `ResidueRingUnits(I): AlgEtQIdl -> GrpAb, Map`

Given a fractional $S$-ideal $I$, returns the group $(S/I)^*$ and a map $(S/I)^* \to S$ giving representatives. Implemented when $S$ is maximal.

## `ResidueRingUnitsSubgroupGenerators(F): AlgEtQIdl -> SeqEnum[AlgEtQElt]`

Given a fractional $S$-ideal $F$, returns generators of $(S/F)^*$.

## `IsPrincipal(I1): AlgEtQIdl -> BoolElt, AlgAssElt`

```magma
GRH: BoolElt                    Default: false
```

Return if the argument is a principal ideal; if so the function returns also the generator. The optional parameter `GRH` decides whether the bound for the `IsPrincipal` test should be conditional. The default value is `false`.

## `PicardGroup(S): AlgEtQOrd -> GrpAb, Map`

```magma
GRH: BoolElt                    Default: false
```

Return the `PicardGroup` of the order $S$, which is not required to be maximal, and a map from the Picard group to a set of representatives of the ideal classes. The optional parameter `GRH` decides the bound for the computations of the Class group and Unit group of the maximal order. The default value is `false`.

## `ExtensionHomPicardGroups(S, T): AlgEtQOrd, AlgEtQOrd -> Map`

```magma
GRH: BoolElt                    Default: false
```

Given orders $S$ and $T$ such that $S \subseteq T$, returns the surjective extension map ${\rm Pic}(S) \to {\rm Pic}(T)$. The parameter `GRH` is passed to `PicardGroup`.

## `UnitGroup(S): AlgEtQOrd -> GrpAb, Map`

```magma
GRH: BoolElt                    Default: false
```

Return the unit group of a order in a étale algebra. The optional parameter `GRH` decides the bound for the computation of the unit group of the maximal order. The default value is `false`.

## `Example: Picard And Units (ex-034565)`

```magma
> _<x> := PolynomialRing(Integers());
> A := EtaleAlgebra((x^4+16)*(x^4+81));
> E := EquationOrder(A);
> P, phi := PicardGroup(E);
> AbelianInvariants(P);
[ 2, 24, 24, 24, 24 ]
> U, psi := UnitGroup(E);
> TorsionInvariants(U);
[ 2 ]
> TorsionFreeRank(U);
2

```

## `IsIsomorphic(I, J): AlgEtQIdl, AlgEtQIdl -> BoolElt, AlgAssElt`

```magma
GRH: BoolElt                    Default: false
```

Checks if $I=x \cdot J$, for some $x$. If so, also $x$ is returned. The optional parameter `GRH` decides whether the bound for the `IsPrincipal` test should be conditional. The default value is `false`.
