Maps between Schemes

Given schemes X and Y one can define a map f: X -> Y in a number of ways. The basic method is to give a sequence of polynomials or quotients of polynomials defined on X. If X has an associated function field then function field elements may also be used. Alternative sets of defining polynomials/rational functions may also be given, as long as these represent the same rational map as the original defining set.

Scheme maps in Magma represent rational maps between schemes. That is, a map f: X -> Y between schemes X and Y actually corresponds to a morphism from a dense Zariski-open subset of X to Y and two maps f and g from X to Y are considered to be equal (and will be so deemed by eq, for example) if they are equal as morphisms when restricted to a dense open subset of X that lies in a domain of definition of f and a domain of definition of g. The precise open domain of definition U of a map f is unspecified but in most functional contexts, it is equal to the complement of the base scheme f as returned by BaseScheme(f). This is the set of scheme-theoretic points at which none of the maps given by the defining polynomials/rational functions or any set of alternative defining polynomials are `naively' defined. The intrinsic Extend computes alternative defining equations that reduces the base scheme so that its open complement is equal to the maximal domain of definition of the rational map represented. However, this is a fairly generic implementation that can be computationally very heavy in many cases. When the domain X is a curve with function field and the codomain Y is ordinary projective, the implicit domain of definition for computing the image of points is the maximal domain of definition of f rather than the base scheme. The function field machinery is used here.

Similarly, isomorphisms between schemes can be defined using inverse defining polynomials/rational functions and these represent birational maps rather than actual scheme isomorphisms.

There are some natural functions associated to a map f and some other more complicated functions. The most natural things are, for a point p of X, computing the image point f(p) and, for a subscheme S⊂Y computing the preimage scheme Pullback(f,S). More complicated functions include the standard Gröbner basis algorithm for computing images f(T)⊂Y of subschemes T of X. This is defined when T does not lie in the base scheme of f and the image is actually the scheme theoretic closure of the image of f restricted to the open subset of T on which it is defined.

For some functions such as the image computation just mentioned, it is a requirement that the schemes X and Y be defined over a common base ring and that the map f be defined over the identity map (or coercion map) of this common base ring.

Maps respect point set structures. Indeed, given a map f as above and an extension L of k, the base ring of X, there is a map f(L): X(L) -> Y(L). The point set of Y is determined by the composition of the map of base rings with the extension map k -> L. This map f(L) cannot be created without creating the scheme map f first, and in any case it is not usually explicitly required: the evaluation of f(p) will invoke it in the background, for example. But when the main purpose of f is to transfer a large number of points from X(L) to Y(L) then it is best to assign g := f(L) explicitly and use the map g. In this way the small additional overheads involved in repetitively constructing f(L) are avoided. Perhaps more importantly, it also ensures that the image points all lie in the same point set.

Maps respect projective closures of schemes. That is, given f as above one can compute the projective closure of f which is a map from the projective closure of X to that of Y and which agrees with f where they are both defined.

From V2.16, there is a slight variant on the basic scheme map type (MapSch), which we refer to as scheme graph maps and are defined by the graph of the map in the product of the domain and codomain. These currently only have very basic constructors and somewhat less functionality than scheme maps. They will be described in a separate subsection.

Much of the functionality only works for scheme maps f between schemes whose base rings are fields. We usually do not explicitly mention in this documentation when this is a requirement, but the functions will return an error if the base rings are not fields in cases where they must be.

Contents

Creation of Maps

The most basic map constructors are described here. It is possible to create maps defined over a map of the base rings of the schemes.

map< X -> Y | F > : Sch,Sch,SeqEnum -> MapSch
map< X -> Y | F, G > : Sch,Sch,SeqEnum -> MapSch
map< X -> Y | u, F > : Sch,Sch,Map,SeqEnum -> MapSch
    Check: BoolElt                      Default: true
    CheckInverse: BoolElt               Default: true
Create the map X -> Y of schemes determined by the sequence F of polynomials or rational functions defined on X. The two schemes X and Y must be defined over compatible base rings, that is, there must exist a ring map u from the base ring of Y to that of X. The polynomials can be elements of the coordinate ring of the ambient space containing X or elements of the coordinate ring of X itself. In any case, the polynomials will be lifted to elements of the coordinate ring of the ambient space and any ring elements which admit this operation could be used. If the function field of X exists then elements of this may also be used.

The argument u is a map from the base ring of Y to that of X. If it is omitted then natural coercion map is assumed. In practice, the base rings are often identical in which case coercion will simply be the identity map.

A birational inverse specified by polynomials or rational functions on Y can be given as the sequence G.

It is also allowed for F and G to be a sequence of sequences of polynomials or rational functions, giving alternate sets of defining equations (inverse defining equations) that must define the same rational map on X (rational inverse on Y). The base scheme of the map (the inverse) is the intersection of the base schemes of the individual sets of defining equations (inverse defining equations) as described in BaseScheme.

There are two parameters Check and CheckInverse which control exactly what validation checks are carried out.

If the parameter Check is set to false then no checking occurs at all.

If Check is true but CheckInverse is false, then the map is checked to be well defined from domain to codomain and any inverse to be well defined in the opposite direction. However if there are inverse functions specified, it is not checked that the forward and inverse functions actually define (birational) inverse maps.

If both parameters are true then all checks mentioned above are done.

iso< X -> Y | F, G > : Sch,Sch,SeqEnum,SeqEnum -> MapAutSch
Create the map X -> Y of schemes determined by the sequence F for which the map Y -> X determined by the sequence G is a birational inverse. The sequences F and G should contain polynomials or rational functions defined on X and Y respectively. The two schemes X and Y must be defined over the same base ring.

The two check parameters for the main map constructor also apply here with the same meaning.

Example Scheme_map-creation (H119E32)

Map creation is very similar to that for maps between polynomial rings, although here one must put the polynomial arguments into a single sequence.
> k := Rationals();
> A<t> := AffineSpace(k,1);
> B<x,y> := AffineSpace(k,2);
> f := map< A -> B | [t^3 + t, t^2 - 3] >;
> f;
Mapping from: Aff: A to Aff: B
with equations :
t^3 + t
t^2 - 3
Features of the map can be computed. Of course, the domain and codomain are trivial attributes of the map while its image requires a Gröbner basis computation.
> Domain(f) eq A;
true
Variables : t
> Codomain(f);
Affine Space of dimension 2
Variables : x, y
> Image(f);
Scheme over Rational Field defined by
-x^2 + y^3 + 11*y^2 + 40*y + 48

Example Scheme_map-fnfld (H119E33)

Defining maps using function field elements directly can be particularly convenient for curves. For example, the user may have a set of such functions coming from some divisor computations. Here is a simple (artificial!) example where a rational map from a projective curve or any of it's affine patchs to the projective line corresponding to a rational function is defined.
> P<x,y,z> := ProjectiveSpace(Rationals(),2);
> C := Curve(P,x^2+y^2-z^2);
> C1 := AffinePatch(C,1);
> C2 := AffinePatch(C,2);
> F := FunctionField(C);
> f := F!(x/y);
> P1 := ProjectiveSpace(Rationals(),1);
> mp1 := map<C->P1 | [f,1]>;
> mp2 := map<C1->P1 | [f,1]>;
> mp3 := map<C2->P1 | [f,1]>;

Example Scheme_map-frobenius (H119E34)

Maps of the base ring can be included in scheme maps as is the case for maps of polynomial rings. Here we make a Frobenius map.
> k<w> := FiniteField(3^2);
> u := hom< k -> k | w^3 >;
> A<t> := AffineSpace(k,1);
> f := map< A -> A | u, [t^3] >;
> f;
Mapping from: Aff: A to Aff: A
with equations :
t^3
and map between base rings
Mapping from: FldFin: k to FldFin: k given by a rule [no inverse]
Notice next how the map f fixes points defined over the prime subfield of k but moves those points with coordinates having nontrivial w component.
> p := A ! [w];
> f(p);
(w^3)
> f(A ! [2]);
(2)
IdentityMap(X) : Sch -> MapSch
Create the identity map of the scheme X.

ConstantMap(X,Y,p) : Sch,Sch,Pt -> MapSch
map< X -> Y | Q > : Sch,Sch,SeqEnum -> MapSch
The map taking all points of the scheme X to the point p of scheme Y where Q is the sequence of coordinates of p.

Projection(X,Y) : Prj,Prj -> MapSch
The linear projection from projective space X to projective space Y that omits the first dim X - dim Y coordinates.
Projection(X, Q) : Sch, Prj -> Sch, MapSch
Projection(X) : Sch -> Sch, MapSch
Projection(X, p) : Sch, Pt -> Sch, MapSch
The projection of the scheme X away from the point p into the projective ambient space Q (if given). If p is not given it is taken to be (1:0: ... :0).
ProjectionFromNonsingularPoint(X,p) : Sch,Pt -> Sch,MapSch,Sch
The projection of the scheme X from the nonsingular (and rational) point p of X. The projection map is returned as a second value. The image of the blowup of p as a point of X is returned as a third value. If this is a point, it is returned as a point type.
ProjectiveMap(L, Y) : [FldFunFracSchElt], Sch -> MapSch
ProjectiveMap(L) : [FldFunFracSchElt]-> MapSch
Given a list L of functions in the function field of X, where X is a projective scheme, return the projective map X to Y defined by taking those functions as projective coordinates. The scheme Y should be a projective space of dimension one less than the length of L. If Y is not supplied, a new projective space of appropriate dimension is created.
ProjectiveMap(f, Y) : FldFunFracSchElt, Sch -> MapSch
ProjectiveMap(f) : FldFunFracSchElt -> MapSch
A short form for ProjectiveMap([f,1],X,Y).

Example Scheme_map-creation-prj (H119E35)

The above function is illustrated.
> P2<X,Y,Z>:=ProjectiveSpace(Rationals(),2);
> C:=Curve(P2,
>      X^4-2*X^3*Y-X^2*Y^2-2*X^2*Y*Z+2*X*Y^3+2*X*Y^2*Z+Y^4-7*Y^3*Z+Y^2*Z^2);
> omega:=CanonicalDivisor(C);
> Degree(omega); //genus 0 curve
-2
> L:=Basis(-omega);
> L;
[
    ($.2 - 4/25) * ($.1^3 - $.1*$.2 + 5/56*$.2^3 + 20/63*$.2^2) * ($.2 - 4) *
    ($.1^3*$.2 - 1/4*$.1^2*$.2^2 - 26/5*$.1^2*$.2 + 4/5*$.1^2 - 7/4*$.1*$.2^3 -
        2*$.1*$.2^2 - 3/4*$.2^4 + 151/20*$.2^3 + 4*$.2^2 - 4/5*$.2)^-1,
    ($.2) * ($.1^2 - 3/14*$.2^2 + 1/63*$.2) * ($.2 - 4) * ($.2 - 4/25) *
    ($.1^3*$.2 - 1/4*$.1^2*$.2^2 - 26/5*$.1^2*$.2 + 4/5*$.1^2 - 7/4*$.1*$.2^3 -
        2*$.1*$.2^2 - 3/4*$.2^4 + 151/20*$.2^3 + 4*$.2^2 - 4/5*$.2)^-1,
    ($.1 + 13/28*$.2 - 8/63) * ($.2 - 4) * ($.2 - 4/25) * ($.2)^2 * ($.1^3*$.2 -
        1/4*$.1^2*$.2^2 - 26/5*$.1^2*$.2 + 4/5*$.1^2 - 7/4*$.1*$.2^3 -
        2*$.1*$.2^2 - 3/4*$.2^4 + 151/20*$.2^3 + 4*$.2^2 - 4/5*$.2)^-1
]
> mp:=ProjectiveMap(L,P2); //anticanonical embedding
> mp;
Mapping from: Crv: C to Prj: P2
with equations :
23/16*X^3 - 113/64*X^2*Y + 5/16*X^2*Z - 71/64*X*Y^2 + 93/16*X*Y*Z + 21/64*Y^3 -
    61/64*Y^2*Z - 5/16*Y*Z^2
-1/8*X^3 + 23/16*X^2*Y + X^2*Z - 19/16*X*Y^2 - 15/8*X*Y*Z - 21/16*Y^3 +
    115/16*Y^2*Z - Y*Z^2
X^3 - 53/32*X^2*Y - 1/8*X^2*Z - 11/32*X*Y^2 - 3/4*X*Y*Z + 21/32*Y^3 -
    13/32*Y^2*Z + 1/8*Y*Z^2
> mp(C);
Curve over Rational Field defined by
X^2 - 15/8*X*Y + 23/4*X*Z - 229/32*Y^2 - 17/16*Y*Z - Z^2
Elimination(X,V) : Sch,SeqEnum -> Sch
The affine scheme obtained by eliminating the ambient variables of the affine scheme X whose indices appear in V from the equations of X. Thus if V=[2, 5] then the result will be a scheme in the affine subspace u=v=0 where u and v are the second and fifth variables of the ambient space of X.

Inverse(f) : MapSch -> MapSch
The inverse of the map of schemes f if inverse defining equations have been included in the definition of f, otherwise an error.
IsInvertible(f) : MapSch -> Bool, MapSch
Tests whether the map f between schemes is birational. If so, returns a birational inverse. This function works fairly generically, using Groebner basis computations over standard affine patches of the domain and codomain to compute the closure of the graph of f and retrieve inverse equations from that. It can be very expensive computationally.
HasKnownInverse(f) : MapSch -> Bool
Returns true if the map f has an inverse stored.

Example Scheme_map_creation_inv (H119E36)

This example shows how IsInvertible is more powerful then Inverse.
> P2<X,Y,Z> := ProjectiveSpace(Rationals(),2);
> C := Curve(P2, X^3*Y^2 + X^3*Z^2 - Z^5);
> Genus(C);
1
> pt := C![1,0,1];
> E,toE := EllipticCurve(C,pt);
> IsInvertible(toE);
true Mapping from: CrvEll: E to Crv: C
with equations :
$.1^3
-3*$.1*$.2*$.3 - 9*$.2*$.3^2
$.1^3 + 3*$.1^2*$.3
and inverse
-3*X^2*Z + 3*X*Z^2
-3*X^2*Y
X^2*Z - 2*X*Z^2 + Z^3
> Inverse(toE);
>> Inverse(toE);
          ^
Runtime error in 'Inverse': Map has no inverse
g * f : MapSch,MapSch -> MapSch
The composition g f, but note the convention for order of composition: the order of mapping is that g acts first and is followed by f. Strictly speaking, one might want to see evaluation of points done on the left to make sense of this, (this can be done using p @ f instead of f(p)). Since one would usually assign a new identifier to this composition, this is not a large problem. Only simple error checking is done --- domain--codomain matching and that the composition doesn't have so many zero components that it is projectively illegal.

Where the expansion of such compositions could be expensive, the resulting map will be stored as a composition. The equivalent expanded map can be created by

> gf := g*f;
> dp := DefiningPolynomials(gf);
> dpi := InverseDefiningPolynomials(gf);
> m := map<D -> C | dp, dpi>;

where D is the domain of g and C is the codomain of f. The composition will act differently to the expanded map - it will be undefined at all the places each factor is undefined.

Components(f) : Map -> [Map]
The maps composed to form f.

Example Scheme_hom-spaces (H119E37)

As part of its generic map machinery, Magma has a structure for the set of all maps between two given schemes. There is also a structure for the group of all automorphisms of a scheme which is discussed in Section Automorphisms. Using this space one can realise the effect of a map on Hom spaces. We will make two Hom spaces having a common codomain.
> k := Rationals();
> P<x,y,z,t> := ProjectiveSpace(k,3);
> A := Scheme(P,Minors(M,2))
>           where M is Matrix(CoordinateRing(P),2,3,[x,y,z,y,z,t]);
> B := Scheme(P,x*t - y*z);
> F<r,s,u,v> := RuledSurface(k,0,0);
> HomAF := Maps(A,F);
> HomBF := Maps(B,F);
> HomAF;
Set of all maps from A to F
Given a map A -> B we make the map from HomBF to HomAF given by composition. Although A lies inside B, we choose a map A -> B which isn't this inclusion.
> i := map< A -> B | [y,x,t,z] >;
> ii := map< HomBF -> HomAF | g :-> i * g >;
The map ii of Hom spaces realises the composition of maps with i. We test this on a single map f: B -> F.
> f := map< B -> F | [x,y,z,t] >;
> Expand(ii(f)) eq Expand(i*f);
true
Restriction(f,X,Y) : MapSch,Sch,Sch -> MapSch
    Check: BoolElt                      Default: true
The restriction of the map of schemes f to the scheme X in its domain. The codomain of the new map is considered to be the scheme Y which must either contain the codomain of f, or lie in that codomain but contain the scheme f(X).

By default the program checks these subscheme relationships; this may be time-consuming, and can be skipped by setting the optional parameter Check to false.

Expand(phi) : MapSch -> MapSch
Given a map φ between schemes stored in factored form, return the map in expanded form. Note that if φ is a composite of maps, each with many alternative defining polynomials, then computing the expansion can be very expensive. In other situations computing the expansion of φ can cause huge (intermediate) expressions and therefore be very expensive as well.

Due to the automatic simplification in map creation, the base scheme of the returned map might be smaller than the base scheme of φ.

Extend(phi) : MapSch -> MapSch
Given a map φ between schemes, returns an expanded map with extra alternative equations in order to reduce the base scheme as far as possible, i.e. so that the open complement of the base scheme is the maximal domain of definition of the rational map represented by φ. This routine is potentially very expensive because it requires Groebner basis computations on several affine graph ideals of φ.
Prune(phi) : MapSch -> MapSch
Given a map φ between schemes in expanded form, removes alternative equations that do not reduce the base scheme of φ. If φ has a known inverse, this is returned unaltered.
Normalization(phi) : MapSch -> MapSch
Normalisation(phi) : MapSch -> MapSch
The map created from φ by removing common factors from the defining polynomial.

Example Scheme_map_creation-comp_alt (H119E38)

It is shown below how to convert a map between schemes into a proper morphism.
> P2<x,y,z>:=ProjectiveSpace(Rationals(),2);
> C:=Curve(P2,x^3+y^3-2*z^3);
> E,phicomp:=EllipticCurve(C,Place(C![1,1,1]));
> Puvw<u,v,w>:=Ambient(E);
We get φ as phicomp in expanded form.
> phi:=Expand(phicomp);
> phi;
Mapping from: Crv: C to CrvEll: E
with equations :
3*x^2*y - 3*x^2*z - 3*x*y^2 + 9*x*y*z - 6*x*z^2 - 6*y^2*z + 15*y*z^2 - 9*z^3
-9*x^2*y + 27*x*y^2 - 54*x*y*z + 18*x*z^2 + 45*y^2*z - 81*y*z^2 + 27*z^3
y^3 - 3*y^2*z + 3*y*z^2 - z^3
But φ still has a base scheme.
> Degree(BaseScheme(phi));
6
So we extend φ to phiext defined on C entirely.
> phiext:=Extend(phi);
> phiext;
Mapping from: Crv: C to CrvEll: E
with equations :
3*x^2*y - 3*x^2*z - 3*x*y^2 + 9*x*y*z - 6*x*z^2 - 6*y^2*z + 15*y*z^2 - 9*z^3
-9*x^2*y + 27*x*y^2 - 54*x*y*z + 18*x*z^2 + 45*y^2*z - 81*y*z^2 + 27*z^3
y^3 - 3*y^2*z + 3*y*z^2 - z^3
and alternative equations :
3*x^3 + 6*x^2*z - 6*x*y*z + 9*x*z^2 + 3*y^3 - 15*y*z^2
-18*x^2*z + 54*x*y*z - 27*x*z^2 + 99*y*z^2
x*z^2 + 2*y^2*z - 3*y*z^2
And there is no base scheme anymore!
> Degree(BaseScheme(phiext));
0
This map is invertible.
> bl,phii:=IsInvertible(phiext);
> assert bl;
> phii;
Mapping from: CrvEll: E to Crv: C
with equations :
1/6*u^3 - 13/2*u^2*w - 2*u*v*w + 21/2*u*w^2 - 1/6*v^2*w + 3*v*w^2 + 27*w^3
u^2*w - 30*u*w^2 - 3*v*w^2 + 36*w^3
u^2*w - 3*u*w^2 - 18*w^3
and inverse
3*x^2*y - 3*x^2*z - 3*x*y^2 + 9*x*y*z - 6*x*z^2 - 6*y^2*z + 15*y*z^2 - 9*z^3
-9*x^2*y + 27*x*y^2 - 54*x*y*z + 18*x*z^2 + 45*y^2*z - 81*y*z^2 + 27*z^3
y^3 - 3*y^2*z + 3*y*z^2 - z^3
and alternative inverse equations :
3*x^3 + 6*x^2*z - 6*x*y*z + 9*x*z^2 + 3*y^3 - 15*y*z^2
-18*x^2*z + 54*x*y*z - 27*x*z^2 + 99*y*z^2
x*z^2 + 2*y^2*z - 3*y*z^2
But the inverse still has a base scheme.
> Degree(BaseScheme(phii));
6
So extend phii.
> phiiext:=Extend(phii);
No base scheme left!
> Degree(BaseScheme(phiiext));
0
Note that the inverse -- phiext -- is still retained. So phiiext now really is a morphism.
> phiiext;
Mapping from: CrvEll: E to Crv: C
with equations :
1/6*u^3 - 13/2*u^2*w - 2*u*v*w + 21/2*u*w^2 - 1/6*v^2*w + 3*v*w^2 + 27*w^3
u^2*w - 30*u*w^2 - 3*v*w^2 + 36*w^3
u^2*w - 3*u*w^2 - 18*w^3
and inverse
3*x^2*y - 3*x^2*z - 3*x*y^2 + 9*x*y*z - 6*x*z^2 - 6*y^2*z + 15*y*z^2 - 9*z^3
-9*x^2*y + 27*x*y^2 - 54*x*y*z + 18*x*z^2 + 45*y^2*z - 81*y*z^2 + 27*z^3
y^3 - 3*y^2*z + 3*y*z^2 - z^3
and alternative equations :
-1/234*u^3 + 7/26*u^2*w + 5/117*u*v*w - 57/26*u*w^2 + 1/702*v^2*w - 6/13*v*w^2 -
    27/13*w^3
-1/39*u^2*w + 1/117*u*v*w + 21/13*u*w^2 - 1/351*v^2*w + 2/39*v*w^2 - 54/13*w^3
u*w^2 - 1/351*v^2*w + 4/39*v*w^2 + 18/13*w^3
-729/26*u^3 + 3/13*u^2*v + 32805/26*u^2*w + 17/13*u*v^2 + 4293/13*u*v*w -
    19683/26*u*w^2 + 4/39*v^3 + 537/26*v^2*w - 1377/13*v*w^2 + 19683/13*w^3
-27/13*u^2*v + 9/13*u*v^2 + 1233/13*u*v*w + 4/39*v^3 + 132/13*v^2*w -
    1215/13*v*w^2
u*v^2 + 4/39*v^3 - 9/13*v^2*w + 756/13*v*w^2
and alternative inverse equations :
3*x^3 + 6*x^2*z - 6*x*y*z + 9*x*z^2 + 3*y^3 - 15*y*z^2
-18*x^2*z + 54*x*y*z - 27*x*z^2 + 99*y*z^2
x*z^2 + 2*y^2*z - 3*y*z^2
ImproveParametrization(p) : MapSch -> MapSch
Let p be a map over the rational numbers from the projective line, P1Q = ProjectiveSpace(Q,1), to another ordinary projective scheme X. For example, p could be a parametrization of a rational curve.

The intrinsic applies minimization and reduction for binary forms to construct and return a new map φ : P1 -> X over Q that is as simple as possible amongst those differing from p by an automorphism ψ (over Q) of P1. That is, φ = p ψ for some ψ.

Example Scheme_improve_prm_ex (H119E39)

We start with a "bad" parametrization map of a plane conic, produced by choosing a large base point on the conic, and find a simpler parametrization using ImproveParametrization.
> P2<x,y,z> := ProjectiveSpace(Rationals(),2);
> C := Conic(P2, y^2 - x*z - y*z);
> pt := C![1140, 2109, 1369];
> prm := Parametrization(C,pt);
> P1<s,t> := Domain(prm);
> prm;
 Mapping from: Curve over Rational Field defined by
0 to CrvCon: C
with equations :
1140/1369*s^2 + 77/37*s*t + t^2
57/37*s^2 + s*t
s^2
and inverse
z
y - 57/37*z
> prm1 := ImproveParametrization(prm);
> prm1;
Mapping from: Curve over Rational Field defined by
0 to CrvCon: C
with equations :
s*t
s^2 - s*t
s^2 - 2*s*t + t^2
and inverse
-y
-y + z

Basic Attributes

Trivial Attributes
Domain(f) : MapSch -> Sch
The domain of the map of schemes f.

Codomain(f) : MapSch -> Sch
The codomain of the map of schemes f.

DefiningPolynomials(f) : MapSch -> SeqEnum
DefiningEquations(f) : MapSch -> SeqEnum
The sequence of functions used to define the map of schemes f.

If f is stored as an unexpanded composition then it will be expanded and the defining equations of the expansion returned.

FactoredDefiningPolynomials(f) : MapSch -> SeqEnum
If the map of schemes f was created by composition (and not expanded) return the sequence of sequences of the defining equations of the maps which were composed to form f otherwise return DefiningPolynomials of f.
InverseDefiningPolynomials(f) : MapSch -> SeqEnum
The sequence of functions used to define the inverse of the map of schemes f.

If f is stored as an unexpanded composition then it will be expanded and the inverse defining equations of the expansion returned.

FactoredInverseDefiningPolynomials(f) : MapSch -> SeqEnum
If the map of schemes f was created by composition (and not expanded) and has an inverse return the sequence of sequences of inverse defining equations of the maps which were composed to form f otherwise return InverseDefiningPolynomials of f.
AllDefiningPolynomials(f) : MapSch -> SeqEnum
The polynomials of all definitions of the map of schemes f.

AllInverseDefiningPolynomials(f) : MapSch -> SeqEnum
The polynomials of all definitions of the inverse of the map of schemes f if f has a known inverse.
AlgebraMap(f) : MapSch -> Map
The underlying map of polynomial rings determining the map of schemes f. Thus if F is the sequence of defining equations of f and x is the first variable of the codomain then F[1] will be the image of x under AlgebraMap(f).
FunctionDegree(f) : MapSch -> RngIntElt
The degree of the homogeneous polynomials which define the map f of projective schemes. If there are alternative defining polynomials, returns the minimum value over the different sets of defining polynomials.

Basic Tests
f eq g : MapSch, MapSch -> BoolElt
Returns true if and only if the maps of schemes f and g have the same domain and codomain and define the same rational map.

IsRegular(f) : MapSch -> BoolElt
IsPolynomial(f) : MapSch -> BoolElt
Returns true if and only if the map of schemes f is defined at all points of its domain.

IsIsomorphism(f) : MapSch -> BoolElt, IsoSch
Returns true if and only if the map of schemes f: X -> Y has inverse defining equations or if they may be easily computed (e.g. the projective closure of the map has inverse defining equations). If so, return a map g: X -> Y which is of the recognised isomorphism type as a second value.

IsDominant(f) : MapSch -> BoolElt
Returns true if and only if the closure of the image of the map of schemes f is the whole of its codomain.

IsLinear(f) : MapSch -> BoolElt
Returns true if and only if the map of schemes f is a regular map defined by linear polynomials.

IsAffineLinear(f) : MapSch -> BoolElt
Returns true if and only if the map of schemes f is a map between affine spaces defined by polynomials of degree at most 1.

Maps and Points

Given a map f: X -> Y of schemes and point p of X outside of the base scheme of f, then the image f(p) is a point of Y. Moreover, given an extension K of the base rings of X and Y, there is a map of point sets f(K): X(K) -> Y(K). This isn't often needed, but should be used as in the example below, when very many point images are required. Note that it will ensure that all points are returned in the same determined point set. Maps also behave well with respect to sets and sequences of points.

f(p) : MapSch,Pt -> Pt
The point f(p) if the point p is in a point set of the domain of the map of schemes f and doesn't lie in the base scheme of f. An error results if p is in the base scheme (except in the curve case described below). Sets and sequences of points are handled in the same way. If the domain of the map is a curve C with a function field (see Algebraic Curves chapter) and p is in the base scheme of f, then now (from V2.17), magma tries to compute the image of p by working with the function field places over p without having to extend f via Extend. If p is non-singular then there is only one place above it and the image will exist if the codomain is projective. If there are several places over p, the image will be computed and returned when the image of all of the places is the same and is defined over p's point set base ring (that must be a field).

Pullback(f, p) : MapSch, Pt -> Any
The preimage of a point p under the map of schemes f. When f is an isomorphism of schemes with an inverse g, the returned result is the point g(p). Otherwise the pullback is returned as a subscheme of the domain of f. This is identical to Pullback(f,S), where S is the one-point scheme containing p.

When a scheme is returned, it will contain the base scheme of f (which won't map to p under f), but this can be remedied using the (potentially expensive) function call Difference(Pullback(f,p), BaseScheme(f)).

p @@ f : Pt,MapSch -> Any
This is the same as Pullback(f,p) except when f is an isogeny between elliptic curves. in which case one rational point in the preimage is returned (if none exist, an error results).
f(K) : MapSch,Rng -> Map
f(m) : MapSch,Map -> Map
The map induced by the map of schemes f: X -> Y on point sets X(K) -> Y(K). If m is a ring map from the base ring of X and u is the map of base rings from Y to X then f(m) will be the map of point sets X(m) -> Y(m(u)).

Example Scheme_maps-point-image (H119E40)

Mapping a single point is easy.
> P1<s,t> := ProjectiveSpace(Rationals(),1);
> P3<w,x,y,z> := ProjectiveSpace(Rationals(),3);
> f := map< P1 -> P3 | [s^4,s^3*t,s*t^3,t^4] >;
> p := P1 ! [2,1];
> f(p);
(16 : 8 : 2 : 1)
If many points need to be mapped from a fixed point set, a small overhead can be avoided by working with the map of point sets directly.
> K := QuadraticField(5);
> g := f(K);
> ims := [];
> for i in [1..100] do
> Append(~ims, g(P1 ! [i,1]));
> end for;
This example could also have been handled in one step using a sequence constructor.
> pts := [ P1 ! [i,1] : i in [1..100] ];
> f(pts) eq ims;
true
An example where the projection from an elliptic curve to the projective line contains the origin in its base scheme but the image under the extension of the projection is computed by using the place machinery without having to globally extend the map.
> P2<X,Y,Z> := ProjectiveSpace(Rationals(),2);
> E := Curve(P2,Y^2*Z-X^3-X*Z^2);
> p := E![0,0,1];
> f := map<E->P1|[X,Y]>;
> p in BaseScheme(f);
true (0 : 0 : 1)
> f(p);
(0 : 1)

Maps and Schemes

The natural operation for maps on schemes is pullback, that is, compute the preimage. This is rather trivial. On the other hand, computing the image of schemes under a map requires a Gröbner basis calculation so is much harder. If the map has an inverse this image calculation is automatically replaced by the more simple pullback using the inverse map.

Note that, strictly speaking, the image algorithm computes the closure of the image of the map. We still call it the image, though, and don't worry that there may be some points of the image that are not the set-theoretic image of any point of the domain.

Over a field, the equations of the image of a map in a particular degree can be computed using linear algebra, so a distinct intrinsic is provided for this.

Other schemes related to a map are also discussed here.

Pullback(f, X) : MapSch, Sch -> Sch
X @@ f : Sch, MapSch -> Sch
The scheme in the domain of the map of schemes f given by the pullback of the equations defining the subscheme X of the codomain of f. The result will contain the base scheme of f (which won't map onto X under f) but this can be remedied using the (potentially expensive) function call Difference(Pullback(f,X), BaseScheme(f)).

Image(f) : MapSch -> Sch
f(X) : Sch, MapSch -> Sch
Let X be a subscheme of the domain of the map of schemes f such that, if U is the open complement of the base scheme of f, X ∩U is Zariski-dense in X. This intrinsic returns the scheme-theoretic closure of f(X ∩U) in the codomain of f, which we refer to simple as the image f(X). For the first signature the image of the entire domain is returned. Moreover, it is stored with the map f so can be called again later without any recomputation. Note that if the domain of f is projective multi-graded, then X is saturated before the computation to ensure the correct result. For computational efficiency, we do not check that X ∩U is indeed Zariski-dense in X.
Image(f,X,d) : MapSch,Sch,RngIntElt -> []
A basis of the polynomials of degree d in the codomain of the map of schemes f which contain the image f(X). The scheme X must be a subscheme of the domain of f and d must be a positive integer.

For best results for projective schemes, remove the contribution of the irrelevant ideal corresponding to the zero point from X (normalize the equations of the scheme).

Example Scheme_map-image1 (H119E41)

Consider the embedding of the projective line in 3-space as a quartic. It can be defined as the image of a map determined by a 4-dimensional subspace of the degree 4 monomials on the line, for instance: see [Har77] Chapter II, Example 7.8.6 or the later section here on linear systems.
> P1<s,t> := ProjectiveSpace(Rationals(),1);
> P3<w,x,y,z> := ProjectiveSpace(Rationals(),3);
> f := map< P1 -> P3 | [s^4,s^3*t,s*t^3,t^4] >;
> Image(f);
Scheme over Rational Field defined by
-w^2*y + x^3
w*y^2 - x^2*z
-x*z^2 + y^3
-w*z + x*y
> IsNonsingular(Image(f));
true
> f(p) in Image(f) where p is P1 ! [2,1];
true (16 : 8 : 2 : 1)
If the Gröbner basis computation is too expensive, or if a partial solution for the image computation would be acceptable, the function Image(f,C,d) described above and illustrated in the next example calculates those hypersurfaces of degree d containing f(C). Given a bound on d, the equations of the image could also be calculated using this function.

Example Scheme_map-image2 (H119E42)

A situation where one is really interested in the equations of the image in a particular degree occurs in the case of canonical curves. Usually the ideal is generated in degree 2, but for trigonal curves the degree 2 generators only cut out a surface scroll on which the curve is cut out by a relative equation of degree 3.

Here we simply assert that the curve C has genus 5 and that the map f is the canonical map of the curve C. Chapter ALGEBRAIC CURVES describes functions that determine both invariants.

> k := Rationals();
> P2<X,Y,Z> := ProjectiveSpace(k,2);
> P4<a,b,c,d,e> := ProjectiveSpace(k,4);
> C := Curve(P2, X^5 + X*Y^3*Z + Z^5);
> f := map< P2 -> P4 | [Y*Z, X*Y, Z^2, X*Z, X^2] >;
> S := Image(f,C,2);
> S;
Scheme over Rational Field defined by
a*d - b*c
a*e - b*d
c*e - d^2
> Dimension(S);
2
> f(C);
Curve over Rational Field defined by
-d^2 + c*e,
-b*d + a*e,
-b*c + a*d,
a*b^2 + c^2*d + e^3,
a^2*b + c^3 + d*e^2
In this case both image computations are fast so the timing difference between them is tiny. But pushing the genus a little higher soon makes the point.

It is easy to see that S is a scroll: its equations are the rank 2 minors of the matrix

(matrix( a & c & d
b & d & e ) ).

BaseScheme(f) : MapSch -> Sch
The subscheme of the domain X of the map of schemes f where the map is `naively' not defined. When f is expanded, this is equal to the intersection of the base schemes of each of the alternate sets of defining polynomials/rational functions. For a single set of defining polynomials/rational functions, the base scheme is defined by the union of subschemes of X where a denominator of a defining rational function vanishes when the codomain is affine, and by the subset of points of X which are mapped by the given defining polynomials into a null point (with coordinates on which all polynomials in an irrelevant ideal vanish) when the codomain is projective.

BasePoints(f) : MapSch -> SetEnum
BasePoints(f,L) : MapSch,Fld -> SetEnum
If the base scheme of the map of schemes f is finite, this returns a sequence containing those points defined over the base ring which lie in it. Otherwise an error is reported. If a second argument L is included which is an extension field of the base field then base points defined over L are returned.

Example Scheme_map-base-points (H119E43)

We find the base points of a map, although we have to extend the field before we find them all.
> k := GF(7);
> P<x,y,z> := ProjectiveSpace(k,2);
> p := x^2 + y^2;
> f := map< P -> P | [p*x,p*y,z^2*(z-x)] >;
> BasePoints(f);
> Degree(BaseScheme(f));
6
> HasPointsOverExtension(BaseScheme(f));
true
Clearly we are not seeing all the points of indeterminacy of f. We clumsily extend the base field until we do see enough points. Of course, it is clear that the problem is the polynomial p, so a degree 2 extension will be enough.
> BasePoints(f,ext<k|2>);
{ (1 : $.1^36 : 1), ($.1^12 : 1 : 0), ($.1^36 : 1 : 0), (1 : $.1^12 : 1) }
> HasPointsOverExtension(BaseScheme(f),ext<k|2>);
false

Example Scheme_scroll-map-base-points (H119E44)

In this example we make an elementary transformation of scrolls.
> Q := Rationals();
> F<u,v,x,y> := RuledSurface(Q,2);
> G<a,b,r,s> := RuledSurface(Q,3);
> F;
Rational Scroll of dimension 2
Variables : u, v, x, y
Gradings :
1       1       -2      0
0       0       1       1
> phi := map< F -> G | [u,v,x,y*u] >;
Next we find the base points of the map φ by hand.
> Scheme(F,[u,v]) join Scheme(F,[x,u*y]);
Scheme over Rational Field defined by
u*x
v*x
u*y
> RationalPoints($1);
{ (0 : 1 : 0 : 1) }
The map φ is the elementary transformation in the point (0:1:0:1) of F. That is, it is the blowup of this point followed by the contraction of the birational transform of the fibre through this point.

Maps and Closure

ProjectiveClosure(f) : MapSch -> MapSch
The map induced by the map of schemes f between the projective closure of its domain and codomain. If either domain or codomain is already projective, then it remains unchanged in the new map. In particular, if both domain and codomain are already projective, then the returned map is simply f itself.
MakeProjectiveClosureMap(A, P, S) : Aff,Prj,SeqEnum ->
MakePCMap(A, P, S) : Aff, Prj, SeqEnum ->
MakeProjectiveClosureMap(m) : Map ->
MakePCMap(m) : Map ->
If A is an affine space and P a projective space and if S is a sequence of polynomials on A defining a map from A to P (or if m is such a map) then this map is set as the projective closure map of A. There is very little functionality for projective closure maps which are not the standard ones, so this intrinsic is usually used in cases where no relationship between A and P yet exists but the user would like A to behave as a standard patch on P so that the closure of a scheme in A is a scheme in P.
RestrictionToPatch(f,j) : MapSch,RngIntElt -> MapSch
The restriction of the map f, a map of schemes from an affine scheme to a projective scheme, to a rational map from its domain to the jth standard affine patch of its codomain.

RestrictionToPatch(f,i,j) : MapSch,RngIntElt,RngIntElt -> MapSch
The restriction of the map f, a map between two projective schemes, to a rational map from the ith standard affine patch of its domain to the jth patch of its codomain.

Example Scheme_map-patches (H119E45)

The application of closure and patching functions is straightforward. To compute the restriction of a map f to the ith patch of the domain and jth patch of the codomain, essentially set the dim + 2 - ith coordinate function to 1 and divide by the dim + 2 - jth defining equation of f.
> P<w,x,y,z> := ProjectiveSpace(Rationals(),3);
> f := map< P -> P | [1/w,1/x,1/y,1/z] >;
> f12 := RestrictionToPatch(f,1,2);
> f12;
Map of affine spaces defined by [ $.3/$.1, $.3/$.2, $.3 ]
The functions are inevitably rational so cannot be expressed in any coordinates that might already exist on the affine patches. Instead they are expressed in terms of the generators of the function fields.
> ProjectiveClosure(f12);
Map of projective spaces defined by [ x*y*z, w*y*z, w*x*z, w*x*y ]
> ProjectiveClosure(f12) eq f;
true
However, as seen in the final line above, the relationship between a map and its closure is maintained.

Automorphisms

Automorphisms of schemes defined over a field may be constructed. The main cases where there is significant functionality is for automorphisms of affine and projective spaces and curves. Recall that for projective spaces the only regular automorphisms are the linear maps. However there are many more rational automorphisms, often called Cremona transformations. In the case of the projective plane, these form a group generated by linear automorphisms together with a single quadratic transformation. In higher dimensions, the structure of this group is unknown.

Affine spaces have much more complicated automorphism groups. Decomposition results are known in the case of the affine plane over certain fields (the complex numbers for instance), but otherwise no general statements are known. More information and references can be found in [vdE00], especially in the opening essay.

Although automorphisms can be computed, groups of automorphisms cannot be computed except in a very few cases. For the case of curves, see the Algebraic Curves chapter. For ambients, there is currently a function AutomorphismGroup which returns a group together with a map matching group elements with the automorphism they represent only in the case of linear automorphisms of projective spaces defined over a finite field.

Automorphism(X,F) : Sch,SeqEnum -> MapAutSch
The automorphism of the scheme X determined by the sequence of polynomials F defined on X. This function uses a Gröbner basis calculation. If the inverse functions are already known then one can use the map< | > constructor and then a type change or the iso< | > constructor. This is illustrated in Example H119E46.
IdentityAutomorphism(X) : Sch -> MapAutSch
IdentityMap(X) : Sch -> MapAutSch
The identity map X -> X on the scheme X.

IsEndomorphism(f) : MapSch -> BoolElt
Returns true if and only if the domain and range of the maps of schemes f are equal.

IsAutomorphism(f) : MapSch -> BoolElt,AutSch
Returns true if and only if the maps of schemes f is an automorphism of its domain. In this case f is returned as an automorphism as the second value.

Example Scheme_automorphism-construction (H119E46)

In this example we show how to make an automorphism from equations, and also how to include the equations of the inverse map if they are already known. The automorphism is the hyperelliptic involution on a hyperelliptic curve, although we don't use the machinery of hyperelliptic curves here.

> A<u,v> := AffineSpace(Rationals(),2);
> f := v^5 + 2*v^3 + 5;
> C := Curve(A,u^2 - f);
> phi := Automorphism(C,[-u,v]);
> Type(phi);
MapAutSch
> phi;
Mapping from: Crv: C to Crv: C
with equations :
-u
v
and inverse
-u
v
In this case we clearly know the inverse map in advance. We can make an automorphism of C as follows.
> psi := map< C -> C | [-u,v],[-u,v] >;
> psi eq phi;
true
> Type(psi);
MapSch
The map ψ is fine, but it is not of the same type as φ. We make the type change, if desired, as follows.
> bool,psi1 := IsAutomorphism(psi);
> bool;
true
> Type(psi1);
MapAutSch

Example Scheme_aut-aff-jac (H119E47)

A standard Gröbner basis exercise is to test particular examples of the Jacobian conjecture. This states that a polynomial map of the plane is invertible if (and only if) its jacobian determinant is everywhere nonzero. The problem here is to calculate the conjectured inverse polynomial map.
> A<u,v> := AffineSpace(Rationals(),2);
> f := u^3 + 3*u^2*v^2 + 3*u^2 + 3*u*v^4 + 6*u*v^2 + v^6 + 3*v^4 + v + 3;
> g := u + v^2 + 1;
> J := JacobianMatrix([f,g]);
> Determinant(J);
-1
> m := map< A -> A | [f,g] >;
> m;
Mapping from: Aff: A to Aff: A
with equations :
u^3 + 3*u^2*v^2 + 3*u^2 + 3*u*v^4 + 6*u*v^2 + v^6 + 3*v^4 + v + 3
u + v^2 + 1
> IsAutomorphism(m);
true
> m;
Mapping from: Aff: A to Aff: A
with equations :
u^3 + 3*u^2*v^2 + 3*u^2 + 3*u*v^4 + 6*u*v^2 + v^6 + 3*v^4 + v + 3
u + v^2 + 1
and inverse
-u^2 + 2*u*v^3 - 6*u*v + 10*u - v^6 + 6*v^4 - 10*v^3 - 9*v^2 + 31*v - 26
u - v^3 + 3*v - 5
> Type(m);
MapSch
> Inverse(m);
Mapping from: Aff: A to Aff: A
with equations :
-u^2 + 2*u*v^3 - 6*u*v + 10*u - v^6 + 6*v^4 - 10*v^3 - 9*v^2 + 31*v - 26
u - v^3 + 3*v - 5
and inverse
u^3 + 3*u^2*v^2 + 3*u^2 + 3*u*v^4 + 6*u*v^2 + v^6 + 3*v^4 + v + 3
u + v^2 + 1
The automorphism test returns two values. The first, true, confirms that the map m is an automorphism. In doing this test, Magma computes the inverse and stores it with m. The second is the same map m, now with its inverse computed, but with the type of an automorphism.
> _,maut := IsAutomorphism(m);
> maut;
Mapping from: Aff: A to Aff: A
with equations :
u^3 + 3*u^2*v^2 + 3*u^2 + 3*u*v^4 + 6*u*v^2 + v^6 + 3*v^4 + v + 3
u + v^2 + 1
and inverse
-u^2 + 2*u*v^3 - 6*u*v + 10*u - v^6 + 6*v^4 - 10*v^3 - 9*v^2 + 31*v - 26
u - v^3 + 3*v - 5
> Type(maut);
MapAutSch
Affine Automorphisms

The first constructor below checks that the proposed map is indeed an automorphism by computing an inverse for the map determined by the arguments. It is a potentially expensive test. The other constructors are all either clearly automorphisms or else require only very simple tests.

Automorphism(A,F) : Sch,SeqEnum -> MapSch
The automorphism of the affine space A determined by the sequence of functions F defined on A.

Automorphism(A,M) : Sch,Mtrx -> MapIsoSch
The linear automorphism of the affine space A determined by the entries of the matrix of base ring elements M acting from the right on points.
Translation(A,p) : Sch, Pt -> MapSch
The translation map of the affine space A taking the rational point p to the origin.

PermutationAutomorphism(A, g) : Sch,GrpPermElt -> MapIsoSch
Automorphism(A, g) : Sch, GrpPermElt -> MapIsoSch
The automorphism of the affine space A that permutes its coordinates according to the permutation g.

Example Scheme_aut-aff-perm (H119E48)

Permutations are easy to create as elements of the symmetric group. The symmetric group used must act on the set of n points, where n is the dimension of the affine space, even if it is only intended to permute a few of the coordinates.
> A := AffineSpace(Rationals(),5);
> g := SymmetricGroup(5) ! (1,2,3);
> f := PermutationAutomorphism(A,g);
> p := A ! [1,2,3,4,5];
> f(p);
(2, 3, 1, 4, 5)
Automorphism(A,p) : Sch, RngMPolElt -> IsoSch
The automorphism which takes the first coordinate x of the affine space A to x + p. The polynomial p must be a function on A which does not involve x.

AffineDecomposition(f) : MapSch -> MapSch,MapSch
If f is an affine linear endomorphism, that is, an automorphism of some affine space defined by polynomials of degree at most 1, this returns a linear endomorphism ell and a translation t such that, in Magma notation, f eq l * t.

Example Scheme_decompose-automorphism (H119E49)

In this example we make an affine linear map by composing a linear map and a translation. Then we promptly decompose it into these components.
> A<x,y,z> := AffineSpace(Rationals(),3);
> f := Automorphism(A,2*y+3*z) * Translation(A,A ! [2,3,5]);
> l,t := AffineDecomposition(f);
> l,t;
Mapping from: Aff: A to Aff: A
with equations :
x + 2*y + 3*z
y
z
and inverse
x - 2*y - 3*z
y
z
Mapping from: Aff: A to Aff: A
with equations :
x - 2
y - 3
z - 5
and inverse
x + 2
y + 3
z + 5
> f eq l * t;
true
Note that the composition l * t in Magma means that the map ell is applied first followed by t.
> p := A ! [1,2,3];
> f(p);
(12, -1, -2)
> t(l(p));
(12, -1, -2)
NagataAutomorphism(A) : Aff -> MapSch
This intrinsic returns the Nagata automorphism in a standard form:

(u, v, w) |-> ( - u2w3 - 2uv2w2 - 2uvw + u - v4w - 2v3, uw2 + v2w + v, w).

Recall that this is an automorphism of affine 3-space A which is not known to be tame, that is, admits no known factorisation into automorphisms of the types listed above.

Projectivity(A,M) : Aff,Mtrx -> MapAutSch
The restriction to the affine space A of the linear automorphism of its projective closure determined by the matrix M. Note that this map is not usually regular on A but it is an isomorphism where it is defined.

Example Scheme_projectivity (H119E50)

Most projectivities on an affine space are not regular maps. By definition, the equations which define them are naturally rational polynomials. That is the reason for naming the variables in the field of fractions of the coordinate ring of A in the following code.
> k := FiniteField(23);
> A<x,y,z> := AffineSpace(k,3);
> M := Matrix(k,4,4,[1,2,3,-4,2,3,5,6,3,4,5,9,4,5,6,0]);
> phi := Projectivity(A,M);
> KA<u,v,w> := Parent(x/y);
> phi;
Mapping from: Aff: A to Aff: A
with equations :
(6*u + 12*v + 18*w + 22)/(u + 7*v + 13*w)
(12*u + 18*v + 7*w + 13)/(u + 7*v + 13*w)
(18*u + v + 7*w + 8)/(u + 7*v + 13*w)
and inverse
(11*u + 15*v + 5)/(u + 20*w + 2)
(9*u + 16*v + w + 12)/(u + 20*w + 2)
(12*u + 15*v + 3*w + 16)/(u + 20*w + 2)
Notice that the inverse of φ has also been computed. In fact, φ has been returned as an automorphism even though it is not regular.
> Type(phi);
MapAutSch
> IsRegular(phi);
false
Projective Automorphisms

As in the case of affine spaces, a version of the automorphism constructor is provided which takes a sequence of polynomials as second argument. It is included mainly for completeness whereas the other constructors are more appropriate for constructing automorphisms in the contexts in which they often arise.

Projective automorphisms (which are regular) are always linear so they have an associated matrix with respect to the basis of monomials. A function is provided to retrieve this matrix, and conversely automorphisms may be created using matrices. In fact, if the projective space is defined over a finite field, then the automorphism group can be computed (as a group in Magma) and its elements can be realised as matrices.

Also included are functions for creating a nonregular birational automorphism of projective space, the standard quadratic transformation. When working in the plane, this together with linear automorphisms generates the group of birational automorphisms. An example of factorising a birational automorphism in this group is given.

Automorphism(P,F) : Prj, SeqEnum -> MapSch
The automorphism of the projective space P determined by the sequence of polynomials F defined on P.

Matrix(f) : MapSch -> Mtrx
The matrix corresponding to the linear automorphism f of a projective space.

Automorphism(P,M) : Sch,Mtrx -> MapSch
The linear automorphism of the projective space P determined by the entries of the matrix of base ring elements M acting on the left of coordinates.
Aut(P) : Prj -> PowAutSch
The parent of automorphisms of the projective space P.
AutomorphismGroup(P) : Prj -> GrpMat,Map
The automorphism group of the projective space P together with a map from this group to the set of automorphisms of P, that is, the parent of such automorphisms. The space P must be defined over a finite field for this intrinsic. Note that currently the group returned is a general linear group rather than the projectivised version. This will be changed in the future, but in any case does not create much confusion.

Example Scheme_projective-automorphism-group (H119E51)

When a projective space is defined over a finite field, then its automorphism group can be realised as a group of matrices in a natural way. First we see how to use standard intrinsics to realise the correspondence between matrices and linear automorphisms of projective space.
> P<x,y,z> := ProjectiveSpace(GF(5),2);
> phi := Automorphism(P,[x+y,y,z]);
> M := Matrix(phi);
> M;
[1 0 0]
[1 1 0]
[0 0 1]
> Automorphism(P,M) eq phi;
true
Since P is a projective space defined over a finite field, we can actually work with a group which is isomorphic to its automorphism group. The map m computed below maps matrices to automorphisms and conversely its inverse constructs a matrix from an automorphism.
> G,m := AutomorphismGroup(P);
> G;
GL(3, GF(5))
> m;
Mapping from: GrpMat: G to Parent structure for automorphisms of P
> phi eq m(Transpose(M));
true
> Transpose(phi @@ m);
[1 0 0]
[1 1 0]
[0 0 1]
The parent of automorphisms is also an object in Magma. It can be created using Aut(P).
> Aut(P);
Set of all automorphisms of P
> Aut(P) eq Codomain(m);
true
TranslationOfSimplex(P,Q) : Prj, [Pt] -> MapSch
The unique automorphism of the n-dimensional projective space P taking the n + 2 standard simplex points (1:0 ... :0), ... and (1:1 ... :1) to the points of the sequence Q. The sequence Q must comprise n + 2 linearly independent rational points of P.

Translation(P,Q) : Prj, [Pt] -> MapSch
This function returns an automorphism which translates the standard coordinate points to the points of the sequence Q. The sequence Q must comprise n + 1 linearly independent rational points of the projective space P where n is the dimension of P. This intrinsic puts no condition on the usual final point (1:1 ... :1) of the standard simplex. In other words, it creates the automorphism of P by the matrix having the coordinates of the n + 1 points of Q as its columns. This automorphism is not uniquely determined since (PGL)(n, k) is n + 2 transitive.

Translation(P,p,q) : Prj, Pt, Pt -> MapSch
A choice of linear automorphism of the projective space P which takes the rational point p to the rational point q.

Translation(X,p) : Sch, Pt -> MapSch
A choice of linear automorphism of the projective space P taking the point (0: ... :0:1) to the rational point p.

Example Scheme_translation (H119E52)

The intrinsic Translation(X,p) works in both the affine and the projective context. For an affine scheme, it makes the translation which moves the point p to the origin.
> A<u,v> := AffineSpace(Rationals(),2);
> Translation(A,A![1,2]);
Mapping from: Aff: A to Aff: A
with equations :
u - 1
v - 2
and inverse
u + 1
v + 2
In the projective case, the resulting translation moves the point p to the image of the origin on the first affine patch. When the point p lies on the first affine patch, then the translation is the obvious one. But when it doesn't a permutation of the coordinates is made first.
> P<x,y,z> := ProjectiveSpace(Integers(),2);
> p := P ! [3,2,1];
> f := Translation(P,p);
> f;
Mapping from: Prj: P to Prj: P
with equations :
-x + 3*z
-y + 2*z
z
and inverse
-x + 3*z
-y + 2*z
z
> f(p);
(0 : 0 : 1)
> p := P ! [0,1,0];
> f := Translation(P,p);
> f(p);
(0 : 0 : 1)
> f;
Mapping from: Prj: P to Prj: P
with equations :
-x
-z
y
and inverse
x
-z
y
QuadraticTransformation(P) : Prj -> MapSch
QuadraticTransformation(P,Q) : Prj,SeqEnum -> MapSch
The first function is the standard quadratic transformation of projective space P taking its coordinates to their reciprocals, that is (x:y: ... ) |-> (1/x:1/y: ... ). The second conjugates the standard map with a translation of the points of Q to the standard basis vectors. The sequence Q must comprise n + 1 linearly independent rational points of P where n is the dimension of P.

QuadraticTransformation(X) : Sch -> Sch, MapIsoSch
QuadraticTransformation(X,Q) : Sch, [Pt] -> Sch, MapIsoSch
The birational pullback of the projective scheme X by the quadratic transformation. In the first intrinsic the transformation used is QuadraticTransformation(P) while in the second, the transformation is QuadraticTransformation(P,Q) where P is the ambient projective space of X. Thus Q must comprise n + 1 linearly independent rational points of P where n is the dimension of P. Exceptional components in the total pullback of X are removed.

Example Scheme_cremona-factorisation (H119E53)

This example shows how to factorise a simple Cremona transformation. (The reader who knows something about this will note that in this example we take no account of the Nöther--Fano inequalities nor do we analyse infinitely near points. In fact, we are rather lucky to be able to complete the factorisation.)
> k := RationalField();
> P<x,y,z> := ProjectiveSpace(k, 2);
> funs := [ 2/3*x^2*y^2 + 2/3*x^2*y*z + x*y^2*z + x*y*z^2,
>     1/3*x^2*y^2 + 4/3*x^2*y*z + x^2*z^2 + 1/2*x*y^2*z + 1/2*x*y*z^2,
>     2/9*x^2*y^2 + 2/3*x^2*y*z + 2/3*x*y^2*z + x*y*z^2 + 1/2*y^2*z^2 ];
> g := map< P -> P | funs >;
> FunctionDegree(g);
4
> RationalPoints(BaseScheme(g));
{@ (3/4 : -1 : 1), (0 : 1 : 0), (0 : 0 : 1), (-3/2 : -1 : 1), (1 : 0 : 0) @}
Our aim is to precompose g with quadratic transformations which will reduce the degree of its defining polynomials, currently 4. When the function degree is reduced to 1 the factorisation is complete since the inverse sequence of quadratic transformations will comprise a factorisation of g up to a translation. (Draw the diagram of maps!) That will be done at the end. First a quadratic transformation in the three coordinate points is made since these points are the simplest appearing in the list of base points. (The complete mathematical theory works hard to make the choice of map here the right one: clearly no hard work has been done here in making the choice of coordinate points.)
> std_quad := QuadraticTransformation(P);
> g1 := std_quad * g;
> // (Expand and) extend the map to its maximal domain:
> g1:=Extend(g1);
> FunctionDegree(g1);
2
> S := BaseScheme(g1);
> RationalPoints(S);
{@ (4/3 : -1 : 1), (-2/3 : -1 : 1), (-2/3 : 0 : 1) @}
> HasPointsOverExtension(S);
false
Good! With only three non-collinear points of indeterminacy (the final line makes sure there aren't further points defined over some extension of the base ring) we are only one step away from completing the factorisation. We make a quadratic transformation in these three noncollinear points.
> tr := Translation(P,[ p : p in $2 ]);
> quad := std_quad * tr;
> g2 := quad * g1;
> g2:=Extend(g2);
> FunctionDegree(g2);
1
So g is seen to be the composition of linear translations and standard quadratic transformations: g2 is itself a linear translation. This sequence of maps is reconstructed in reverse order to get g. All the maps should be inverted, but note that the quadratic transformations are selfinverse so that this is rather easy. Of course, composing the maps in the order they were discovered above produces the birational inverse of g.
> f3 := f2 * g2
>     where f2 is f1 * std_quad
>     where f1 is std_quad * Inverse(tr);
> Expand(f3) eq g;
true

Scheme Graph Maps

In Magma V2.16, we have introduced an alternative to the usual MapSch for maps between ordinary projective schemes: a new type MapSchGrph, which we refer to as graph maps. These are objects whose defining data is the closure of the graph of a rational map, without explicit defining or inverse polynomials. This is a fairly traditional way to consider maps in algebraic geometry and the main motivation for their introduction is for divisor maps of invertible sheaves. These are naturally constructed in graph form and the further derivation of explicit defining polynomials can be quite time-consuming and lead to extremely high degree, ugly results.

As well as being more naturally constructible in certain situations, graph maps have advantages over MapSchs in a number of contexts.

1
A graph map is automatically maximally defined, so Extend and alternative equations are unnecessary.

2
Computation of images of subschemes of the domain or of the inverse of a map go, in one way or another, through the graph of the map, so it is more efficient to already have it in graph form.

3
For an invertible graph map, separate inverse equations are not required. It is only necessary to record that it is invertible and consider the "reverse" of the graph.

If f: X -> Y is a rational map, the closure of its graph G naturally lies in X x Y. For computational ease, we take G as lying in the product projective space of the ambients of X and Y, Functionally, it is defined by a bihomogeneous ideal in a polynomial ring with n + m + 2 variables, where n (resp. m) is the dimension of the ambient of X (resp. Y). There is a primitive basic user constructor described below. Graph maps are more naturally constructed and returned by specialised functions.

Graph maps have most of the functionality of MapSch maps including IsInvertible and Expand. Rather than repeat the list of all of the relevant intrinsics, we note here that the major functionality not currently available for them is

1
No defining or inverse defining polynomials.

2
No pointset map construction: it is not possible to ask for the image or preimage under a graph map of a point in a pointset over a proper extension of the base field. Neither are there images and preimages of rational functions.

3
Restriction to affine patchs of the domain or codomain is not possible (graph maps are only between projective schemes). However, restriction to a closed subscheme of the domain or codomain via Restriction is allowable as usual.

4
Any specialised MapSch functionality only available for maps between particular scheme types, like maps between curves.

Graph maps can be composed in the usual way for maps, but can not be mixed with MapSch maps in composition.

A further minor restriction has been built in for implementational efficiency. It is assumed for the domain X of a graph map that there is no coordinate hyperplane that contains some but not all of the irreducible components of X. In particular, there is no problem if X is irreducible. For the image f(S) of a subscheme S of X, the same restriction applies to S.

A graph map f may be converted into normal MapSch with an intrinsic given below. If f is known invertible, this also computes inverse defining polynomials. It should be noted that for maps between complicated schemes, this often produces a MapSch with extremely high degree defining polynomials and a large base scheme where it is not defined. In such cases, the original MapSchGrph can be a functionally much more efficient representation.

SchemeGraphMap(X, Y, I) : Sch, Sch, RngMPol -> MapSchGrph
    Saturated: BoolElt                  Default: false
The schemes X and Y are ordinary projective schemes with ambients Pm and Pn respectively. The ideal I is in an n + m + 2 variable polynomial ring R that should have the grevlex ordering. The ideal I should define the closure of the graph of a rational map from X to Y if R is identified with the coordinate ring of the product projective space of Pm and Pn such that the first m + 1 variables correspond to the variables of the coordinate ring of Pm in the same order and the last n + 1 variables correspond to those of Pn in the same order.

Thus, the ideal I should be bihomogeneous in the first m + 1 and second n + 1 variables and be large enough to define the graph of the map, though it doesn't have to be the maximal defining ideal. For example, if a map is explicitly given by defining polynomials [F0(x), ..., Fn(x)] where we use xi and yi to denote the variables of R corresponding to the domain and codomain variables, then the ideal generated by yiFj(x) - yjFi(x) forall 0 ≤i, j ≤n and the defining equations for X will define the graph if the defining polynomials give an everywhere defined map. We give an explicit example below. If there is a non-empty base scheme, it will be necessary to saturate the above ideal by one of the Fi(x) that doesn't vanish on any component of the domain. It is then "domain" saturated.

A defining ideal like the above that hasn't been saturated by an Fi(x) is usually not maximal and for functional purposes has to be saturated by an appropriate domain variable using ColonIdeal. This is performed internally. If the user already knows that I is domain saturated, he can set the parameter Saturated (default false) to true to avoid this.

This is a simple convenience function that performs practically no checks on the validity of the input data.

SchemeGraphMapToSchemeMap(f) : MapSchGrph -> MapSch
Converts the graph map f into a usual scheme map. As noted in the introduction, if f is a map between fairly complex schemes, this can be quite a computationally heavy procedure and can produce very large degree, non-sparse defining polynomials and the MapSch produced can have a large base scheme, even if f is defined everywhere on its domain. If f is known invertible (see below), inverse definingpolynomials are also added to the result.
IsInvertible(f) : MapSchGrph -> BoolElt, MapSchGrph
As for the MapSch version, returns whether f is birationally invertible and, if so, also returns the inverse map. This records that f is known invertible internally, as the inverse map just has the graph reversed (also the graph ideal may need to be saturated with respect to a codomain variable, which will be performed here if it is determined that the map is invertible) so no inverse equations are added. The HasKnownInverse intrinsic for MapSchs, which returns whether the map has already been determined to be invertible, is also available.

Example Scheme_graph_maps (H119E54)

Let X be an elliptic curve, given as an intersection of quadrics in P3. Here we start with a map from X into P4, given by cubics, that is birational onto its image. We show how to convert this into a graph map, take restrictions, check for invertibility and various other things.
> P3<x,y,z,t> := ProjectiveSpace(Rationals(),3);
> X := Scheme(P3,[x*t-y*z, x^2+y^2-4*z^2+7*t^2]);
> P4<a,b,c,d,e> := ProjectiveSpace(Rationals(),4);
> mp_seq := [x^3,y^3,z^3,t^3,y*z*t]; // polys defining a map to P^4
> mp := map<X->P4|mp_seq>;
> // Will now define the graph map
> R<x1,x2,x3,x4,y1,y2,y3,y4,y5> := PolynomialRing(Rationals(),9,"grevlex");
> hm := hom<CoordinateRing(P3) -> R |[R.i : i in [1..4]]>; // usual map
> grI := ideal<R|[(R.(i+4))*hm(mp_seq[j])-(R.(j+4))*hm(mp_seq[i]):
>   i in [j+1..5] , j in [1..5]] cat [hm(b) : b in Basis(Ideal(X))]>;
> gr_mp := SchemeGraphMap(X,P4,grI); // the graph map
> // check that gr_mp does give mp
> mp eq SchemeGraphMapToSchemeMap(gr_mp);
true
> Y := gr_mp(X);
> Y eq mp(X);
true
> // take restrictions to the image
> gr_mp1 := Restriction(gr_mp,X,Y);
> mp1 := Restriction(mp,X,Y);
> // check that gr_mp1 still gives mp1
> mp1 eq SchemeGraphMapToSchemeMap(gr_mp1);
true
> boo := IsInvertible(gr_mp1);
> boo;
true
> // find the image and preimage of a point
> pt := X![2,0,1,0];
> ipt := gr_mp1(X![2,0,1,0]);
> iminv := ipt @@ gr_mp1;
> Dimension(iminv); Degree(iminv);
0
2
> // the preimage is just pt doubled
> Support(iminv);
{ (2 : 0 : 1 : 0) }
V2.28, 13 July 2023