In this chapter we show how one can work with finite affine spaces in FinInG.
An affine space can be loosely described as the ``geometry you get'' when you remove a hyperplane from a projective space. Lines which were concurrent in a point of the subtracted hyperplane, are now parallel. Conversely, one can ``complete'' an affine space naturally to produce a projective space, by adding a hyperplane at infinity. In order to implement (Desarguesian) affine spaces in FinInG, we have to represent the subspaces in a standard fashion. The common representation is that of a coset of a vector subspace
v+S.
Hence one can think of an affine variety as consisting of: (i) a projective variety, and (ii) a ``direction''. Thus in FinInG, we represent a variety of rank at least 2 by a pair
[v, mat]
where v is a row vector and mat is a matrix (representing a basis of the associated projective variety). For affine points, we simply use vectors. Here is a basic example of how we can work with affine spaces in FinInG.
gap> ag := AffineSpace(3,3); AG(3, 3) gap> points := Points(ag);; gap> x := Random(points); <a point in AG(3, 3)> gap> Display(x); Affine point: [ Z(3), Z(3), 0*Z(3) ] gap> planes := AsList( Planes(ag) );; gap> p := Random(planes); <a plane in AG(3, 3)> gap> Display(p); Affine plane: Coset representative: [ 0*Z(3), 0*Z(3), 0*Z(3) ] Coset (direction): [ [ Z(3)^0, 0*Z(3), Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] gap> g := CollineationGroup( ag ); AGL(3,3) |
> AffineSpace ( d, F ) | ( operation ) |
> AffineSpace ( d, q ) | ( operation ) |
> AG ( d, F ) | ( operation ) |
> AG ( d, q ) | ( operation ) |
Returns: an affine space
d must be a positive integer. In the first form, F is a field and the function returns the (Desarguesian) affine space of dimension d over F. In the second form, q is a prime power specifying the size of the field. We have also installed the synonym AG
, as this is the customary shorthand notation for an affine space.
gap> AffineSpace(3,GF(3)); AG(3, 3) gap> AffineSpace(3,3); AG(3, 3) |
> AffineSubspace ( geo, v ) | ( operation ) |
> AffineSubspace ( geo, v, M ) | ( operation ) |
Returns: a subspace of an affine space
geo is an affine space, v is a row vector, and M is a matrix. There are two representations necessary for affine subspaces in FinInG: (i) points represented as vectors and (ii) subspaces of dimension at least 2 represented as a coset of a vector subspace:
v+S.
For the former, the underlying object is just a vector, whereas the second is a pair [v, M] where v is a vector and M is a matrix representing the basis of S. Now there is a canonical representative for the coset v+ S, and the matrix M is in semi-echelon form , therefore we can easily compare two affine subspaces. If no matrix is given in the arguments, then it is assumed that the user is constructing an affine point.
gap> ag := AffineSpace(3, 3); AG(3, 3) gap> x := [[1,1,0]]*Z(3)^0; [ [ Z(3)^0, Z(3)^0, 0*Z(3) ] ] gap> v := [0,-1,1] * Z(3)^0; [ 0*Z(3), Z(3), Z(3)^0 ] gap> line := AffineSubspace(ag, v, x); <a line in AG(3, 3)> |
> Span ( u, v ) | ( operation ) |
Returns: a subspace
u and v are subspaces of an affine space. This function returns the join of the two subspaces, that is, the span of the two subspaces.
gap> ag := AffineSpace(4,5); AG(4, 5) gap> p := AffineSubspace(ag, [1,0,0,0] * One(GF(5)) ); <a point in AG(4, 5)> gap> r := AffineSubspace(ag, [0,1,0,0] * One(GF(5)) ); <a point in AG(4, 5)> gap> l := Join(p, r); <a line in AG(4, 5)> gap> l^_; [ [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [ [ Z(5)^0, Z(5)^2, 0*Z(5), 0*Z(5) ] ] ] gap> Display(l); Affine line: Coset representative: [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ] Coset (direction): [ [ Z(5)^0, Z(5)^2, 0*Z(5), 0*Z(5) ] ] |
> Meet ( u, v ) | ( operation ) |
Returns: a subspace
u and v are subspaces of an affine space. This function returns the meet of the two subspaces. If the two subspaces are disjoint, then Meet returns [ ].
gap> ag := AffineSpace(4,5); AG(4, 5) gap> p := AffineSubspace(ag, [1,0,0,0] * One(GF(5)), > [[1,0,0,-1], [0,1,0,0],[0,0,1,3]] * One(GF(5))); <a solid in AG(4, 5)> gap> l := AffineSubspace(ag, [0,0,0,0] * One(GF(5)), [[1,1,0,0]] * One(GF(5)) ); <a line in AG(4, 5)> gap> x := Meet(p, l); <a point in AG(4, 5)> gap> x^_; [ Z(5)^0, Z(5)^0, 0*Z(5), 0*Z(5) ] gap> Display(x); Affine point: [ Z(5)^0, Z(5)^0, 0*Z(5), 0*Z(5) ] |
> ShadowOfElement ( as, v, type ) | ( operation ) |
Returns: the subspaces of the affine space as of dimension type which are incident with v
as is an affine space and v is an element of as. This operation computes and returns the subspaces of dimension type which are incident with v. In fact, this operation returns a collection which is only computed when iterated (such as when applying AsList
to the collection). Some shorthand notation for ShadowOfElement
is available for affine spaces: Points(as,v)
, Points(v)
, Lines(v)
, etc.
gap> as := AffineSpace(3, 3); AG(3, 3) gap> l := Random( Lines( as ) ); <a line in AG(3, 3)> gap> planesonl := Planes(l); <shadow planes in AG(3, 3)> gap> AsList(planesonl); [ <a plane in AG(3, 3)>, <a plane in AG(3, 3)>, <a plane in AG(3, 3)>, <a plane in AG(3, 3)> ] |
> ShadowOfFlag ( as, list, type ) | ( operation ) |
Returns: the subspaces of the affine space as of dimension type which are incident with each element of list
as is an affine space and list is a list of pairwise incident elements of as. This operation computes and returns the subspaces of dimension type which are incident with every element of list. In fact, this operation returns a collection which is only computed when iterated (such as when applying AsList
to the collection).
gap> as := AffineSpace(3, 3); AG(3, 3) gap> l := Random( Lines( as ) ); <a line in AG(3, 3)> gap> x := Random( Points( as ) ); <a point in AG(3, 3)> gap> flag := [x, l]; [ <a point in AG(3, 3)>, <a line in AG(3, 3)> ] gap> shadow := ShadowOfFlag( as, flag, 3 ); <shadow planes in AG(3, 3)> gap> AsList(shadow); [ <a plane in AG(3, 3)>, <a plane in AG(3, 3)>, <a plane in AG(3, 3)>, <a plane in AG(3, 3)> ] |
> IsParallel ( u, v ) | ( operation ) |
Returns: true or false
The arguments u and v must be affine subspaces of a common affine space, of the same dimension. These two subspaces are parallel if and only if they are cosets of the same vector subspace.
> ParallelClass ( as, v ) | ( operation ) |
> ParallelClass ( v ) | ( operation ) |
Returns: a collection of affine subspaces
The argument v is an affine subspace of as. This operation returns a collection for which an iterator is installed for it. The collection represents the set of elements of as of the same type as v which are parallel to v; they have the same direction. If v is a point, then this operation returns the collection of all points of as. If one argument is given, then it is assumed that the affine space which we are working with is that which v contains as a component.
gap> as := AffineSpace(3, 3); AG(3, 3) gap> l := Random( Lines( as ) ); <a line in AG(3, 3)> gap> pclass := ParallelClass( l ); <parallel class of lines in AG(3, 3)> gap> AsList(pclass); [ <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)>, <a line in AG(3, 3)> ] |
Recall from ``All the subspaces or just one at a time'' from Chapter 8, that an iterator allows us to obtain elements from a collection one at a time in sequence, whereas an enumerator for a collection give us a way of picking out the i-th element. In FinInG we have enumerators and iterators for subspace collections of affine spaces.
> Iterator ( subs ) | ( operation ) |
Returns: an iterator for the given subspaces collection
subs is a collection of subspaces of an affine space, such as Points( AffineSpace(3, 3) )
.
gap> ag := AffineSpace(3, 3); AG(3, 3) gap> lines := Lines( ag ); <lines of AG(3, 3)> gap> iter := Iterator( lines ); <iterator> gap> l := NextIterator( iter ); <a line in AG(3, 3)> |
> Enumerator ( subs ) | ( operation ) |
Returns: an enumerator for the the given subspaces collection
subs is a collection of subspaces of an affine space, such as Points( AffineSpace(3, 3) )
.
gap> ag := AffineSpace(3, 3); AG(3, 3) gap> lines := Lines( ag ); <lines of AG(3, 3)> gap> enum := Enumerator( lines ); <enumerator of <lines of AG(3, 3)>> gap> l := enum[20]; <a line in AG(3, 3)> gap> Display(l); Affine line: Coset representative: [ 0*Z(3), 0*Z(3), Z(3)^0 ] Coset (direction): [ [ Z(3)^0, 0*Z(3), Z(3) ] ] |
One technical aspect of the design behind affine spaces in FinInG are having canonical transversals for subspaces of vector spaces. So we provide some documentation below for the interested user.
> IsVectorSpaceTransversal | ( filter ) |
The category IsVectorSpaceTransversal
represents a special object in FinInG which carries a record with two components: space and subspace. This category is a subcategory of IsSubspacesOfVectorSpace
, however, we do not recommend that the user apply methods normally used for this category to our objects (they won't work!). Our objects are only used in order to facilitate computing enumerators of subspace collections.
> VectorSpaceTransversal ( space, mat ) | ( operation ) |
Returns: a collection for representing a transversal of a subspaces of a vector space
space is a vector space V and mat is a matrix whose rows are a basis for a subspace U of V. A transversal for U in V is a set of coset representatives for the quotient V/U. This collection comes equipped with an enumerator operation.
> VectorSpaceTransversalElement ( space, mat, vector ) | ( operation ) |
Returns: a canonical coset representative
space is a vector space V, mat is a matrix whose rows are a basis for a subspace U of V, and vector is a vector v of V. A canonical representative v' is returned for the coset U+v.
> ComplementSpace ( space, mat ) | ( operation ) |
Returns: a collection for representing a transversal of a subspaces of a vector space
space is a vector space V and mat is a matrix whose rows are a basis for a subspace U of V. The operation is almost a complete copy of the function BaseSteinitzVector
except that just a basis for the complement of U is returned instead of a full record.
A collineation of an affine space is a permutation of the points which preserves the relation of collinearity within the affine space. The fundamental theorem of affine geometry states that the collineations of an affine space AG(d,F) form the group AΓL(d,F), which is generated by the translations T, matrices of GL(d,F) and the automorphisms of the field F. Since the translations T form a normal subgroup of AΓL(d,F), we see that AΓL(d,F) is the semidirect product of T and ΓL(d,F). In FinInG, we represent the affine groups as projective semilinear transformations so that we can use all the functionality that exists for collineations of projective spaces. Suppose we have an affine transformation of the form x+A where x is a vector representing a translation, and A is a matrix in GL(d,q). Then by using the natural embedding of AGL(d,q) in PGL(d+1,q), we can write this collineation as a matrix:
|
gap> ag := AffineSpace(3,3); AG(3, 3) gap> g := AffineGroup(ag); AGL(3,3) gap> x:=Random(g);; gap> Display(x); <projective element with Frobenius, underlying matrix: 2 1 2 . 1 2 2 . 1 1 2 . 1 2 2 1 , F^0> |
Here we see that this affine transformation is
| + |
|
> AffineGroup ( as ) | ( operation ) |
Returns: a group
This operation returnes the affine linear group AGL(V) acting on the affine space with underlying vector space V. The elements of this group are collineations of the associated projective space. In order to get the full group of collineations of the affine space, one may need to use the operation CollineationGroup
.
gap> as := AffineSpace(4, 7); AG(4, 7) gap> g := AffineGroup( as ); AGL(4,7) |
> CollineationGroup ( as ) | ( operation ) |
Returns: a group
This operation returnes the affine semilinear group AGamma L(V) acting on the affine space with underlying vector space V. The elements of this group are collineations of the associated projective space. Note that if the defining field has prime order, then AGamma L(V)=AGL(V).
gap> as := AffineSpace(4, 8); AG(4, 8) gap> g := CollineationGroup( as ); AGammaL(4,8) |
> OnAffineSpaces ( subspace, el ) | ( operation ) |
Returns: an element of an affine space
subspace must be an element of an affine space and el is a collineation of an affine space (which is in fact also a collineation of an associated projective space). This is the action one should use for collineations of affine spaces, and it acts on subspaces of all types of affine spaces: points, lines, planes, etc.
generated by GAPDoc2HTML