An affine or projective plane in Magma consists of three objects: the plane P itself, the point--set V of P, and the line--set L of P.
Although called the point--set and line--set, V and L are not actual Magma sets. They simply act as the parent structures for the points and lines (respectively) of the plane P, enabling easy creation of these objects via the ! and . operators.
The point--set V belongs to the Magma category PlanePtSet, and the line--set L to the category PlaneLnSet.
In this section, the functions used to create point--sets, line--sets and the points and lines themselves are described.
As mentioned above, the point--set and line--set are returned as the second and third arguments of any function which creates a plane. They can also be created via the following two functions.
Given a plane P, return the point--set V of P.
Given a plane P, return the line--set L of P.
For efficiency and clarity, the points and lines of a plane are given special types in Magma. The category names for points and lines are PlanePt and PlaneLn respectively. They can be created in the following ways.
Given the point--set V of a plane P and an integer i, return the i-th point of P.
Given the point--set V of a classical projective plane P = PG2(K), and elements a, b, c of the finite field K, create the projective point (a : b : c) in the plane P.
Given the point--set V of a classical affine plane P = AG2(K), and elements a, b of the finite field K, create the point (a, b) in the plane P.
Given the point--set V of a plane P, return the point of P corresponding to the element x, which should be coercible into the underlying point set for P. (In the case of classical planes, x should be coercible to a vector.)
Given the point--set V of a plane P, return a representative point of P.
Given the point--set V of a plane P, return a random point of P.
Given the line--set L of a plane P and an integer i, return the i-th line of P.
Given the line set L of a classical plane P defined over a finite field K, and elements a, b, c of K, create the line <a : b : c> (i.e. the line given by the equation ax + by + cz = 0 if P is projective, or ax + by + c = 0 if P is affine).
Given the line set L of a classical affine plane P = AG2(K), and elements m, b of the finite field K, create the affine line y = mx + b in P.
Given the line--set L of a plane P and a set or sequence S of collinear points of P, return the line containing the points of S.
Given the line--set L of a plane P and a line l of a (possibly) different plane (generally a subplane of P), return the line of P corresponding to l.
Given the line--set L of a plane P, return a representative line of P.
Given the line--set L of a plane P, return a random line of P.
> P, V, L := FiniteProjectivePlane(5); > V; Point-set of Projective Plane PG(2, 5) > L; Line-set of Projective Plane PG(2, 5)Create the third point of P:
> V.3; ( 0 : 0 : 1 )Create the point (1:2:3) of P:
> V![1, 2, 3]; ( 1 : 2 : 3 )Choose a random point of P:
> Random(V); ( 1 : 0 : 0 ) > Random(V); ( 0 : 0 : 1 )Create the sixth line of P:
> L.6; < 1 : 1 : 3 >Create the line of P given by the equation 4x + 3y + 2z = 0:
> L![4, 3, 2]; < 1 : 2 : 3 >Create the line of P containing the points (0:0:1) and (0:1:0):
> L![ V | [0, 0, 1], [0, 1, 0] ]; < 1 : 0 : 0 >Get a representative from the line-set of P, and a random line:
> Rep(L); < 1 : 0 : 0 > > Random(L); < 1 : 2 : 4 >Now we look at a non-classical plane.
> V := {2, 4, 6, 8}; > A, P, L := FiniteAffinePlane< SetToIndexedSet(V) | Setseq(Subsets(V, 2)) >; > A: Maximal; Affine Plane of order 2 Points: {@ 2, 4, 6, 8 @} Lines: {6, 8}, {2, 6}, {2, 8}, {2, 4}, {4, 6}, {4, 8} > P; Point-set of Affine Plane of order 2 > L; Line-set of Affine Plane of order 2Get the third point of A:
> P.3; 6Create the point of A given by the integer 4:
> P!4; 4Get a representative from the point--set of A:
> Rep(P); 2Get the third line of A:
> L.3; {2, 8}Create the line of A containing the integers 2 and 6:
> L![2, 6]; {2, 6}Choose a random line from A:
> Random(L); {6, 8}
The ParentPlane function allows you to access the plane to which a point, line, point--set or line--set belongs.
The plane P for which V is the point--set.
The plane P for which L is the line--set.
The plane P for which p is a point.
The plane P for which l is a line.