There exist natural mathematical constructions to form a projective plane from an affine plane and vice versa. The functions in the this section provide a quick and easy way to do this in Magma.
The affine plane obtained by removing the line l from the projective plane P, together with the point set and line set of the affine plane, plus the embedding map from the affine plane to P.
The projective completion of the affine plane P, together with the point set and line set of the projective plane, plus the embedding map from P to the projective plane.
> A := FiniteAffinePlane(3); > P := ProjectiveEmbedding(A); > P; Projective Plane of order 3 > A2 := FiniteAffinePlane(P, Random(LineSet(P))); > A2; Affine Plane of order 3 > iso, map := IsIsomorphic(A, A2); > is_iso, map := IsIsomorphic(A, A2); > is_iso; true > map; Mapping from: PlaneAff: A to PlaneAff: A2We demonstrate the use of the embedding map to get the correspondence between the points of the affine and projective planes.
> K<w> := GF(4); > A, AP, AL := FiniteAffinePlane(K); > P, PP, PL, f := ProjectiveEmbedding(A);Now take a point of the affine plane and map it into the projective.
> AP.5; ( 1, w ) > AP.5 @ f; 5Our point corresponds to PP.5, which in the affine plane is the pair (1, w). The map f can be applied to any point or line of the affine plane to get the corresponding point or line of the projective plane. Given any point or line of the projective plane, provided that it is not on the adjoined line at infinity, the preimage in the affine plane can be found.
The line at infinity is always the last line in the line set of the projective plane created by ProjectiveEmbedding. We will call this line linf:
> linf := PL.#PL; > linf; {17, 18, 19, 20, 21} > SetSeed(1, 3); > p := Random(PP); > p in linf; false > p @@ f; ( w, 1 ) > l := Random(PL); > l eq linf; false > l @@ f; < 1 : 1 : 0 > > $1 @ f eq l; trueSince neither p nor l were infinite we could find their preimages under f. Of course, when we map a line from P to A and back, we get the line we started with.
When an embedding is constructed by FiniteAffinePlane(P, l), then l is the line at infinity for this embedding.