We propose to represent elements of projective geometries, points, lines, planes, etc., uniquely by RREF matrices without zero rows. We use some of the lattice jargon introduced in the first reference. Counting the top and bottom, a projective space of n dimensions has elements of n+2 different ranks. For 2D projective geometry the elements are:

- 0
- The empty set or 0 in the lattice.
- 1
- Points including those on the line at infinity.
- 2
- Lines including the line at infinity.
- 3
- The whole space, or the 1 of the lattice.

`(P 'meet)` yields the binary operator (x⋀y) corresponding to the intersection of two subspaces.
`(P 'join)` yields the binary operator (x⋁y) corresponding to the span of the union of the two spaces.
`(P 'one)` yields the top of the lattice which is also the entire space.
`(P 'zero)` yields the bottom of the lattice which is also the subspace {0}, or the empty set in the projective space.

When 0 ≤ k ≤ n+1 `((P 're) k)` yields a random element of the geometry of rank k.
`(P 'e=)` yields an equivalence relation which means its two operands are the same element of the geometry.
While RREF is canonical, the field elements therein may not be.

We verify that our model of subspaces behaves as a lattice.

Doing Projective Calculations

You may want to skip ahead and see the verification of Desargues’ Theorem below, but this section bears on some subtleties there.To set the stage for computing in n dimensions we create a value P by evaluating `((fileVal "PGc") F n)`.
In n dimensions a projective point relates to a 1D subspace.
A random point is thus had from

If L and M are two lines and n=2 then L⋀M or `((P 'meet) A B)` yields the point where they intersect.
If n>2 then they may not meet whence the resulting value is the empty list of vectors.
To see if three points, A, B and C are collinear check the rank of A⋁B⋁C `(length (jo (jo A B) c))`.
(`jo` is `(P 'join)`.)
If the rank is 1 they are all the same point; if the rank is 2 they are on the same line and if the rank is 3 then they are not collinear.
To see if three lines, L, M and N, are concurrent, compute L⋀M⋀N `(length (me (me L M) N))`.
If rank is 0 they have no common point.
If the rank is 1 then L⋀M⋀N is that point.
If rank is 2 then the three lines are identical and the same as L⋀M⋀N.

In each of the calculations in the Desargues case there is an expectation of the rank of each of the results which we do not check except for printing the ranks of intermediate results at the end. It might make sense to make the expected ranks explicit in the code and check them as they are calculated.

Desargues’ Theorem

Desargues said of two triangles:

- If lines thru corresponding vertices are concurrent then intersections of corresponding sides are collinear.

- generate a 2D projective geometry,
- Choose arbitrary points a, b and c as to serve as the vertices of the first triangle,
- Choose arbitrary points A and B to serve as two vertices of the second triangle,
- We must find C to conform to the hypothesis but we choose line AC by choosing Ci which will probably differ from C but be on the line AC. This is a way of choosing an arbitrary line thru A.
- We can now compute the line ml that the intersections of corresponding sides lies on.
- We can also locate mp, the point thru which all lines connecting corresponding vertices pass.
- We can can now compute the line Cc, relying on the fact that it passes thru c and mp.
- Finally we can find C since we know two line that it lies on: AC and Cc.

Finally we do this computation over both the rationals and GF(7^{5}).
Modulo debugging we should not be surprised that it works over the rationals.
I was unsure of the finite field situation for I do not remember the proof of Desargues’ theorem.

We were lucky that our choice of points gave us triangles with three distinct non-collinear vertices. This is not unlikely but we should design a version that copes with the possibility. For now reporting the rank of the matrices and verifying that it is 1 for what we expect as point, and 2 for lines, confirms our luck.