[GAP Forum] Re: Advice on programming an algebra with two fields in GAP

Stephen Blake stebla at ntlworld.com
Wed Jun 29 21:16:31 BST 2005


Dear R.N. Tsai and GAP forum,

Since asking the question about what to do about the fact that
an algebra of projective geometry - strictly speaking - needs a field of 
scalar numbers and also a field of pseudonumbers numbers that transform
as f(c)=det(f)c where f is an element of the general linear group, I've
implemented the algebra in GAP. The GAP program is at 
http://homepage.ntlworld.com/stebla/programs/gap/Whitehead.g 
and here follows a log of how to repeat R.N. Tsai's tensor-based example.
I don't know how to handle the two fields so I just assumed that the 
unit pseudonumber (for n=4) a1a2a3a4=1.     
gap> Read("Whitehead.g");
gap> n;#The program is set up for 3-d projective space
4
gap> WA;#GAP understands Whitehead's algebra
<algebra of dimension 15 over Rationals>
gap> b;#We have a basis for the algebra
[ 1, a1, a2, a3, a4, a1a2, a1a3, a1a4, a2a3, a2a4, a3a4, a1a2a3, a1a2a4, 
  a1a3a4, a2a3a4 ]
gap> a1:=b[2];a2:=b[3];a3:=b[4];a4:=b[5];#a1,...,a4 are four reference points
a1
a2
a3
a4
gap> p1:=a1-4*a2+a3+2*a4;#R.N. Tsai's example points
a1+(-4)*a2+a3+(2)*a4
gap> p2:=-3*a1+2*a2+5*a3+a4;
(-3)*a1+(2)*a2+(5)*a3+a4
gap> p3:=-2*a2+4*a3+3*a4;
(-2)*a2+(4)*a3+(3)*a4
gap> E1:=p1*p2*p3;#Plane through points p1,p2,p3
(-24)*a1a2a3+(-16)*a1a2a4+(-4)*a1a3a4+(-16)*a2a3a4
gap> p1*E1=Zero(WA);#Check p1 is in E1
true
gap> p2*E1=Zero(WA);#Check p2 is in E1
true
gap> p3*E1=Zero(WA);#Check p3 is in E1
true
gap> L1:=p1*p2;#Line containing p1,p2
(-10)*a1a2+(8)*a1a3+(7)*a1a4+(-22)*a2a3+(-8)*a2a4+(-9)*a3a4
gap> E2:=L1*p3;#Plane containing L1,p3
(-24)*a1a2a3+(-16)*a1a2a4+(-4)*a1a3a4+(-16)*a2a3a4
gap> E1=E2;#Check planes are the same
true
gap> c:=List([1..n],i->Random(Rationals));
[ -1, -1, 4, -1/2 ]
gap> p4:=c[1]*a1+c[2]*a2+c[3]*a3+c[4]*a4;#Make another random point
(-1)*a1+(-1)*a2+(4)*a3+(-1/2)*a4
gap> c:=List([1..n],i->Random(Rationals));
[ -1, 3/2, 4/5, -2/3 ]
gap> p5:=c[1]*a1+c[2]*a2+c[3]*a3+c[4]*a4;#Make yet another random point
(-1)*a1+(3/2)*a2+(4/5)*a3+(-2/3)*a4
gap> L2:=p4*p5;#Line through the new points
(-5/2)*a1a2+(16/5)*a1a3+(1/6)*a1a4+(-34/5)*a2a3+(17/12)*a2a4+(-34/15)*a3a4
gap> p6:=L2*E1;#Intersection of the line on the first plane
(286/5)*a1+(-514/5)*a2+(-24)*a3+(589/15)*a4
gap> p6*E1=Zero(WA);#Check that the intersection point is in fact on the plane
true
gap> p6*L2=Zero(WA);#Check that the intersection point is in fact on the line
true

Yours sincerely
Stephen Blake
http://homepage.ntlworld.com/stebla





More information about the Forum mailing list