# Relation to Other Modular Forms

## `ModularForm(f): ModFrmAlgElt -> ModFrmElt`

For $1$-dimensional Galois orbits of cuspidal eigenforms in spaces of ternary orthogonal modular forms, returns the associated classical newform.

```{.magma
> ModularForm(fs[2]);
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10 + q^11
+ O(q^12)
  > fQ;
  q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10 + q^11
+ O(q^12)
  ```

```

## `ThetaSeries(f): ModFrmAlgElt -> RngSerPowElt`

## `Theta1(f): ModFrmAlgElt -> RngSerPowElt`

```magma
Precision: RngIntElt                    Default: 25
```

The theta series associated to $f$, with precision $q^n$, where $n$ is given by `Precision`. `Theta1` returns the normalized cuspidal newform.

## `ThetaSiegel(f, g): ModFrmAlgElt, RngIntElt -> Assoc`

## `Theta2(f): ModFrmAlgElt -> Assoc`

```magma
Precision: RngIntElt                    Default: 25
```

The theta series of genus $g$ associated to $f$, which is a Siegel modular form of genus $g$, given as an associative array whose keys are the exponents $e_{i,j}$ of the variables $q_{i,j}$, and whose values are the coefficient in the Fourier expansion of $f$ for the monomial $q^e = \prod_{i,j} q_{i,j}^{e_{i,j}}$. `Precision` determines the maximal exponent $e_{i,i}$ for the diagonal entries $q_{i,i}$. `Theta2` is the same as setting $g = 2$.

## `ShimuraLift(f, k, N): RngSerPowElt, RngIntElt, RngIntElt -> RngSerPowElt`

```magma
Precision: RngIntElt                    Default: 25
```

The Shimura Lift of $f$ in the space $M_k(N)$ with precision $q^n$, where $n$ is given by `Precision`.

## `Example: Shimura Lift (ex-29956e)`

The theta series of a ternary orthogonal modular form $f$ is not the same as the cuspidal modular form associated to it, but one can relate these through the Shimura lift. For example, we consider the space of orthogonal modular forms of rank $3$ and discriminant $11^2$.

```magma
> L:= TernaryQuadraticLattices(121)[1][1];
> M := OrthogonalModularForms(L);
> fs := HeckeEigenforms(M);
> f := fs[2];
> theta<q> := Theta1(f : Precision := 25^2);
> theta + O(q^25);
q + q^3 - 2*q^4 - q^5 - q^11 - 2*q^14 + 3*q^15 + 2*q^16 + 2*q^20 + 2*q^22 -
    3*q^23 + O(q^25)
> qExpansion(&+Basis(CuspForms(44,3/2)),25);
q + q^3 - 2*q^4 - q^5 - q^11 - 2*q^14 + 3*q^15 + 2*q^16 + 2*q^20 + 2*q^22 -
    3*q^23 + O(q^25)

```

As expected $\theta(f) \in S_{3/2}(44)$, but using the Shimura lift, we can associate to it a form in $S_{2}(11)$. Recall that the initial construction does not yield a newform, as we see explicitly below.

```magma
> ShimuraLift(theta, 2, 11);
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10 - 2*q^12 + 4*q^13
    + 4*q^14 - q^15 - 4*q^16 - 2*q^17 + 4*q^18 + 2*q^20 + 2*q^21 - q^23 +
    O(q^25)
> f11 := qExpansion(Basis(CuspForms(11,2))[1],25);
> f11 - Evaluate(f11, q^11);
q - 2*q^2 - q^3 + 2*q^4 + q^5 + 2*q^6 - 2*q^7 - 2*q^9 - 2*q^10 - 2*q^12 + 4*q^13
    + 4*q^14 - q^15 - 4*q^16 - 2*q^17 + 4*q^18 + 2*q^20 + 2*q^21 - q^23 +
    O(q^25)

```
