---
title: "Maps and Curves"
canonical: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/maps-crvpl.html"
source: "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/maps-crvpl.md"
part: "Algebraic Geometry"
chapter: "Algebraic Curves"
breadcrumbs:
  - {"title": "Magma Handbook", "source": "https://docs.magma-maths.org/v2.30-1/index.md"}
  - {"title": "Algebraic Geometry", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/index-algebraic-geometry.md"}
  - {"title": "Algebraic Curves", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/index-algebraic-curves.md"}
prev: {"title": "Global Geometry", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/global-curvepl.md"}
next: {"title": "Automorphism Groups of Curves", "source": "https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/crv_isos.md"}
intrinsics:
  - {"name": "IdentityAutomorphism", "signature": "IdentityAutomorphism(A): Sch -> AutSch"}
  - {"name": "Translation", "signature": "Translation(A, p): Sch, Pt -> AutSch"}
  - {"name": "FlipCoordinates", "signature": "FlipCoordinates(A): Sch -> AutSch"}
  - {"name": "Automorphism", "signature": "Automorphism(A, q): Sch, RngMPolElt -> AutSch"}
  - {"name": "TranslationToInfinity", "signature": "TranslationToInfinity(C, p): Crv, Pt -> Crv, AutSch"}
  - {"name": "EvaluateByPowerSeries", "signature": "EvaluateByPowerSeries(m, P): MapSch, Pt -> Pt"}
  - {"name": "Degree", "signature": "Degree(m): MapSch -> RngIntElt"}
  - {"name": "RamificationDivisor", "signature": "RamificationDivisor(m): MapSch -> DivCrvElt"}
  - {"name": "Pullback", "signature": "Pullback(phi, X): MapSch, FldFunFracSchElt -> FldFunFracSchElt"}
  - {"name": "Pullback", "signature": "Pullback(phi, X): MapSch, DiffCrvElt -> DiffCrvElt"}
  - {"name": "Pullback", "signature": "Pullback(phi, X): MapSch, DivCrvElt -> DivCrvElt"}
  - {"name": "Pullback", "signature": "Pullback(phi, X): MapSch, PlcCrvElt -> DivCrvElt"}
  - {"name": "Pushforward", "signature": "Pushforward(phi, X): MapSch, FldFunFracSchElt -> FldFunFracSchElt"}
  - {"name": "Pushforward", "signature": "Pushforward(phi, X): MapSch, PlcCrvElt -> DivCrvElt"}
  - {"name": "Pushforward", "signature": "Pushforward(phi, X): MapSch, DivCrvElt -> DivCrvElt"}
examples:
  - "ex-cb63a5"
  - "ex-60d1f5"
  - "ex-67ce2e"
---

# Maps and Curves

## Elementary Maps

The first group of functions create selfmaps of the affine plane. Such a map $f$ can be used to move a curve around the plane simply by applying it to the curve. See Chapter [Schemes](https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/Schemes/index-schemes.md#sch) on schemes for more details about maps.

<a id="function-identityautomorphism-sch"></a>
### `IdentityAutomorphism(A): Sch -> AutSch`

<a id="function-translation-sch-pt"></a>
### `Translation(A, p): Sch, Pt -> AutSch`

<a id="function-flipcoordinates-sch"></a>
### `FlipCoordinates(A): Sch -> AutSch`

<a id="function-automorphism-sch-rngmpolelt"></a>
### `Automorphism(A, q): Sch, RngMPolElt -> AutSch`

These are the basic automorphisms of the affine plane $A$ taking $(x,y)$ to $(x,y)$, $(x-a,y-b)$, $(y,x)$, and $(x+q(y),y)$ respectively, where $p$ is the point $(a,b)$ and $q$ is a polynomial on $A$ involving $y$ only.

<a id="function-translationtoinfinity-crv-pt"></a>
### `TranslationToInfinity(C, p): Crv, Pt -> Crv, AutSch`

The image of $C$ under the change of coordinates which translates $p$ to the point $(0:1:0)$ in the projective plane and makes the tangent line there equal to the line at infinity. An error is reported if $p$ is a singular point of $C$. The change of coordinates map is given so that other curves can be mapped by the same change of coordinates.

<a id="example-ex-cb63a5"></a>
### `Example: Translation to Infinity (ex-cb63a5)`

In this example we show how one could begin to work out a Weierstrass equation for a Fermat cubic. First we define that cubic curve $C$ in the projective plane and choose a point $p$ on $C$.

```magma
> P<x,y,z> := ProjectiveSpace(Rationals(),2);
> C := Curve(P,x^3 + y^3 + z^3);
> p := C ! [1,-1,0];
> IsFlex(C,p);
true 3
```

The point we have chosen is a flex — the second return value of $3$ is the local intersection number of the curve $C$ with its tangent line at $p$. We use the intrinsic `TranslationToInfinity` to make an automorphism of $P$ which takes the point $p$ to the point $(0:1:0)$ and takes the curve $C$ to a curve which has tangent line $z=0$ at the image of $p$.

```magma
> C1,phi := TranslationToInfinity(C,p);
> phi(p);
(0 : 1 : 0)
> C1;
Curve over Rational Field defined by
x^3 + 3*y^2*z - 3*y*z^2 + z^3
```

This is almost in Weierstrass form already. It is a pleasant exercise to make coordinate changes which “absorb” some of the coefficients. Alternatively, one can use the intrinsic `EllipticCurve` to perform the entire transformation in one step.

<a id="function-evaluatebypowerseries-mapsch-pt"></a>
### `EvaluateByPowerSeries(m, P): MapSch, Pt -> Pt`

Given a map $m: C \to D$, and a nonsingular point $P$ on $C$, where $C$ is a curve, return $m(P)$, evaluating $m(P)$ using a power series expansion if necessary. This allows a rational map on $C$ to be evaluated at nonsingular base points.

<a id="example-ex-60d1f5"></a>
### `Example: Evaluating a Map by Power Series (ex-60d1f5)`

The following example shows a map evaluated at a point using power series methods.

```magma
> P2<X,Y,Z>:=ProjectiveSpace(Rationals(),2);
> C:=Curve(P2,X^3+Y^3-2*Z^3);
> D:=Curve(P2,Y^2*Z-X^3+27*Z^3);
> phi:=map<C->D|[-6*X^2-6*X*Z+6*Y^2+6*Y*Z,
>                9*X^2+18*X*Y+18*X*Z+9*Y^2+18*Y*Z+36*Z^2,
>                X^2-2*X*Z-Y^2+2*Y*Z
>               ]>;
> P:=C![-1,1,0];
> P in BaseScheme(phi);
true (-1 : 1 : 0)
> Q:=EvaluateByPowerSeries(phi,P);
> Q;
(3 : 0 : 1)
> phi(P);
>> phi(P);
      ^
Runtime error in map application: Image of map does not lie in the codomain
> pullbackQ:=Q@@phi;
> pullbackQ;
Scheme over Rational Field defined by
-9*X^2 + 9*Y^2,
9*X^2 + 18*X*Y + 18*X*Z + 9*Y^2 + 18*Y*Z + 36*Z^2,
X^3 + Y^3 - 2*Z^3
> IsSubscheme(BaseScheme(phi), pullbackQ);
true
> P in pullbackQ;
true (-1 : 1 : 0)
> Degree(BaseScheme(phi))+1 eq Degree(pullbackQ);
true
```

<a id="id1"></a>
<a id="maps-crv-push-pull"></a>
## Maps Induced by Morphisms

Given a non-constant map $\phi:D\to C$ between curves, there are several induced maps between the function fields of $C$ and $D$ and the divisor groups ${\rm Div}(C)$ and ${\rm Div}(D)$. We refer to the contravariant maps $\phi^*$ as *Pullback*$\,$s and to the covariant maps $\phi_*$, corresponding to the Norm between the function fields, as *Pushforward*$\,$s. Divisor groups and other function field related items are discussed in Section [Function Fields](https://docs.magma-maths.org/v2.30-1/AlgebraicGeometry/AlgebraicCurves/function_field.md#crv-fldfun).

<a id="function-degree-mapsch"></a>
### `Degree(m): MapSch -> RngIntElt`

Returns the degree of a non-constant dominant map $m$ between curves.

<a id="function-ramificationdivisor-mapsch"></a>
### `RamificationDivisor(m): MapSch -> DivCrvElt`

Returns the ramification divisor of a non-constant dominant map $m$ between irreducible curves.

<a id="function-pullback-mapsch-fldfunfracschelt"></a>
### `Pullback(phi, X): MapSch, FldFunFracSchElt -> FldFunFracSchElt`

<a id="function-pullback-mapsch-diffcrvelt"></a>
### `Pullback(phi, X): MapSch, DiffCrvElt -> DiffCrvElt`

<a id="function-pullback-mapsch-divcrvelt"></a>
### `Pullback(phi, X): MapSch, DivCrvElt -> DivCrvElt`

<a id="function-pullback-mapsch-plccrvelt"></a>
### `Pullback(phi, X): MapSch, PlcCrvElt -> DivCrvElt`

Given a map $\phi:D\to C$ between curves and a function, differential, place, or divisor $X$ on $C$, this function returns the pullback of $X$ along $\phi$.

<a id="function-pushforward-mapsch-fldfunfracschelt"></a>
### `Pushforward(phi, X): MapSch, FldFunFracSchElt -> FldFunFracSchElt`

<a id="function-pushforward-mapsch-plccrvelt"></a>
### `Pushforward(phi, X): MapSch, PlcCrvElt -> DivCrvElt`

<a id="function-pushforward-mapsch-divcrvelt"></a>
### `Pushforward(phi, X): MapSch, DivCrvElt -> DivCrvElt`

Given a map $\phi:D\to C$ between curves and a function, place, or divisor $X$ on $C$, this function returns the pushforward of $X$ along $\phi$. In older versions, the function applied to a place used to only work with the image of the point (or cluster) below the place for speed and would give an error when $\phi$ was undefined there. Now, if this is true, the function reverts to working entirely with places and should never fail.

<a id="example-ex-67ce2e"></a>
### `Example: Pushforward and Pullback by a Map (ex-67ce2e)`

As an illustration of these routines, consider the following example

```magma
> Puvw<u,v,w>:=ProjectiveSpace(Rationals(),2);
> Pxyz<x,y,z>:=ProjectiveSpace(Rationals(),2);
> D:=Curve(Puvw,u^4+v^4-w^4);
> C:=Curve(Pxyz,x^4-y^4+y^2*z^2);
> phiAmb:=map<Puvw->Pxyz|[y*z,z^2,x^2]>;
> phi:=Restriction(phiAmb,D,C);
> KC:=FunctionField(C);
> KD:=FunctionField(D);
> Omega:=BasisOfHolomorphicDifferentials(C)[1];
```

Here we see a holomorphic differential pulls back to holomorphic.

```magma
> IsEffective(Divisor(Pullback(phi,Omega)));
true
```

Ramification divisors are actually quite easy to compute.

```magma
> RamificationDivisor(phi) eq
>     Divisor(Pullback(phi,Omega))-Pullback(phi,Divisor(Omega));
true
```

Verifying Riemann-Hurwitz:

```magma
> 2*Genus(D)-2 eq Degree(phi)*(2*Genus(C)-2)+Degree(RamificationDivisor(phi));
true
```

Pulling back and pushing forward is taking powers on the function field.

```magma
> f:=KC.1;
> Pushforward(phi,Pullback(phi,f)) eq f^Degree(phi);
true
```

`Divisor` and `Pushforward` commute.

```magma
> g:=KD.1;
> Divisor(Pushforward(phi,g)) eq Pushforward(phi,Divisor(g));
true
```
