gap> gap># Illustration that we can still do the original stuff gap> gap> Read("Whiteheadv3.g"); gap> n;#The program is set up for 3-d projective space 4 gap> WA;#GAP understands Whitehead's algebra gap> a;#We have a basis for the algebra CanonicalBasis( ) gap> AsList(a); [ a1, a2, a3, a4, a1a2, a1a3, a1a4, a2a3, a2a4, a3a4, a1a2a3, a1a2a4, a1a3a4, a2a3a4, a1a2a3a4 ] gap> a[1];a[2];#Some reference points a1 a2 gap> p1:=a[1]-4*a[2]+a[3]+2*a[4];#R.N. Tsai's example points a1+(-4)*a2+a3+(2)*a4 gap> p1 in WA;#Just checking that p1 belongs to Whitehead's algebra true gap> p2:=-3*a[1]+2*a[2]+5*a[3]+a[4]; (-3)*a1+(2)*a2+(5)*a3+a4 gap> p3:=-2*a[2]+4*a[3]+3*a[4]; (-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/2, 0, 4 ] gap> p4:=c[1]*a[1]+c[2]*a[2]+c[3]*a[3]+c[4]*a[4];#Try to make a random point Error, no method found! For debugging hints type ?Recovery from NoMethodFound Error, no 1st choice method found for `PROD' on 2 arguments called from ( ) called from read-eval-loop Entering break read-eval-print loop ... you can 'quit;' to quit to outer loop, or you can 'return;' to continue brk> quit;#Oops, GAP wants the coefficients as polynomials gap> z:=Indeterminate(Rationals); x_1 gap> c:=List([1..n],i->Random(Rationals)*z^0); [ -3/2, 1/2, 0, -2/5 ] gap> IsUnivariatePolynomial(c[1]);#Should be ok this time true gap> p4:=c[1]*a[1]+c[2]*a[2]+c[3]*a[3]+c[4]*a[4];#Second try to make random pt (-3/2)*a1+(1/2)*a2+(-2/5)*a4 gap> p5:=LinearCombination(a{[1..n]},List([1..n],i->Random(F)*z^0)); a1+(-3/2)*a2 gap> p5 in WA;#Another random point, ok true gap> L2:=p4*p5;#Line through the new points (7/4)*a1a2+(2/5)*a1a4+(-3/5)*a2a4 gap> p6:=L2*E1;#Intersection of the line on the first plane (-83/5*x_1)*a1+(-68/5*x_1)*a2+(-44/5*x_1)*a4 gap> p6*E1=Zero(WA);#Check that the intersection point is in fact on the plane true gap> gap> #Illustrating the new version of WA as a module over a polynomial ring gap> gap> A;#Dual basis made from hyperplanes, x_1 is GAP's output for monomial z [ (x_1^-1)*a2a3a4, (-x_1^-1)*a1a3a4, (x_1^-1)*a1a2a4, (-x_1^-1)*a1a2a3, (x_1^-1)*a3a4, (-x_1^-1)*a2a4, (x_1^-1)*a2a3, (x_1^-1)*a1a4, (-x_1^-1)*a1a3, (x_1^-1)*a1a2, (x_1^-1)*a4, (-x_1^-1)*a3, (x_1^-1)*a2, (-x_1^-1)*a1, (x_1^-2)*a1a2a3a4 ] gap> a[1]*A[1];#The hyperplanes really are dual to the points (x_1^-1)*a1a2a3a4 gap> a[1]*A[2]=Zero(WA); true gap> I(a[1])=A[1];#The elliptic polarity I true gap> a[1]*I(a[3])=Zero(WA); true gap> L:=LinearCombination(A{[1..n]},List([1..n],i->Random(F)*z^0)); (x_1^-1)*a1a2a3+(2*x_1^-1)*a1a2a4+(-x_1^-1)*a1a3a4+(-x_1^-1)*a2a3a4 gap> L in WA;#L is a random hyperplane false gap> z*L in WA;#GAP only seems to allow polynomial rings, not Laurent poly's true gap> f:=function(x)#Lets make a function to do relections in hyperplane L > return ((x*I(L))*L+(x*L)*I(L))/(I(L)*L); > end; function( x ) ... end gap> f(p1);#Relect p1 in L (3/7)*a1+(18/7)*a2+(-27/7)*a3+(-4/7)*a4 gap> f(f(p1))=p1;#The reflection is involutory as expected true gap> f(p1*p2)=f(p1)*f(p2);#The reflection is a ring module homomorphism true gap> Product(a{[1..n]});#Our pseudonumber z a1a2a3a4 gap> Product(a{[1..n]},f)=-Product(a{[1..n]});#Showing f has det(f)=-1 true gap> LogTo();