From c0b223c8ec4e0a8619fe1ef39930a32240bc8e13 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 12 May 2021 12:26:27 +0200 Subject: [PATCH 1/4] Replace custom test setup with TestDirectory --- tst/gap/test_forms.g_orig | 106 ------------------ tst/gap/test_forms1.g | 8 -- tst/gap/test_forms10.g | 12 -- tst/gap/test_forms11.g | 7 -- tst/gap/test_forms12.g | 20 ---- tst/gap/test_forms13.g | 17 --- tst/gap/test_forms14.g | 37 ------- tst/gap/test_forms15.g | 23 ---- tst/gap/test_forms16.g | 19 ---- tst/gap/test_forms2.g | 8 -- tst/gap/test_forms3.g | 10 -- tst/gap/test_forms4.g | 12 -- tst/gap/test_forms5.g | 10 -- tst/gap/test_forms6.g | 8 -- tst/gap/test_forms7.g | 8 -- tst/gap/test_forms8.g | 9 -- tst/gap/test_forms9.g | 12 -- tst/gap/test_recog.g | 14 --- tst/generate_tst_files.g | 129 ---------------------- tst/output/test_forms1.out | 32 ------ tst/output/test_forms10.out | 50 --------- tst/output/test_forms11.out | 19 ---- tst/output/test_forms12.out | 67 ----------- tst/output/test_forms13.out | 29 ----- tst/output/test_forms14.out | 64 ----------- tst/output/test_forms15.out | 42 ------- tst/output/test_forms16.out | 33 ------ tst/output/test_forms2.out | 27 ----- tst/output/test_forms3.out | 41 ------- tst/output/test_forms4.out | 37 ------- tst/output/test_forms5.out | 33 ------ tst/output/test_forms6.out | 17 --- tst/output/test_forms7.out | 24 ---- tst/output/test_forms8.out | 18 --- tst/output/test_forms9.out | 31 ------ tst/output/test_recog.out | 26 ----- tst/template_part1.g | 6 - tst/template_part2.g | 17 --- tst/{test_forms1.tst => test_forms01.tst} | 0 tst/{test_forms2.tst => test_forms02.tst} | 0 tst/{test_forms3.tst => test_forms03.tst} | 0 tst/{test_forms4.tst => test_forms04.tst} | 0 tst/{test_forms5.tst => test_forms05.tst} | 0 tst/{test_forms6.tst => test_forms06.tst} | 0 tst/{test_forms7.tst => test_forms07.tst} | 0 tst/{test_forms8.tst => test_forms08.tst} | 0 tst/{test_forms9.tst => test_forms09.tst} | 0 47 files changed, 1082 deletions(-) delete mode 100644 tst/gap/test_forms.g_orig delete mode 100644 tst/gap/test_forms1.g delete mode 100644 tst/gap/test_forms10.g delete mode 100644 tst/gap/test_forms11.g delete mode 100644 tst/gap/test_forms12.g delete mode 100644 tst/gap/test_forms13.g delete mode 100644 tst/gap/test_forms14.g delete mode 100644 tst/gap/test_forms15.g delete mode 100644 tst/gap/test_forms16.g delete mode 100644 tst/gap/test_forms2.g delete mode 100644 tst/gap/test_forms3.g delete mode 100644 tst/gap/test_forms4.g delete mode 100644 tst/gap/test_forms5.g delete mode 100644 tst/gap/test_forms6.g delete mode 100644 tst/gap/test_forms7.g delete mode 100644 tst/gap/test_forms8.g delete mode 100644 tst/gap/test_forms9.g delete mode 100644 tst/gap/test_recog.g delete mode 100644 tst/generate_tst_files.g delete mode 100644 tst/output/test_forms1.out delete mode 100644 tst/output/test_forms10.out delete mode 100644 tst/output/test_forms11.out delete mode 100644 tst/output/test_forms12.out delete mode 100644 tst/output/test_forms13.out delete mode 100644 tst/output/test_forms14.out delete mode 100644 tst/output/test_forms15.out delete mode 100644 tst/output/test_forms16.out delete mode 100644 tst/output/test_forms2.out delete mode 100644 tst/output/test_forms3.out delete mode 100644 tst/output/test_forms4.out delete mode 100644 tst/output/test_forms5.out delete mode 100644 tst/output/test_forms6.out delete mode 100644 tst/output/test_forms7.out delete mode 100644 tst/output/test_forms8.out delete mode 100644 tst/output/test_forms9.out delete mode 100644 tst/output/test_recog.out delete mode 100644 tst/template_part1.g delete mode 100644 tst/template_part2.g rename tst/{test_forms1.tst => test_forms01.tst} (100%) rename tst/{test_forms2.tst => test_forms02.tst} (100%) rename tst/{test_forms3.tst => test_forms03.tst} (100%) rename tst/{test_forms4.tst => test_forms04.tst} (100%) rename tst/{test_forms5.tst => test_forms05.tst} (100%) rename tst/{test_forms6.tst => test_forms06.tst} (100%) rename tst/{test_forms7.tst => test_forms07.tst} (100%) rename tst/{test_forms8.tst => test_forms08.tst} (100%) rename tst/{test_forms9.tst => test_forms09.tst} (100%) diff --git a/tst/gap/test_forms.g_orig b/tst/gap/test_forms.g_orig deleted file mode 100644 index 45a2904..0000000 --- a/tst/gap/test_forms.g_orig +++ /dev/null @@ -1,106 +0,0 @@ -#some forms in odd char. - -f := GF(3); -gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0],[0,0,1,0,0,0], -[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0; -form := BilinearFormByMatrix(gram,f); -Display(form); - -f := GF(5); -gram := -[ [ 0*Z(5), Z(5)^3, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ Z(5)^3, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^3, 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, Z(5)^2 ], - [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^2, 0*Z(5) ] ]; -form := BilinearFormByMatrix(gram,f); -Display(form); - -f := GF(7); -gram := [[-3,0,0,0,0,0],[0,0,3,0,0,0],[0,3,0,0,0,0],[0,0,0,0,0,-1/2], -[0,0,0,0,1,0],[0,0,0,-1/2,0,0]]*Z(7)^0; -form := BilinearFormByMatrix(gram,f); -IsEllipticForm(form); -Display(form); - -# some forms in even char -# parabolic example -f := GF(8); -mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ]; -form := QuadraticFormByMatrix(mat,f); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); - -f := GF(8); -mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0; -form := QuadraticFormByMatrix(mat,f); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); -IsDegenerateForm(iso); -RadicalOfForm(iso); - -# hermitian forms -f := GF(9); -gram := [[0,0,0,Z(9)^2],[0,0,1,0],[0,1,0,0],[-Z(9)^2,0,0,0]]*Z(9)^0; -form := HermitianFormByMatrix(gram,f); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); - -#forms by polynomials. -r := PolynomialRing( GF(11), 4); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[2]+vars[3]*vars[4]; -form := BilinearFormByPolynomial(pol, r, 4); - -r := PolynomialRing( GF(7), 6); -vars := IndeterminatesOfPolynomialRing( r ); -pol := (Z(7)^4)*vars[1]^2-vars[2]*vars[3]-vars[4]*vars[6]+vars[5]^2; -form := BilinearFormByPolynomial(pol, r); -IsEllipticForm(form); -Display(form); - -r := PolynomialRing( GF(8), 3); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]^2 + vars[3]^2 + vars[2]^2; -form := QuadraticFormByPolynomial(pol, r); -IsDegenerateForm(form); -RadicalOfForm(form); - -r := PolynomialRing( GF(16), 4); -vars := IndeterminatesOfPolynomialRing( r ); -z := Z(16); -pol := z^5*vars[3]^2+vars[1]*vars[3]+z^8*vars[1]^2 + vars[2]*vars[4]; -form := QuadraticFormByPolynomial(pol,r); -B := BaseChangeToCanonical(form); -mat := form!.matrix; -mat2 := B*mat*TransposedMat(B); -Display(mat2); -DiscriminantOfForm(form); - -#Klein's quadric in PG(5,8) -r := PolynomialRing( GF(8), 6); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[6]+vars[2]*vars[5]+vars[3]*vars[4]; -form := QuadraticFormByPolynomial(pol,r,6); -B := BaseChangeToCanonical(form); -mat := form!.matrix; -mat2 := B*mat*TransposedMat(B); -Display(mat2); -iso := IsometricCanonicalForm(form); -Display(iso); - -#hermitian -r := PolynomialRing( GF(9), 4); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[2]^3+vars[1]^3*vars[2]+vars[3]*vars[4]^3+vars[3]^3*vars[4]; -form := HermitianFormByPolynomial(pol,r); -Display(form); - -quit; diff --git a/tst/gap/test_forms1.g b/tst/gap/test_forms1.g deleted file mode 100644 index c3778da..0000000 --- a/tst/gap/test_forms1.g +++ /dev/null @@ -1,8 +0,0 @@ -#test_forms1.g -f := GF(3); -gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0],[0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0; -form := BilinearFormByMatrix(gram,f); -BaseChangeToCanonical(form); -Display(form); -TypeOfForm(form); -quit; diff --git a/tst/gap/test_forms10.g b/tst/gap/test_forms10.g deleted file mode 100644 index 8f1f548..0000000 --- a/tst/gap/test_forms10.g +++ /dev/null @@ -1,12 +0,0 @@ -#Klein's quadric in PG(5,8) -r := PolynomialRing( GF(8), 6); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[6]+vars[2]*vars[5]+vars[3]*vars[4]; -form := QuadraticFormByPolynomial(pol,r,6); -B := BaseChangeToCanonical(form); -mat := form!.matrix; -mat2 := B*mat*TransposedMat(B); -Display(mat2); -iso := IsometricCanonicalForm(form); -Display(iso); -quit; diff --git a/tst/gap/test_forms11.g b/tst/gap/test_forms11.g deleted file mode 100644 index 9682bbf..0000000 --- a/tst/gap/test_forms11.g +++ /dev/null @@ -1,7 +0,0 @@ -#test_forms11: hermitian forms by polynomial -r := PolynomialRing( GF(9), 4); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[2]^3+vars[1]^3*vars[2]+vars[3]*vars[4]^3+vars[3]^3*vars[4]; -form := HermitianFormByPolynomial(pol,r); -Display(form); -quit; diff --git a/tst/gap/test_forms12.g b/tst/gap/test_forms12.g deleted file mode 100644 index afd4005..0000000 --- a/tst/gap/test_forms12.g +++ /dev/null @@ -1,20 +0,0 @@ -#test_forms12.g code coverage test for constructor methods. -f := GF(5); -mat := IdentityMat(3,f); -form := BilinearFormByMatrix(mat,f); -Display(form); -mat[1][2] := One(f); -Display(form); -f := GF(5); -mat := IdentityMat(3,f); -form := QuadraticFormByMatrix(mat,f); -Display(form); -mat[1][2] := One(f); -Display(form); -f := GF(81); -mat := IdentityMat(4,f); -form := HermitianFormByMatrix(mat,f); -Display(form); -mat[1][2] := One(f); -Display(form); -quit; diff --git a/tst/gap/test_forms13.g b/tst/gap/test_forms13.g deleted file mode 100644 index b9cb9e3..0000000 --- a/tst/gap/test_forms13.g +++ /dev/null @@ -1,17 +0,0 @@ -#isotropic subspaces. quadratic forms -q := 9; -f := GF(q); -dim := 3; -v := f^dim; -mat := IdentityMat(dim,f); -form := QuadraticFormByMatrix(mat,f); -lines := Subspaces(v,1); -matrices := List(lines,x->BasisVectors(Basis(x)));; -vectors := List(matrices,x->x[1]);; -results := Collected(List(vectors,x->EvaluateForm(form,x)));; -[Zero(f),(q^(dim-1)-1)/(q-1)] in results; -results := Collected(List(matrices,x->x^form));; -[[[Zero(f)]],(q^(dim-1)-1)/(q-1)] in results; -Length(Filtered(vectors,x->IsSingularVector(form,x)))=(q^(dim-1)-1)/(q-1); -Length(Filtered(matrices,x->IsTotallySingularSubspace(form,x)))=(q^(dim-1)-1)/(q-1); -quit; diff --git a/tst/gap/test_forms14.g b/tst/gap/test_forms14.g deleted file mode 100644 index bb2c0c0..0000000 --- a/tst/gap/test_forms14.g +++ /dev/null @@ -1,37 +0,0 @@ -#isotropic subspaces. symplectic form -q := 5; -hdim := 3; -dim := 2*hdim; -f := GF(q); -nzero := List([0..q-2],x->Z(q)^x); -mat := NullMat(2*hdim,2*hdim,f); -for i in [1..hdim] do -entry := Random(nzero);; -mat[i][2*hdim-i+1] := entry; -mat[2*hdim-i+1][i] := -entry; -od; -form := BilinearFormByMatrix(mat,f); -IsAlternatingForm(form); -v := f^dim; -lines := Subspaces(v,1); -matrices := List(lines,x->BasisVectors(Basis(x)));; -vectors := List(matrices,x->x[1]);; -results := Collected(List(vectors,x->EvaluateForm(form,x,x)));; -[Zero(f),(q^dim-1)/(q-1)] in results; -results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -[[[Zero(f)]],(q^dim-1)/(q-1)] in results; -Length(Filtered(vectors,x->IsIsotropicVector(form,x)))=(q^dim-1)/(q-1); -Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=(q^dim-1)/(q-1); -planes := Subspaces(v,2); -matrices := List(planes,x->BasisVectors(Basis(x)));; -results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -z := Zero(f); -[[[z,z],[z,z]],(q^2+1)*(q^6-1)/(q-1)] in results; -Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=(q^2+1)*(q^6-1)/(q-1); -threespaces := Subspaces(v,3); -matrices := List(lines,x->BasisVectors(Basis(x)));; -results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -z := Zero(f); -[[[Zero(f)]],(q^3+1)*(q^2+q+1)] in results; -Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=(q^3+1)*(q^2+q+1); -quit; diff --git a/tst/gap/test_forms15.g b/tst/gap/test_forms15.g deleted file mode 100644 index 53dec3a..0000000 --- a/tst/gap/test_forms15.g +++ /dev/null @@ -1,23 +0,0 @@ -#EvaluateForm and Isotropic subspaces test. quadratic forms (2); -q := 5; -f := GF(q); -dim := 5; -v := f^dim; -mat := IdentityMat(dim,f); -form := QuadraticFormByMatrix(mat,f); -lines := Subspaces(v,1); -matrices := List(lines,x->BasisVectors(Basis(x)));; -vectors := List(matrices,x->x[1]);; -results := Collected(List(vectors,x->EvaluateForm(form,x)));; -[Zero(f),(q^(dim-1)-1)/(q-1)] in results; -results := Collected(List(matrices,x->x^form));; -[[[Zero(f)]],(q^(dim-1)-1)/(q-1)] in results; -Length(Filtered(vectors,x->IsSingularVector(form,x)))=(q^(dim-1)-1)/(q-1); -Length(Filtered(matrices,x->IsTotallySingularSubspace(form,x)))=(q^(dim-1)-1)/(q-1); -planes := Subspaces(v,2); -matrices := List(planes,x->BasisVectors(Basis(x)));; -results := Collected(List(matrices,x->x^form));; -z := Zero(f); -[[[z,z],[z,z]],(q^(dim-1)-1)/(q-1)] in results; -Length(Filtered(matrices,x->IsTotallySingularSubspace(form,x)))=(q^(dim-1)-1)/(q-1); -quit; diff --git a/tst/gap/test_forms16.g b/tst/gap/test_forms16.g deleted file mode 100644 index 0386c69..0000000 --- a/tst/gap/test_forms16.g +++ /dev/null @@ -1,19 +0,0 @@ -#EvaluateForm and Isotropic subspaces: hermitian form -q := 5; -f := GF(q^4); -mat := NullMat(3,3,f); -mat[1][2] := Z(q^4); -mat[2][1] := Z(q^4)^(q^2); -mat[3][3] := Z(q)^0; -form := HermitianFormByMatrix(mat,GF(q^4)); -v := f^3; -lines := Subspaces(v,1); -matrices := List(lines,x->BasisVectors(Basis(x)));; -vectors := List(matrices,x->x[1]);; -results := Collected(List(vectors,x->EvaluateForm(form,x,x)));; -[Zero(f),q^6+1] in results; -results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -[[[Zero(f)]],q^6+1] in results; -Length(Filtered(vectors,x->IsIsotropicVector(form,x)))=q^6+1; -Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=q^6+1; -quit; diff --git a/tst/gap/test_forms2.g b/tst/gap/test_forms2.g deleted file mode 100644 index 5661af0..0000000 --- a/tst/gap/test_forms2.g +++ /dev/null @@ -1,8 +0,0 @@ -#test_forms2.g -f := GF(7); -gram := [[-3,0,0,0,0,0],[0,0,3,0,0,0],[0,3,0,0,0,0],[0,0,0,0,0,-1/2],[0,0,0,0,1,0],[0,0,0,-1/2,0,0]]*Z(7)^0; -form := BilinearFormByMatrix(gram,f); -IsEllipticForm(form); -TypeOfForm(form); -Display(form); -quit; diff --git a/tst/gap/test_forms3.g b/tst/gap/test_forms3.g deleted file mode 100644 index c24a5a0..0000000 --- a/tst/gap/test_forms3.g +++ /dev/null @@ -1,10 +0,0 @@ -# test_forms3: some forms in even char, parabolic example -f := GF(8); -mat := [[Z(8),0*Z(2),0*Z(2),0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,Z(2^3)^5,0*Z(2),0*Z(2)],[0*Z(2),0*Z(2),0*Z(2),0*Z(2),0*Z(2)],[0*Z(2),0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; -form := QuadraticFormByMatrix(mat,f); -TypeOfForm(form); -BaseChangeToCanonical(form); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); -quit; diff --git a/tst/gap/test_forms4.g b/tst/gap/test_forms4.g deleted file mode 100644 index 42a8b09..0000000 --- a/tst/gap/test_forms4.g +++ /dev/null @@ -1,12 +0,0 @@ -#test_forms4 -f := GF(8); -mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0; -form := QuadraticFormByMatrix(mat,f); -IsSingularForm(form); -TypeOfForm(form); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); -IsDegenerateForm(iso); -RadicalOfForm(iso); -quit; diff --git a/tst/gap/test_forms5.g b/tst/gap/test_forms5.g deleted file mode 100644 index 5632241..0000000 --- a/tst/gap/test_forms5.g +++ /dev/null @@ -1,10 +0,0 @@ -# test_forms5: hermitian forms -f := GF(9); -gram := [[0,0,0,Z(9)^2],[0,0,1,0],[0,1,0,0],[-Z(9)^2,0,0,0]]*Z(9)^0; -form := HermitianFormByMatrix(gram,f); -TypeOfForm(form); -BaseChangeToCanonical(form); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); -quit; diff --git a/tst/gap/test_forms6.g b/tst/gap/test_forms6.g deleted file mode 100644 index b3d3df1..0000000 --- a/tst/gap/test_forms6.g +++ /dev/null @@ -1,8 +0,0 @@ -#test_forms6: forms by polynomials. -r := PolynomialRing( GF(11), 4); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[2]+vars[3]*vars[4]; -form := BilinearFormByPolynomial(pol, r, 4); -BaseChangeToCanonical(form); -TypeOfForm(form); -quit; diff --git a/tst/gap/test_forms7.g b/tst/gap/test_forms7.g deleted file mode 100644 index 510a9c1..0000000 --- a/tst/gap/test_forms7.g +++ /dev/null @@ -1,8 +0,0 @@ -#test_forms7: forms by polynomials -r := PolynomialRing( GF(7), 6); -vars := IndeterminatesOfPolynomialRing( r ); -pol := (Z(7)^4)*vars[1]^2-vars[2]*vars[3]-vars[4]*vars[6]+vars[5]^2; -form := BilinearFormByPolynomial(pol, r); -IsEllipticForm(form); -Display(form); -quit; diff --git a/tst/gap/test_forms8.g b/tst/gap/test_forms8.g deleted file mode 100644 index d925804..0000000 --- a/tst/gap/test_forms8.g +++ /dev/null @@ -1,9 +0,0 @@ -#test_forms8: forms by polynomials -r := PolynomialRing( GF(8), 3); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]^2 + vars[3]^2 + vars[2]^2; -form := QuadraticFormByPolynomial(pol, r); -BaseChangeToCanonical(form); -IsDegenerateForm(form); -RadicalOfForm(form); -quit; diff --git a/tst/gap/test_forms9.g b/tst/gap/test_forms9.g deleted file mode 100644 index cf1ae62..0000000 --- a/tst/gap/test_forms9.g +++ /dev/null @@ -1,12 +0,0 @@ -#test_forms9: forms by polynomials -r := PolynomialRing( GF(16), 4); -vars := IndeterminatesOfPolynomialRing( r ); -z := Z(16); -pol := z^5*vars[3]^2+vars[1]*vars[3]+z^8*vars[1]^2 + vars[2]*vars[4]; -form := QuadraticFormByPolynomial(pol,r); -B := BaseChangeToCanonical(form); -mat := form!.matrix; -mat2 := B*mat*TransposedMat(B); -Display(mat2); -DiscriminantOfForm(form); -quit; diff --git a/tst/gap/test_recog.g b/tst/gap/test_recog.g deleted file mode 100644 index 71f6cb3..0000000 --- a/tst/gap/test_recog.g +++ /dev/null @@ -1,14 +0,0 @@ -# test code for recognition -g := Sp(6,3); -forms := PreservedSesquilinearForms(g); -g := SU(4,3); -forms := PreservedSesquilinearForms(g); -g := SO(1,4,3); -forms := PreservedSesquilinearForms(g); -g := SO(1,4,4); -forms := PreservedSesquilinearForms(g); -g := SO(-1,4,3); -forms := PreservedSesquilinearForms(g); -g := SO(5,3); -forms := PreservedSesquilinearForms(g); -quit; diff --git a/tst/generate_tst_files.g b/tst/generate_tst_files.g deleted file mode 100644 index c5e0a30..0000000 --- a/tst/generate_tst_files.g +++ /dev/null @@ -1,129 +0,0 @@ -#create output and tst files from .g files in the tst/gap directory. -#Executing this file is NOT necessary for the installation of the package "forms" (including the documentation) - -#Performing these steps, files will be written in the tst directory of the -#forms package tree. Under UNIX-like operating systems, you need sufficient -#permissions to do. Executing this is NOT necessary for the installation of the -#package "forms". This file is based on the generate_examples_files.g in the /forms/examples directory. - -#to make sure tjere is no confusing with linebreaks, it seems better to have all input (in the .g files) -#in one (long) line. - -#Messy things happen when you do it, so don't try this at home kids! - -#create workspace with packages -LoadPackage("forms"); -SaveWorkspace("forms.ws"); -quit; - -#restart gap now. - -#initialize filenames - -#initialisations to create .tst files from .g files in tst directory. Output will be in outputdir. - -files := ["test_forms1", "test_forms2", "test_forms3", "test_forms4", "test_forms5", - "test_forms6","test_forms7", "test_forms8", "test_forms9", "test_forms10", - "test_forms11", "test_recog", "test_forms12", "test_forms13", "test_forms14", - "test_forms15", "test_forms16" ]; - -#initialize directorynames -#sourcedir = dir where .g files are located : ".../pkg/forms/tst/gap" -#preambledir = directory where 'preamble_sws.g is found' : ".../pkg/forms/examples" -#outputdir = directory to write '.out' files: ".../pkg/forms/examples/output" - -homedir := DirectoryCurrent(); -sourcedir := DirectoriesPackageLibrary("forms","tst/gap")[1]; -preambledir := DirectoriesPackageLibrary("forms","examples/")[1]; -outputdir := DirectoriesPackageLibrary("forms","tst/output")[1]; -paths := JoinStringsWithSeparator(GAPInfo.RootPaths{[2,3]},";"); -args := JoinStringsWithSeparator(["-l",paths," -L forms.ws"," -o 4G"]," "); -args := ["-l",paths,"-L","forms.ws","-o","4G"]; -extension := ".out\";"; -cmddir := "dir \:\= DirectoriesPackageLibrary\(\"forms\"\,\"tst\/output\"\)\[1\]\;"; - -#name of script to start gap version, might be different on your computer -gapstart := "gap4r8"; -gap := Filename(Directory("/usr/bin/"),gapstart); - -#create .out files using the saved workspace -#IMPORTANT: here we suppose that the script to start up our favorite version of -#GAP is called 'gap4r4', and is located in '/usr/bin'. Change the code if this is not true! -#you certainly now the name of the script, since you started gap. To find the -#dir, just issue in the gap session that is running: - -#Exec("which gap4r4"); #for UNIX - -for filename in files do - Print("Now converting file: ", filename, "\n"); - stream := InputOutputLocalProcess( homedir, gap, args); - #cmd := Concatenation("file := \"",filename,".out\";"); - cmd := Concatenation("file := \"",filename,extension); - WriteLine(stream,cmd); - #cmd := "dir \:\= DirectoriesPackageLibrary\(\"forms\"\,\"examples\/output\"\)\[1\]\;"; - WriteLine(stream,cmddir); - preamble := Filename(preambledir,"preamble_sws.g"); - preamble_stream := InputTextFile(preamble); - cmds := ReadAll(preamble_stream); - WriteLine(stream,cmds); - repeat - str := ReadLine(stream); - until str = "true\n"; - inputfile := Filename(sourcedir,Concatenation(filename,".g")); - input_stream := InputTextFile(inputfile); - cmd := ReadLine(input_stream); - while cmd <> fail do - WriteAll(stream,cmd); - cmd := ReadLine(input_stream); - ReadAll(stream); - od; - repeat until ReadAll(stream)=fail; #new since oct 2015. -od; - -#create .tst files -#the nested ifs together with the SizeScreen make sure that input lines (plural), -#are written back in the tst file as one (long) input line. -includedir := DirectoriesPackageLibrary("forms","tst")[1]; -for filename in files do - i := Filename(outputdir,Concatenation(filename,".out")); - o := Filename(includedir,Concatenation(filename,".tst")); - PrintTo(o,""); - input_stream := InputTextFile(i); - ReadLine(input_stream); #reads first line which is a line with a # - #ReadLine(input_stream); - AppendTo(o,Concatenation("gap> START_TEST(\"Forms: ",filename,".tst\");\n")); - line := ReadLine(input_stream); - while line <> "gap> quit;\n" do - if Length(line) > 3 then - if line{[1..4]} = "gap>" then - RemoveCharacters(line,"\n"); - line := Concatenation(line,"\n"); - fi; - fi; - SizeScreen([500,24]); - AppendTo(o,line); - SizeScreen([80,24]); - line := ReadLine(input_stream); - od; - AppendTo(o,Concatenation("gap> STOP_TEST(\"",filename,".tst\", 10000 );\n")); -od; - -#now write testall.g file. - -o := Filename(includedir,"testall.g"); -tstdir := DirectoriesPackageLibrary("forms","tst")[1]; -part1 := Filename(tstdir,"template_part1.g"); -input_stream := InputTextFile(part1); -PrintTo(o,ReadAll(input_stream)); - -AppendTo(o,"testfiles := [\n"); -for i in [1..Length(files)-1] do - filename := Concatenation(files[i],".tst"); - AppendTo(o,Concatenation("\"",filename,"\",\n")); -od; -filename := Concatenation(files[Length(files)],".tst"); -AppendTo(o,Concatenation("\"",filename,"\"\n];\n\n")); - -part2 := Filename(tstdir,"template_part2.g"); -input_stream := InputTextFile(part2); -AppendTo(o,ReadAll(input_stream)); diff --git a/tst/output/test_forms1.out b/tst/output/test_forms1.out deleted file mode 100644 index 2dca4ba..0000000 --- a/tst/output/test_forms1.out +++ /dev/null @@ -1,32 +0,0 @@ -gap> #test_forms1.g -gap> f := GF(3); -GF(3) -gap> gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0],[0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0; -[ [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ] ] -gap> form := BilinearFormByMatrix(gram,f); -< bilinear form > -gap> BaseChangeToCanonical(form); -[ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3)^0, 0*Z(3), Z(3)^0 ], - [ Z(3)^0, 0*Z(3), Z(3), Z(3), 0*Z(3), Z(3)^0 ], - [ Z(3)^0, Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3) ], - [ Z(3), 0*Z(3), Z(3)^0, Z(3), Z(3), Z(3)^0 ], - [ Z(3), 0*Z(3), Z(3)^0, Z(3), 0*Z(3), Z(3)^0 ], - [ 0*Z(3), Z(3)^0, Z(3), Z(3)^0, Z(3), 0*Z(3) ] ] -gap> Display(form); -Hyperbolic bilinear form -Gram Matrix: - . . . . . 2 - . . . . 2 . - . . . 1 . . - . . 1 . . . - . 2 . . . . - 2 . . . . . -Witt Index: 3 -gap> TypeOfForm(form); -1 -gap> quit; diff --git a/tst/output/test_forms10.out b/tst/output/test_forms10.out deleted file mode 100644 index 6082b62..0000000 --- a/tst/output/test_forms10.out +++ /dev/null @@ -1,50 +0,0 @@ -gap> #Klein's quadric in PG(5,8) -gap> r := PolynomialRing( GF(8), 6); -GF(2^3)[x_1,x_2,x_3,x_4,x_5,x_6] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4, x_5, x_6 ] -gap> pol := vars[1]*vars[6]+vars[2]*vars[5]+vars[3]*vars[4]; -x_1*x_6+x_2*x_5+x_3*x_4 -gap> form := QuadraticFormByPolynomial(pol,r,6); -< quadratic form > -gap> B := BaseChangeToCanonical(form); -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> mat := form!.matrix; -[ [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> mat2 := B*mat*TransposedMat(B); -[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ] ] -gap> Display(mat2); - . 1 . . . . - . . . . . . - . . . 1 . . - . . . . . . - . . . . . . - . . . . 1 . -gap> iso := IsometricCanonicalForm(form); -< hyperbolic quadratic form > -gap> Display(iso); -Hyperbolic quadratic form -Gram Matrix: - . 1 . . . . - . . . . . . - . . . 1 . . - . . . . . . - . . . . . 1 - . . . . . . -Witt Index: 3 -gap> quit; diff --git a/tst/output/test_forms11.out b/tst/output/test_forms11.out deleted file mode 100644 index 1c9aed8..0000000 --- a/tst/output/test_forms11.out +++ /dev/null @@ -1,19 +0,0 @@ -gap> #test_forms11: hermitian forms by polynomial -gap> r := PolynomialRing( GF(9), 4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> pol := vars[1]*vars[2]^3+vars[1]^3*vars[2]+vars[3]*vars[4]^3+vars[3]^3*vars[4]; -x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 -gap> form := HermitianFormByPolynomial(pol,r); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - . 1 . . - 1 . . . - . . . 1 - . . 1 . -Polynomial: x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 - -gap> quit; diff --git a/tst/output/test_forms12.out b/tst/output/test_forms12.out deleted file mode 100644 index 968b971..0000000 --- a/tst/output/test_forms12.out +++ /dev/null @@ -1,67 +0,0 @@ -gap> #test_forms12.g code coverage test for constructor methods. -gap> f := GF(5); -GF(5) -gap> mat := IdentityMat(3,f); -[ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0 ] ] -gap> form := BilinearFormByMatrix(mat,f); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - 1 . . - . 1 . - . . 1 -gap> mat[1][2] := One(f); -Z(5)^0 -gap> Display(form); -Bilinear form -Gram Matrix: - 1 . . - . 1 . - . . 1 -gap> f := GF(5); -GF(5) -gap> mat := IdentityMat(3,f); -[ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,f); -< quadratic form > -gap> Display(form); -Quadratic form -Gram Matrix: - 1 . . - . 1 . - . . 1 -gap> mat[1][2] := One(f); -Z(5)^0 -gap> Display(form); -Quadratic form -Gram Matrix: - 1 . . - . 1 . - . . 1 -gap> f := GF(81); -GF(3^4) -gap> mat := IdentityMat(4,f); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := HermitianFormByMatrix(mat,f); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -gap> mat[1][2] := One(f); -Z(3)^0 -gap> Display(form); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -gap> quit; diff --git a/tst/output/test_forms13.out b/tst/output/test_forms13.out deleted file mode 100644 index 121f250..0000000 --- a/tst/output/test_forms13.out +++ /dev/null @@ -1,29 +0,0 @@ -gap> #isotropic subspaces. quadratic forms -gap> q := 9; -9 -gap> f := GF(q); -GF(3^2) -gap> dim := 3; -3 -gap> v := f^dim; -( GF(3^2)^3 ) -gap> mat := IdentityMat(dim,f); -[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,f); -< quadratic form > -gap> lines := Subspaces(v,1); -Subspaces( ( GF(3^2)^3 ), 1 ) -gap> matrices := List(lines,x->BasisVectors(Basis(x)));; -gap> vectors := List(matrices,x->x[1]);; -gap> results := Collected(List(vectors,x->EvaluateForm(form,x)));; -gap> [Zero(f),(q^(dim-1)-1)/(q-1)] in results; -true -gap> results := Collected(List(matrices,x->x^form));; -gap> [[[Zero(f)]],(q^(dim-1)-1)/(q-1)] in results; -true -gap> Length(Filtered(vectors,x->IsSingularVector(form,x)))=(q^(dim-1)-1)/(q-1); -true -gap> Length(Filtered(matrices,x->IsTotallySingularSubspace(form,x)))=(q^(dim-1)-1)/(q-1); -true -gap> quit; diff --git a/tst/output/test_forms14.out b/tst/output/test_forms14.out deleted file mode 100644 index dc011b1..0000000 --- a/tst/output/test_forms14.out +++ /dev/null @@ -1,64 +0,0 @@ -gap> #isotropic subspaces. symplectic form -gap> q := 5; -5 -gap> hdim := 3; -3 -gap> dim := 2*hdim; -6 -gap> f := GF(q); -GF(5) -gap> nzero := List([0..q-2],x->Z(q)^x); -[ Z(5)^0, Z(5), Z(5)^2, Z(5)^3 ] -gap> mat := NullMat(2*hdim,2*hdim,f); -[ [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> for i in [1..hdim] do -> entry := Random(nzero);; -> mat[i][2*hdim-i+1] := entry; -> mat[2*hdim-i+1][i] := -entry; -> od; -gap> form := BilinearFormByMatrix(mat,f); -< bilinear form > -gap> IsAlternatingForm(form); -true -gap> v := f^dim; -( GF(5)^6 ) -gap> lines := Subspaces(v,1); -Subspaces( ( GF(5)^6 ), 1 ) -gap> matrices := List(lines,x->BasisVectors(Basis(x)));; -gap> vectors := List(matrices,x->x[1]);; -gap> results := Collected(List(vectors,x->EvaluateForm(form,x,x)));; -gap> [Zero(f),(q^dim-1)/(q-1)] in results; -true -gap> results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -gap> [[[Zero(f)]],(q^dim-1)/(q-1)] in results; -true -gap> Length(Filtered(vectors,x->IsIsotropicVector(form,x)))=(q^dim-1)/(q-1); -true -gap> Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=(q^dim-1)/(q-1); -true -gap> planes := Subspaces(v,2); -Subspaces( ( GF(5)^6 ), 2 ) -gap> matrices := List(planes,x->BasisVectors(Basis(x)));; -gap> results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -gap> z := Zero(f); -0*Z(5) -gap> [[[z,z],[z,z]],(q^2+1)*(q^6-1)/(q-1)] in results; -true -gap> Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=(q^2+1)*(q^6-1)/(q-1); -true -gap> threespaces := Subspaces(v,3); -Subspaces( ( GF(5)^6 ), 3 ) -gap> matrices := List(lines,x->BasisVectors(Basis(x)));; -gap> results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -gap> z := Zero(f); -0*Z(5) -gap> [[[Zero(f)]],(q^3+1)*(q^2+q+1)] in results; -true -gap> Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=(q^3+1)*(q^2+q+1); -true -gap> quit; diff --git a/tst/output/test_forms15.out b/tst/output/test_forms15.out deleted file mode 100644 index 1661b41..0000000 --- a/tst/output/test_forms15.out +++ /dev/null @@ -1,42 +0,0 @@ -gap> #EvaluateForm and Isotropic subspaces test. quadratic forms (2); -gap> q := 5; -5 -gap> f := GF(q); -GF(5) -gap> dim := 5; -5 -gap> v := f^dim; -( GF(5)^5 ) -gap> mat := IdentityMat(dim,f); -[ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,f); -< quadratic form > -gap> lines := Subspaces(v,1); -Subspaces( ( GF(5)^5 ), 1 ) -gap> matrices := List(lines,x->BasisVectors(Basis(x)));; -gap> vectors := List(matrices,x->x[1]);; -gap> results := Collected(List(vectors,x->EvaluateForm(form,x)));; -gap> [Zero(f),(q^(dim-1)-1)/(q-1)] in results; -true -gap> results := Collected(List(matrices,x->x^form));; -gap> [[[Zero(f)]],(q^(dim-1)-1)/(q-1)] in results; -true -gap> Length(Filtered(vectors,x->IsSingularVector(form,x)))=(q^(dim-1)-1)/(q-1); -true -gap> Length(Filtered(matrices,x->IsTotallySingularSubspace(form,x)))=(q^(dim-1)-1)/(q-1); -true -gap> planes := Subspaces(v,2); -Subspaces( ( GF(5)^5 ), 2 ) -gap> matrices := List(planes,x->BasisVectors(Basis(x)));; -gap> results := Collected(List(matrices,x->x^form));; -gap> z := Zero(f); -0*Z(5) -gap> [[[z,z],[z,z]],(q^(dim-1)-1)/(q-1)] in results; -true -gap> Length(Filtered(matrices,x->IsTotallySingularSubspace(form,x)))=(q^(dim-1)-1)/(q-1); -true -gap> quit; diff --git a/tst/output/test_forms16.out b/tst/output/test_forms16.out deleted file mode 100644 index d7099b9..0000000 --- a/tst/output/test_forms16.out +++ /dev/null @@ -1,33 +0,0 @@ -gap> #hermitian form -gap> q := 5; -5 -gap> f := GF(q^4); -GF(5^4) -gap> mat := NullMat(3,3,f); -[ [ 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> mat[1][2] := Z(q^4); -Z(5^4) -gap> mat[2][1] := Z(q^4)^(q^2); -Z(5^4)^25 -gap> mat[3][3] := Z(q)^0; -Z(5)^0 -gap> form := HermitianFormByMatrix(mat,GF(q^4)); -< hermitian form > -gap> v := f^3; -( GF(5^4)^3 ) -gap> lines := Subspaces(v,1); -Subspaces( ( GF(5^4)^3 ), 1 ) -gap> matrices := List(lines,x->BasisVectors(Basis(x)));; -gap> vectors := List(matrices,x->x[1]);; -gap> results := Collected(List(vectors,x->EvaluateForm(form,x,x)));; -gap> [Zero(f),q^6+1] in results; -true -gap> results := Collected(List(matrices,x->EvaluateForm(form,x,x)));; -gap> [[[Zero(f)]],q^6+1] in results; -true -gap> Length(Filtered(vectors,x->IsIsotropicVector(form,x)))=q^6+1; -true -gap> Length(Filtered(matrices,x->IsTotallyIsotropicSubspace(form,x)))=q^6+1; -true -gap> quit; diff --git a/tst/output/test_forms2.out b/tst/output/test_forms2.out deleted file mode 100644 index 67ea064..0000000 --- a/tst/output/test_forms2.out +++ /dev/null @@ -1,27 +0,0 @@ -gap> #test_forms2.g -gap> f := GF(7); -GF(7) -gap> gram := [[-3,0,0,0,0,0],[0,0,3,0,0,0],[0,3,0,0,0,0],[0,0,0,0,0,-1/2],[0,0,0,0,1,0],[0,0,0,-1/2,0,0]]*Z(7)^0; -[ [ Z(7)^4, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(gram,f); -< bilinear form > -gap> IsEllipticForm(form); -true -gap> TypeOfForm(form); --1 -gap> Display(form); -Elliptic bilinear form -Gram Matrix: - 4 . . . . . - . . 3 . . . - . 3 . . . . - . . . . . 3 - . . . . 1 . - . . . 3 . . -Witt Index: 2 -gap> quit; diff --git a/tst/output/test_forms3.out b/tst/output/test_forms3.out deleted file mode 100644 index 5107849..0000000 --- a/tst/output/test_forms3.out +++ /dev/null @@ -1,41 +0,0 @@ -gap> # test_forms3: some forms in even char, parabolic example -gap> f := GF(8); -GF(2^3) -gap> mat := [[Z(8),0*Z(2),0*Z(2),0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,Z(2^3)^5,0*Z(2),0*Z(2)],[0*Z(2),0*Z(2),0*Z(2),0*Z(2),0*Z(2)],[0*Z(2),0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; -[ [ Z(2^3), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat,f); -< quadratic form > -gap> TypeOfForm(form); -0 -gap> BaseChangeToCanonical(form); -[ [ Z(2^3)^3, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), Z(2^3)^2, Z(2^3)^4, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ] -gap> iso := IsometricCanonicalForm(form); -< parabolic quadratic form > -gap> Display(form); -Parabolic quadratic form -Gram Matrix: -z = Z(8) - z^1 . . . . - . 1 z^5 . . - . . . . . - . . . . 1 - . . . . . -Witt Index: 2 -gap> Display(iso); -Parabolic quadratic form -Gram Matrix: - 1 . . . . - . . 1 . . - . . . . . - . . . . 1 - . . . . . -Witt Index: 2 -gap> quit; diff --git a/tst/output/test_forms4.out b/tst/output/test_forms4.out deleted file mode 100644 index 16ed169..0000000 --- a/tst/output/test_forms4.out +++ /dev/null @@ -1,37 +0,0 @@ -gap> #test_forms4 -gap> f := GF(8); -GF(2^3) -gap> mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0; -[ [ Z(2^3), 0*Z(2), 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), Z(2^3)^4, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat,f); -< quadratic form > -gap> IsSingularForm(form); -true -gap> TypeOfForm(form); -0 -gap> iso := IsometricCanonicalForm(form); -< parabolic quadratic form > -gap> Display(form); -Singular parabolic quadratic form -Gram Matrix: -z = Z(8) - z^1 . . . - . . z^4 . - . . . 1 - . . . . -Witt Index: 1 -gap> Display(iso); -Parabolic quadratic form -Gram Matrix: - 1 . . . - . . 1 . - . . . . - . . . . -Witt Index: 1 -gap> IsDegenerateForm(iso); -#I Testing degeneracy of the *associated bilinear form* -true -gap> RadicalOfForm(iso); - -gap> quit; diff --git a/tst/output/test_forms5.out b/tst/output/test_forms5.out deleted file mode 100644 index 6d6298e..0000000 --- a/tst/output/test_forms5.out +++ /dev/null @@ -1,33 +0,0 @@ -gap> # test_forms5: hermitian forms -gap> f := GF(9); -GF(3^2) -gap> gram := [[0,0,0,Z(9)^2],[0,0,1,0],[0,1,0,0],[-Z(9)^2,0,0,0]]*Z(9)^0; -[ [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3^2)^2 ], [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], - [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], [ Z(3^2)^6, 0*Z(3), 0*Z(3), 0*Z(3) ] ] -gap> form := HermitianFormByMatrix(gram,f); -< hermitian form > -gap> TypeOfForm(form); -1/2 -gap> BaseChangeToCanonical(form); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), Z(3^2)^3 ], [ Z(3^2), 0*Z(3), 0*Z(3), Z(3^2)^2 ], - [ 0*Z(3), Z(3^2), Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3^2)^2, Z(3^2)^3, 0*Z(3) ] ] -gap> iso := IsometricCanonicalForm(form); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: -z = Z(9) - . . . z^2 - . . 1 . - . 1 . . - z^6 . . . -Witt Index: 2 -gap> Display(iso); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -Witt Index: 2 -gap> quit; diff --git a/tst/output/test_forms6.out b/tst/output/test_forms6.out deleted file mode 100644 index f3631e9..0000000 --- a/tst/output/test_forms6.out +++ /dev/null @@ -1,17 +0,0 @@ -gap> #test_forms6: forms by polynomials. -gap> r := PolynomialRing( GF(11), 4); -GF(11)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> pol := vars[1]*vars[2]+vars[3]*vars[4]; -x_1*x_2+x_3*x_4 -gap> form := BilinearFormByPolynomial(pol, r, 4); -< bilinear form > -gap> BaseChangeToCanonical(form); -[ [ Z(11)^2, 0*Z(11), Z(11)^2, 0*Z(11) ], - [ 0*Z(11), Z(11)^8, Z(11)^7, 0*Z(11) ], - [ Z(11)^4, Z(11)^5, Z(11)^4, Z(11)^0 ], - [ 0*Z(11), 0*Z(11), Z(11)^0, 0*Z(11) ] ] -gap> TypeOfForm(form); -1 -gap> quit; diff --git a/tst/output/test_forms7.out b/tst/output/test_forms7.out deleted file mode 100644 index b3c0887..0000000 --- a/tst/output/test_forms7.out +++ /dev/null @@ -1,24 +0,0 @@ -gap> #test_forms7: forms by polynomials -gap> r := PolynomialRing( GF(7), 6); -GF(7)[x_1,x_2,x_3,x_4,x_5,x_6] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4, x_5, x_6 ] -gap> pol := (Z(7)^4)*vars[1]^2-vars[2]*vars[3]-vars[4]*vars[6]+vars[5]^2; -Z(7)^4*x_1^2-x_2*x_3-x_4*x_6+x_5^2 -gap> form := BilinearFormByPolynomial(pol, r); -< bilinear form > -gap> IsEllipticForm(form); -true -gap> Display(form); -Elliptic bilinear form -Gram Matrix: - 4 . . . . . - . . 3 . . . - . 3 . . . . - . . . . . 3 - . . . . 1 . - . . . 3 . . -Polynomial: Z(7)^4*x_1^2-x_2*x_3-x_4*x_6+x_5^2 - -Witt Index: 2 -gap> quit; diff --git a/tst/output/test_forms8.out b/tst/output/test_forms8.out deleted file mode 100644 index 0d0b0da..0000000 --- a/tst/output/test_forms8.out +++ /dev/null @@ -1,18 +0,0 @@ -gap> #test_forms8: forms by polynomials -gap> r := PolynomialRing( GF(8), 3); -GF(2^3)[x_1,x_2,x_3] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3 ] -gap> pol := vars[1]^2 + vars[3]^2 + vars[2]^2; -x_1^2+x_2^2+x_3^2 -gap> form := QuadraticFormByPolynomial(pol, r); -< quadratic form > -gap> BaseChangeToCanonical(form); -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ Z(2)^0, Z(2)^0, 0*Z(2) ], - [ Z(2)^0, 0*Z(2), Z(2)^0 ] ] -gap> IsDegenerateForm(form); -#I Testing degeneracy of the *associated bilinear form* -true -gap> RadicalOfForm(form); - -gap> quit; diff --git a/tst/output/test_forms9.out b/tst/output/test_forms9.out deleted file mode 100644 index fd85ad6..0000000 --- a/tst/output/test_forms9.out +++ /dev/null @@ -1,31 +0,0 @@ -gap> #test_forms9: forms by polynomials -gap> r := PolynomialRing( GF(16), 4); -GF(2^4)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> z := Z(16); -Z(2^4) -gap> pol := z^5*vars[3]^2+vars[1]*vars[3]+z^8*vars[1]^2 + vars[2]*vars[4]; -Z(2^4)^8*x_1^2+x_1*x_3+x_2*x_4+Z(2^2)*x_3^2 -gap> form := QuadraticFormByPolynomial(pol,r); -< quadratic form > -gap> B := BaseChangeToCanonical(form); -[ [ Z(2^4)^11, 0*Z(2), 0*Z(2), 0*Z(2) ], - [ Z(2^4)^7, 0*Z(2), Z(2^4)^4, 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ] ] -gap> mat := form!.matrix; -[ [ Z(2^4)^8, 0*Z(2), Z(2)^0, 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), Z(2^2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> mat2 := B*mat*TransposedMat(B); -[ [ Z(2)^0, Z(2^4)^12, 0*Z(2), 0*Z(2) ], - [ Z(2^4)^11, Z(2^4)^3, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ] ] -gap> Display(mat2); -z = Z(16) - 1 z^12 . . - z^11 z^3 . . - . . . . - . . 1 . -gap> DiscriminantOfForm(form); -"square" -gap> quit; diff --git a/tst/output/test_recog.out b/tst/output/test_recog.out deleted file mode 100644 index f16ac94..0000000 --- a/tst/output/test_recog.out +++ /dev/null @@ -1,26 +0,0 @@ -gap> # test code for recognition -gap> g := Sp(6,3); -Sp(6,3) -gap> forms := PreservedSesquilinearForms(g); -[ < bilinear form > ] -gap> g := SU(4,3); -SU(4,3) -gap> forms := PreservedSesquilinearForms(g); -[ < hermitian form > ] -gap> g := SO(1,4,3); -SO(+1,4,3) -gap> forms := PreservedSesquilinearForms(g); -[ < bilinear form > ] -gap> g := SO(1,4,4); -GO(+1,4,4) -gap> forms := PreservedSesquilinearForms(g); -[ < bilinear form > ] -gap> g := SO(-1,4,3); -SO(-1,4,3) -gap> forms := PreservedSesquilinearForms(g); -[ < bilinear form > ] -gap> g := SO(5,3); -SO(0,5,3) -gap> forms := PreservedSesquilinearForms(g); -[ < bilinear form > ] -gap> quit; diff --git a/tst/template_part1.g b/tst/template_part1.g deleted file mode 100644 index d7cbfa8..0000000 --- a/tst/template_part1.g +++ /dev/null @@ -1,6 +0,0 @@ -TestMyPackage := function( pkgname ) -local pkgdir, testfiles, testresult, ff, fn; -LoadPackage( pkgname ); -pkgdir := DirectoriesPackageLibrary( pkgname, "tst" ); - -# Arrange chapters as required diff --git a/tst/template_part2.g b/tst/template_part2.g deleted file mode 100644 index 51409e9..0000000 --- a/tst/template_part2.g +++ /dev/null @@ -1,17 +0,0 @@ -testresult:=true; -for ff in testfiles do - fn := Filename( pkgdir, ff ); - Print("#I Testing ", fn, "\n"); - if not Test( fn, rec(compareFunction := "uptowhitespace") ) then - testresult:=false; - fi; -od; -if testresult then - Print("#I No errors detected while testing package ", pkgname, "\n"); -else - Print("#I Errors detected while testing package ", pkgname, "\n"); -fi; -end; - -# Set the name of the package here -TestMyPackage( "forms" ); \ No newline at end of file diff --git a/tst/test_forms1.tst b/tst/test_forms01.tst similarity index 100% rename from tst/test_forms1.tst rename to tst/test_forms01.tst diff --git a/tst/test_forms2.tst b/tst/test_forms02.tst similarity index 100% rename from tst/test_forms2.tst rename to tst/test_forms02.tst diff --git a/tst/test_forms3.tst b/tst/test_forms03.tst similarity index 100% rename from tst/test_forms3.tst rename to tst/test_forms03.tst diff --git a/tst/test_forms4.tst b/tst/test_forms04.tst similarity index 100% rename from tst/test_forms4.tst rename to tst/test_forms04.tst diff --git a/tst/test_forms5.tst b/tst/test_forms05.tst similarity index 100% rename from tst/test_forms5.tst rename to tst/test_forms05.tst diff --git a/tst/test_forms6.tst b/tst/test_forms06.tst similarity index 100% rename from tst/test_forms6.tst rename to tst/test_forms06.tst diff --git a/tst/test_forms7.tst b/tst/test_forms07.tst similarity index 100% rename from tst/test_forms7.tst rename to tst/test_forms07.tst diff --git a/tst/test_forms8.tst b/tst/test_forms08.tst similarity index 100% rename from tst/test_forms8.tst rename to tst/test_forms08.tst diff --git a/tst/test_forms9.tst b/tst/test_forms09.tst similarity index 100% rename from tst/test_forms9.tst rename to tst/test_forms09.tst From a03e0cdd375e31b367c86f5abd5d03a0431d3f70 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 18 May 2021 17:47:55 +0200 Subject: [PATCH 2/4] Inline examples into the manual XML source --- .gitignore | 2 - doc/construct_basic.xml | 706 ++++++++++++++++-- doc/examples.xml | 74 +- doc/morphisms.xml | 212 +++++- doc/theory.xml | 216 +++++- examples/gap/assocbilform.g | 7 - examples/gap/basechangehom.g | 12 - examples/gap/basechangetocanonical.g | 13 - examples/gap/bg_th_ex1.g | 5 - examples/gap/bg_th_ex2.g | 10 - examples/gap/bg_th_ex3.g | 9 - examples/gap/bg_th_ex4.g | 10 - examples/gap/bg_th_ex5.g | 30 - examples/gap/bg_th_ex6.g | 8 - examples/gap/bg_th_ex7.g | 7 - examples/gap/bg_th_ex8.g | 12 - examples/gap/bg_th_ex9.g | 13 - examples/gap/bilformbymatrix.g | 17 - examples/gap/bilformbypoly.g | 11 - examples/gap/bilformbyquadform.g | 9 - examples/gap/conic.g | 25 - examples/gap/discofform.g | 5 - examples/gap/evalform.g | 16 - examples/gap/hermitianformbymatrix.g | 10 - examples/gap/hermitianformbypoly.g | 8 - examples/gap/isisotropicvector.g | 12 - examples/gap/isometriccanonicalform.g | 11 - examples/gap/issingularvector.g | 10 - examples/gap/istotallyisotropic.g | 12 - examples/gap/istotallysingular.g | 7 - examples/gap/orthogonaltovector.g | 19 - examples/gap/polyofform.g | 9 - examples/gap/pres_quadform.g | 6 - examples/gap/pres_sesforms1.g | 5 - examples/gap/pres_sesforms2.g | 13 - examples/gap/preservedform.g | 13 - examples/gap/preservedforms1.g | 9 - examples/gap/preservedforms2.g | 19 - examples/gap/quadformbybilform.g | 14 - examples/gap/quadformbymatrix.g | 9 - examples/gap/quadformbypoly.g | 10 - examples/gap/quadformfields.g | 9 - examples/gap/radicalofform.g | 7 - examples/gap/scalarfromsim.g | 16 - examples/gap/trivialform.g | 11 - examples/gap/trivialform2.g | 7 - examples/gap/trivialform_prop.g | 15 - examples/gap/typeofform.g | 27 - examples/gap/w53.g | 16 - examples/gap/wittindex.g | 14 - examples/generate_example_files.g | 141 ---- examples/include/assocbilform.include | 17 - examples/include/basechangehom.include | 26 - .../include/basechangetocanonical.include | 19 - examples/include/bg_th_ex1.include | 13 - examples/include/bg_th_ex2.include | 22 - examples/include/bg_th_ex3.include | 19 - examples/include/bg_th_ex4.include | 27 - examples/include/bg_th_ex5.include | 81 -- examples/include/bg_th_ex6.include | 17 - examples/include/bg_th_ex7.include | 16 - examples/include/bg_th_ex8.include | 38 - examples/include/bg_th_ex9.include | 25 - examples/include/bilformbymatrix.include | 44 -- examples/include/bilformbypoly.include | 32 - examples/include/bilformbyquadform.include | 27 - examples/include/conic.include | 58 -- examples/include/discofform.include | 5 - examples/include/evalform.include | 21 - .../include/hermitianformbymatrix.include | 26 - examples/include/hermitianformbypoly.include | 17 - examples/include/isisotropicvector.include | 27 - .../include/isometriccanonicalform.include | 28 - examples/include/issingularvector.include | 20 - examples/include/istotallyisotropic.include | 23 - examples/include/istotallysingular.include | 14 - examples/include/orthogonaltovector.include | 39 - examples/include/polyofform.include | 9 - examples/include/pres_quadform.include | 8 - examples/include/pres_sesforms1.include | 11 - examples/include/pres_sesforms2.include | 22 - examples/include/preservedform.include | 21 - examples/include/preservedforms1.include | 12 - examples/include/preservedforms2.include | 32 - examples/include/quadformbybilform.include | 42 -- examples/include/quadformbymatrix.include | 27 - examples/include/quadformbypoly.include | 22 - examples/include/quadformfields.include | 13 - examples/include/radicalofform.include | 10 - examples/include/scalarfromsim.include | 16 - examples/include/trivialform.include | 19 - examples/include/trivialform2.include | 11 - examples/include/trivialform_prop.include | 28 - examples/include/typeofform.include | 59 -- examples/include/w53.include | 43 -- examples/include/wittindex.include | 36 - examples/output/assocbilform.out | 19 - examples/output/basechangehom.out | 28 - examples/output/basechangetocanonical.out | 21 - examples/output/bg_th_ex1.out | 15 - examples/output/bg_th_ex2.out | 24 - examples/output/bg_th_ex3.out | 21 - examples/output/bg_th_ex4.out | 29 - examples/output/bg_th_ex5.out | 83 -- examples/output/bg_th_ex6.out | 19 - examples/output/bg_th_ex7.out | 19 - examples/output/bg_th_ex8.out | 40 - examples/output/bg_th_ex9.out | 27 - examples/output/bilformbymatrix.out | 46 -- examples/output/bilformbypoly.out | 34 - examples/output/bilformbyquadform.out | 30 - examples/output/conic.out | 61 -- examples/output/discofform.out | 7 - examples/output/evalform.out | 23 - examples/output/hermitianformbymatrix.out | 28 - examples/output/hermitianformbypoly.out | 20 - examples/output/isisotropicvector.out | 29 - examples/output/isometriccanonicalform.out | 30 - examples/output/issingularvector.out | 22 - examples/output/istotallyisotropic.out | 25 - examples/output/istotallysingular.out | 16 - examples/output/orthogonaltovector.out | 41 - examples/output/polyofform.out | 11 - examples/output/pres_sesforms1.out | 13 - examples/output/pres_sesforms2.out | 24 - examples/output/preservedform.out | 23 - examples/output/quadformbybilform.out | 44 -- examples/output/quadformbymatrix.out | 29 - examples/output/quadformbypoly.out | 25 - examples/output/quadformfields.out | 15 - examples/output/radicalofform.out | 12 - examples/output/scalarfromsim.out | 18 - examples/output/trivialform.out | 21 - examples/output/trivialform2.out | 14 - examples/output/trivialform_prop.out | 30 - examples/output/typeofform.out | 61 -- examples/output/w53.out | 45 -- examples/output/wittindex.out | 38 - examples/preamble_sws.g | 3 - make_archive.sh | 4 +- 140 files changed, 1081 insertions(+), 3136 deletions(-) delete mode 100644 examples/gap/assocbilform.g delete mode 100644 examples/gap/basechangehom.g delete mode 100644 examples/gap/basechangetocanonical.g delete mode 100644 examples/gap/bg_th_ex1.g delete mode 100644 examples/gap/bg_th_ex2.g delete mode 100644 examples/gap/bg_th_ex3.g delete mode 100644 examples/gap/bg_th_ex4.g delete mode 100644 examples/gap/bg_th_ex5.g delete mode 100644 examples/gap/bg_th_ex6.g delete mode 100644 examples/gap/bg_th_ex7.g delete mode 100644 examples/gap/bg_th_ex8.g delete mode 100644 examples/gap/bg_th_ex9.g delete mode 100644 examples/gap/bilformbymatrix.g delete mode 100644 examples/gap/bilformbypoly.g delete mode 100644 examples/gap/bilformbyquadform.g delete mode 100644 examples/gap/conic.g delete mode 100644 examples/gap/discofform.g delete mode 100644 examples/gap/evalform.g delete mode 100644 examples/gap/hermitianformbymatrix.g delete mode 100644 examples/gap/hermitianformbypoly.g delete mode 100644 examples/gap/isisotropicvector.g delete mode 100644 examples/gap/isometriccanonicalform.g delete mode 100644 examples/gap/issingularvector.g delete mode 100644 examples/gap/istotallyisotropic.g delete mode 100644 examples/gap/istotallysingular.g delete mode 100644 examples/gap/orthogonaltovector.g delete mode 100644 examples/gap/polyofform.g delete mode 100644 examples/gap/pres_quadform.g delete mode 100644 examples/gap/pres_sesforms1.g delete mode 100644 examples/gap/pres_sesforms2.g delete mode 100644 examples/gap/preservedform.g delete mode 100644 examples/gap/preservedforms1.g delete mode 100644 examples/gap/preservedforms2.g delete mode 100644 examples/gap/quadformbybilform.g delete mode 100644 examples/gap/quadformbymatrix.g delete mode 100644 examples/gap/quadformbypoly.g delete mode 100644 examples/gap/quadformfields.g delete mode 100644 examples/gap/radicalofform.g delete mode 100644 examples/gap/scalarfromsim.g delete mode 100644 examples/gap/trivialform.g delete mode 100644 examples/gap/trivialform2.g delete mode 100644 examples/gap/trivialform_prop.g delete mode 100644 examples/gap/typeofform.g delete mode 100644 examples/gap/w53.g delete mode 100644 examples/gap/wittindex.g delete mode 100644 examples/generate_example_files.g delete mode 100644 examples/include/assocbilform.include delete mode 100644 examples/include/basechangehom.include delete mode 100644 examples/include/basechangetocanonical.include delete mode 100644 examples/include/bg_th_ex1.include delete mode 100644 examples/include/bg_th_ex2.include delete mode 100644 examples/include/bg_th_ex3.include delete mode 100644 examples/include/bg_th_ex4.include delete mode 100644 examples/include/bg_th_ex5.include delete mode 100644 examples/include/bg_th_ex6.include delete mode 100644 examples/include/bg_th_ex7.include delete mode 100644 examples/include/bg_th_ex8.include delete mode 100644 examples/include/bg_th_ex9.include delete mode 100644 examples/include/bilformbymatrix.include delete mode 100644 examples/include/bilformbypoly.include delete mode 100644 examples/include/bilformbyquadform.include delete mode 100644 examples/include/conic.include delete mode 100644 examples/include/discofform.include delete mode 100644 examples/include/evalform.include delete mode 100644 examples/include/hermitianformbymatrix.include delete mode 100644 examples/include/hermitianformbypoly.include delete mode 100644 examples/include/isisotropicvector.include delete mode 100644 examples/include/isometriccanonicalform.include delete mode 100644 examples/include/issingularvector.include delete mode 100644 examples/include/istotallyisotropic.include delete mode 100644 examples/include/istotallysingular.include delete mode 100644 examples/include/orthogonaltovector.include delete mode 100644 examples/include/polyofform.include delete mode 100644 examples/include/pres_quadform.include delete mode 100644 examples/include/pres_sesforms1.include delete mode 100644 examples/include/pres_sesforms2.include delete mode 100644 examples/include/preservedform.include delete mode 100644 examples/include/preservedforms1.include delete mode 100644 examples/include/preservedforms2.include delete mode 100644 examples/include/quadformbybilform.include delete mode 100644 examples/include/quadformbymatrix.include delete mode 100644 examples/include/quadformbypoly.include delete mode 100644 examples/include/quadformfields.include delete mode 100644 examples/include/radicalofform.include delete mode 100644 examples/include/scalarfromsim.include delete mode 100644 examples/include/trivialform.include delete mode 100644 examples/include/trivialform2.include delete mode 100644 examples/include/trivialform_prop.include delete mode 100644 examples/include/typeofform.include delete mode 100644 examples/include/w53.include delete mode 100644 examples/include/wittindex.include delete mode 100644 examples/output/assocbilform.out delete mode 100644 examples/output/basechangehom.out delete mode 100644 examples/output/basechangetocanonical.out delete mode 100644 examples/output/bg_th_ex1.out delete mode 100644 examples/output/bg_th_ex2.out delete mode 100644 examples/output/bg_th_ex3.out delete mode 100644 examples/output/bg_th_ex4.out delete mode 100644 examples/output/bg_th_ex5.out delete mode 100644 examples/output/bg_th_ex6.out delete mode 100644 examples/output/bg_th_ex7.out delete mode 100644 examples/output/bg_th_ex8.out delete mode 100644 examples/output/bg_th_ex9.out delete mode 100644 examples/output/bilformbymatrix.out delete mode 100644 examples/output/bilformbypoly.out delete mode 100644 examples/output/bilformbyquadform.out delete mode 100644 examples/output/conic.out delete mode 100644 examples/output/discofform.out delete mode 100644 examples/output/evalform.out delete mode 100644 examples/output/hermitianformbymatrix.out delete mode 100644 examples/output/hermitianformbypoly.out delete mode 100644 examples/output/isisotropicvector.out delete mode 100644 examples/output/isometriccanonicalform.out delete mode 100644 examples/output/issingularvector.out delete mode 100644 examples/output/istotallyisotropic.out delete mode 100644 examples/output/istotallysingular.out delete mode 100644 examples/output/orthogonaltovector.out delete mode 100644 examples/output/polyofform.out delete mode 100644 examples/output/pres_sesforms1.out delete mode 100644 examples/output/pres_sesforms2.out delete mode 100644 examples/output/preservedform.out delete mode 100644 examples/output/quadformbybilform.out delete mode 100644 examples/output/quadformbymatrix.out delete mode 100644 examples/output/quadformbypoly.out delete mode 100644 examples/output/quadformfields.out delete mode 100644 examples/output/radicalofform.out delete mode 100644 examples/output/scalarfromsim.out delete mode 100644 examples/output/trivialform.out delete mode 100644 examples/output/trivialform2.out delete mode 100644 examples/output/trivialform_prop.out delete mode 100644 examples/output/typeofform.out delete mode 100644 examples/output/w53.out delete mode 100644 examples/output/wittindex.out delete mode 100644 examples/preamble_sws.g diff --git a/.gitignore b/.gitignore index dd2ef61..59ddf05 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,4 @@ /doc/chap* -/examples/output/* -/tst/output/* /doc/forms.aux /doc/forms.bbl /doc/forms.blg diff --git a/doc/construct_basic.xml b/doc/construct_basic.xml index 60f84cd..61c6893 100644 --- a/doc/construct_basic.xml +++ b/doc/construct_basic.xml @@ -67,9 +67,52 @@ is returned. The output is a bilinear form (i.e., an object in IsBilinearForm) with Gram matrix matrix and defining field field. (See for more on bilinear forms). - -<#Include SYSTEM "../examples/include/bilformbymatrix.include"> - + mat := IdentityMat(4, GF(9)); +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> form := BilinearFormByMatrix(mat,GF(9)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 1 +gap> mat := [[0*Z(2),Z(16)^12,0*Z(2),Z(4)^2,Z(16)^13], +> [Z(16)^12,0*Z(2),0*Z(2),Z(16)^11,Z(16)], +> [0*Z(2),0*Z(2),0*Z(2),Z(4)^2,Z(16)^3], +> [Z(4)^2,Z(16)^11,Z(4)^2,0*Z(2),Z(16)^3], +> [Z(16)^13,Z(16),Z(16)^3,Z(16)^3,0*Z(2) ]]; +[ [ 0*Z(2), Z(2^4)^12, 0*Z(2), Z(2^2)^2, Z(2^4)^13 ], + [ Z(2^4)^12, 0*Z(2), 0*Z(2), Z(2^4)^11, Z(2^4) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2^4)^3 ], + [ Z(2^2)^2, Z(2^4)^11, Z(2^2)^2, 0*Z(2), Z(2^4)^3 ], + [ Z(2^4)^13, Z(2^4), Z(2^4)^3, Z(2^4)^3, 0*Z(2) ] ] +gap> form := BilinearFormByMatrix(mat,GF(16)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: +z = Z(16) + . z^12 . z^10 z^13 + z^12 . . z^11 z^1 + . . . z^10 z^3 + z^10 z^11 z^10 . z^3 + z^13 z^1 z^3 z^3 . +gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> WittIndex(form); +1 +gap> form := BilinearFormByMatrix(mat,GF(49)); +< bilinear form > +gap> WittIndex(form); +2 +]]> @@ -86,14 +129,52 @@ matrix determines a quadratic form, but the Gram matrix is recomputed so that it is an upper triangle matrix. The output is a quadratic form (i.e., an object in IsQuadraticForm) with defining field field. (See for more on bilinear forms). - -<#Include SYSTEM "../examples/include/quadformbymatrix.include"> - + mat := [[1,0,0,0],[0,3,0,0],[0,0,0,6],[0,0,6,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^3 ], [ 0*Z(7), 0*Z(7), Z(7)^3, 0*Z(7) ] ] +gap> form := QuadraticFormByMatrix(mat,GF(7)); +< quadratic form > +gap> Display(form); +Quadratic form +Gram Matrix: + 1 . . . + . 3 . . + . . . 5 + . . . . +gap> gf := GF(2^2); +GF(2^2) +gap> mat := InvariantQuadraticForm( SO(-1, 4, 4) )!.matrix; +[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2 ] ] +gap> form := QuadraticFormByMatrix( mat, gf ); +< quadratic form > +gap> Display(form); +Quadratic form +Gram Matrix: +z = Z(4) + . 1 . . + . . . . + . . z^2 1 + . . . z^2 +]]> The following example shows how using the argument field has influence on the properties of the constructed form. - -<#Include SYSTEM "../examples/include/quadformfields.include"> - + mat := +> [[Z(2)^0,Z(2)^0,0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,0*Z(2),0*Z(2)], +> [0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; +[ [ Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> WittIndex(form); +1 +gap> form := QuadraticFormByMatrix(mat,GF(4)); +< quadratic form > +gap> WittIndex(form); +2 +]]> @@ -110,9 +191,34 @@ sesquilinear forms, it is checked whether the matrix is a hermitian matrix, and not, an error message is returned. The output is a hermitian sesquilinear form (i.e., an object in IsHermitianForm) with Gram matrix matrix and defining field field. (See for more on hermitian forms). - -<#Include SYSTEM "../examples/include/hermitianformbymatrix.include"> - + gf := GF(3^2); +GF(3^2) +gap> mat := IdentityMat(4, gf); +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> form := HermitianFormByMatrix( mat, gf ); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 1 +gap> mat := [[Z(11)^0,0*Z(11),0*Z(11)],[0*Z(11),0*Z(11),Z(11)], +> [0*Z(11),Z(11),0*Z(11)]]; +[ [ Z(11)^0, 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), Z(11) ], + [ 0*Z(11), Z(11), 0*Z(11) ] ] +gap> form := HermitianFormByMatrix(mat,GF(121)); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: + 1 . . + . . 2 + . 2 . +]]> @@ -153,9 +259,38 @@ given field, and if not, an error message is returned. It is not possible to construct a nontrivial bilinear form from a polynomial in even characteristic. The output is a bilinear (orthogonal) form in the category IsBilinearForm. (See for more on bilinear forms). - -<#Include SYSTEM "../examples/include/bilformbypoly.include"> - + r := PolynomialRing( GF(11), 4); +GF(11)[x_1,x_2,x_3,x_4] +gap> vars := IndeterminatesOfPolynomialRing( r ); +[ x_1, x_2, x_3, x_4 ] +gap> pol := vars[1]*vars[2]+vars[3]*vars[4]; +x_1*x_2+x_3*x_4 +gap> form := BilinearFormByPolynomial(pol, r, 4); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + . 6 . . + 6 . . . + . . . 6 + . . 6 . +Polynomial: x_1*x_2+x_3*x_4 + +gap> r := PolynomialRing(GF(4),2); +GF(2^2)[x_1,x_2] +gap> pol := r.1*r.2; +x_1*x_2 +gap> form := BilinearFormByPolynomial(pol,r); +Error, No orthogonal form can be associated with a quadratic polynomial in even chara\ +cteristic + called from +BilinearFormByPolynomial( pol, pring, n + ) at ./pkg/forms/lib/forms.gi:470 called from +( ) + called from read-eval loop at line 14 of *stdin* +you can 'return;' to continue +]]> @@ -170,9 +305,31 @@ by default is the number of indeterminates specified by poly. It is checked whether the polynomial is a homogeneous polynomial of degree two over the given field, and if not, an error message is returned. The output is a quadratic form in the category IsQuadraticForm. (See for more on quadratic forms). - -<#Include SYSTEM "../examples/include/quadformbypoly.include"> - + r := PolynomialRing( GF(8), 3); +GF(2^3)[x_1,x_2,x_3] +gap> poly := r.1^2 + r.2^2 + r.3^2; +x_1^2+x_2^2+x_3^2 +gap> form := QuadraticFormByPolynomial(poly, r); +< quadratic form > +gap> RadicalOfForm(form); + +gap> r := PolynomialRing(GF(9),4); +GF(3^2)[x_1,x_2,x_3,x_4] +gap> poly := Z(3)^2*r.1^2+r.2^2+r.3*r.4; +x_1^2+x_2^2+x_3*x_4 +gap> qform := QuadraticFormByPolynomial(poly,r); +< quadratic form > +gap> Display(qform); +Quadratic form +Gram Matrix: + 1 . . . + . 1 . . + . . . 1 + . . . . +Polynomial: x_1^2+x_2^2+x_3*x_4 + +]]> @@ -191,9 +348,26 @@ checked whether the polynomial is a homogeneous polynomial of degree q+1, and if not, an error message is returned. The output is a hermitian form in the category IsHermitianForm. (See for more on hermitian forms). - -<#Include SYSTEM "../examples/include/hermitianformbypoly.include"> - + r := PolynomialRing( GF(9), 4); +GF(3^2)[x_1,x_2,x_3,x_4] +gap> vars := IndeterminatesOfPolynomialRing( r ); +[ x_1, x_2, x_3, x_4 ] +gap> poly := vars[1]*vars[2]^3+vars[1]^3*vars[2]+ +> vars[3]*vars[4]^3+vars[3]^3*vars[4]; +x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 +gap> form := HermitianFormByPolynomial(poly,r); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: + . 1 . . + 1 . . . + . . . 1 + . . 1 . +Polynomial: x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 + +]]> @@ -224,9 +398,50 @@ in IsQuadraticForm), such that Q(v) = form(v,v) for all vectors v in a vector space equipped with form. An error is returned when the characteristic of the field is even, or when form is not orthogonal. - -<#Include SYSTEM "../examples/include/quadformbybilform.include"> - + mat := [ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], +> [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], +> [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], +> [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], +> [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ]; +[ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], + [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], + [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], + [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], + [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ] +gap> form := BilinearFormByMatrix(mat,GF(9)); +< bilinear form > +gap> Q := QuadraticFormByBilinearForm(form); +< quadratic form > +gap> Display(form); +Bilinear form +Gram Matrix: +z = Z(9) + z^7 1 z^2 . z^5 + 1 z^7 z^6 z^5 z^2 + z^2 z^6 z^7 z^2 z^2 + . z^5 z^2 z^6 z^7 + z^5 z^2 z^2 z^7 2 +gap> Display(Q); +Quadratic form +Gram Matrix: +z = Z(9) + z^7 2 z^6 . z^1 + . z^7 z^2 z^1 z^6 + . . z^7 z^6 z^6 + . . . z^6 z^3 + . . . . 2 +gap> Set(List(GF(9)^5),x->[x,x]^form=x^Q); +[ true ] +gap> PolynomialOfForm(form); +Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2\ +*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2\ +)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 +gap> PolynomialOfForm(Q); +Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2\ +*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2\ +)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 +]]> Note that the given bilinear form form is not the associated bilinear form of the constructed quadratic form Q, according to the definition in Section . We can construct the associated @@ -242,9 +457,36 @@ bilinear forms by using . IsQuadraticForm). The output is the orthogonal bilinear form f (an object in IsBilinearForm), such that f(v,v) = Q(v) for all vectors v in a vector space equipped with Q. An error is returned when the characteristic of the field is even. - -<#Include SYSTEM "../examples/include/bilformbyquadform.include"> - + r := PolynomialRing(GF(9),4); +GF(3^2)[x_1,x_2,x_3,x_4] +gap> poly := -r.1*r.2+Z(3^2)*r.3^2+r.4^2; +-x_1*x_2+Z(3^2)*x_3^2+x_4^2 +gap> qform := QuadraticFormByPolynomial(poly,r); +< quadratic form > +gap> Display( qform ); +Quadratic form +Gram Matrix: +z = Z(9) + . 2 . . + . . . . + . . z^1 . + . . . 1 +Polynomial: -x_1*x_2+Z(3^2)*x_3^2+x_4^2 + +gap> form := BilinearFormByQuadraticForm( qform ); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: +z = Z(9) + . 1 . . + 1 . . . + . . z^1 . + . . . 1 +gap> Set(GF(9)^4, x -> [x,x]^form = x^qform); +[ true ] +]]> Note that the constructed bilinear form f is not the associated bilinear form of the given quadratic form Q, according to the definition in Section . We can construct the associated @@ -262,9 +504,25 @@ in IsBilinearForm), as defined in Section , i.e. the bilinear form f such that f(v,w) = Q(v+w)-Q(v)-Q(w) for all vectors v,w in a vector space equipped with Q. (See for more on quadratic forms). - -<#Include SYSTEM "../examples/include/assocbilform.include"> - + r:= PolynomialRing(GF(121),6); +GF(11^2)[x_1,x_2,x_3,x_4,x_5,x_6] +gap> poly := r.1*r.5-r.2*r.6+r.3*r.4; +x_1*x_5-x_2*x_6+x_3*x_4 +gap> form := QuadraticFormByPolynomial(poly,r); +< quadratic form > +gap> aform := AssociatedBilinearForm(form); +< bilinear form > +gap> Display(aform); +Bilinear form +Gram Matrix: + . . . . 1 . + . . . . . 10 + . . . 1 . . + . . 1 . . . + 1 . . . . . + . 10 . . . . +]]> @@ -286,9 +544,29 @@ of the operation \^ where (u,v)^f represents f(u,v) in the case that f is sesquilinear, and u^f stands for f(u) in the quadratic case. So for convenience, the user may use this compressed version of this operation, which we show in the following example: - -<#Include SYSTEM "../examples/include/evalform.include"> - + mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0;; +gap> form := QuadraticFormByMatrix(mat,GF(8)); +< quadratic form > +gap> u := [ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ]; +[ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ] +gap> EvaluateForm( form, u ); +Z(2^3)^6 +gap> u^form; +Z(2^3)^6 +gap> gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0], +> [0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0;; +gap> form := BilinearFormByMatrix(gram,GF(3)); +< bilinear form > +gap> u := [ [ Z(3)^0, 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), Z(3)^0 ], +> [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0, Z(3), 0*Z(3) ] ];; +gap> v := [ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3), 0*Z(3), Z(3) ], +> [ 0*Z(3), Z(3)^0, 0*Z(3), Z(3), Z(3), Z(3) ] ];; +gap> EvaluateForm( form, u, v); +[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] +gap> [u,v]^form; +[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] +]]> @@ -309,9 +587,47 @@ bilinear form of the quadratic form form. For a given matrix mat, this operation returns a base of the subspace orthogonal to the subspace spanned by the rows of mat with relation to the sesquilinear form or with relation to the associated bilinear form of the quadratic form form - -<#Include SYSTEM "../examples/include/orthogonaltovector.include"> - + mat := [[0,0,0,-2],[0,0,-3,0],[0,3,0,0],[2,0,0,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^4, 0*Z(7) ], + [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], [ Z(7)^2, 0*Z(7), 0*Z(7), 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> v := [0*Z(7),Z(7)^0,Z(7)^3,Z(7)^5]; +[ 0*Z(7), Z(7)^0, Z(7)^3, Z(7)^5 ] +gap> vperp := OrthogonalSubspaceMat(form,v); +[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ Z(7)^0, 0*Z(7), Z(7)^0, 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] +gap> List(vperp,x->[x,v]^form); +[ 0*Z(7), 0*Z(7), 0*Z(7) ] +gap> sub := [[1,1,0,0],[0,0,1,2]]*Z(7)^0; +[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^0, Z(7)^2 ] ] +gap> subperp := OrthogonalSubspaceMat(form,sub); +[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^4, Z(7)^0 ] ] +gap> List(subperp,x->List(sub,y->[x,y]^form)); +[ [ 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7) ] ] +gap> mat := [[1,0,0],[0,0,1],[0,0,0]]*Z(2)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> v := [Z(2)^0,Z(2)^0,0*Z(2)]; +[ Z(2)^0, Z(2)^0, 0*Z(2) ] +gap> vperp := OrthogonalSubspaceMat(form,v); +[ , ] +gap> bil_form := AssociatedBilinearForm(form); +< bilinear form > +gap> List(vperp,x->[x,v]^bil_form); +[ 0*Z(2), 0*Z(2) ] +gap> sub := [[1,0,1],[1,0,0]]*Z(2)^0; +[ [ Z(2)^0, 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ] +gap> subperp := OrthogonalSubspaceMat(form,sub); +[ , ] +gap> List(subperp,x->List(sub,y->[x,y]^bil_form)); +[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] +]]> @@ -321,9 +637,35 @@ associated bilinear form of the quadratic form form The operation return true if and only if v is isotropic with relation to the sesquilinear or quadratic form form. - -<#Include SYSTEM "../examples/include/isisotropicvector.include"> - + mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(41)^0; +[ [ Z(41)^0, 0*Z(41), 0*Z(41), 0*Z(41) ], + [ 0*Z(41), Z(41)^20, 0*Z(41), 0*Z(41) ], + [ 0*Z(41), 0*Z(41), 0*Z(41), Z(41)^0 ], + [ 0*Z(41), 0*Z(41), Z(41)^0, 0*Z(41) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> v := [1,1,0,0]*Z(41)^0; +[ Z(41)^0, Z(41)^0, 0*Z(41), 0*Z(41) ] +gap> IsIsotropicVector(form,v); +true +gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> v1 := [1,0,0,0,0]*Z(8)^0; +[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> v2 := [0,1,0,0,0]*Z(8)^0; +[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> IsIsotropicVector(form,v1); +true +gap> IsIsotropicVector(form,v2); +true +]]> @@ -335,9 +677,28 @@ The operation return true if and only if v is singular with relation to the quadratic form form. Note that only when the characteristic of the field is odd, the singular vectors with relation to a quadratic form are the isotropic vectors with relation to its associated form. - -<#Include SYSTEM "../examples/include/issingularvector.include"> - + mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> v1 := [1,0,0,0,0]*Z(8)^0; +[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> v2 := [0,1,0,0,0]*Z(8)^0; +[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> IsSingularVector(form,v1); +false +gap> IsSingularVector(form,v2); +true +gap> IsIsotropicVector(form,v1); +true +gap> IsIsotropicVector(form,v2); +true +]]> @@ -351,9 +712,31 @@ relation to the sesquilinear or quadratic form form. Note that when form is a quadratic form, it is checked whether sub generates a subspace that is totally isotropic with relation to the associated bilinear form of form. - -<#Include SYSTEM "../examples/include/istotallyisotropic.include"> - + mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^3, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> sub:= [[Z(7)^0,0*Z(7),Z(7)^0,Z(7)],[0*Z(7),Z(7)^0,Z(7)^0,Z(7)^4]]; +[ [ Z(7)^0, 0*Z(7), Z(7)^0, Z(7) ], [ 0*Z(7), Z(7)^0, Z(7)^0, Z(7)^4 ] ] +gap> IsTotallyIsotropicSubspace(form,sub); +true +gap> mat := IdentityMat(6,GF(2)); +[ , , + , , + , ] +gap> form := HermitianFormByMatrix(mat,GF(4)); +< hermitian form > +gap> sub := [[Z(2)^0,0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2)^0], +> [0*Z(2),Z(2)^0,0*Z(2),Z(2^2)^2,Z(2^2),Z(2)^0], +> [0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2^2),Z(2^2)^2]]; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], + [ 0*Z(2), Z(2)^0, 0*Z(2), Z(2^2)^2, Z(2^2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2^2), Z(2^2)^2 ] ] +gap> IsTotallyIsotropicSubspace(form,sub); +true +]]> @@ -367,9 +750,22 @@ relation to quadratic form form. Note that only when the characteristic of the field is odd, the totally singular subspaces of given dimension n with relation to a quadratic form are exactly the totally isotropic subspaces of dimension n with relation to its associated form. - -<#Include SYSTEM "../examples/include/istotallysingular.include"> - + mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> sub := [[Z(2)^0,0*Z(2),Z(2^3)^6,Z(2^3),Z(2^3)^3], +> [0*Z(2),Z(2)^0,Z(2^3)^6,Z(2^3)^2,Z(2^3)]]; +[ [ Z(2)^0, 0*Z(2), Z(2^3)^6, Z(2^3), Z(2^3)^3 ], + [ 0*Z(2), Z(2)^0, Z(2^3)^6, Z(2^3)^2, Z(2^3) ] ] +gap> IsTotallySingularSubspace(form,sub); +true +]]> @@ -548,9 +944,18 @@ the associated bilinear form f (see ) &rad;(Q) = \{v \in V | Q(v) = 0\,\, \mathrm{and}\,\, v \in &rad;(f)\}. &rad;(Q) = \{v \in V | Q(v) = 0\,\, \mathrm{and}\,\, v \in &rad;(f)\}. <center>Rad(Q) = {v ∈ V | Q(v) = 0 and v ∈ Rad(f)}.</center> - -<#Include SYSTEM "../examples/include/radicalofform.include"> - + r := PolynomialRing( GF(8), 3 ); +GF(2^3)[x_1,x_2,x_3] +gap> poly := r.1^2 + r.2 * r.3; +x_1^2+x_2*x_3 +gap> form := QuadraticFormByPolynomial( poly, r ); +< quadratic form > +gap> r := RadicalOfForm( form ); + +gap> Dimension(r); +0 +]]> @@ -562,9 +967,17 @@ The argument f must be a form (and thus it belongs to IsForm). All forms, except for bilinear forms in even characteristic, have an associated polynomial defining a quadratic or hermitian form (see and ). This method returns the polynomial associated with f, and if not already bound, stores it as a property of f. - -<#Include SYSTEM "../examples/include/polyofform.include"> - + mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; +gap> form := QuadraticFormByMatrix(mat,GF(8)); +< quadratic form > +gap> PolynomialOfForm(form); +Z(2^3)*x_1^2+x_2^2+Z(2^3)^5*x_2*x_3+x_4*x_5 +]]> @@ -585,9 +998,13 @@ Thus, discriminants can be used to delineate the isometry type of an orthogonal form in even (algebraic) dimension. The discriminant of a hermitian form is not defined, and applying this operation on a hermitian form, will result in an error message. - -<#Include SYSTEM "../examples/include/discofform.include"> - + gram := InvariantQuadraticForm(GO(-1,4,5))!.matrix;; +gap> qform := QuadraticFormByMatrix(gram, GF(5)); +< quadratic form > +gap> DiscriminantOfForm( qform ); +"nonsquare" +]]> @@ -616,15 +1033,48 @@ to find all of the bilinear, unitary or quadratic forms preserved by group -<#Include SYSTEM "../examples/include/preservedforms1.include"> - + group := GO(-1,4,4); +GO(-1,4,4) +gap> pres_forms := PreservedForms(group); +[ < quadratic form > ] +gap> group := GO(1,6,9); +GO(+1,6,9) +gap> pres_forms := PreservedForms(group); +[ < quadratic form > ] +gap> group := SU(4,16); +SU(4,16) +gap> pres_forms := PreservedForms(group); +[ < hermitian form > ] +]]> The next example demonstrates the impact of randomized methods on the number of preserved forms returned. For the particular matrix group, two preserved forms are returned after four calls of the operation. - -<#Include SYSTEM "../examples/include/preservedforms2.include"> - + gens := [ +> [ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], +> [ 0*Z(5), 0*Z(5), Z(5)^3, Z(5^2)^21 ], +> [ 0*Z(5), Z(5), Z(5), Z(5^2)^3 ], +> [ 0*Z(5), Z(5^2)^21, Z(5^2)^15, Z(5)^2 ] ], +> [ [ Z(5)^3, Z(5^2)^7, Z(5^2)^16, Z(5^2)^15 ], +> [ 0*Z(5), Z(5)^0, Z(5^2)^4, Z(5)^3 ], +> [ Z(5^2)^22, Z(5^2)^10, Z(5^2)^21, Z(5)^2 ], +> [ Z(5^2)^7, Z(5^2)^23, Z(5^2)^9, Z(5^2)^11 ] ], +> [ [ 0*Z(5), Z(5^2), 0*Z(5), 0*Z(5) ], +> [ Z(5^2)^5, 0*Z(5), 0*Z(5), 0*Z(5) ], +> [ 0*Z(5), 0*Z(5), Z(5)^0, Z(5^2)^4 ], +> [ 0*Z(5), 0*Z(5), Z(5^2)^20, Z(5)^2 ] ] ];; +gap> group := Group(gens); + +gap> PreservedForms(group); +[ < quadratic form > ] +gap> PreservedForms(group); +[ < quadratic form > ] +gap> PreservedForms(group); +[ < quadratic form > ] +gap> PreservedForms(group); +[ < quadratic form > ] +]]> @@ -638,17 +1088,48 @@ to find all of the bilinear or unitary forms preserved by group (the trivial form is also a possibility) up to a scalar. Since the procedure relies on a pseudo-random generator, the user may need to execute the operation more than once to find all invariant sesquilinear forms. - -<#Include SYSTEM "../examples/include/pres_sesforms1.include"> - + g := SU(4,3); +SU(4,3) +gap> forms := PreservedSesquilinearForms(g); +[ < hermitian form > ] +gap> Display( forms[1] ); +Hermitian form +Gram Matrix: + . . . 2 + . . 2 . + . 2 . . + 2 . . . +]]> Here is another example which shows that this procedure is suitable in some cases where using the MeatAxe is not applicable. Here, our matrix group is the group of similarities preserving a (hyperbolic) bilinear form on a 6-dimensional vector space over GF(3) &gf;(3)&gf;(3) GF(3). - -<#Include SYSTEM "../examples/include/pres_sesforms2.include"> - + a := [ [ -1, 0, 0, -1, 0, 1 ], [ 0, -1, -1, 0, 0, 1 ], +> [ -1, 0, 0, 1, 0, 0 ], [ 0, -1, 1, 0, 0, -1 ], +> [ 0, 0, 0, 0, 0, -1 ], [ 0, -1, -1, 1, 1, 1 ] ] * One(GF(3));; +gap> b := [ [ 1, -1, 1, -1, 1, -1 ], [ 1, 1, -1, 1, 1, 0 ], +> [ -1, 0, 1, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 1 ], +> [ 1, 1, 1, 1, 1, 1 ], [ -1, 1, 1, 1, -1, 0 ] ] * One(GF(3));; +gap> g := Group( a, b ); + +gap> forms := PreservedSesquilinearForms( g ); +[ < bilinear form > ] +gap> Display( forms[1] ); +Bilinear form +Gram Matrix: + . 1 . . . . + 1 . . . . . + . . . 1 . . + . . 1 . . . + . . . . . 1 + . . . . 1 . +gap> m := GModuleByMats( [a,b], GF(3) );; +gap> usemeataxe := MTX.InvariantBilinearForm(m); +fail +]]> @@ -662,9 +1143,16 @@ to find all of the quadratic forms preserved by group up to a scalar. Since the procedure relies on a pseudo-random generator, the user may need to execute the operation more than once to find all invariant sesquilinear forms. - -<#Include SYSTEM "../examples/include/pres_quadform.include"> - + group := GO(-1,4,8); +GO(-1,4,8) +gap> pres_forms := PreservedQuadraticForms(group); +[ < quadratic form > ] +gap> group := GO(1,6,9); +GO(+1,6,9) +gap> pres_forms := PreservedQuadraticForms(group); +[ < quadratic form > ] +]]> @@ -678,9 +1166,27 @@ form mapping all vectors, couples of vectors respectively, to the zero element of their basefield. As mentioned in Section , Forms allows the construction of an object in the Category IsTrivialForm. - -<#Include SYSTEM "../examples/include/trivialform.include"> - + mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7) ] ] +gap> form1 := BilinearFormByMatrix(mat,GF(7)); +< trivial form > +gap> form2 := QuadraticFormByMatrix(mat,GF(7)); +< trivial form > +gap> form1 = form2; +true +gap> IsQuadraticForm(form1); +false +gap> IsSesquilinearForm(form1); +false +gap> mat := [[0,0],[0,0]]*Z(4)^0; +[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] +gap> form3 := BilinearFormByMatrix(mat,GF(4)); +< trivial form > +gap> form3 = form1; +false +]]> As we have seen by the above example, there is only one trivial form for a given vector space over a finite field, and such a trivial form can result from the @@ -688,16 +1194,54 @@ construction of a quadratic form or a sesquilinear form, but the trivial form itself is none of these, although it can behave as a sesquilinear or a quadratic form, depending on its arguments. - -<#Include SYSTEM "../examples/include/trivialform2.include"> - + +gap> mat := [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(3)^0; +[ [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ] ] +gap> form := BilinearFormByMatrix(mat,GF(3)); +< trivial form > +gap> v := Random(GF(3)^4); +[ Z(3), Z(3), 0*Z(3), Z(3) ] +gap> [v,v]^form; +0*Z(3) +gap> v^form; +0*Z(3) +]]> The attributes and properties described in Section are all applicable to trivial forms. - -<#Include SYSTEM "../examples/include/trivialform_prop.include"> - + mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(11)^0; +[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], + [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] +gap> form := QuadraticFormByMatrix(mat,GF(121)); +< trivial form > +gap> IsReflexiveForm(form); +true +gap> IsAlternatingForm(form); +true +gap> IsSymmetricForm(form); +true +gap> IsOrthogonalForm(form); +false +gap> IsPseudoForm(form); +false +gap> IsSymplecticForm(form); +true +gap> IsDegenerateForm(form); +true +gap> IsSingularForm(form); +true +gap> BaseField(form); +GF(11^2) +gap> GramMatrix(form); +[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], + [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] +gap> RadicalOfForm(form); + +]]> diff --git a/doc/examples.xml b/doc/examples.xml index de058dc..a453cfc 100644 --- a/doc/examples.xml +++ b/doc/examples.xml @@ -135,9 +135,51 @@ f(x,y)=x<sub>1</sub>y<sub>2</sub><font face="symbol">-</font >1</sub>y<sub>2n</sub><font face="symbol">-</font >x<sub>2n</sub>y<sub>2n<font face="symbol">-</font >1</sub></center> - -<#Include SYSTEM "../examples/include/w53.include"> - + f := GF(3); +GF(3) +gap> gram := [ +> [0,0,0,1,0,0], +> [0,0,0,0,1,0], +> [0,0,0,0,0,1], +> [-1,0,0,0,0,0], +> [0,-1,0,0,0,0], +> [0,0,-1,0,0,0]] * One(f);; +gap> form := BilinearFormByMatrix( gram, f ); +< bilinear form > +gap> IsSymplecticForm( form ); +true +gap> Display( form ); +Symplectic form +Gram Matrix: + . . . 1 . . + . . . . 1 . + . . . . . 1 + 2 . . . . . + . 2 . . . . + . . 2 . . . +gap> b := BaseChangeToCanonical( form ); +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> Display( b ); + 1 . . . . . + . . . 1 . . + . 1 . . . . + . . . . 1 . + . . 1 . . . + . . . . . 1 +gap> Display( b * gram * TransposedMat(b) ); + . 1 . . . . + 2 . . . . . + . . . 1 . . + . . 2 . . . + . . . . . 1 + . . . . 2 . +]]>
@@ -152,8 +194,28 @@ and then we find the forms left invariant by this copy of GO(5,5)\mathrm{GO}(5,5) \mathrm{GO}(5,5)GO(5,5) (which we expect to be a symmetric bilinear form). - -<#Include SYSTEM "../examples/include/preservedform.include"> - + go := GO(5, 5); +GO(0,5,5) +gap> x := +> [ [ Z(5)^0, Z(5)^3, 0*Z(5), Z(5)^3, Z(5)^3 ], +> [ Z(5)^2, Z(5)^3, 0*Z(5), Z(5)^2, Z(5) ], +> [ Z(5)^2, Z(5)^2, Z(5)^0, Z(5), Z(5)^3 ], +> [ Z(5)^0, Z(5)^3, Z(5), Z(5)^0, Z(5)^3 ], +> [ Z(5)^3, 0*Z(5), Z(5)^0, 0*Z(5), Z(5) ] +> ];; +gap> go2 := go^x; + +gap> forms := PreservedSesquilinearForms( go2 ); +[ < bilinear form > ] +gap> Display( forms[1] ); +Bilinear form +Gram Matrix: + 4 2 4 3 3 + 2 2 2 3 3 + 4 2 3 1 4 + 3 3 1 2 4 + 3 3 4 4 3 +]]>
diff --git a/doc/morphisms.xml b/doc/morphisms.xml index b28ed13..43642e9 100644 --- a/doc/morphisms.xml +++ b/doc/morphisms.xml @@ -599,9 +599,27 @@ matrix b such that b M TransposedMat(b) if f is a hermitian form) is the Gram matrix of the canonical representative. That is, b is the transition matrix from a basis of the underlying vector space of f to another basis. - -<#Include SYSTEM "../examples/include/basechangetocanonical.include"> - + gf := GF(3); +GF(3) +gap> gram := [ +> [0,0,0,1,0,0], +> [0,0,0,0,1,0], +> [0,0,0,0,0,1], +> [-1,0,0,0,0,0], +> [0,-1,0,0,0,0], +> [0,0,-1,0,0,0]] * One(gf);; +gap> form := BilinearFormByMatrix( gram, gf ); +< bilinear form > +gap> b := BaseChangeToCanonical( form );; +gap> Display( b * gram * TransposedMat(b) ); + . 1 . . . . + 2 . . . . . + . . . 1 . . + . . 2 . . . + . . . . . 1 + . . . . 2 . +]]> @@ -613,9 +631,34 @@ to the transition matrix b. The argument b must be an invertible matrix of size d over the finite field gf of order q. This method returns the inner automorphism of &gldq; induces by conjugation by b. - -<#Include SYSTEM "../examples/include/basechangehom.include"> - + gl:=GL(3,3); +GL(3,3) +gap> go:=GO(3,3); +GO(0,3,3) +gap> form := PreservedSesquilinearForms(go)[1]; +< bilinear form > +gap> gram := GramMatrix( form ); +[ [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> b := BaseChangeToCanonical(form);; +gap> hom := BaseChangeHomomorphism(b, GF(3)); +^[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], + [ Z(3)^0, Z(3), 0*Z(3) ] ] +gap> newgo := Image(hom, go); +Group( +[ + [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], + [ Z(3), Z(3)^0, Z(3) ] ], + [ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], + [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ]) +gap> gens := GeneratorsOfGroup(newgo);; +gap> canonical := b * gram * TransposedMat(b); +[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3) ], + [ 0*Z(3), Z(3), 0*Z(3) ] ] +gap> ForAll(gens, y -> y * canonical * TransposedMat(y) = canonical); +true +]]> @@ -629,9 +672,36 @@ The argument f is a sesquilinear or quadratic form. For every isometry class of forms, there is a canonical representative, as described in Section , which is the returned form. - -<#Include SYSTEM "../examples/include/isometriccanonicalform.include"> - + mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; +gap> form := QuadraticFormByMatrix(mat,GF(8)); +< quadratic form > +gap> iso := IsometricCanonicalForm(form); +< parabolic quadratic form > +gap> Display(form); +Parabolic quadratic form +Gram Matrix: +z = Z(8) + z^1 . . . . + . 1 z^5 . . + . . . . . + . . . . 1 + . . . . . +Witt Index: 2 +gap> Display(iso); +Parabolic quadratic form +Gram Matrix: + 1 . . . . + . . 1 . . + . . . . . + . . . . 1 + . . . . . +Witt Index: 2 +]]> @@ -648,9 +718,24 @@ scalar c such that for all v,w in V, f(u<sup>g</sup>,v<sup>g</sup>) = c f(u,v) This operation finds for a particular matrix M, giving rise to a similarity of the sesquilinear form form, the said scalar c. - -<#Include SYSTEM "../examples/include/scalarfromsim.include"> - + gram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], +> [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], +> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];; +gap> form := BilinearFormByMatrix( gram, GF(3) ); +< bilinear form > +gap> m := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], +> [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], +> [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], +> [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], +> [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];; +gap> ScalarOfSimilarity( m, form ); +Z(3) +]]> @@ -663,9 +748,44 @@ The argument f is a sesquilinear or quadratic form on the vector space f is degenerate, respectively singular, its Witt index is defined as the Witt index of the induced non-degenerate, respectively non-singular form on the vector space &vmodradf;, see Sections and . - -<#Include SYSTEM "../examples/include/wittindex.include"> - + mat := [[0,0,1,0,0],[0,0,0,0,0],[-1,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ Z(7)^3, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat,GF(7)); +< bilinear form > +gap> WittIndex(form); +1 +gap> RadicalOfForm(form); + +gap> Dimension(last); +3 +gap> mat := IdentityMat(6,GF(5)); +[ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0 ] ] +gap> form := QuadraticFormByMatrix(mat,GF(5)); +< quadratic form > +gap> WittIndex(form); +3 +gap> mat := IdentityMat(6,GF(7)); +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] +gap> form := QuadraticFormByMatrix(mat,GF(7)); +< quadratic form > +gap> WittIndex(form); +2 +]]> @@ -738,9 +858,65 @@ the form g is just the given form f. This opertion returns Note that no method is installed for the trivial form. The methods for this operation rely on IsParabolicForm, IsHyperbolicForm and IsEllipticForm for orthogonal bilinear forms and quadratic forms. - -<#Include SYSTEM "../examples/include/typeofform.include"> - + mat := [[0,0,0,-1],[0,0,3,0],[0,-3,0,0],[1,0,0,0]]*Z(25)^0; +[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^2 ], [ 0*Z(5), 0*Z(5), Z(5)^3, 0*Z(5) ], + [ 0*Z(5), Z(5), 0*Z(5), 0*Z(5) ], [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ] ] +gap> form := BilinearFormByMatrix(mat,GF(25)); +< bilinear form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +0 +gap> mat := IdentityMat(3,GF(7)); +[ [ Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7) ], + [ 0*Z(7), 0*Z(7), Z(7)^0 ] ] +gap> form := QuadraticFormByMatrix(mat,GF(7)); +< quadratic form > +gap> IsSingularForm(form); +false +gap> TypeOfForm(form); +0 +gap> mat := [[0,1,0,0],[-1,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(5)^0; +[ [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [ Z(5)^2, 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ] ] +gap> form := BilinearFormByMatrix(mat,GF(5)); +< bilinear form > +gap> IsDegenerateForm(form); +true +gap> TypeOfForm(form); +0 +gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat,GF(7)); +< bilinear form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +-1 +gap> mat := IdentityMat(3,GF(9)); +[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> form := HermitianFormByMatrix(mat,GF(9)); +< hermitian form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +-1/2 +gap> mat := [[0,0,0,1],[0,1,0,0],[0,0,1,0],[1,0,0,0]]*Z(8)^0; +[ [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := BilinearFormByMatrix(mat,GF(8)); +< bilinear form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +Error, is a pseudo form and has no defined type called from +( ) + called from read-eval loop at line 30 of *stdin* +you can 'return;' to continue +]]> diff --git a/doc/theory.xml b/doc/theory.xml index b0f4aa8..837e7d1 100644 --- a/doc/theory.xml +++ b/doc/theory.xml @@ -182,28 +182,103 @@ with particular aspects of this package. All the functionality for sesquilinear in detail in the next chapter.

We try to construct a bilinear form... - -<#Include SYSTEM "../examples/include/bg_th_ex1.include"> - + mat := [[1,0,0],[0,1,4],[1,2,1]]*Z(5)^0; +[ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, Z(5)^2 ], + [ Z(5)^0, Z(5), Z(5)^0 ] ] +gap> form := BilinearFormByMatrix(mat,GF(5)); +Error, Invalid Gram matrix + called from +BilinearFormByMatrixOp( MutableCopyMat( m ), f + ) at ./pkg/forms/lib/forms.gi:164 called from +( ) + called from read-eval loop at line 8 of *stdin* +you can 'return;' to continue +]]> It is clear that the matrix used is not defining a reflexive bilinear form, which causes the system to generate the error message.

We construct now a reflexive bilinear form. We investigate also the radical of the form. - -<#Include SYSTEM "../examples/include/bg_th_ex2.include"> - + mat := [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,-1]]*Z(9)^0; +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3) ] ] +gap> form := BilinearFormByMatrix(mat,GF(9)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 2 +gap> IsReflexiveForm(form); +true +gap> IsSymmetricForm(form); +true +gap> IsAlternatingForm(form); +false +gap> r := RadicalOfForm(form); + +gap> Dimension(r); +0 +]]>

Degenerate forms are allowed. As an example we construct an alternating bilinear form on an odd dimensional vector space. - -<#Include SYSTEM "../examples/include/bg_th_ex3.include"> - + mat := [[0,0,-2],[0,0,1],[2,-1,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^0 ], + [ Z(7)^2, Z(7)^3, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat,GF(7)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + . . 5 + . . 1 + 2 6 . +gap> IsSymmetricForm(form); +false +gap> IsAlternatingForm(form); +true +gap> r := RadicalOfForm(form); + +gap> Dimension(r); +1 +]]> When the characteristic of the field equals two, alternating forms are also symmetric. We construct an example. - -<#Include SYSTEM "../examples/include/bg_th_ex4.include"> - + mat := [[0,1,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,1], +> [0,0,0,0,1,0],[0,0,0,1,0,0],[0,0,1,0,0,0]]*Z(16)^0; +[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := BilinearFormByMatrix(mat,GF(16)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + . 1 . . . . + 1 . . . . . + . . . . . 1 + . . . . 1 . + . . . 1 . . + . . 1 . . . +gap> IsSymmetricForm(form); +true +gap> IsAlternatingForm(form); +true +gap> IsDegenerateForm(form); +false +gap> WittIndex(form); +3 +]]> To define a hermitian form, we need a matrix and the companion automorphism. Since this automorphism has order 2, it exists and is unique if the ground field has square order. @@ -433,24 +508,117 @@ for quadratic forms will be listed in detail in the next chapter. The user can construct quadratic forms using any matrix (provided it has the right dimension). The Gram matrix is always stored as an upper triangle matrix, as explained above. - -<#Include SYSTEM "../examples/include/bg_th_ex6.include"> - + V := GF(4)^3; +( GF(2^2)^3 ) +gap> mat := [[Z(2^2)^2,Z(2^2),Z(2^2)^2],[Z(2^2)^2,Z(2)^0,Z(2)^0], +> [0*Z(2),Z(2)^0,0*Z(2)]]; +[ [ Z(2^2)^2, Z(2^2), Z(2^2)^2 ], [ Z(2^2)^2, Z(2)^0, Z(2)^0 ], + [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] +gap> qform := QuadraticFormByMatrix(mat, GF(4)); +< quadratic form > +gap> Display( qform ); +Quadratic form +Gram Matrix: +z = Z(4) + z^2 1 z^2 + . 1 . + . . . +gap> PolynomialOfForm( qform ); +Z(2^2)^2*x_1^2+x_1*x_2+Z(2^2)^2*x_1*x_3+x_2^2 +]]> In the previous example, we saw how we used a polynomial to display a quadratic form. Conversely, Forms allows the user to construct (quadratic) forms using a polynomial. - -<#Include SYSTEM "../examples/include/bg_th_ex7.include"> - + r := PolynomialRing(GF(8),4); +GF(2^3)[x_1,x_2,x_3,x_4] +gap> poly := r.1*r.2+r.3*r.4; +x_1*x_2+x_3*x_4 +gap> qform := QuadraticFormByPolynomial(poly, r); +< quadratic form > +gap> Display(qform); +Quadratic form +Gram Matrix: + . 1 . . + . . . . + . . . 1 + . . . . +Polynomial: x_1*x_2+x_3*x_4 + +gap> RadicalOfForm(qform); + +]]> We construct now two different quadratic forms with the same associated bilinear form. - -<#Include SYSTEM "../examples/include/bg_th_ex8.include"> - + mat := [[Z(16)^3,1,0,0],[0,Z(16)^5,0,0], +> [0,0,Z(16)^3,1],[0,0,0,Z(16)^12]]*Z(16)^0; +[ [ Z(2^4)^3, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^4)^3, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^12 ] + ] +gap> qform := QuadraticFormByMatrix(mat,GF(16)); +< quadratic form > +gap> Display( qform ); +Quadratic form +Gram Matrix: +z = Z(16) + z^3 1 . . + . z^5 . . + . . z^3 1 + . . . z^12 +gap> mat2 := [[Z(16)^7,1,0,0],[0,0,0,0], +> [0,0,Z(16)^2,1],[0,0,0,Z(16)^9]]*Z(16)^0; +[ [ Z(2^4)^7, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^4)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^9 ] ] +gap> qform2 := QuadraticFormByMatrix(mat2, GF(16)); +< quadratic form > +gap> Display( qform2 ); +Quadratic form +Gram Matrix: +z = Z(16) + z^7 1 . . + . . . . + . . z^2 1 + . . . z^9 +gap> biform := AssociatedBilinearForm( qform2 ); +< bilinear form > +gap> Display( biform ); +Bilinear form +Gram Matrix: + . 1 . . + 1 . . . + . . . 1 + . . 1 . +]]> We end with an example of a non-singular quadratic form with a degenerate associated bilinear form. - -<#Include SYSTEM "../examples/include/bg_th_ex9.include"> - + mat := [ [ Z(2^2), Z(2^2), Z(2^2), Z(2^2), Z(2^2) ], +> [ 0*Z(2), Z(2^2), Z(2^2)^2, 0*Z(2), Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ];; +gap> qform := QuadraticFormByMatrix(mat,GF(4)); +< quadratic form > +gap> IsSingularForm(qform); +false +gap> IsDegenerateForm(qform); +#I Testing degeneracy of the *associated bilinear form* +true +gap> biform := AssociatedBilinearForm(qform); +< bilinear form > +gap> Display(biform); +Bilinear form +Gram Matrix: +z = Z(4) + . z^1 z^1 z^1 z^1 + z^1 . z^2 . 1 + z^1 z^2 . 1 1 + z^1 . 1 . 1 + z^1 1 1 1 . +gap> IsDegenerateForm(biform); +true +]]> diff --git a/examples/gap/assocbilform.g b/examples/gap/assocbilform.g deleted file mode 100644 index 9720128..0000000 --- a/examples/gap/assocbilform.g +++ /dev/null @@ -1,7 +0,0 @@ -#Constructing form: AssociatedBilinearForm -r:= PolynomialRing(GF(121),6); -poly := r.1*r.5-r.2*r.6+r.3*r.4; -form := QuadraticFormByPolynomial(poly,r); -aform := AssociatedBilinearForm(form); -Display(aform); -quit; diff --git a/examples/gap/basechangehom.g b/examples/gap/basechangehom.g deleted file mode 100644 index b9ec76e..0000000 --- a/examples/gap/basechangehom.g +++ /dev/null @@ -1,12 +0,0 @@ -#morphisms: BaseChangeHomomorphism -gl:=GL(3,3); -go:=GO(3,3); -form := PreservedSesquilinearForms(go)[1]; -gram := GramMatrix( form ); -b := BaseChangeToCanonical(form);; -hom := BaseChangeHomomorphism(b, GF(3)); -newgo := Image(hom, go); -gens := GeneratorsOfGroup(newgo);; -canonical := b * gram * TransposedMat(b); -ForAll(gens, y -> y * canonical * TransposedMat(y) = canonical); -quit; diff --git a/examples/gap/basechangetocanonical.g b/examples/gap/basechangetocanonical.g deleted file mode 100644 index a17d08f..0000000 --- a/examples/gap/basechangetocanonical.g +++ /dev/null @@ -1,13 +0,0 @@ -#morphisms: BaseChangeToCanonical -gf := GF(3); -gram := [ -[0,0,0,1,0,0], -[0,0,0,0,1,0], -[0,0,0,0,0,1], -[-1,0,0,0,0,0], -[0,-1,0,0,0,0], -[0,0,-1,0,0,0]] * One(gf);; -form := BilinearFormByMatrix( gram, gf ); -b := BaseChangeToCanonical( form );; -Display( b * gram * TransposedMat(b) ); -quit; diff --git a/examples/gap/bg_th_ex1.g b/examples/gap/bg_th_ex1.g deleted file mode 100644 index 353c3c8..0000000 --- a/examples/gap/bg_th_ex1.g +++ /dev/null @@ -1,5 +0,0 @@ -#Background theory: example 1 -mat := [[1,0,0],[0,1,4],[1,2,1]]*Z(5)^0; -form := BilinearFormByMatrix(mat,GF(5)); -quit; -quit; diff --git a/examples/gap/bg_th_ex2.g b/examples/gap/bg_th_ex2.g deleted file mode 100644 index 5d64c53..0000000 --- a/examples/gap/bg_th_ex2.g +++ /dev/null @@ -1,10 +0,0 @@ -#Background theory: example 2 -mat := [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,-1]]*Z(9)^0; -form := BilinearFormByMatrix(mat,GF(9)); -Display(form); -IsReflexiveForm(form); -IsSymmetricForm(form); -IsAlternatingForm(form); -r := RadicalOfForm(form); -Dimension(r); -quit; diff --git a/examples/gap/bg_th_ex3.g b/examples/gap/bg_th_ex3.g deleted file mode 100644 index 7926649..0000000 --- a/examples/gap/bg_th_ex3.g +++ /dev/null @@ -1,9 +0,0 @@ -#Background theory: example 3 -mat := [[0,0,-2],[0,0,1],[2,-1,0]]*Z(7)^0; -form := BilinearFormByMatrix(mat,GF(7)); -Display(form); -IsSymmetricForm(form); -IsAlternatingForm(form); -r := RadicalOfForm(form); -Dimension(r); -quit; diff --git a/examples/gap/bg_th_ex4.g b/examples/gap/bg_th_ex4.g deleted file mode 100644 index b5c320b..0000000 --- a/examples/gap/bg_th_ex4.g +++ /dev/null @@ -1,10 +0,0 @@ -#Background theory: example 4 -mat := [[0,1,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,1], - [0,0,0,0,1,0],[0,0,0,1,0,0],[0,0,1,0,0,0]]*Z(16)^0; -form := BilinearFormByMatrix(mat,GF(16)); -Display(form); -IsSymmetricForm(form); -IsAlternatingForm(form); -IsDegenerateForm(form); -WittIndex(form); -quit; diff --git a/examples/gap/bg_th_ex5.g b/examples/gap/bg_th_ex5.g deleted file mode 100644 index 1a918d7..0000000 --- a/examples/gap/bg_th_ex5.g +++ /dev/null @@ -1,30 +0,0 @@ -#Background theory: example 5 -mat := [[0*Z(5),0*Z(5),0*Z(25),Z(25)^3],[0*Z(5),0*Z(5),Z(25)^3,0*Z(25)], - [0*Z(5),-Z(25)^3,0*Z(5),0*Z(5)],[-Z(25)^3,0*Z(5),0*Z(25),0*Z(25)]]; -form := HermitianFormByMatrix(mat,GF(25)); -Display(form); -WittIndex(form); -form2 := BilinearFormByMatrix(mat,GF(25)); -Display(form2); -IsAlternatingForm(form2); -Display(IsometricCanonicalForm(form)); -Display(IsometricCanonicalForm(form2)); -V := GF(25)^4; -u := [Z(5)^0,Z(5^2)^11,Z(5)^3,Z(5^2)^13 ]; -[u,u]^form; -v := [Z(5)^0,Z(5^2)^5,Z(5^2),Z(5^2)^13 ]; -[v,v]^form; -[u,v]^form; -([v,u]^form)^5; -w := [Z(5^2)^21,Z(5^2)^19,Z(5^2)^4,Z(5)^3 ]; -[w,w]^form; -v := [Z(5)^0,Z(5^2)^10,Z(5^2)^15,Z(5^2)^3 ]; -u := [Z(5)^3,Z(5^2)^9,Z(5^2)^4,Z(5^2)^16 ]; -w := [Z(5)^2,Z(5^2)^9,Z(5^2)^23,Z(5^2)^11 ]; -[u,v]^form; -[u,w]^form; -[v,w]^form; -s := Subspace(V,[v,u,w]); -Dimension(s); -WittIndex(form); -quit; diff --git a/examples/gap/bg_th_ex6.g b/examples/gap/bg_th_ex6.g deleted file mode 100644 index 001e65e..0000000 --- a/examples/gap/bg_th_ex6.g +++ /dev/null @@ -1,8 +0,0 @@ -#Background theory: example 6 -V := GF(4)^3; -mat := [[Z(2^2)^2,Z(2^2),Z(2^2)^2],[Z(2^2)^2,Z(2)^0,Z(2)^0], - [0*Z(2),Z(2)^0,0*Z(2)]]; -qform := QuadraticFormByMatrix(mat, GF(4)); -Display( qform ); -PolynomialOfForm( qform ); -quit; diff --git a/examples/gap/bg_th_ex7.g b/examples/gap/bg_th_ex7.g deleted file mode 100644 index 08fac57..0000000 --- a/examples/gap/bg_th_ex7.g +++ /dev/null @@ -1,7 +0,0 @@ -#Background theory: example 7 -r := PolynomialRing(GF(8),4); -poly := r.1*r.2+r.3*r.4; -qform := QuadraticFormByPolynomial(poly, r); -Display(qform); -RadicalOfForm(qform); -quit; diff --git a/examples/gap/bg_th_ex8.g b/examples/gap/bg_th_ex8.g deleted file mode 100644 index c407275..0000000 --- a/examples/gap/bg_th_ex8.g +++ /dev/null @@ -1,12 +0,0 @@ -#Background theory: example 8 -mat := [[Z(16)^3,1,0,0],[0,Z(16)^5,0,0], - [0,0,Z(16)^3,1],[0,0,0,Z(16)^12]]*Z(16)^0; -qform := QuadraticFormByMatrix(mat,GF(16)); -Display( qform ); -mat2 := [[Z(16)^7,1,0,0],[0,0,0,0], - [0,0,Z(16)^2,1],[0,0,0,Z(16)^9]]*Z(16)^0; -qform2 := QuadraticFormByMatrix(mat2, GF(16)); -Display( qform2 ); -biform := AssociatedBilinearForm( qform2 ); -Display( biform ); -quit; diff --git a/examples/gap/bg_th_ex9.g b/examples/gap/bg_th_ex9.g deleted file mode 100644 index 61746ec..0000000 --- a/examples/gap/bg_th_ex9.g +++ /dev/null @@ -1,13 +0,0 @@ -#Background theory: example 9 -mat := [ [ Z(2^2), Z(2^2), Z(2^2), Z(2^2), Z(2^2) ], - [ 0*Z(2), Z(2^2), Z(2^2)^2, 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ];; -qform := QuadraticFormByMatrix(mat,GF(4)); -IsSingularForm(qform); -IsDegenerateForm(qform); -biform := AssociatedBilinearForm(qform); -Display(biform); -IsDegenerateForm(biform); -quit; diff --git a/examples/gap/bilformbymatrix.g b/examples/gap/bilformbymatrix.g deleted file mode 100644 index 917a801..0000000 --- a/examples/gap/bilformbymatrix.g +++ /dev/null @@ -1,17 +0,0 @@ -#Constructing form: BilinearFormByMatrix -mat := IdentityMat(4, GF(9)); -form := BilinearFormByMatrix(mat,GF(9)); -Display(form); -mat := [[0*Z(2),Z(16)^12,0*Z(2),Z(4)^2,Z(16)^13], - [Z(16)^12,0*Z(2),0*Z(2),Z(16)^11,Z(16)], - [0*Z(2),0*Z(2),0*Z(2),Z(4)^2,Z(16)^3], - [Z(4)^2,Z(16)^11,Z(4)^2,0*Z(2),Z(16)^3], - [Z(16)^13,Z(16),Z(16)^3,Z(16)^3,0*Z(2) ]]; -form := BilinearFormByMatrix(mat,GF(16)); -Display(form); -mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -form := BilinearFormByMatrix(mat); -WittIndex(form); -form := BilinearFormByMatrix(mat,GF(49)); -WittIndex(form); -quit; diff --git a/examples/gap/bilformbypoly.g b/examples/gap/bilformbypoly.g deleted file mode 100644 index 7960227..0000000 --- a/examples/gap/bilformbypoly.g +++ /dev/null @@ -1,11 +0,0 @@ -#Constructing form: BilinearFormByPolynomial -r := PolynomialRing( GF(11), 4); -vars := IndeterminatesOfPolynomialRing( r ); -pol := vars[1]*vars[2]+vars[3]*vars[4]; -form := BilinearFormByPolynomial(pol, r, 4); -Display(form); -r := PolynomialRing(GF(4),2); -pol := r.1*r.2; -form := BilinearFormByPolynomial(pol,r); -quit; -quit; diff --git a/examples/gap/bilformbyquadform.g b/examples/gap/bilformbyquadform.g deleted file mode 100644 index 44e1c9e..0000000 --- a/examples/gap/bilformbyquadform.g +++ /dev/null @@ -1,9 +0,0 @@ -#Constructing form: BilinearFormByQuadraticForm -r := PolynomialRing(GF(9),4); -poly := -r.1*r.2+Z(3^2)*r.3^2+r.4^2; -qform := QuadraticFormByPolynomial(poly,r); -Display( qform ); -form := BilinearFormByQuadraticForm( qform ); -Display(form); -Set(GF(9)^4, x -> [x,x]^form = x^qform); -quit; diff --git a/examples/gap/conic.g b/examples/gap/conic.g deleted file mode 100644 index 1918503..0000000 --- a/examples/gap/conic.g +++ /dev/null @@ -1,25 +0,0 @@ -#A conic of PG(2,8) -gf := GF(8); -vec := gf^3; -r := PolynomialRing( gf, 3); -poly := r.1^2 + r.2 * r.3; -form := QuadraticFormByPolynomial( poly, r ); -Display( form ); -IsDegenerateForm( form ); -IsSingularForm( form ); -WittIndex( form ); -IsParabolicForm( form ); -RadicalOfForm( form ); -canonical := IsometricCanonicalForm( form ); -form = canonical; -go := GO(3,8); -mat := InvariantQuadraticForm( go )!.matrix; -gapform := QuadraticFormByMatrix( mat, GF(8) ); -b := BaseChangeToCanonical( gapform ); -hom := BaseChangeHomomorphism( b, GF(8) ); -newgo := Image(hom, go); -conic := Filtered(vec, x -> IsZero( x^form ));; -Size(conic); -orbs := Orbits(newgo, conic, OnRight);; -List(orbs,Size); -quit; diff --git a/examples/gap/discofform.g b/examples/gap/discofform.g deleted file mode 100644 index 3f4a84a..0000000 --- a/examples/gap/discofform.g +++ /dev/null @@ -1,5 +0,0 @@ -#Discriminant of form: DiscriminantOfForm -gram := InvariantQuadraticForm(GO(-1,4,5))!.matrix;; -qform := QuadraticFormByMatrix(gram, GF(5)); -DiscriminantOfForm( qform ); -quit; diff --git a/examples/gap/evalform.g b/examples/gap/evalform.g deleted file mode 100644 index 40292f7..0000000 --- a/examples/gap/evalform.g +++ /dev/null @@ -1,16 +0,0 @@ -#computing subspace orthogonal to given vector -mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0;; -form := QuadraticFormByMatrix(mat,GF(8)); -u := [ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ]; -EvaluateForm( form, u ); -u^form; -gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0], - [0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0;; -form := BilinearFormByMatrix(gram,GF(3)); -u := [ [ Z(3)^0, 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), Z(3)^0 ], - [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0, Z(3), 0*Z(3) ] ];; -v := [ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3), 0*Z(3), Z(3) ], - [ 0*Z(3), Z(3)^0, 0*Z(3), Z(3), Z(3), Z(3) ] ];; -EvaluateForm( form, u, v); -[u,v]^form; -quit; diff --git a/examples/gap/hermitianformbymatrix.g b/examples/gap/hermitianformbymatrix.g deleted file mode 100644 index 80adfb3..0000000 --- a/examples/gap/hermitianformbymatrix.g +++ /dev/null @@ -1,10 +0,0 @@ -#Constructing form: HermitianFormByMatrix -gf := GF(3^2); -mat := IdentityMat(4, gf); -form := HermitianFormByMatrix( mat, gf ); -Display(form); -mat := [[Z(11)^0,0*Z(11),0*Z(11)],[0*Z(11),0*Z(11),Z(11)], - [0*Z(11),Z(11),0*Z(11)]]; -form := HermitianFormByMatrix(mat,GF(121)); -Display(form); -quit; diff --git a/examples/gap/hermitianformbypoly.g b/examples/gap/hermitianformbypoly.g deleted file mode 100644 index ef20d76..0000000 --- a/examples/gap/hermitianformbypoly.g +++ /dev/null @@ -1,8 +0,0 @@ -#Constructing form: HermitianFormByPolynomial -r := PolynomialRing( GF(9), 4); -vars := IndeterminatesOfPolynomialRing( r ); -poly := vars[1]*vars[2]^3+vars[1]^3*vars[2]+ - vars[3]*vars[4]^3+vars[3]^3*vars[4]; -form := HermitianFormByPolynomial(poly,r); -Display(form); -quit; diff --git a/examples/gap/isisotropicvector.g b/examples/gap/isisotropicvector.g deleted file mode 100644 index f3016bf..0000000 --- a/examples/gap/isisotropicvector.g +++ /dev/null @@ -1,12 +0,0 @@ -#testing isotropy for vectors. -mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(41)^0; -form := BilinearFormByMatrix(mat); -v := [1,1,0,0]*Z(41)^0; -IsIsotropicVector(form,v); -mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -form := QuadraticFormByMatrix(mat); -v1 := [1,0,0,0,0]*Z(8)^0; -v2 := [0,1,0,0,0]*Z(8)^0; -IsIsotropicVector(form,v1); -IsIsotropicVector(form,v2); -quit; diff --git a/examples/gap/isometriccanonicalform.g b/examples/gap/isometriccanonicalform.g deleted file mode 100644 index f02a44f..0000000 --- a/examples/gap/isometriccanonicalform.g +++ /dev/null @@ -1,11 +0,0 @@ -#morphisms: IsometricCanonicalForm -mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -[ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], -[ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -[ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], -[ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; -form := QuadraticFormByMatrix(mat,GF(8)); -iso := IsometricCanonicalForm(form); -Display(form); -Display(iso); -quit; diff --git a/examples/gap/issingularvector.g b/examples/gap/issingularvector.g deleted file mode 100644 index afa5382..0000000 --- a/examples/gap/issingularvector.g +++ /dev/null @@ -1,10 +0,0 @@ -#testing singularity for vectors. -mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -form := QuadraticFormByMatrix(mat); -v1 := [1,0,0,0,0]*Z(8)^0; -v2 := [0,1,0,0,0]*Z(8)^0; -IsSingularVector(form,v1); -IsSingularVector(form,v2); -IsIsotropicVector(form,v1); -IsIsotropicVector(form,v2); -quit; diff --git a/examples/gap/istotallyisotropic.g b/examples/gap/istotallyisotropic.g deleted file mode 100644 index 5242254..0000000 --- a/examples/gap/istotallyisotropic.g +++ /dev/null @@ -1,12 +0,0 @@ -#testing total isotropy for subspaces -mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -form := BilinearFormByMatrix(mat); -sub:= [[Z(7)^0,0*Z(7),Z(7)^0,Z(7)],[0*Z(7),Z(7)^0,Z(7)^0,Z(7)^4]]; -IsTotallyIsotropicSubspace(form,sub); -mat := IdentityMat(6,GF(2)); -form := HermitianFormByMatrix(mat,GF(4)); -sub := [[Z(2)^0,0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2)^0], - [0*Z(2),Z(2)^0,0*Z(2),Z(2^2)^2,Z(2^2),Z(2)^0], - [0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2^2),Z(2^2)^2]]; -IsTotallyIsotropicSubspace(form,sub); -quit; diff --git a/examples/gap/istotallysingular.g b/examples/gap/istotallysingular.g deleted file mode 100644 index e0b664f..0000000 --- a/examples/gap/istotallysingular.g +++ /dev/null @@ -1,7 +0,0 @@ -#testing singularity for subspaces. -mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -form := QuadraticFormByMatrix(mat); -sub := [[Z(2)^0,0*Z(2),Z(2^3)^6,Z(2^3),Z(2^3)^3], - [0*Z(2),Z(2)^0,Z(2^3)^6,Z(2^3)^2,Z(2^3)]]; -IsTotallySingularSubspace(form,sub); -quit; diff --git a/examples/gap/orthogonaltovector.g b/examples/gap/orthogonaltovector.g deleted file mode 100644 index 1c48b12..0000000 --- a/examples/gap/orthogonaltovector.g +++ /dev/null @@ -1,19 +0,0 @@ -#computing subspace orthogonal to given vector -mat := [[0,0,0,-2],[0,0,-3,0],[0,3,0,0],[2,0,0,0]]*Z(7)^0; -form := BilinearFormByMatrix(mat); -v := [0*Z(7),Z(7)^0,Z(7)^3,Z(7)^5]; -vperp := OrthogonalSubspaceMat(form,v); -List(vperp,x->[x,v]^form); -sub := [[1,1,0,0],[0,0,1,2]]*Z(7)^0; -subperp := OrthogonalSubspaceMat(form,sub); -List(subperp,x->List(sub,y->[x,y]^form)); -mat := [[1,0,0],[0,0,1],[0,0,0]]*Z(2)^0; -form := QuadraticFormByMatrix(mat); -v := [Z(2)^0,Z(2)^0,0*Z(2)]; -vperp := OrthogonalSubspaceMat(form,v); -bil_form := AssociatedBilinearForm(form); -List(vperp,x->[x,v]^bil_form); -sub := [[1,0,1],[1,0,0]]*Z(2)^0; -subperp := OrthogonalSubspaceMat(form,sub); -List(subperp,x->List(sub,y->[x,y]^bil_form)); -quit; diff --git a/examples/gap/polyofform.g b/examples/gap/polyofform.g deleted file mode 100644 index 6c3b737..0000000 --- a/examples/gap/polyofform.g +++ /dev/null @@ -1,9 +0,0 @@ -#Polynomial of form: PolynomialOfForm -mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; -form := QuadraticFormByMatrix(mat,GF(8)); -PolynomialOfForm(form); -quit; diff --git a/examples/gap/pres_quadform.g b/examples/gap/pres_quadform.g deleted file mode 100644 index f53d7b3..0000000 --- a/examples/gap/pres_quadform.g +++ /dev/null @@ -1,6 +0,0 @@ -#example of PreservedQuadraticForms -group := GO(-1,4,8); -pres_forms := PreservedQuadraticForms(group); -group := GO(1,6,9); -pres_forms := PreservedQuadraticForms(group); -quit; diff --git a/examples/gap/pres_sesforms1.g b/examples/gap/pres_sesforms1.g deleted file mode 100644 index 3b8a05a..0000000 --- a/examples/gap/pres_sesforms1.g +++ /dev/null @@ -1,5 +0,0 @@ -#Preserved Sesquilinear forms: example 1 -g := SU(4,3); -forms := PreservedSesquilinearForms(g); -Display( forms[1] ); -quit; diff --git a/examples/gap/pres_sesforms2.g b/examples/gap/pres_sesforms2.g deleted file mode 100644 index 8f0f911..0000000 --- a/examples/gap/pres_sesforms2.g +++ /dev/null @@ -1,13 +0,0 @@ -#Preserved Sesquilinear forms: example 2 -a := [ [ -1, 0, 0, -1, 0, 1 ], [ 0, -1, -1, 0, 0, 1 ], - [ -1, 0, 0, 1, 0, 0 ], [ 0, -1, 1, 0, 0, -1 ], - [ 0, 0, 0, 0, 0, -1 ], [ 0, -1, -1, 1, 1, 1 ] ] * One(GF(3));; -b := [ [ 1, -1, 1, -1, 1, -1 ], [ 1, 1, -1, 1, 1, 0 ], - [ -1, 0, 1, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 1 ], - [ 1, 1, 1, 1, 1, 1 ], [ -1, 1, 1, 1, -1, 0 ] ] * One(GF(3));; -g := Group( a, b ); -forms := PreservedSesquilinearForms( g ); -Display( forms[1] ); -m := GModuleByMats( [a,b], GF(3) );; -usemeataxe := MTX.InvariantBilinearForm(m); -quit; diff --git a/examples/gap/preservedform.g b/examples/gap/preservedform.g deleted file mode 100644 index c4b3623..0000000 --- a/examples/gap/preservedform.g +++ /dev/null @@ -1,13 +0,0 @@ -#What is the form preserved by this group? -go := GO(5, 5); -x := -[ [ Z(5)^0, Z(5)^3, 0*Z(5), Z(5)^3, Z(5)^3 ], - [ Z(5)^2, Z(5)^3, 0*Z(5), Z(5)^2, Z(5) ], - [ Z(5)^2, Z(5)^2, Z(5)^0, Z(5), Z(5)^3 ], - [ Z(5)^0, Z(5)^3, Z(5), Z(5)^0, Z(5)^3 ], - [ Z(5)^3, 0*Z(5), Z(5)^0, 0*Z(5), Z(5) ] - ];; -go2 := go^x; -forms := PreservedSesquilinearForms( go2 ); -Display( forms[1] ); -quit; diff --git a/examples/gap/preservedforms1.g b/examples/gap/preservedforms1.g deleted file mode 100644 index 3c481f5..0000000 --- a/examples/gap/preservedforms1.g +++ /dev/null @@ -1,9 +0,0 @@ -#example of PreservedForms -group := GO(-1,4,4); -pres_forms := PreservedForms(group); -group := GO(1,6,9); -pres_forms := PreservedForms(group); -group := SU(4,16); -pres_forms := PreservedForms(group); -quit; - diff --git a/examples/gap/preservedforms2.g b/examples/gap/preservedforms2.g deleted file mode 100644 index 01576af..0000000 --- a/examples/gap/preservedforms2.g +++ /dev/null @@ -1,19 +0,0 @@ -#example (due to John) of more than one preserved form (after three calls). -gens := [ [ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^3, Z(5^2)^21 ], - [ 0*Z(5), Z(5), Z(5), Z(5^2)^3 ], - [ 0*Z(5), Z(5^2)^21, Z(5^2)^15, Z(5)^2 ] ], - [ [ Z(5)^3, Z(5^2)^7, Z(5^2)^16, Z(5^2)^15 ], - [ 0*Z(5), Z(5)^0, Z(5^2)^4, Z(5)^3 ], - [ Z(5^2)^22, Z(5^2)^10, Z(5^2)^21, Z(5)^2 ], - [ Z(5^2)^7, Z(5^2)^23, Z(5^2)^9, Z(5^2)^11 ] ], - [ [ 0*Z(5), Z(5^2), 0*Z(5), 0*Z(5) ], - [ Z(5^2)^5, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0, Z(5^2)^4 ], - [ 0*Z(5), 0*Z(5), Z(5^2)^20, Z(5)^2 ] ] ]; -group := Group(gens); -PreservedForms(group); -PreservedForms(group); -PreservedForms(group); -PreservedForms(group); -quit; diff --git a/examples/gap/quadformbybilform.g b/examples/gap/quadformbybilform.g deleted file mode 100644 index b7f0e75..0000000 --- a/examples/gap/quadformbybilform.g +++ /dev/null @@ -1,14 +0,0 @@ -#Constructing form: QuadraticFormByBilinearForm -mat := [ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], - [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], - [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], - [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], - [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ]; -form := BilinearFormByMatrix(mat,GF(9)); -Q := QuadraticFormByBilinearForm(form); -Display(form); -Display(Q); -Set(List(GF(9)^5),x->[x,x]^form=x^Q); -PolynomialOfForm(form); -PolynomialOfForm(Q); -quit; diff --git a/examples/gap/quadformbymatrix.g b/examples/gap/quadformbymatrix.g deleted file mode 100644 index e3c07e5..0000000 --- a/examples/gap/quadformbymatrix.g +++ /dev/null @@ -1,9 +0,0 @@ -#Constructing form: QuadraticFormByMatrix -mat := [[1,0,0,0],[0,3,0,0],[0,0,0,6],[0,0,6,0]]*Z(7)^0; -form := QuadraticFormByMatrix(mat,GF(7)); -Display(form); -gf := GF(2^2); -mat := InvariantQuadraticForm( SO(-1, 4, 4) )!.matrix; -form := QuadraticFormByMatrix( mat, gf ); -Display(form); -quit; diff --git a/examples/gap/quadformbypoly.g b/examples/gap/quadformbypoly.g deleted file mode 100644 index 2d2efd6..0000000 --- a/examples/gap/quadformbypoly.g +++ /dev/null @@ -1,10 +0,0 @@ -#Constructing form: QuadraticFormByPolynomial -r := PolynomialRing( GF(8), 3); -poly := r.1^2 + r.2^2 + r.3^2; -form := QuadraticFormByPolynomial(poly, r); -RadicalOfForm(form); -r := PolynomialRing(GF(9),4); -poly := Z(3)^2*r.1^2+r.2^2+r.3*r.4; -qform := QuadraticFormByPolynomial(poly,r); -Display(qform); -quit; diff --git a/examples/gap/quadformfields.g b/examples/gap/quadformfields.g deleted file mode 100644 index ceca16b..0000000 --- a/examples/gap/quadformfields.g +++ /dev/null @@ -1,9 +0,0 @@ -#constructing the same form over different fields -mat := -[[Z(2)^0,Z(2)^0,0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,0*Z(2),0*Z(2)], - [0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; -form := QuadraticFormByMatrix(mat); -WittIndex(form); -form := QuadraticFormByMatrix(mat,GF(4)); -WittIndex(form); -quit; diff --git a/examples/gap/radicalofform.g b/examples/gap/radicalofform.g deleted file mode 100644 index 3b5aa07..0000000 --- a/examples/gap/radicalofform.g +++ /dev/null @@ -1,7 +0,0 @@ -#Radical of form: RadicalOfForm -r := PolynomialRing( GF(8), 3 ); -poly := r.1^2 + r.2 * r.3; -form := QuadraticFormByPolynomial( poly, r ); -r := RadicalOfForm( form ); -Dimension(r); -quit; diff --git a/examples/gap/scalarfromsim.g b/examples/gap/scalarfromsim.g deleted file mode 100644 index 210e857..0000000 --- a/examples/gap/scalarfromsim.g +++ /dev/null @@ -1,16 +0,0 @@ -#ScalarOfSimilairty example -gram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];; -form := BilinearFormByMatrix( gram, GF(3) ); -m := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], - [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], - [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], - [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], - [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];; -ScalarOfSimilarity( m, form ); -quit; diff --git a/examples/gap/trivialform.g b/examples/gap/trivialform.g deleted file mode 100644 index 778d0bc..0000000 --- a/examples/gap/trivialform.g +++ /dev/null @@ -1,11 +0,0 @@ -#Constructing a trivial form -mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(7)^0; -form1 := BilinearFormByMatrix(mat,GF(7)); -form2 := QuadraticFormByMatrix(mat,GF(7)); -form1 = form2; -IsQuadraticForm(form1); -IsSesquilinearForm(form1); -mat := [[0,0],[0,0]]*Z(4)^0; -form3 := BilinearFormByMatrix(mat,GF(4)); -form3 = form1; -quit; diff --git a/examples/gap/trivialform2.g b/examples/gap/trivialform2.g deleted file mode 100644 index 7da94c8..0000000 --- a/examples/gap/trivialform2.g +++ /dev/null @@ -1,7 +0,0 @@ -#Behaviour of a trivial form -mat := [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(3)^0; -form := BilinearFormByMatrix(mat,GF(3)); -v := Random(GF(3)^4); -[v,v]^form; -v^form; -quit; diff --git a/examples/gap/trivialform_prop.g b/examples/gap/trivialform_prop.g deleted file mode 100644 index 94f06ba..0000000 --- a/examples/gap/trivialform_prop.g +++ /dev/null @@ -1,15 +0,0 @@ -#attributes and properties of a trivial form -mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(11)^0; -form := QuadraticFormByMatrix(mat,GF(121)); -IsReflexiveForm(form); -IsAlternatingForm(form); -IsSymmetricForm(form); -IsOrthogonalForm(form); -IsPseudoForm(form); -IsSymplecticForm(form); -IsDegenerateForm(form); -IsSingularForm(form); -BaseField(form); -GramMatrix(form); -RadicalOfForm(form); -quit; diff --git a/examples/gap/typeofform.g b/examples/gap/typeofform.g deleted file mode 100644 index 3550914..0000000 --- a/examples/gap/typeofform.g +++ /dev/null @@ -1,27 +0,0 @@ -#Type Of Form -mat := [[0,0,0,-1],[0,0,3,0],[0,-3,0,0],[1,0,0,0]]*Z(25)^0; -form := BilinearFormByMatrix(mat,GF(25)); -IsDegenerateForm(form); -TypeOfForm(form); -mat := IdentityMat(3,GF(7)); -form := QuadraticFormByMatrix(mat,GF(7)); -IsSingularForm(form); -TypeOfForm(form); -mat := [[0,1,0,0],[-1,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(5)^0; -form := BilinearFormByMatrix(mat,GF(5)); -IsDegenerateForm(form); -TypeOfForm(form); -mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -form := BilinearFormByMatrix(mat,GF(7)); -IsDegenerateForm(form); -TypeOfForm(form); -mat := IdentityMat(3,GF(9)); -form := HermitianFormByMatrix(mat,GF(9)); -IsDegenerateForm(form); -TypeOfForm(form); -mat := [[0,0,0,1],[0,1,0,0],[0,0,1,0],[1,0,0,0]]*Z(8)^0; -form := BilinearFormByMatrix(mat,GF(8)); -IsDegenerateForm(form); -TypeOfForm(form); -quit; -quit; diff --git a/examples/gap/w53.g b/examples/gap/w53.g deleted file mode 100644 index 56688c4..0000000 --- a/examples/gap/w53.g +++ /dev/null @@ -1,16 +0,0 @@ -#A form for W(5,3) -f := GF(3); -gram := [ -[0,0,0,1,0,0], -[0,0,0,0,1,0], -[0,0,0,0,0,1], -[-1,0,0,0,0,0], -[0,-1,0,0,0,0], -[0,0,-1,0,0,0]] * One(f);; -form := BilinearFormByMatrix( gram, f ); -IsSymplecticForm( form ); -Display( form ); -b := BaseChangeToCanonical( form ); -Display( b ); -Display( b * gram * TransposedMat(b) ); -quit; diff --git a/examples/gap/wittindex.g b/examples/gap/wittindex.g deleted file mode 100644 index ca31e32..0000000 --- a/examples/gap/wittindex.g +++ /dev/null @@ -1,14 +0,0 @@ -# Witt index. Also of degenerated forms -mat := [[0,0,1,0,0],[0,0,0,0,0],[-1,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]*Z(7)^0; -form := BilinearFormByMatrix(mat,GF(7)); -WittIndex(form); -RadicalOfForm(form); -Dimension(last); -mat := IdentityMat(6,GF(5)); -form := QuadraticFormByMatrix(mat,GF(5)); -WittIndex(form); -mat := IdentityMat(6,GF(7)); -form := QuadraticFormByMatrix(mat,GF(7)); -WittIndex(form); -quit; - diff --git a/examples/generate_example_files.g b/examples/generate_example_files.g deleted file mode 100644 index 3d21d6a..0000000 --- a/examples/generate_example_files.g +++ /dev/null @@ -1,141 +0,0 @@ -#create output and include files from .g files in the examples/gap directory. -#Executing this file is NOT necessary for the installation of the package "forms", and the -#use of all documentation. -# -#Performing these steps, files will be written in the doc directory of the -#forms package tree. Under UNIX-like operating systems, you need sufficient -#permissions to do. Executing this is NOT necessary for the installation of the -#package "forms". -# -#Messy things happen when you do it, so don't try this at home kids! - -#create workspace with packages -LoadPackage("forms"); -SaveWorkspace("forms.ws"); -quit; - -#restart gap now. - -#initialize filenames - -files := ["conic", "w53", "preservedform", "bg_th_ex1", "bg_th_ex2","bg_th_ex3","bg_th_ex4", - "bg_th_ex5", "bg_th_ex6", "bg_th_ex7", "bg_th_ex8", "bg_th_ex9", "bilformbymatrix", - "quadformbymatrix", "hermitianformbymatrix", "bilformbypoly", "quadformbypoly", - "hermitianformbypoly", "quadformbybilform", "bilformbyquadform", "assocbilform", - "evalform", "radicalofform", "polyofform", "discofform", "pres_sesforms1", - "pres_sesforms2", "pres_quadform", "preservedforms2", "basechangehom", "basechangetocanonical", - "isometriccanonicalform", "quadformfields", "orthogonaltovector", - "istotallysingular", "istotallyisotropic", "isisotropicvector", - "issingularvector", "istotallysingular", "scalarfromsim", "trivialform", - "trivialform_prop", "wittindex", "typeofform", "orthogonaltovector"]; - -files := ["preservedforms2"]; - -#initialize directorynames -#exampledir = dir where .g files are located : ".../pkg/forms/examples/gap" -#preambledir = directory where 'preamble_sws.g is found' : ".../pkg/forms/examples" -#outputdir = directory to write '.out' files: ".../pkg/forms/examples/output" -#name of script to start gap version. The user has to fill this in! - -homedir := DirectoryCurrent(); -exampledir := DirectoriesPackageLibrary("forms","examples/gap")[1]; -preambledir := DirectoriesPackageLibrary("forms","examples/")[1]; -outputdir := DirectoriesPackageLibrary("forms","examples/output")[1]; -gap := Filename(Directory("/usr/local/bin/"),"gap4r9"); -#paths := JoinStringsWithSeparator(GAPInfo.RootPaths{[2,3]},";"); -paths := JoinStringsWithSeparator(GAPInfo.RootPaths{[3,4]},";"); -args := JoinStringsWithSeparator(["-l",paths," -L forms.ws"," -o 4G"]," "); -args := ["-l",paths,"-L","forms.ws","-o","4G"]; -extension := ".out\";"; -cmddir := "dir \:\= DirectoriesPackageLibrary\(\"forms\"\,\"examples\/output\"\)\[1\]\;"; - -#create .out files using the saved workspace -#IMPORTANT: here we suppose that the script to start up our favorite version of -#GAP is called 'gap4r4', and is located in '/usr/bin'. Change the code if this is not true! -#you certainly now the name of the script, since you started gap. To find the -#dir, just issue in the gap session that is running: - -#Exec("which gap4r4"); #for UNIX only - -gapstart := "gap4r9"; #might be different on your computer -gap := Filename(Directory("/usr/local/bin/"),gapstart); - -for filename in files do - Print("Now converting file: ", filename, "\n"); - stream := InputOutputLocalProcess( homedir, gap, args); - #cmd := Concatenation("file := \"",filename,".out\";"); - cmd := Concatenation("file := \"",filename,extension); - WriteLine(stream,cmd); - #cmd := "dir \:\= DirectoriesPackageLibrary\(\"forms\"\,\"examples\/output\"\)\[1\]\;"; - WriteLine(stream,cmddir); - preamble := Filename(preambledir,"preamble_sws.g"); - preamble_stream := InputTextFile(preamble); - cmds := ReadAll(preamble_stream); - WriteLine(stream,cmds); - repeat - str := ReadLine(stream); - until str = "true\n"; - inputfile := Filename(exampledir,Concatenation(filename,".g")); - input_stream := InputTextFile(inputfile); - cmd := ReadLine(input_stream); - while cmd <> fail do - WriteAll(stream,cmd); - cmd := ReadLine(input_stream); - ReadAll(stream); - od; - repeat until ReadAll(stream)=fail; #new since oct 2015. -od; - -#create .include files -#for the include files, some characters will be translated to suitable xml -#codes, taking more then one character. Therefore we widen the screen a little bit. -#includir: directory containing the include files: ".../pkg/forms/examples/include" -SizeScreen([85,24]); -includedir := DirectoriesPackageLibrary("forms","examples/include")[1]; -for filename in files do - i := Filename(outputdir,Concatenation(filename,".out")); - o := Filename(includedir,Concatenation(filename,".include")); - PrintTo(o,""); - input_stream := InputTextFile(i); - #ReadLine(input_stream); - ReadLine(input_stream); - line := ReadLine(input_stream); - while line <> "gap> quit;\n" do - if line <> "\n" then - line := ReplacedString(line,"\\\n","\n"); - AppendTo(o,ReplacedString(line,"<","<")); - fi; - line := ReadLine(input_stream); - od; -od; -SizeScreen([80,24]); - - -SizeScreen([85,24]); -includedir := DirectoriesPackageLibrary("forms","examples/include")[1]; -for filename in files do - i := Filename(outputdir,Concatenation(filename,".out")); - o := Filename(includedir,Concatenation(filename,".include")); - PrintTo(o,""); - input_stream := InputTextFile(i); - ReadLine(input_stream); - list := []; - line := ReadLine(input_stream); - while line <> "gap> quit;\n" do - if line <> "\n" then - line := ReplacedString(line,"\\\n","\n"); - #AppendTo(o,ReplacedString(line,"<","<")); - Add(list,ReplacedString(line,"<","<")); - fi; - line := ReadLine(input_stream); - od; - l := Length(list); - new := ReplacedString(list[l],"\n",""); - list[l] := new; - for line in list do - AppendTo(o,line); - od; -od; -SizeScreen([80,24]); - - diff --git a/examples/include/assocbilform.include b/examples/include/assocbilform.include deleted file mode 100644 index 23910bd..0000000 --- a/examples/include/assocbilform.include +++ /dev/null @@ -1,17 +0,0 @@ -gap> r:= PolynomialRing(GF(121),6); -GF(11^2)[x_1,x_2,x_3,x_4,x_5,x_6] -gap> poly := r.1*r.5-r.2*r.6+r.3*r.4; -x_1*x_5-x_2*x_6+x_3*x_4 -gap> form := QuadraticFormByPolynomial(poly,r); -< quadratic form > -gap> aform := AssociatedBilinearForm(form); -< bilinear form > -gap> Display(aform); -Bilinear form -Gram Matrix: - . . . . 1 . - . . . . . 10 - . . . 1 . . - . . 1 . . . - 1 . . . . . - . 10 . . . . \ No newline at end of file diff --git a/examples/include/basechangehom.include b/examples/include/basechangehom.include deleted file mode 100644 index 5720825..0000000 --- a/examples/include/basechangehom.include +++ /dev/null @@ -1,26 +0,0 @@ -gap> gl:=GL(3,3); -GL(3,3) -gap> go:=GO(3,3); -GO(0,3,3) -gap> form := PreservedSesquilinearForms(go)[1]; -< bilinear form > -gap> gram := GramMatrix( form ); -[ [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> b := BaseChangeToCanonical(form);; -gap> hom := BaseChangeHomomorphism(b, GF(3)); -^[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], - [ Z(3)^0, Z(3), 0*Z(3) ] ] -gap> newgo := Image(hom, go); -Group( -[ - [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], - [ Z(3), Z(3)^0, Z(3) ] ], - [ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], - [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ]) -gap> gens := GeneratorsOfGroup(newgo);; -gap> canonical := b * gram * TransposedMat(b); -[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3) ], - [ 0*Z(3), Z(3), 0*Z(3) ] ] -gap> ForAll(gens, y -> y * canonical * TransposedMat(y) = canonical); -true \ No newline at end of file diff --git a/examples/include/basechangetocanonical.include b/examples/include/basechangetocanonical.include deleted file mode 100644 index ed86ab1..0000000 --- a/examples/include/basechangetocanonical.include +++ /dev/null @@ -1,19 +0,0 @@ -gap> gf := GF(3); -GF(3) -gap> gram := [ -> [0,0,0,1,0,0], -> [0,0,0,0,1,0], -> [0,0,0,0,0,1], -> [-1,0,0,0,0,0], -> [0,-1,0,0,0,0], -> [0,0,-1,0,0,0]] * One(gf);; -gap> form := BilinearFormByMatrix( gram, gf ); -< bilinear form > -gap> b := BaseChangeToCanonical( form );; -gap> Display( b * gram * TransposedMat(b) ); - . 1 . . . . - 2 . . . . . - . . . 1 . . - . . 2 . . . - . . . . . 1 - . . . . 2 . \ No newline at end of file diff --git a/examples/include/bg_th_ex1.include b/examples/include/bg_th_ex1.include deleted file mode 100644 index 988b5ec..0000000 --- a/examples/include/bg_th_ex1.include +++ /dev/null @@ -1,13 +0,0 @@ -gap> mat := [[1,0,0],[0,1,4],[1,2,1]]*Z(5)^0; -[ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, Z(5)^2 ], - [ Z(5)^0, Z(5), Z(5)^0 ] ] -gap> form := BilinearFormByMatrix(mat,GF(5)); -Error, Invalid Gram matrix - called from -BilinearFormByMatrixOp( MutableCopyMat( m ), f - ) at ./pkg/forms/lib/forms.gi:164 called from -<function "unknown">( <arguments> ) - called from read-eval loop at line 8 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue -brk> quit; \ No newline at end of file diff --git a/examples/include/bg_th_ex2.include b/examples/include/bg_th_ex2.include deleted file mode 100644 index 9ea1fc7..0000000 --- a/examples/include/bg_th_ex2.include +++ /dev/null @@ -1,22 +0,0 @@ -gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,-1]]*Z(9)^0; -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3) ] ] -gap> form := BilinearFormByMatrix(mat,GF(9)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 2 -gap> IsReflexiveForm(form); -true -gap> IsSymmetricForm(form); -true -gap> IsAlternatingForm(form); -false -gap> r := RadicalOfForm(form); -<vector space over GF(3^2), with 0 generators> -gap> Dimension(r); -0 \ No newline at end of file diff --git a/examples/include/bg_th_ex3.include b/examples/include/bg_th_ex3.include deleted file mode 100644 index 42135cc..0000000 --- a/examples/include/bg_th_ex3.include +++ /dev/null @@ -1,19 +0,0 @@ -gap> mat := [[0,0,-2],[0,0,1],[2,-1,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^0 ], - [ Z(7)^2, Z(7)^3, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat,GF(7)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - . . 5 - . . 1 - 2 6 . -gap> IsSymmetricForm(form); -false -gap> IsAlternatingForm(form); -true -gap> r := RadicalOfForm(form); -<vector space over GF(7), with 1 generators> -gap> Dimension(r); -1 \ No newline at end of file diff --git a/examples/include/bg_th_ex4.include b/examples/include/bg_th_ex4.include deleted file mode 100644 index 32d34cd..0000000 --- a/examples/include/bg_th_ex4.include +++ /dev/null @@ -1,27 +0,0 @@ -gap> mat := [[0,1,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,1], -> [0,0,0,0,1,0],[0,0,0,1,0,0],[0,0,1,0,0,0]]*Z(16)^0; -[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := BilinearFormByMatrix(mat,GF(16)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - . 1 . . . . - 1 . . . . . - . . . . . 1 - . . . . 1 . - . . . 1 . . - . . 1 . . . -gap> IsSymmetricForm(form); -true -gap> IsAlternatingForm(form); -true -gap> IsDegenerateForm(form); -false -gap> WittIndex(form); -3 \ No newline at end of file diff --git a/examples/include/bg_th_ex5.include b/examples/include/bg_th_ex5.include deleted file mode 100644 index a1c8c7d..0000000 --- a/examples/include/bg_th_ex5.include +++ /dev/null @@ -1,81 +0,0 @@ -gap> mat := [[0*Z(5),0*Z(5),0*Z(25),Z(25)^3],[0*Z(5),0*Z(5),Z(25)^3,0*Z(25)], -> [0*Z(5),-Z(25)^3,0*Z(5),0*Z(5)],[-Z(25)^3,0*Z(5),0*Z(25),0*Z(25)]]; -[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5^2)^3 ], [ 0*Z(5), 0*Z(5), Z(5^2)^3, 0*Z(5) ], - [ 0*Z(5), Z(5^2)^15, 0*Z(5), 0*Z(5) ], - [ Z(5^2)^15, 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> form := HermitianFormByMatrix(mat,GF(25)); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: -z = Z(25) - . . . z^3 - . . z^3 . - . z^15 . . - z^15 . . . -gap> WittIndex(form); -2 -gap> form2 := BilinearFormByMatrix(mat,GF(25)); -< bilinear form > -gap> Display(form2); -Bilinear form -Gram Matrix: -z = Z(25) - . . . z^3 - . . z^3 . - . z^15 . . - z^15 . . . -gap> IsAlternatingForm(form2); -true -gap> Display(IsometricCanonicalForm(form)); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -Witt Index: 2 -gap> Display(IsometricCanonicalForm(form2)); -Bilinear form -Gram Matrix: - . 1 . . - 4 . . . - . . . 1 - . . 4 . -Witt Index: 2 -gap> V := GF(25)^4; -( GF(5^2)^4 ) -gap> u := [Z(5)^0,Z(5^2)^11,Z(5)^3,Z(5^2)^13 ]; -[ Z(5)^0, Z(5^2)^11, Z(5)^3, Z(5^2)^13 ] -gap> [u,u]^form; -0*Z(5) -gap> v := [Z(5)^0,Z(5^2)^5,Z(5^2),Z(5^2)^13 ]; -[ Z(5)^0, Z(5^2)^5, Z(5^2), Z(5^2)^13 ] -gap> [v,v]^form; -0*Z(5) -gap> [u,v]^form; -Z(5^2)^7 -gap> ([v,u]^form)^5; -Z(5^2)^7 -gap> w := [Z(5^2)^21,Z(5^2)^19,Z(5^2)^4,Z(5)^3 ]; -[ Z(5^2)^21, Z(5^2)^19, Z(5^2)^4, Z(5)^3 ] -gap> [w,w]^form; -Z(5) -gap> v := [Z(5)^0,Z(5^2)^10,Z(5^2)^15,Z(5^2)^3 ]; -[ Z(5)^0, Z(5^2)^10, Z(5^2)^15, Z(5^2)^3 ] -gap> u := [Z(5)^3,Z(5^2)^9,Z(5^2)^4,Z(5^2)^16 ]; -[ Z(5)^3, Z(5^2)^9, Z(5^2)^4, Z(5^2)^16 ] -gap> w := [Z(5)^2,Z(5^2)^9,Z(5^2)^23,Z(5^2)^11 ]; -[ Z(5)^2, Z(5^2)^9, Z(5^2)^23, Z(5^2)^11 ] -gap> [u,v]^form; -0*Z(5) -gap> [u,w]^form; -0*Z(5) -gap> [v,w]^form; -0*Z(5) -gap> s := Subspace(V,[v,u,w]); -<vector space over GF(5^2), with 3 generators> -gap> Dimension(s); -2 -gap> WittIndex(form); -2 \ No newline at end of file diff --git a/examples/include/bg_th_ex6.include b/examples/include/bg_th_ex6.include deleted file mode 100644 index 314da6c..0000000 --- a/examples/include/bg_th_ex6.include +++ /dev/null @@ -1,17 +0,0 @@ -gap> V := GF(4)^3; -( GF(2^2)^3 ) -gap> mat := [[Z(2^2)^2,Z(2^2),Z(2^2)^2],[Z(2^2)^2,Z(2)^0,Z(2)^0], -> [0*Z(2),Z(2)^0,0*Z(2)]]; -[ [ Z(2^2)^2, Z(2^2), Z(2^2)^2 ], [ Z(2^2)^2, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] -gap> qform := QuadraticFormByMatrix(mat, GF(4)); -< quadratic form > -gap> Display( qform ); -Quadratic form -Gram Matrix: -z = Z(4) - z^2 1 z^2 - . 1 . - . . . -gap> PolynomialOfForm( qform ); -Z(2^2)^2*x_1^2+x_1*x_2+Z(2^2)^2*x_1*x_3+x_2^2 \ No newline at end of file diff --git a/examples/include/bg_th_ex7.include b/examples/include/bg_th_ex7.include deleted file mode 100644 index e914044..0000000 --- a/examples/include/bg_th_ex7.include +++ /dev/null @@ -1,16 +0,0 @@ -gap> r := PolynomialRing(GF(8),4); -GF(2^3)[x_1,x_2,x_3,x_4] -gap> poly := r.1*r.2+r.3*r.4; -x_1*x_2+x_3*x_4 -gap> qform := QuadraticFormByPolynomial(poly, r); -< quadratic form > -gap> Display(qform); -Quadratic form -Gram Matrix: - . 1 . . - . . . . - . . . 1 - . . . . -Polynomial: x_1*x_2+x_3*x_4 -gap> RadicalOfForm(qform); -<vector space over GF(2^3), with 0 generators> \ No newline at end of file diff --git a/examples/include/bg_th_ex8.include b/examples/include/bg_th_ex8.include deleted file mode 100644 index 0a298dd..0000000 --- a/examples/include/bg_th_ex8.include +++ /dev/null @@ -1,38 +0,0 @@ -gap> mat := [[Z(16)^3,1,0,0],[0,Z(16)^5,0,0], -> [0,0,Z(16)^3,1],[0,0,0,Z(16)^12]]*Z(16)^0; -[ [ Z(2^4)^3, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^4)^3, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^12 ] - ] -gap> qform := QuadraticFormByMatrix(mat,GF(16)); -< quadratic form > -gap> Display( qform ); -Quadratic form -Gram Matrix: -z = Z(16) - z^3 1 . . - . z^5 . . - . . z^3 1 - . . . z^12 -gap> mat2 := [[Z(16)^7,1,0,0],[0,0,0,0], -> [0,0,Z(16)^2,1],[0,0,0,Z(16)^9]]*Z(16)^0; -[ [ Z(2^4)^7, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^4)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^9 ] ] -gap> qform2 := QuadraticFormByMatrix(mat2, GF(16)); -< quadratic form > -gap> Display( qform2 ); -Quadratic form -Gram Matrix: -z = Z(16) - z^7 1 . . - . . . . - . . z^2 1 - . . . z^9 -gap> biform := AssociatedBilinearForm( qform2 ); -< bilinear form > -gap> Display( biform ); -Bilinear form -Gram Matrix: - . 1 . . - 1 . . . - . . . 1 - . . 1 . \ No newline at end of file diff --git a/examples/include/bg_th_ex9.include b/examples/include/bg_th_ex9.include deleted file mode 100644 index bca3e05..0000000 --- a/examples/include/bg_th_ex9.include +++ /dev/null @@ -1,25 +0,0 @@ -gap> mat := [ [ Z(2^2), Z(2^2), Z(2^2), Z(2^2), Z(2^2) ], -> [ 0*Z(2), Z(2^2), Z(2^2)^2, 0*Z(2), Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ];; -gap> qform := QuadraticFormByMatrix(mat,GF(4)); -< quadratic form > -gap> IsSingularForm(qform); -false -gap> IsDegenerateForm(qform); -#I Testing degeneracy of the *associated bilinear form* -true -gap> biform := AssociatedBilinearForm(qform); -< bilinear form > -gap> Display(biform); -Bilinear form -Gram Matrix: -z = Z(4) - . z^1 z^1 z^1 z^1 - z^1 . z^2 . 1 - z^1 z^2 . 1 1 - z^1 . 1 . 1 - z^1 1 1 1 . -gap> IsDegenerateForm(biform); -true \ No newline at end of file diff --git a/examples/include/bilformbymatrix.include b/examples/include/bilformbymatrix.include deleted file mode 100644 index 4ad988f..0000000 --- a/examples/include/bilformbymatrix.include +++ /dev/null @@ -1,44 +0,0 @@ -gap> mat := IdentityMat(4, GF(9)); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := BilinearFormByMatrix(mat,GF(9)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -gap> mat := [[0*Z(2),Z(16)^12,0*Z(2),Z(4)^2,Z(16)^13], -> [Z(16)^12,0*Z(2),0*Z(2),Z(16)^11,Z(16)], -> [0*Z(2),0*Z(2),0*Z(2),Z(4)^2,Z(16)^3], -> [Z(4)^2,Z(16)^11,Z(4)^2,0*Z(2),Z(16)^3], -> [Z(16)^13,Z(16),Z(16)^3,Z(16)^3,0*Z(2) ]]; -[ [ 0*Z(2), Z(2^4)^12, 0*Z(2), Z(2^2)^2, Z(2^4)^13 ], - [ Z(2^4)^12, 0*Z(2), 0*Z(2), Z(2^4)^11, Z(2^4) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2^4)^3 ], - [ Z(2^2)^2, Z(2^4)^11, Z(2^2)^2, 0*Z(2), Z(2^4)^3 ], - [ Z(2^4)^13, Z(2^4), Z(2^4)^3, Z(2^4)^3, 0*Z(2) ] ] -gap> form := BilinearFormByMatrix(mat,GF(16)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: -z = Z(16) - . z^12 . z^10 z^13 - z^12 . . z^11 z^1 - . . . z^10 z^3 - z^10 z^11 z^10 . z^3 - z^13 z^1 z^3 z^3 . -gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> WittIndex(form); -1 -gap> form := BilinearFormByMatrix(mat,GF(49)); -< bilinear form > -gap> WittIndex(form); -2 \ No newline at end of file diff --git a/examples/include/bilformbypoly.include b/examples/include/bilformbypoly.include deleted file mode 100644 index 64e2304..0000000 --- a/examples/include/bilformbypoly.include +++ /dev/null @@ -1,32 +0,0 @@ -gap> r := PolynomialRing( GF(11), 4); -GF(11)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> pol := vars[1]*vars[2]+vars[3]*vars[4]; -x_1*x_2+x_3*x_4 -gap> form := BilinearFormByPolynomial(pol, r, 4); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - . 6 . . - 6 . . . - . . . 6 - . . 6 . -Polynomial: x_1*x_2+x_3*x_4 -gap> r := PolynomialRing(GF(4),2); -GF(2^2)[x_1,x_2] -gap> pol := r.1*r.2; -x_1*x_2 -gap> form := BilinearFormByPolynomial(pol,r); -Error, No orthogonal form can be associated with a quadratic polynomial in even cha\ -ra -cteristic - called from -BilinearFormByPolynomial( pol, pring, n - ) at ./pkg/forms/lib/forms.gi:470 called from -<function "unknown">( <arguments> ) - called from read-eval loop at line 14 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue -brk> quit; \ No newline at end of file diff --git a/examples/include/bilformbyquadform.include b/examples/include/bilformbyquadform.include deleted file mode 100644 index 5d4fd8f..0000000 --- a/examples/include/bilformbyquadform.include +++ /dev/null @@ -1,27 +0,0 @@ -gap> r := PolynomialRing(GF(9),4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> poly := -r.1*r.2+Z(3^2)*r.3^2+r.4^2; --x_1*x_2+Z(3^2)*x_3^2+x_4^2 -gap> qform := QuadraticFormByPolynomial(poly,r); -< quadratic form > -gap> Display( qform ); -Quadratic form -Gram Matrix: -z = Z(9) - . 2 . . - . . . . - . . z^1 . - . . . 1 -Polynomial: -x_1*x_2+Z(3^2)*x_3^2+x_4^2 -gap> form := BilinearFormByQuadraticForm( qform ); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: -z = Z(9) - . 1 . . - 1 . . . - . . z^1 . - . . . 1 -gap> Set(GF(9)^4, x -> [x,x]^form = x^qform); -[ true ] \ No newline at end of file diff --git a/examples/include/conic.include b/examples/include/conic.include deleted file mode 100644 index db85cf7..0000000 --- a/examples/include/conic.include +++ /dev/null @@ -1,58 +0,0 @@ -gap> gf := GF(8); -GF(2^3) -gap> vec := gf^3; -( GF(2^3)^3 ) -gap> r := PolynomialRing( gf, 3); -GF(2^3)[x_1,x_2,x_3] -gap> poly := r.1^2 + r.2 * r.3; -x_1^2+x_2*x_3 -gap> form := QuadraticFormByPolynomial( poly, r ); -< quadratic form > -gap> Display( form ); -Quadratic form -Gram Matrix: - 1 . . - . . 1 - . . . -Polynomial: x_1^2+x_2*x_3 -gap> IsDegenerateForm( form ); -#I Testing degeneracy of the *associated bilinear form* -true -gap> IsSingularForm( form ); -false -gap> WittIndex( form ); -1 -gap> IsParabolicForm( form ); -true -gap> RadicalOfForm( form ); -<vector space over GF(2^3), with 0 generators> -gap> canonical := IsometricCanonicalForm( form ); -< parabolic quadratic form > -gap> form = canonical; -true -gap> go := GO(3,8); -GO(0,3,8) -gap> mat := InvariantQuadraticForm( go )!.matrix; -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] -gap> gapform := QuadraticFormByMatrix( mat, GF(8) ); -< quadratic form > -gap> b := BaseChangeToCanonical( gapform ); -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] -gap> hom := BaseChangeHomomorphism( b, GF(8) ); -^[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] -gap> newgo := Image(hom, go); -Group( -[ - [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^3), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^3)^6 ] ], - [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ Z(2)^0, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] ]) -gap> conic := Filtered(vec, x -> IsZero( x^form ));; -gap> Size(conic); -64 -gap> orbs := Orbits(newgo, conic, OnRight);; -gap> List(orbs,Size); -[ 1, 63 ] \ No newline at end of file diff --git a/examples/include/discofform.include b/examples/include/discofform.include deleted file mode 100644 index 34f1fe8..0000000 --- a/examples/include/discofform.include +++ /dev/null @@ -1,5 +0,0 @@ -gap> gram := InvariantQuadraticForm(GO(-1,4,5))!.matrix;; -gap> qform := QuadraticFormByMatrix(gram, GF(5)); -< quadratic form > -gap> DiscriminantOfForm( qform ); -"nonsquare" \ No newline at end of file diff --git a/examples/include/evalform.include b/examples/include/evalform.include deleted file mode 100644 index 45ccc7c..0000000 --- a/examples/include/evalform.include +++ /dev/null @@ -1,21 +0,0 @@ -gap> mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0;; -gap> form := QuadraticFormByMatrix(mat,GF(8)); -< quadratic form > -gap> u := [ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ]; -[ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ] -gap> EvaluateForm( form, u ); -Z(2^3)^6 -gap> u^form; -Z(2^3)^6 -gap> gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0], -> [0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0;; -gap> form := BilinearFormByMatrix(gram,GF(3)); -< bilinear form > -gap> u := [ [ Z(3)^0, 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), Z(3)^0 ], -> [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0, Z(3), 0*Z(3) ] ];; -gap> v := [ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3), 0*Z(3), Z(3) ], -> [ 0*Z(3), Z(3)^0, 0*Z(3), Z(3), Z(3), Z(3) ] ];; -gap> EvaluateForm( form, u, v); -[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] -gap> [u,v]^form; -[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] \ No newline at end of file diff --git a/examples/include/hermitianformbymatrix.include b/examples/include/hermitianformbymatrix.include deleted file mode 100644 index 2d9a0ac..0000000 --- a/examples/include/hermitianformbymatrix.include +++ /dev/null @@ -1,26 +0,0 @@ -gap> gf := GF(3^2); -GF(3^2) -gap> mat := IdentityMat(4, gf); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := HermitianFormByMatrix( mat, gf ); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -gap> mat := [[Z(11)^0,0*Z(11),0*Z(11)],[0*Z(11),0*Z(11),Z(11)], -> [0*Z(11),Z(11),0*Z(11)]]; -[ [ Z(11)^0, 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), Z(11) ], - [ 0*Z(11), Z(11), 0*Z(11) ] ] -gap> form := HermitianFormByMatrix(mat,GF(121)); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - 1 . . - . . 2 - . 2 . \ No newline at end of file diff --git a/examples/include/hermitianformbypoly.include b/examples/include/hermitianformbypoly.include deleted file mode 100644 index 81cf947..0000000 --- a/examples/include/hermitianformbypoly.include +++ /dev/null @@ -1,17 +0,0 @@ -gap> r := PolynomialRing( GF(9), 4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> poly := vars[1]*vars[2]^3+vars[1]^3*vars[2]+ -> vars[3]*vars[4]^3+vars[3]^3*vars[4]; -x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 -gap> form := HermitianFormByPolynomial(poly,r); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - . 1 . . - 1 . . . - . . . 1 - . . 1 . -Polynomial: x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 \ No newline at end of file diff --git a/examples/include/isisotropicvector.include b/examples/include/isisotropicvector.include deleted file mode 100644 index 5c0518b..0000000 --- a/examples/include/isisotropicvector.include +++ /dev/null @@ -1,27 +0,0 @@ -gap> mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(41)^0; -[ [ Z(41)^0, 0*Z(41), 0*Z(41), 0*Z(41) ], - [ 0*Z(41), Z(41)^20, 0*Z(41), 0*Z(41) ], - [ 0*Z(41), 0*Z(41), 0*Z(41), Z(41)^0 ], - [ 0*Z(41), 0*Z(41), Z(41)^0, 0*Z(41) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> v := [1,1,0,0]*Z(41)^0; -[ Z(41)^0, Z(41)^0, 0*Z(41), 0*Z(41) ] -gap> IsIsotropicVector(form,v); -true -gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> v1 := [1,0,0,0,0]*Z(8)^0; -[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> v2 := [0,1,0,0,0]*Z(8)^0; -[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> IsIsotropicVector(form,v1); -true -gap> IsIsotropicVector(form,v2); -true diff --git a/examples/include/isometriccanonicalform.include b/examples/include/isometriccanonicalform.include deleted file mode 100644 index d192109..0000000 --- a/examples/include/isometriccanonicalform.include +++ /dev/null @@ -1,28 +0,0 @@ -gap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; -gap> form := QuadraticFormByMatrix(mat,GF(8)); -< quadratic form > -gap> iso := IsometricCanonicalForm(form); -< parabolic quadratic form > -gap> Display(form); -Parabolic quadratic form -Gram Matrix: -z = Z(8) - z^1 . . . . - . 1 z^5 . . - . . . . . - . . . . 1 - . . . . . -Witt Index: 2 -gap> Display(iso); -Parabolic quadratic form -Gram Matrix: - 1 . . . . - . . 1 . . - . . . . . - . . . . 1 - . . . . . -Witt Index: 2 \ No newline at end of file diff --git a/examples/include/issingularvector.include b/examples/include/issingularvector.include deleted file mode 100644 index 813ad7d..0000000 --- a/examples/include/issingularvector.include +++ /dev/null @@ -1,20 +0,0 @@ -gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> v1 := [1,0,0,0,0]*Z(8)^0; -[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> v2 := [0,1,0,0,0]*Z(8)^0; -[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> IsSingularVector(form,v1); -false -gap> IsSingularVector(form,v2); -true -gap> IsIsotropicVector(form,v1); -true -gap> IsIsotropicVector(form,v2); -true diff --git a/examples/include/istotallyisotropic.include b/examples/include/istotallyisotropic.include deleted file mode 100644 index cb19fd5..0000000 --- a/examples/include/istotallyisotropic.include +++ /dev/null @@ -1,23 +0,0 @@ -gap> mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^3, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> sub:= [[Z(7)^0,0*Z(7),Z(7)^0,Z(7)],[0*Z(7),Z(7)^0,Z(7)^0,Z(7)^4]]; -[ [ Z(7)^0, 0*Z(7), Z(7)^0, Z(7) ], [ 0*Z(7), Z(7)^0, Z(7)^0, Z(7)^4 ] ] -gap> IsTotallyIsotropicSubspace(form,sub); -true -gap> mat := IdentityMat(6,GF(2)); -[ <a GF2 vector of length 6>, <a GF2 vector of length 6>, - <a GF2 vector of length 6>, <a GF2 vector of length 6>, - <a GF2 vector of length 6>, <a GF2 vector of length 6> ] -gap> form := HermitianFormByMatrix(mat,GF(4)); -< hermitian form > -gap> sub := [[Z(2)^0,0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2)^0], -> [0*Z(2),Z(2)^0,0*Z(2),Z(2^2)^2,Z(2^2),Z(2)^0], -> [0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2^2),Z(2^2)^2]]; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2), Z(2^2)^2, Z(2^2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2^2), Z(2^2)^2 ] ] -gap> IsTotallyIsotropicSubspace(form,sub); -true diff --git a/examples/include/istotallysingular.include b/examples/include/istotallysingular.include deleted file mode 100644 index 307603d..0000000 --- a/examples/include/istotallysingular.include +++ /dev/null @@ -1,14 +0,0 @@ -gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> sub := [[Z(2)^0,0*Z(2),Z(2^3)^6,Z(2^3),Z(2^3)^3], -> [0*Z(2),Z(2)^0,Z(2^3)^6,Z(2^3)^2,Z(2^3)]]; -[ [ Z(2)^0, 0*Z(2), Z(2^3)^6, Z(2^3), Z(2^3)^3 ], - [ 0*Z(2), Z(2)^0, Z(2^3)^6, Z(2^3)^2, Z(2^3) ] ] -gap> IsTotallySingularSubspace(form,sub); -true diff --git a/examples/include/orthogonaltovector.include b/examples/include/orthogonaltovector.include deleted file mode 100644 index 817991b..0000000 --- a/examples/include/orthogonaltovector.include +++ /dev/null @@ -1,39 +0,0 @@ -gap> mat := [[0,0,0,-2],[0,0,-3,0],[0,3,0,0],[2,0,0,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^4, 0*Z(7) ], - [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], [ Z(7)^2, 0*Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> v := [0*Z(7),Z(7)^0,Z(7)^3,Z(7)^5]; -[ 0*Z(7), Z(7)^0, Z(7)^3, Z(7)^5 ] -gap> vperp := OrthogonalSubspaceMat(form,v); -[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ Z(7)^0, 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] -gap> List(vperp,x->[x,v]^form); -[ 0*Z(7), 0*Z(7), 0*Z(7) ] -gap> sub := [[1,1,0,0],[0,0,1,2]]*Z(7)^0; -[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^0, Z(7)^2 ] ] -gap> subperp := OrthogonalSubspaceMat(form,sub); -[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^4, Z(7)^0 ] ] -gap> List(subperp,x->List(sub,y->[x,y]^form)); -[ [ 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7) ] ] -gap> mat := [[1,0,0],[0,0,1],[0,0,0]]*Z(2)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> v := [Z(2)^0,Z(2)^0,0*Z(2)]; -[ Z(2)^0, Z(2)^0, 0*Z(2) ] -gap> vperp := OrthogonalSubspaceMat(form,v); -[ <an immutable GF2 vector of length 3>, <an immutable GF2 vector of length - 3> ] -gap> bil_form := AssociatedBilinearForm(form); -< bilinear form > -gap> List(vperp,x->[x,v]^bil_form); -[ 0*Z(2), 0*Z(2) ] -gap> sub := [[1,0,1],[1,0,0]]*Z(2)^0; -[ [ Z(2)^0, 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ] -gap> subperp := OrthogonalSubspaceMat(form,sub); -[ <an immutable GF2 vector of length 3>, <an immutable GF2 vector of length - 3> ] -gap> List(subperp,x->List(sub,y->[x,y]^bil_form)); -[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] diff --git a/examples/include/polyofform.include b/examples/include/polyofform.include deleted file mode 100644 index 99e1e89..0000000 --- a/examples/include/polyofform.include +++ /dev/null @@ -1,9 +0,0 @@ -gap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; -gap> form := QuadraticFormByMatrix(mat,GF(8)); -< quadratic form > -gap> PolynomialOfForm(form); -Z(2^3)*x_1^2+x_2^2+Z(2^3)^5*x_2*x_3+x_4*x_5 \ No newline at end of file diff --git a/examples/include/pres_quadform.include b/examples/include/pres_quadform.include deleted file mode 100644 index 54faa69..0000000 --- a/examples/include/pres_quadform.include +++ /dev/null @@ -1,8 +0,0 @@ -gap> group := GO(-1,4,8); -GO(-1,4,8) -gap> pres_forms := PreservedQuadraticForms(group); -[ < quadratic form > ] -gap> group := GO(1,6,9); -GO(+1,6,9) -gap> pres_forms := PreservedQuadraticForms(group); -[ < quadratic form > ] diff --git a/examples/include/pres_sesforms1.include b/examples/include/pres_sesforms1.include deleted file mode 100644 index f9e247f..0000000 --- a/examples/include/pres_sesforms1.include +++ /dev/null @@ -1,11 +0,0 @@ -gap> g := SU(4,3); -SU(4,3) -gap> forms := PreservedSesquilinearForms(g); -[ < hermitian form > ] -gap> Display( forms[1] ); -Hermitian form -Gram Matrix: - . . . 2 - . . 2 . - . 2 . . - 2 . . . \ No newline at end of file diff --git a/examples/include/pres_sesforms2.include b/examples/include/pres_sesforms2.include deleted file mode 100644 index 3af33dc..0000000 --- a/examples/include/pres_sesforms2.include +++ /dev/null @@ -1,22 +0,0 @@ -gap> a := [ [ -1, 0, 0, -1, 0, 1 ], [ 0, -1, -1, 0, 0, 1 ], -> [ -1, 0, 0, 1, 0, 0 ], [ 0, -1, 1, 0, 0, -1 ], -> [ 0, 0, 0, 0, 0, -1 ], [ 0, -1, -1, 1, 1, 1 ] ] * One(GF(3));; -gap> b := [ [ 1, -1, 1, -1, 1, -1 ], [ 1, 1, -1, 1, 1, 0 ], -> [ -1, 0, 1, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 1 ], -> [ 1, 1, 1, 1, 1, 1 ], [ -1, 1, 1, 1, -1, 0 ] ] * One(GF(3));; -gap> g := Group( a, b ); -<matrix group with 2 generators> -gap> forms := PreservedSesquilinearForms( g ); -[ < bilinear form > ] -gap> Display( forms[1] ); -Bilinear form -Gram Matrix: - . 1 . . . . - 1 . . . . . - . . . 1 . . - . . 1 . . . - . . . . . 1 - . . . . 1 . -gap> m := GModuleByMats( [a,b], GF(3) );; -gap> usemeataxe := MTX.InvariantBilinearForm(m); -fail \ No newline at end of file diff --git a/examples/include/preservedform.include b/examples/include/preservedform.include deleted file mode 100644 index a1d3ab5..0000000 --- a/examples/include/preservedform.include +++ /dev/null @@ -1,21 +0,0 @@ -gap> go := GO(5, 5); -GO(0,5,5) -gap> x := -> [ [ Z(5)^0, Z(5)^3, 0*Z(5), Z(5)^3, Z(5)^3 ], -> [ Z(5)^2, Z(5)^3, 0*Z(5), Z(5)^2, Z(5) ], -> [ Z(5)^2, Z(5)^2, Z(5)^0, Z(5), Z(5)^3 ], -> [ Z(5)^0, Z(5)^3, Z(5), Z(5)^0, Z(5)^3 ], -> [ Z(5)^3, 0*Z(5), Z(5)^0, 0*Z(5), Z(5) ] -> ];; -gap> go2 := go^x; -<matrix group of size 18720000 with 2 generators> -gap> forms := PreservedSesquilinearForms( go2 ); -[ < bilinear form > ] -gap> Display( forms[1] ); -Bilinear form -Gram Matrix: - 4 2 4 3 3 - 2 2 2 3 3 - 4 2 3 1 4 - 3 3 1 2 4 - 3 3 4 4 3 \ No newline at end of file diff --git a/examples/include/preservedforms1.include b/examples/include/preservedforms1.include deleted file mode 100644 index 456cb16..0000000 --- a/examples/include/preservedforms1.include +++ /dev/null @@ -1,12 +0,0 @@ -gap> group := GO(-1,4,4); -GO(-1,4,4) -gap> pres_forms := PreservedForms(group); -[ < quadratic form > ] -gap> group := GO(1,6,9); -GO(+1,6,9) -gap> pres_forms := PreservedForms(group); -[ < quadratic form > ] -gap> group := SU(4,16); -SU(4,16) -gap> pres_forms := PreservedForms(group); -[ < hermitian form > ] diff --git a/examples/include/preservedforms2.include b/examples/include/preservedforms2.include deleted file mode 100644 index 9ef678f..0000000 --- a/examples/include/preservedforms2.include +++ /dev/null @@ -1,32 +0,0 @@ -gap> gens := [ [ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], -> [ 0*Z(5), 0*Z(5), Z(5)^3, Z(5^2)^21 ], -> [ 0*Z(5), Z(5), Z(5), Z(5^2)^3 ], -> [ 0*Z(5), Z(5^2)^21, Z(5^2)^15, Z(5)^2 ] ], -> [ [ Z(5)^3, Z(5^2)^7, Z(5^2)^16, Z(5^2)^15 ], -> [ 0*Z(5), Z(5)^0, Z(5^2)^4, Z(5)^3 ], -> [ Z(5^2)^22, Z(5^2)^10, Z(5^2)^21, Z(5)^2 ], -> [ Z(5^2)^7, Z(5^2)^23, Z(5^2)^9, Z(5^2)^11 ] ], -> [ [ 0*Z(5), Z(5^2), 0*Z(5), 0*Z(5) ], -> [ Z(5^2)^5, 0*Z(5), 0*Z(5), 0*Z(5) ], -> [ 0*Z(5), 0*Z(5), Z(5)^0, Z(5^2)^4 ], -> [ 0*Z(5), 0*Z(5), Z(5^2)^20, Z(5)^2 ] ] ]; -[ [ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), Z(5)^3, Z(5^2)^21 ], - [ 0*Z(5), Z(5), Z(5), Z(5^2)^3 ], - [ 0*Z(5), Z(5^2)^21, Z(5^2)^15, Z(5)^2 ] ], - [ [ Z(5)^3, Z(5^2)^7, Z(5^2)^16, Z(5^2)^15 ], - [ 0*Z(5), Z(5)^0, Z(5^2)^4, Z(5)^3 ], - [ Z(5^2)^22, Z(5^2)^10, Z(5^2)^21, Z(5)^2 ], - [ Z(5^2)^7, Z(5^2)^23, Z(5^2)^9, Z(5^2)^11 ] ], - [ [ 0*Z(5), Z(5^2), 0*Z(5), 0*Z(5) ], [ Z(5^2)^5, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0, Z(5^2)^4 ], - [ 0*Z(5), 0*Z(5), Z(5^2)^20, Z(5)^2 ] ] ] -gap> group := Group(gens); -<matrix group with 3 generators> -gap> PreservedForms(group); -[ < quadratic form > ] -gap> PreservedForms(group); -[ < quadratic form > ] -gap> PreservedForms(group); -[ < quadratic form > ] -gap> PreservedForms(group); -[ < quadratic form >, < hermitian form > ] diff --git a/examples/include/quadformbybilform.include b/examples/include/quadformbybilform.include deleted file mode 100644 index 9b3b8d6..0000000 --- a/examples/include/quadformbybilform.include +++ /dev/null @@ -1,42 +0,0 @@ -gap> mat := [ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], -> [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], -> [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], -> [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], -> [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ]; -[ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], - [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], - [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], - [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], - [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ] -gap> form := BilinearFormByMatrix(mat,GF(9)); -< bilinear form > -gap> Q := QuadraticFormByBilinearForm(form); -< quadratic form > -gap> Display(form); -Bilinear form -Gram Matrix: -z = Z(9) - z^7 1 z^2 . z^5 - 1 z^7 z^6 z^5 z^2 - z^2 z^6 z^7 z^2 z^2 - . z^5 z^2 z^6 z^7 - z^5 z^2 z^2 z^7 2 -gap> Display(Q); -Quadratic form -Gram Matrix: -z = Z(9) - z^7 2 z^6 . z^1 - . z^7 z^2 z^1 z^6 - . . z^7 z^6 z^6 - . . . z^6 z^3 - . . . . 2 -gap> Set(List(GF(9)^5),x->[x,x]^form=x^Q); -[ true ] -gap> PolynomialOfForm(form); -Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2 -*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2 -)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 -gap> PolynomialOfForm(Q); -Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2 -*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2 -)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 \ No newline at end of file diff --git a/examples/include/quadformbymatrix.include b/examples/include/quadformbymatrix.include deleted file mode 100644 index 58aed74..0000000 --- a/examples/include/quadformbymatrix.include +++ /dev/null @@ -1,27 +0,0 @@ -gap> mat := [[1,0,0,0],[0,3,0,0],[0,0,0,6],[0,0,6,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^3 ], [ 0*Z(7), 0*Z(7), Z(7)^3, 0*Z(7) ] ] -gap> form := QuadraticFormByMatrix(mat,GF(7)); -< quadratic form > -gap> Display(form); -Quadratic form -Gram Matrix: - 1 . . . - . 3 . . - . . . 5 - . . . . -gap> gf := GF(2^2); -GF(2^2) -gap> mat := InvariantQuadraticForm( SO(-1, 4, 4) )!.matrix; -[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2 ] ] -gap> form := QuadraticFormByMatrix( mat, gf ); -< quadratic form > -gap> Display(form); -Quadratic form -Gram Matrix: -z = Z(4) - . 1 . . - . . . . - . . z^2 1 - . . . z^2 \ No newline at end of file diff --git a/examples/include/quadformbypoly.include b/examples/include/quadformbypoly.include deleted file mode 100644 index 0247b90..0000000 --- a/examples/include/quadformbypoly.include +++ /dev/null @@ -1,22 +0,0 @@ -gap> r := PolynomialRing( GF(8), 3); -GF(2^3)[x_1,x_2,x_3] -gap> poly := r.1^2 + r.2^2 + r.3^2; -x_1^2+x_2^2+x_3^2 -gap> form := QuadraticFormByPolynomial(poly, r); -< quadratic form > -gap> RadicalOfForm(form); -<vector space over GF(2^3), with 63 generators> -gap> r := PolynomialRing(GF(9),4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> poly := Z(3)^2*r.1^2+r.2^2+r.3*r.4; -x_1^2+x_2^2+x_3*x_4 -gap> qform := QuadraticFormByPolynomial(poly,r); -< quadratic form > -gap> Display(qform); -Quadratic form -Gram Matrix: - 1 . . . - . 1 . . - . . . 1 - . . . . -Polynomial: x_1^2+x_2^2+x_3*x_4 \ No newline at end of file diff --git a/examples/include/quadformfields.include b/examples/include/quadformfields.include deleted file mode 100644 index 454e9a0..0000000 --- a/examples/include/quadformfields.include +++ /dev/null @@ -1,13 +0,0 @@ -gap> mat := -> [[Z(2)^0,Z(2)^0,0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,0*Z(2),0*Z(2)], -> [0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; -[ [ Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> WittIndex(form); -1 -gap> form := QuadraticFormByMatrix(mat,GF(4)); -< quadratic form > -gap> WittIndex(form); -2 \ No newline at end of file diff --git a/examples/include/radicalofform.include b/examples/include/radicalofform.include deleted file mode 100644 index 2fff1dd..0000000 --- a/examples/include/radicalofform.include +++ /dev/null @@ -1,10 +0,0 @@ -gap> r := PolynomialRing( GF(8), 3 ); -GF(2^3)[x_1,x_2,x_3] -gap> poly := r.1^2 + r.2 * r.3; -x_1^2+x_2*x_3 -gap> form := QuadraticFormByPolynomial( poly, r ); -< quadratic form > -gap> r := RadicalOfForm( form ); -<vector space over GF(2^3), with 0 generators> -gap> Dimension(r); -0 \ No newline at end of file diff --git a/examples/include/scalarfromsim.include b/examples/include/scalarfromsim.include deleted file mode 100644 index eaaa16d..0000000 --- a/examples/include/scalarfromsim.include +++ /dev/null @@ -1,16 +0,0 @@ -gap> gram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], -> [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], -> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];; -gap> form := BilinearFormByMatrix( gram, GF(3) ); -< bilinear form > -gap> m := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], -> [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], -> [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], -> [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], -> [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];; -gap> ScalarOfSimilarity( m, form ); -Z(3) diff --git a/examples/include/trivialform.include b/examples/include/trivialform.include deleted file mode 100644 index e10d1f8..0000000 --- a/examples/include/trivialform.include +++ /dev/null @@ -1,19 +0,0 @@ -gap> mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form1 := BilinearFormByMatrix(mat,GF(7)); -< trivial form > -gap> form2 := QuadraticFormByMatrix(mat,GF(7)); -< trivial form > -gap> form1 = form2; -true -gap> IsQuadraticForm(form1); -false -gap> IsSesquilinearForm(form1); -false -gap> mat := [[0,0],[0,0]]*Z(4)^0; -[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] -gap> form3 := BilinearFormByMatrix(mat,GF(4)); -< trivial form > -gap> form3 = form1; -false diff --git a/examples/include/trivialform2.include b/examples/include/trivialform2.include deleted file mode 100644 index 55ec775..0000000 --- a/examples/include/trivialform2.include +++ /dev/null @@ -1,11 +0,0 @@ -gap> mat := [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(3)^0; -[ [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ] ] -gap> form := BilinearFormByMatrix(mat,GF(3)); -< trivial form > -gap> v := Random(GF(3)^4); -[ Z(3), Z(3), 0*Z(3), Z(3) ] -gap> [v,v]^form; -0*Z(3) -gap> v^form; -0*Z(3) diff --git a/examples/include/trivialform_prop.include b/examples/include/trivialform_prop.include deleted file mode 100644 index 3733040..0000000 --- a/examples/include/trivialform_prop.include +++ /dev/null @@ -1,28 +0,0 @@ -gap> mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(11)^0; -[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], - [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] -gap> form := QuadraticFormByMatrix(mat,GF(121)); -< trivial form > -gap> IsReflexiveForm(form); -true -gap> IsAlternatingForm(form); -true -gap> IsSymmetricForm(form); -true -gap> IsOrthogonalForm(form); -false -gap> IsPseudoForm(form); -false -gap> IsSymplecticForm(form); -true -gap> IsDegenerateForm(form); -true -gap> IsSingularForm(form); -true -gap> BaseField(form); -GF(11^2) -gap> GramMatrix(form); -[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], - [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] -gap> RadicalOfForm(form); -<vector space over GF(11^2), with 3 generators> diff --git a/examples/include/typeofform.include b/examples/include/typeofform.include deleted file mode 100644 index 7e4ca1f..0000000 --- a/examples/include/typeofform.include +++ /dev/null @@ -1,59 +0,0 @@ -gap> mat := [[0,0,0,-1],[0,0,3,0],[0,-3,0,0],[1,0,0,0]]*Z(25)^0; -[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^2 ], [ 0*Z(5), 0*Z(5), Z(5)^3, 0*Z(5) ], - [ 0*Z(5), Z(5), 0*Z(5), 0*Z(5) ], [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> form := BilinearFormByMatrix(mat,GF(25)); -< bilinear form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); -0 -gap> mat := IdentityMat(3,GF(7)); -[ [ Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), Z(7)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,GF(7)); -< quadratic form > -gap> IsSingularForm(form); -false -gap> TypeOfForm(form); -0 -gap> mat := [[0,1,0,0],[-1,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(5)^0; -[ [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [ Z(5)^2, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> form := BilinearFormByMatrix(mat,GF(5)); -< bilinear form > -gap> IsDegenerateForm(form); -true -gap> TypeOfForm(form); -0 -gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat,GF(7)); -< bilinear form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); --1 -gap> mat := IdentityMat(3,GF(9)); -[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := HermitianFormByMatrix(mat,GF(9)); -< hermitian form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); --1/2 -gap> mat := [[0,0,0,1],[0,1,0,0],[0,0,1,0],[1,0,0,0]]*Z(8)^0; -[ [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := BilinearFormByMatrix(mat,GF(8)); -< bilinear form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); -Error, <f> is a pseudo form and has no defined type called from -<function "unknown">( <arguments> ) - called from read-eval loop at line 30 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue -brk> quit; diff --git a/examples/include/w53.include b/examples/include/w53.include deleted file mode 100644 index 1e33bc8..0000000 --- a/examples/include/w53.include +++ /dev/null @@ -1,43 +0,0 @@ -gap> f := GF(3); -GF(3) -gap> gram := [ -> [0,0,0,1,0,0], -> [0,0,0,0,1,0], -> [0,0,0,0,0,1], -> [-1,0,0,0,0,0], -> [0,-1,0,0,0,0], -> [0,0,-1,0,0,0]] * One(f);; -gap> form := BilinearFormByMatrix( gram, f ); -< bilinear form > -gap> IsSymplecticForm( form ); -true -gap> Display( form ); -Symplectic form -Gram Matrix: - . . . 1 . . - . . . . 1 . - . . . . . 1 - 2 . . . . . - . 2 . . . . - . . 2 . . . -gap> b := BaseChangeToCanonical( form ); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> Display( b ); - 1 . . . . . - . . . 1 . . - . 1 . . . . - . . . . 1 . - . . 1 . . . - . . . . . 1 -gap> Display( b * gram * TransposedMat(b) ); - . 1 . . . . - 2 . . . . . - . . . 1 . . - . . 2 . . . - . . . . . 1 - . . . . 2 . \ No newline at end of file diff --git a/examples/include/wittindex.include b/examples/include/wittindex.include deleted file mode 100644 index b267bf0..0000000 --- a/examples/include/wittindex.include +++ /dev/null @@ -1,36 +0,0 @@ -gap> mat := [[0,0,1,0,0],[0,0,0,0,0],[-1,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ Z(7)^3, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat,GF(7)); -< bilinear form > -gap> WittIndex(form); -1 -gap> RadicalOfForm(form); -<vector space over GF(7), with 3 generators> -gap> Dimension(last); -3 -gap> mat := IdentityMat(6,GF(5)); -[ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,GF(5)); -< quadratic form > -gap> WittIndex(form); -3 -gap> mat := IdentityMat(6,GF(7)); -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,GF(7)); -< quadratic form > -gap> WittIndex(form); -2 diff --git a/examples/output/assocbilform.out b/examples/output/assocbilform.out deleted file mode 100644 index f276af9..0000000 --- a/examples/output/assocbilform.out +++ /dev/null @@ -1,19 +0,0 @@ -gap> #Constructing form: AssociatedBilinearForm -gap> r:= PolynomialRing(GF(121),6); -GF(11^2)[x_1,x_2,x_3,x_4,x_5,x_6] -gap> poly := r.1*r.5-r.2*r.6+r.3*r.4; -x_1*x_5-x_2*x_6+x_3*x_4 -gap> form := QuadraticFormByPolynomial(poly,r); -< quadratic form > -gap> aform := AssociatedBilinearForm(form); -< bilinear form > -gap> Display(aform); -Bilinear form -Gram Matrix: - . . . . 1 . - . . . . . 10 - . . . 1 . . - . . 1 . . . - 1 . . . . . - . 10 . . . . -gap> quit; diff --git a/examples/output/basechangehom.out b/examples/output/basechangehom.out deleted file mode 100644 index df59291..0000000 --- a/examples/output/basechangehom.out +++ /dev/null @@ -1,28 +0,0 @@ -gap> #morphisms: BaseChangeHomomorphism -gap> gl:=GL(3,3); -GL(3,3) -gap> go:=GO(3,3); -GO(0,3,3) -gap> form := PreservedSesquilinearForms(go)[1]; -< bilinear form > -gap> gram := GramMatrix( form ); -[ [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> b := BaseChangeToCanonical(form);; -gap> hom := BaseChangeHomomorphism(b, GF(3)); -^[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], - [ Z(3)^0, Z(3), 0*Z(3) ] ] -gap> newgo := Image(hom, go); -Group( -[ - [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], - [ Z(3), Z(3)^0, Z(3) ] ], - [ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], - [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ]) -gap> gens := GeneratorsOfGroup(newgo);; -gap> canonical := b * gram * TransposedMat(b); -[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3) ], - [ 0*Z(3), Z(3), 0*Z(3) ] ] -gap> ForAll(gens, y -> y * canonical * TransposedMat(y) = canonical); -true -gap> quit; diff --git a/examples/output/basechangetocanonical.out b/examples/output/basechangetocanonical.out deleted file mode 100644 index c5ca8a4..0000000 --- a/examples/output/basechangetocanonical.out +++ /dev/null @@ -1,21 +0,0 @@ -gap> #morphisms: BaseChangeToCanonical -gap> gf := GF(3); -GF(3) -gap> gram := [ -> [0,0,0,1,0,0], -> [0,0,0,0,1,0], -> [0,0,0,0,0,1], -> [-1,0,0,0,0,0], -> [0,-1,0,0,0,0], -> [0,0,-1,0,0,0]] * One(gf);; -gap> form := BilinearFormByMatrix( gram, gf ); -< bilinear form > -gap> b := BaseChangeToCanonical( form );; -gap> Display( b * gram * TransposedMat(b) ); - . 1 . . . . - 2 . . . . . - . . . 1 . . - . . 2 . . . - . . . . . 1 - . . . . 2 . -gap> quit; diff --git a/examples/output/bg_th_ex1.out b/examples/output/bg_th_ex1.out deleted file mode 100644 index c2062d0..0000000 --- a/examples/output/bg_th_ex1.out +++ /dev/null @@ -1,15 +0,0 @@ -gap> #Background theory: example 1 -gap> mat := [[1,0,0],[0,1,4],[1,2,1]]*Z(5)^0; -[ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, Z(5)^2 ], - [ Z(5)^0, Z(5), Z(5)^0 ] ] -gap> form := BilinearFormByMatrix(mat,GF(5)); -Error, Invalid Gram matrix - called from -BilinearFormByMatrixOp( MutableCopyMat( m ), f - ) at ./pkg/forms/lib/forms.gi:164 called from -( ) - called from read-eval loop at line 8 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue -brk> quit; -gap> quit; diff --git a/examples/output/bg_th_ex2.out b/examples/output/bg_th_ex2.out deleted file mode 100644 index fe5ce40..0000000 --- a/examples/output/bg_th_ex2.out +++ /dev/null @@ -1,24 +0,0 @@ -gap> #Background theory: example 2 -gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,-1]]*Z(9)^0; -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3) ] ] -gap> form := BilinearFormByMatrix(mat,GF(9)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 2 -gap> IsReflexiveForm(form); -true -gap> IsSymmetricForm(form); -true -gap> IsAlternatingForm(form); -false -gap> r := RadicalOfForm(form); - -gap> Dimension(r); -0 -gap> quit; diff --git a/examples/output/bg_th_ex3.out b/examples/output/bg_th_ex3.out deleted file mode 100644 index b080125..0000000 --- a/examples/output/bg_th_ex3.out +++ /dev/null @@ -1,21 +0,0 @@ -gap> #Background theory: example 3 -gap> mat := [[0,0,-2],[0,0,1],[2,-1,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^0 ], - [ Z(7)^2, Z(7)^3, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat,GF(7)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - . . 5 - . . 1 - 2 6 . -gap> IsSymmetricForm(form); -false -gap> IsAlternatingForm(form); -true -gap> r := RadicalOfForm(form); - -gap> Dimension(r); -1 -gap> quit; diff --git a/examples/output/bg_th_ex4.out b/examples/output/bg_th_ex4.out deleted file mode 100644 index be1eb40..0000000 --- a/examples/output/bg_th_ex4.out +++ /dev/null @@ -1,29 +0,0 @@ -gap> #Background theory: example 4 -gap> mat := [[0,1,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,1], -> [0,0,0,0,1,0],[0,0,0,1,0,0],[0,0,1,0,0,0]]*Z(16)^0; -[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := BilinearFormByMatrix(mat,GF(16)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - . 1 . . . . - 1 . . . . . - . . . . . 1 - . . . . 1 . - . . . 1 . . - . . 1 . . . -gap> IsSymmetricForm(form); -true -gap> IsAlternatingForm(form); -true -gap> IsDegenerateForm(form); -false -gap> WittIndex(form); -3 -gap> quit; diff --git a/examples/output/bg_th_ex5.out b/examples/output/bg_th_ex5.out deleted file mode 100644 index 82bb369..0000000 --- a/examples/output/bg_th_ex5.out +++ /dev/null @@ -1,83 +0,0 @@ -gap> #Background theory: example 5 -gap> mat := [[0*Z(5),0*Z(5),0*Z(25),Z(25)^3],[0*Z(5),0*Z(5),Z(25)^3,0*Z(25)], -> [0*Z(5),-Z(25)^3,0*Z(5),0*Z(5)],[-Z(25)^3,0*Z(5),0*Z(25),0*Z(25)]]; -[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5^2)^3 ], [ 0*Z(5), 0*Z(5), Z(5^2)^3, 0*Z(5) ], - [ 0*Z(5), Z(5^2)^15, 0*Z(5), 0*Z(5) ], - [ Z(5^2)^15, 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> form := HermitianFormByMatrix(mat,GF(25)); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: -z = Z(25) - . . . z^3 - . . z^3 . - . z^15 . . - z^15 . . . -gap> WittIndex(form); -2 -gap> form2 := BilinearFormByMatrix(mat,GF(25)); -< bilinear form > -gap> Display(form2); -Bilinear form -Gram Matrix: -z = Z(25) - . . . z^3 - . . z^3 . - . z^15 . . - z^15 . . . -gap> IsAlternatingForm(form2); -true -gap> Display(IsometricCanonicalForm(form)); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -Witt Index: 2 -gap> Display(IsometricCanonicalForm(form2)); -Bilinear form -Gram Matrix: - . 1 . . - 4 . . . - . . . 1 - . . 4 . -Witt Index: 2 -gap> V := GF(25)^4; -( GF(5^2)^4 ) -gap> u := [Z(5)^0,Z(5^2)^11,Z(5)^3,Z(5^2)^13 ]; -[ Z(5)^0, Z(5^2)^11, Z(5)^3, Z(5^2)^13 ] -gap> [u,u]^form; -0*Z(5) -gap> v := [Z(5)^0,Z(5^2)^5,Z(5^2),Z(5^2)^13 ]; -[ Z(5)^0, Z(5^2)^5, Z(5^2), Z(5^2)^13 ] -gap> [v,v]^form; -0*Z(5) -gap> [u,v]^form; -Z(5^2)^7 -gap> ([v,u]^form)^5; -Z(5^2)^7 -gap> w := [Z(5^2)^21,Z(5^2)^19,Z(5^2)^4,Z(5)^3 ]; -[ Z(5^2)^21, Z(5^2)^19, Z(5^2)^4, Z(5)^3 ] -gap> [w,w]^form; -Z(5) -gap> v := [Z(5)^0,Z(5^2)^10,Z(5^2)^15,Z(5^2)^3 ]; -[ Z(5)^0, Z(5^2)^10, Z(5^2)^15, Z(5^2)^3 ] -gap> u := [Z(5)^3,Z(5^2)^9,Z(5^2)^4,Z(5^2)^16 ]; -[ Z(5)^3, Z(5^2)^9, Z(5^2)^4, Z(5^2)^16 ] -gap> w := [Z(5)^2,Z(5^2)^9,Z(5^2)^23,Z(5^2)^11 ]; -[ Z(5)^2, Z(5^2)^9, Z(5^2)^23, Z(5^2)^11 ] -gap> [u,v]^form; -0*Z(5) -gap> [u,w]^form; -0*Z(5) -gap> [v,w]^form; -0*Z(5) -gap> s := Subspace(V,[v,u,w]); - -gap> Dimension(s); -2 -gap> WittIndex(form); -2 -gap> quit; diff --git a/examples/output/bg_th_ex6.out b/examples/output/bg_th_ex6.out deleted file mode 100644 index 96430fc..0000000 --- a/examples/output/bg_th_ex6.out +++ /dev/null @@ -1,19 +0,0 @@ -gap> #Background theory: example 6 -gap> V := GF(4)^3; -( GF(2^2)^3 ) -gap> mat := [[Z(2^2)^2,Z(2^2),Z(2^2)^2],[Z(2^2)^2,Z(2)^0,Z(2)^0], -> [0*Z(2),Z(2)^0,0*Z(2)]]; -[ [ Z(2^2)^2, Z(2^2), Z(2^2)^2 ], [ Z(2^2)^2, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] -gap> qform := QuadraticFormByMatrix(mat, GF(4)); -< quadratic form > -gap> Display( qform ); -Quadratic form -Gram Matrix: -z = Z(4) - z^2 1 z^2 - . 1 . - . . . -gap> PolynomialOfForm( qform ); -Z(2^2)^2*x_1^2+x_1*x_2+Z(2^2)^2*x_1*x_3+x_2^2 -gap> quit; diff --git a/examples/output/bg_th_ex7.out b/examples/output/bg_th_ex7.out deleted file mode 100644 index a7eac8f..0000000 --- a/examples/output/bg_th_ex7.out +++ /dev/null @@ -1,19 +0,0 @@ -gap> #Background theory: example 7 -gap> r := PolynomialRing(GF(8),4); -GF(2^3)[x_1,x_2,x_3,x_4] -gap> poly := r.1*r.2+r.3*r.4; -x_1*x_2+x_3*x_4 -gap> qform := QuadraticFormByPolynomial(poly, r); -< quadratic form > -gap> Display(qform); -Quadratic form -Gram Matrix: - . 1 . . - . . . . - . . . 1 - . . . . -Polynomial: x_1*x_2+x_3*x_4 - -gap> RadicalOfForm(qform); - -gap> quit; diff --git a/examples/output/bg_th_ex8.out b/examples/output/bg_th_ex8.out deleted file mode 100644 index 11e3322..0000000 --- a/examples/output/bg_th_ex8.out +++ /dev/null @@ -1,40 +0,0 @@ -gap> #Background theory: example 8 -gap> mat := [[Z(16)^3,1,0,0],[0,Z(16)^5,0,0], -> [0,0,Z(16)^3,1],[0,0,0,Z(16)^12]]*Z(16)^0; -[ [ Z(2^4)^3, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^4)^3, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^12 ] - ] -gap> qform := QuadraticFormByMatrix(mat,GF(16)); -< quadratic form > -gap> Display( qform ); -Quadratic form -Gram Matrix: -z = Z(16) - z^3 1 . . - . z^5 . . - . . z^3 1 - . . . z^12 -gap> mat2 := [[Z(16)^7,1,0,0],[0,0,0,0], -> [0,0,Z(16)^2,1],[0,0,0,Z(16)^9]]*Z(16)^0; -[ [ Z(2^4)^7, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^4)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^9 ] ] -gap> qform2 := QuadraticFormByMatrix(mat2, GF(16)); -< quadratic form > -gap> Display( qform2 ); -Quadratic form -Gram Matrix: -z = Z(16) - z^7 1 . . - . . . . - . . z^2 1 - . . . z^9 -gap> biform := AssociatedBilinearForm( qform2 ); -< bilinear form > -gap> Display( biform ); -Bilinear form -Gram Matrix: - . 1 . . - 1 . . . - . . . 1 - . . 1 . -gap> quit; diff --git a/examples/output/bg_th_ex9.out b/examples/output/bg_th_ex9.out deleted file mode 100644 index d4ff783..0000000 --- a/examples/output/bg_th_ex9.out +++ /dev/null @@ -1,27 +0,0 @@ -gap> #Background theory: example 9 -gap> mat := [ [ Z(2^2), Z(2^2), Z(2^2), Z(2^2), Z(2^2) ], -> [ 0*Z(2), Z(2^2), Z(2^2)^2, 0*Z(2), Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ];; -gap> qform := QuadraticFormByMatrix(mat,GF(4)); -< quadratic form > -gap> IsSingularForm(qform); -false -gap> IsDegenerateForm(qform); -#I Testing degeneracy of the *associated bilinear form* -true -gap> biform := AssociatedBilinearForm(qform); -< bilinear form > -gap> Display(biform); -Bilinear form -Gram Matrix: -z = Z(4) - . z^1 z^1 z^1 z^1 - z^1 . z^2 . 1 - z^1 z^2 . 1 1 - z^1 . 1 . 1 - z^1 1 1 1 . -gap> IsDegenerateForm(biform); -true -gap> quit; diff --git a/examples/output/bilformbymatrix.out b/examples/output/bilformbymatrix.out deleted file mode 100644 index edc0e01..0000000 --- a/examples/output/bilformbymatrix.out +++ /dev/null @@ -1,46 +0,0 @@ -gap> #Constructing form: BilinearFormByMatrix -gap> mat := IdentityMat(4, GF(9)); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := BilinearFormByMatrix(mat,GF(9)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -gap> mat := [[0*Z(2),Z(16)^12,0*Z(2),Z(4)^2,Z(16)^13], -> [Z(16)^12,0*Z(2),0*Z(2),Z(16)^11,Z(16)], -> [0*Z(2),0*Z(2),0*Z(2),Z(4)^2,Z(16)^3], -> [Z(4)^2,Z(16)^11,Z(4)^2,0*Z(2),Z(16)^3], -> [Z(16)^13,Z(16),Z(16)^3,Z(16)^3,0*Z(2) ]]; -[ [ 0*Z(2), Z(2^4)^12, 0*Z(2), Z(2^2)^2, Z(2^4)^13 ], - [ Z(2^4)^12, 0*Z(2), 0*Z(2), Z(2^4)^11, Z(2^4) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2^4)^3 ], - [ Z(2^2)^2, Z(2^4)^11, Z(2^2)^2, 0*Z(2), Z(2^4)^3 ], - [ Z(2^4)^13, Z(2^4), Z(2^4)^3, Z(2^4)^3, 0*Z(2) ] ] -gap> form := BilinearFormByMatrix(mat,GF(16)); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: -z = Z(16) - . z^12 . z^10 z^13 - z^12 . . z^11 z^1 - . . . z^10 z^3 - z^10 z^11 z^10 . z^3 - z^13 z^1 z^3 z^3 . -gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> WittIndex(form); -1 -gap> form := BilinearFormByMatrix(mat,GF(49)); -< bilinear form > -gap> WittIndex(form); -2 -gap> quit; diff --git a/examples/output/bilformbypoly.out b/examples/output/bilformbypoly.out deleted file mode 100644 index 312cead..0000000 --- a/examples/output/bilformbypoly.out +++ /dev/null @@ -1,34 +0,0 @@ -gap> #Constructing form: BilinearFormByPolynomial -gap> r := PolynomialRing( GF(11), 4); -GF(11)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> pol := vars[1]*vars[2]+vars[3]*vars[4]; -x_1*x_2+x_3*x_4 -gap> form := BilinearFormByPolynomial(pol, r, 4); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: - . 6 . . - 6 . . . - . . . 6 - . . 6 . -Polynomial: x_1*x_2+x_3*x_4 - -gap> r := PolynomialRing(GF(4),2); -GF(2^2)[x_1,x_2] -gap> pol := r.1*r.2; -x_1*x_2 -gap> form := BilinearFormByPolynomial(pol,r); -Error, No orthogonal form can be associated with a quadratic polynomial in even chara\ -cteristic - called from -BilinearFormByPolynomial( pol, pring, n - ) at ./pkg/forms/lib/forms.gi:470 called from -( ) - called from read-eval loop at line 14 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue -brk> quit; -gap> quit; diff --git a/examples/output/bilformbyquadform.out b/examples/output/bilformbyquadform.out deleted file mode 100644 index 45b0100..0000000 --- a/examples/output/bilformbyquadform.out +++ /dev/null @@ -1,30 +0,0 @@ -gap> #Constructing form: BilinearFormByQuadraticForm -gap> r := PolynomialRing(GF(9),4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> poly := -r.1*r.2+Z(3^2)*r.3^2+r.4^2; --x_1*x_2+Z(3^2)*x_3^2+x_4^2 -gap> qform := QuadraticFormByPolynomial(poly,r); -< quadratic form > -gap> Display( qform ); -Quadratic form -Gram Matrix: -z = Z(9) - . 2 . . - . . . . - . . z^1 . - . . . 1 -Polynomial: -x_1*x_2+Z(3^2)*x_3^2+x_4^2 - -gap> form := BilinearFormByQuadraticForm( qform ); -< bilinear form > -gap> Display(form); -Bilinear form -Gram Matrix: -z = Z(9) - . 1 . . - 1 . . . - . . z^1 . - . . . 1 -gap> Set(GF(9)^4, x -> [x,x]^form = x^qform); -[ true ] -gap> quit; diff --git a/examples/output/conic.out b/examples/output/conic.out deleted file mode 100644 index c7373d3..0000000 --- a/examples/output/conic.out +++ /dev/null @@ -1,61 +0,0 @@ -gap> #A conic of PG(2,8) -gap> gf := GF(8); -GF(2^3) -gap> vec := gf^3; -( GF(2^3)^3 ) -gap> r := PolynomialRing( gf, 3); -GF(2^3)[x_1,x_2,x_3] -gap> poly := r.1^2 + r.2 * r.3; -x_1^2+x_2*x_3 -gap> form := QuadraticFormByPolynomial( poly, r ); -< quadratic form > -gap> Display( form ); -Quadratic form -Gram Matrix: - 1 . . - . . 1 - . . . -Polynomial: x_1^2+x_2*x_3 - -gap> IsDegenerateForm( form ); -#I Testing degeneracy of the *associated bilinear form* -true -gap> IsSingularForm( form ); -false -gap> WittIndex( form ); -1 -gap> IsParabolicForm( form ); -true -gap> RadicalOfForm( form ); - -gap> canonical := IsometricCanonicalForm( form ); -< parabolic quadratic form > -gap> form = canonical; -true -gap> go := GO(3,8); -GO(0,3,8) -gap> mat := InvariantQuadraticForm( go )!.matrix; -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] -gap> gapform := QuadraticFormByMatrix( mat, GF(8) ); -< quadratic form > -gap> b := BaseChangeToCanonical( gapform ); -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] -gap> hom := BaseChangeHomomorphism( b, GF(8) ); -^[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] -gap> newgo := Image(hom, go); -Group( -[ - [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^3), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^3)^6 ] ], - [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ Z(2)^0, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] ]) -gap> conic := Filtered(vec, x -> IsZero( x^form ));; -gap> Size(conic); -64 -gap> orbs := Orbits(newgo, conic, OnRight);; -gap> List(orbs,Size); -[ 1, 63 ] -gap> quit; diff --git a/examples/output/discofform.out b/examples/output/discofform.out deleted file mode 100644 index 9f0985c..0000000 --- a/examples/output/discofform.out +++ /dev/null @@ -1,7 +0,0 @@ -gap> #Discriminant of form: DiscriminantOfForm -gap> gram := InvariantQuadraticForm(GO(-1,4,5))!.matrix;; -gap> qform := QuadraticFormByMatrix(gram, GF(5)); -< quadratic form > -gap> DiscriminantOfForm( qform ); -"nonsquare" -gap> quit; diff --git a/examples/output/evalform.out b/examples/output/evalform.out deleted file mode 100644 index e3b4f13..0000000 --- a/examples/output/evalform.out +++ /dev/null @@ -1,23 +0,0 @@ -gap> #computing subspace orthogonal to given vector -gap> mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0;; -gap> form := QuadraticFormByMatrix(mat,GF(8)); -< quadratic form > -gap> u := [ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ]; -[ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ] -gap> EvaluateForm( form, u ); -Z(2^3)^6 -gap> u^form; -Z(2^3)^6 -gap> gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0], -> [0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0;; -gap> form := BilinearFormByMatrix(gram,GF(3)); -< bilinear form > -gap> u := [ [ Z(3)^0, 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), Z(3)^0 ], -> [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0, Z(3), 0*Z(3) ] ];; -gap> v := [ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3), 0*Z(3), Z(3) ], -> [ 0*Z(3), Z(3)^0, 0*Z(3), Z(3), Z(3), Z(3) ] ];; -gap> EvaluateForm( form, u, v); -[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] -gap> [u,v]^form; -[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] -gap> quit; diff --git a/examples/output/hermitianformbymatrix.out b/examples/output/hermitianformbymatrix.out deleted file mode 100644 index 436ad43..0000000 --- a/examples/output/hermitianformbymatrix.out +++ /dev/null @@ -1,28 +0,0 @@ -gap> #Constructing form: HermitianFormByMatrix -gap> gf := GF(3^2); -GF(3^2) -gap> mat := IdentityMat(4, gf); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := HermitianFormByMatrix( mat, gf ); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - 1 . . . - . 1 . . - . . 1 . - . . . 1 -gap> mat := [[Z(11)^0,0*Z(11),0*Z(11)],[0*Z(11),0*Z(11),Z(11)], -> [0*Z(11),Z(11),0*Z(11)]]; -[ [ Z(11)^0, 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), Z(11) ], - [ 0*Z(11), Z(11), 0*Z(11) ] ] -gap> form := HermitianFormByMatrix(mat,GF(121)); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - 1 . . - . . 2 - . 2 . -gap> quit; diff --git a/examples/output/hermitianformbypoly.out b/examples/output/hermitianformbypoly.out deleted file mode 100644 index ec5cf01..0000000 --- a/examples/output/hermitianformbypoly.out +++ /dev/null @@ -1,20 +0,0 @@ -gap> #Constructing form: HermitianFormByPolynomial -gap> r := PolynomialRing( GF(9), 4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> vars := IndeterminatesOfPolynomialRing( r ); -[ x_1, x_2, x_3, x_4 ] -gap> poly := vars[1]*vars[2]^3+vars[1]^3*vars[2]+ -> vars[3]*vars[4]^3+vars[3]^3*vars[4]; -x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 -gap> form := HermitianFormByPolynomial(poly,r); -< hermitian form > -gap> Display(form); -Hermitian form -Gram Matrix: - . 1 . . - 1 . . . - . . . 1 - . . 1 . -Polynomial: x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 - -gap> quit; diff --git a/examples/output/isisotropicvector.out b/examples/output/isisotropicvector.out deleted file mode 100644 index 399c016..0000000 --- a/examples/output/isisotropicvector.out +++ /dev/null @@ -1,29 +0,0 @@ -gap> #testing isotropy for vectors. -gap> mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(41)^0; -[ [ Z(41)^0, 0*Z(41), 0*Z(41), 0*Z(41) ], - [ 0*Z(41), Z(41)^20, 0*Z(41), 0*Z(41) ], - [ 0*Z(41), 0*Z(41), 0*Z(41), Z(41)^0 ], - [ 0*Z(41), 0*Z(41), Z(41)^0, 0*Z(41) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> v := [1,1,0,0]*Z(41)^0; -[ Z(41)^0, Z(41)^0, 0*Z(41), 0*Z(41) ] -gap> IsIsotropicVector(form,v); -true -gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> v1 := [1,0,0,0,0]*Z(8)^0; -[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> v2 := [0,1,0,0,0]*Z(8)^0; -[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> IsIsotropicVector(form,v1); -true -gap> IsIsotropicVector(form,v2); -true -gap> quit; diff --git a/examples/output/isometriccanonicalform.out b/examples/output/isometriccanonicalform.out deleted file mode 100644 index 2f5137f..0000000 --- a/examples/output/isometriccanonicalform.out +++ /dev/null @@ -1,30 +0,0 @@ -gap> #morphisms: IsometricCanonicalForm -gap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; -gap> form := QuadraticFormByMatrix(mat,GF(8)); -< quadratic form > -gap> iso := IsometricCanonicalForm(form); -< parabolic quadratic form > -gap> Display(form); -Parabolic quadratic form -Gram Matrix: -z = Z(8) - z^1 . . . . - . 1 z^5 . . - . . . . . - . . . . 1 - . . . . . -Witt Index: 2 -gap> Display(iso); -Parabolic quadratic form -Gram Matrix: - 1 . . . . - . . 1 . . - . . . . . - . . . . 1 - . . . . . -Witt Index: 2 -gap> quit; diff --git a/examples/output/issingularvector.out b/examples/output/issingularvector.out deleted file mode 100644 index 429c18f..0000000 --- a/examples/output/issingularvector.out +++ /dev/null @@ -1,22 +0,0 @@ -gap> #testing singularity for vectors. -gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> v1 := [1,0,0,0,0]*Z(8)^0; -[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> v2 := [0,1,0,0,0]*Z(8)^0; -[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] -gap> IsSingularVector(form,v1); -false -gap> IsSingularVector(form,v2); -true -gap> IsIsotropicVector(form,v1); -true -gap> IsIsotropicVector(form,v2); -true -gap> quit; diff --git a/examples/output/istotallyisotropic.out b/examples/output/istotallyisotropic.out deleted file mode 100644 index bc72fd0..0000000 --- a/examples/output/istotallyisotropic.out +++ /dev/null @@ -1,25 +0,0 @@ -gap> #testing total isotropy for subspaces -gap> mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^3, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> sub:= [[Z(7)^0,0*Z(7),Z(7)^0,Z(7)],[0*Z(7),Z(7)^0,Z(7)^0,Z(7)^4]]; -[ [ Z(7)^0, 0*Z(7), Z(7)^0, Z(7) ], [ 0*Z(7), Z(7)^0, Z(7)^0, Z(7)^4 ] ] -gap> IsTotallyIsotropicSubspace(form,sub); -true -gap> mat := IdentityMat(6,GF(2)); -[ , , - , , - , ] -gap> form := HermitianFormByMatrix(mat,GF(4)); -< hermitian form > -gap> sub := [[Z(2)^0,0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2)^0], -> [0*Z(2),Z(2)^0,0*Z(2),Z(2^2)^2,Z(2^2),Z(2)^0], -> [0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2^2),Z(2^2)^2]]; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], - [ 0*Z(2), Z(2)^0, 0*Z(2), Z(2^2)^2, Z(2^2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2^2), Z(2^2)^2 ] ] -gap> IsTotallyIsotropicSubspace(form,sub); -true -gap> quit; diff --git a/examples/output/istotallysingular.out b/examples/output/istotallysingular.out deleted file mode 100644 index f37ccaa..0000000 --- a/examples/output/istotallysingular.out +++ /dev/null @@ -1,16 +0,0 @@ -gap> #testing singularity for subspaces. -gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> sub := [[Z(2)^0,0*Z(2),Z(2^3)^6,Z(2^3),Z(2^3)^3], -> [0*Z(2),Z(2)^0,Z(2^3)^6,Z(2^3)^2,Z(2^3)]]; -[ [ Z(2)^0, 0*Z(2), Z(2^3)^6, Z(2^3), Z(2^3)^3 ], - [ 0*Z(2), Z(2)^0, Z(2^3)^6, Z(2^3)^2, Z(2^3) ] ] -gap> IsTotallySingularSubspace(form,sub); -true -gap> quit; diff --git a/examples/output/orthogonaltovector.out b/examples/output/orthogonaltovector.out deleted file mode 100644 index 70e750f..0000000 --- a/examples/output/orthogonaltovector.out +++ /dev/null @@ -1,41 +0,0 @@ -gap> #computing subspace orthogonal to given vector -gap> mat := [[0,0,0,-2],[0,0,-3,0],[0,3,0,0],[2,0,0,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^4, 0*Z(7) ], - [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], [ Z(7)^2, 0*Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat); -< bilinear form > -gap> v := [0*Z(7),Z(7)^0,Z(7)^3,Z(7)^5]; -[ 0*Z(7), Z(7)^0, Z(7)^3, Z(7)^5 ] -gap> vperp := OrthogonalSubspaceMat(form,v); -[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ Z(7)^0, 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] -gap> List(vperp,x->[x,v]^form); -[ 0*Z(7), 0*Z(7), 0*Z(7) ] -gap> sub := [[1,1,0,0],[0,0,1,2]]*Z(7)^0; -[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^0, Z(7)^2 ] ] -gap> subperp := OrthogonalSubspaceMat(form,sub); -[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^4, Z(7)^0 ] ] -gap> List(subperp,x->List(sub,y->[x,y]^form)); -[ [ 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7) ] ] -gap> mat := [[1,0,0],[0,0,1],[0,0,0]]*Z(2)^0; -[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), Z(2)^0 ], - [ 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> v := [Z(2)^0,Z(2)^0,0*Z(2)]; -[ Z(2)^0, Z(2)^0, 0*Z(2) ] -gap> vperp := OrthogonalSubspaceMat(form,v); -[ , ] -gap> bil_form := AssociatedBilinearForm(form); -< bilinear form > -gap> List(vperp,x->[x,v]^bil_form); -[ 0*Z(2), 0*Z(2) ] -gap> sub := [[1,0,1],[1,0,0]]*Z(2)^0; -[ [ Z(2)^0, 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ] -gap> subperp := OrthogonalSubspaceMat(form,sub); -[ , ] -gap> List(subperp,x->List(sub,y->[x,y]^bil_form)); -[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] -gap> quit; diff --git a/examples/output/polyofform.out b/examples/output/polyofform.out deleted file mode 100644 index 7430dc4..0000000 --- a/examples/output/polyofform.out +++ /dev/null @@ -1,11 +0,0 @@ -gap> #Polynomial of form: PolynomialOfForm -gap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], -> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; -gap> form := QuadraticFormByMatrix(mat,GF(8)); -< quadratic form > -gap> PolynomialOfForm(form); -Z(2^3)*x_1^2+x_2^2+Z(2^3)^5*x_2*x_3+x_4*x_5 -gap> quit; diff --git a/examples/output/pres_sesforms1.out b/examples/output/pres_sesforms1.out deleted file mode 100644 index ab9405c..0000000 --- a/examples/output/pres_sesforms1.out +++ /dev/null @@ -1,13 +0,0 @@ -gap> #Preserved Sesquilinear forms: example 1 -gap> g := SU(4,3); -SU(4,3) -gap> forms := PreservedSesquilinearForms(g); -[ < hermitian form > ] -gap> Display( forms[1] ); -Hermitian form -Gram Matrix: - . . . 2 - . . 2 . - . 2 . . - 2 . . . -gap> quit; diff --git a/examples/output/pres_sesforms2.out b/examples/output/pres_sesforms2.out deleted file mode 100644 index 92fdd55..0000000 --- a/examples/output/pres_sesforms2.out +++ /dev/null @@ -1,24 +0,0 @@ -gap> #Preserved Sesquilinear forms: example 2 -gap> a := [ [ -1, 0, 0, -1, 0, 1 ], [ 0, -1, -1, 0, 0, 1 ], -> [ -1, 0, 0, 1, 0, 0 ], [ 0, -1, 1, 0, 0, -1 ], -> [ 0, 0, 0, 0, 0, -1 ], [ 0, -1, -1, 1, 1, 1 ] ] * One(GF(3));; -gap> b := [ [ 1, -1, 1, -1, 1, -1 ], [ 1, 1, -1, 1, 1, 0 ], -> [ -1, 0, 1, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 1 ], -> [ 1, 1, 1, 1, 1, 1 ], [ -1, 1, 1, 1, -1, 0 ] ] * One(GF(3));; -gap> g := Group( a, b ); - -gap> forms := PreservedSesquilinearForms( g ); -[ < bilinear form > ] -gap> Display( forms[1] ); -Bilinear form -Gram Matrix: - . 1 . . . . - 1 . . . . . - . . . 1 . . - . . 1 . . . - . . . . . 1 - . . . . 1 . -gap> m := GModuleByMats( [a,b], GF(3) );; -gap> usemeataxe := MTX.InvariantBilinearForm(m); -fail -gap> quit; diff --git a/examples/output/preservedform.out b/examples/output/preservedform.out deleted file mode 100644 index f95363a..0000000 --- a/examples/output/preservedform.out +++ /dev/null @@ -1,23 +0,0 @@ -gap> #What is the form preserved by this group? -gap> go := GO(5, 5); -GO(0,5,5) -gap> x := -> [ [ Z(5)^0, Z(5)^3, 0*Z(5), Z(5)^3, Z(5)^3 ], -> [ Z(5)^2, Z(5)^3, 0*Z(5), Z(5)^2, Z(5) ], -> [ Z(5)^2, Z(5)^2, Z(5)^0, Z(5), Z(5)^3 ], -> [ Z(5)^0, Z(5)^3, Z(5), Z(5)^0, Z(5)^3 ], -> [ Z(5)^3, 0*Z(5), Z(5)^0, 0*Z(5), Z(5) ] -> ];; -gap> go2 := go^x; - -gap> forms := PreservedSesquilinearForms( go2 ); -[ < bilinear form > ] -gap> Display( forms[1] ); -Bilinear form -Gram Matrix: - 4 2 4 3 3 - 2 2 2 3 3 - 4 2 3 1 4 - 3 3 1 2 4 - 3 3 4 4 3 -gap> quit; diff --git a/examples/output/quadformbybilform.out b/examples/output/quadformbybilform.out deleted file mode 100644 index 1c6ed8f..0000000 --- a/examples/output/quadformbybilform.out +++ /dev/null @@ -1,44 +0,0 @@ -gap> #Constructing form: QuadraticFormByBilinearForm -gap> mat := [ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], -> [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], -> [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], -> [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], -> [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ]; -[ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], - [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], - [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], - [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], - [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ] -gap> form := BilinearFormByMatrix(mat,GF(9)); -< bilinear form > -gap> Q := QuadraticFormByBilinearForm(form); -< quadratic form > -gap> Display(form); -Bilinear form -Gram Matrix: -z = Z(9) - z^7 1 z^2 . z^5 - 1 z^7 z^6 z^5 z^2 - z^2 z^6 z^7 z^2 z^2 - . z^5 z^2 z^6 z^7 - z^5 z^2 z^2 z^7 2 -gap> Display(Q); -Quadratic form -Gram Matrix: -z = Z(9) - z^7 2 z^6 . z^1 - . z^7 z^2 z^1 z^6 - . . z^7 z^6 z^6 - . . . z^6 z^3 - . . . . 2 -gap> Set(List(GF(9)^5),x->[x,x]^form=x^Q); -[ true ] -gap> PolynomialOfForm(form); -Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2\ -*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2\ -)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 -gap> PolynomialOfForm(Q); -Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2\ -*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2\ -)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 -gap> quit; diff --git a/examples/output/quadformbymatrix.out b/examples/output/quadformbymatrix.out deleted file mode 100644 index 398ccc9..0000000 --- a/examples/output/quadformbymatrix.out +++ /dev/null @@ -1,29 +0,0 @@ -gap> #Constructing form: QuadraticFormByMatrix -gap> mat := [[1,0,0,0],[0,3,0,0],[0,0,0,6],[0,0,6,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^3 ], [ 0*Z(7), 0*Z(7), Z(7)^3, 0*Z(7) ] ] -gap> form := QuadraticFormByMatrix(mat,GF(7)); -< quadratic form > -gap> Display(form); -Quadratic form -Gram Matrix: - 1 . . . - . 3 . . - . . . 5 - . . . . -gap> gf := GF(2^2); -GF(2^2) -gap> mat := InvariantQuadraticForm( SO(-1, 4, 4) )!.matrix; -[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2 ] ] -gap> form := QuadraticFormByMatrix( mat, gf ); -< quadratic form > -gap> Display(form); -Quadratic form -Gram Matrix: -z = Z(4) - . 1 . . - . . . . - . . z^2 1 - . . . z^2 -gap> quit; diff --git a/examples/output/quadformbypoly.out b/examples/output/quadformbypoly.out deleted file mode 100644 index 053e777..0000000 --- a/examples/output/quadformbypoly.out +++ /dev/null @@ -1,25 +0,0 @@ -gap> #Constructing form: QuadraticFormByPolynomial -gap> r := PolynomialRing( GF(8), 3); -GF(2^3)[x_1,x_2,x_3] -gap> poly := r.1^2 + r.2^2 + r.3^2; -x_1^2+x_2^2+x_3^2 -gap> form := QuadraticFormByPolynomial(poly, r); -< quadratic form > -gap> RadicalOfForm(form); - -gap> r := PolynomialRing(GF(9),4); -GF(3^2)[x_1,x_2,x_3,x_4] -gap> poly := Z(3)^2*r.1^2+r.2^2+r.3*r.4; -x_1^2+x_2^2+x_3*x_4 -gap> qform := QuadraticFormByPolynomial(poly,r); -< quadratic form > -gap> Display(qform); -Quadratic form -Gram Matrix: - 1 . . . - . 1 . . - . . . 1 - . . . . -Polynomial: x_1^2+x_2^2+x_3*x_4 - -gap> quit; diff --git a/examples/output/quadformfields.out b/examples/output/quadformfields.out deleted file mode 100644 index e669512..0000000 --- a/examples/output/quadformfields.out +++ /dev/null @@ -1,15 +0,0 @@ -gap> #constructing the same form over different fields -gap> mat := -> [[Z(2)^0,Z(2)^0,0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,0*Z(2),0*Z(2)], -> [0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; -[ [ Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := QuadraticFormByMatrix(mat); -< quadratic form > -gap> WittIndex(form); -1 -gap> form := QuadraticFormByMatrix(mat,GF(4)); -< quadratic form > -gap> WittIndex(form); -2 -gap> quit; diff --git a/examples/output/radicalofform.out b/examples/output/radicalofform.out deleted file mode 100644 index e4de5e8..0000000 --- a/examples/output/radicalofform.out +++ /dev/null @@ -1,12 +0,0 @@ -gap> #Radical of form: RadicalOfForm -gap> r := PolynomialRing( GF(8), 3 ); -GF(2^3)[x_1,x_2,x_3] -gap> poly := r.1^2 + r.2 * r.3; -x_1^2+x_2*x_3 -gap> form := QuadraticFormByPolynomial( poly, r ); -< quadratic form > -gap> r := RadicalOfForm( form ); - -gap> Dimension(r); -0 -gap> quit; diff --git a/examples/output/scalarfromsim.out b/examples/output/scalarfromsim.out deleted file mode 100644 index 2583d4d..0000000 --- a/examples/output/scalarfromsim.out +++ /dev/null @@ -1,18 +0,0 @@ -gap> #ScalarOfSimilairty example -gap> gram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], -> [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], -> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];; -gap> form := BilinearFormByMatrix( gram, GF(3) ); -< bilinear form > -gap> m := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], -> [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], -> [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], -> [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], -> [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], -> [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];; -gap> ScalarOfSimilarity( m, form ); -Z(3) -gap> quit; diff --git a/examples/output/trivialform.out b/examples/output/trivialform.out deleted file mode 100644 index 02b9ed6..0000000 --- a/examples/output/trivialform.out +++ /dev/null @@ -1,21 +0,0 @@ -gap> #Constructing a trivial form -gap> mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form1 := BilinearFormByMatrix(mat,GF(7)); -< trivial form > -gap> form2 := QuadraticFormByMatrix(mat,GF(7)); -< trivial form > -gap> form1 = form2; -true -gap> IsQuadraticForm(form1); -false -gap> IsSesquilinearForm(form1); -false -gap> mat := [[0,0],[0,0]]*Z(4)^0; -[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] -gap> form3 := BilinearFormByMatrix(mat,GF(4)); -< trivial form > -gap> form3 = form1; -false -gap> quit; diff --git a/examples/output/trivialform2.out b/examples/output/trivialform2.out deleted file mode 100644 index 410e8c7..0000000 --- a/examples/output/trivialform2.out +++ /dev/null @@ -1,14 +0,0 @@ -gap> -gap> #Behaviour of a trivial form -gap> mat := [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(3)^0; -[ [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ] ] -gap> form := BilinearFormByMatrix(mat,GF(3)); -< trivial form > -gap> v := Random(GF(3)^4); -[ Z(3), Z(3), 0*Z(3), Z(3) ] -gap> [v,v]^form; -0*Z(3) -gap> v^form; -0*Z(3) -gap> quit; diff --git a/examples/output/trivialform_prop.out b/examples/output/trivialform_prop.out deleted file mode 100644 index 25229ef..0000000 --- a/examples/output/trivialform_prop.out +++ /dev/null @@ -1,30 +0,0 @@ -gap> #attributes and properties of a trivial form -gap> mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(11)^0; -[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], - [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] -gap> form := QuadraticFormByMatrix(mat,GF(121)); -< trivial form > -gap> IsReflexiveForm(form); -true -gap> IsAlternatingForm(form); -true -gap> IsSymmetricForm(form); -true -gap> IsOrthogonalForm(form); -false -gap> IsPseudoForm(form); -false -gap> IsSymplecticForm(form); -true -gap> IsDegenerateForm(form); -true -gap> IsSingularForm(form); -true -gap> BaseField(form); -GF(11^2) -gap> GramMatrix(form); -[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], - [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] -gap> RadicalOfForm(form); - -gap> quit; diff --git a/examples/output/typeofform.out b/examples/output/typeofform.out deleted file mode 100644 index bbfa5a5..0000000 --- a/examples/output/typeofform.out +++ /dev/null @@ -1,61 +0,0 @@ -gap> #Type Of Form -gap> mat := [[0,0,0,-1],[0,0,3,0],[0,-3,0,0],[1,0,0,0]]*Z(25)^0; -[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^2 ], [ 0*Z(5), 0*Z(5), Z(5)^3, 0*Z(5) ], - [ 0*Z(5), Z(5), 0*Z(5), 0*Z(5) ], [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> form := BilinearFormByMatrix(mat,GF(25)); -< bilinear form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); -0 -gap> mat := IdentityMat(3,GF(7)); -[ [ Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), Z(7)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,GF(7)); -< quadratic form > -gap> IsSingularForm(form); -false -gap> TypeOfForm(form); -0 -gap> mat := [[0,1,0,0],[-1,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(5)^0; -[ [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [ Z(5)^2, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ] ] -gap> form := BilinearFormByMatrix(mat,GF(5)); -< bilinear form > -gap> IsDegenerateForm(form); -true -gap> TypeOfForm(form); -0 -gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat,GF(7)); -< bilinear form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); --1 -gap> mat := IdentityMat(3,GF(9)); -[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> form := HermitianFormByMatrix(mat,GF(9)); -< hermitian form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); --1/2 -gap> mat := [[0,0,0,1],[0,1,0,0],[0,0,1,0],[1,0,0,0]]*Z(8)^0; -[ [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], - [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] -gap> form := BilinearFormByMatrix(mat,GF(8)); -< bilinear form > -gap> IsDegenerateForm(form); -false -gap> TypeOfForm(form); -Error, is a pseudo form and has no defined type called from -( ) - called from read-eval loop at line 30 of *stdin* -you can 'quit;' to quit to outer loop, or -you can 'return;' to continue -brk> quit; -gap> quit; diff --git a/examples/output/w53.out b/examples/output/w53.out deleted file mode 100644 index ab1b7a1..0000000 --- a/examples/output/w53.out +++ /dev/null @@ -1,45 +0,0 @@ -gap> #A form for W(5,3) -gap> f := GF(3); -GF(3) -gap> gram := [ -> [0,0,0,1,0,0], -> [0,0,0,0,1,0], -> [0,0,0,0,0,1], -> [-1,0,0,0,0,0], -> [0,-1,0,0,0,0], -> [0,0,-1,0,0,0]] * One(f);; -gap> form := BilinearFormByMatrix( gram, f ); -< bilinear form > -gap> IsSymplecticForm( form ); -true -gap> Display( form ); -Symplectic form -Gram Matrix: - . . . 1 . . - . . . . 1 . - . . . . . 1 - 2 . . . . . - . 2 . . . . - . . 2 . . . -gap> b := BaseChangeToCanonical( form ); -[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], - [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], - [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], - [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] -gap> Display( b ); - 1 . . . . . - . . . 1 . . - . 1 . . . . - . . . . 1 . - . . 1 . . . - . . . . . 1 -gap> Display( b * gram * TransposedMat(b) ); - . 1 . . . . - 2 . . . . . - . . . 1 . . - . . 2 . . . - . . . . . 1 - . . . . 2 . -gap> quit; diff --git a/examples/output/wittindex.out b/examples/output/wittindex.out deleted file mode 100644 index 914bbd4..0000000 --- a/examples/output/wittindex.out +++ /dev/null @@ -1,38 +0,0 @@ -gap> # Witt index. Also of degenerated forms -gap> mat := [[0,0,1,0,0],[0,0,0,0,0],[-1,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]*Z(7)^0; -[ [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ Z(7)^3, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ] ] -gap> form := BilinearFormByMatrix(mat,GF(7)); -< bilinear form > -gap> WittIndex(form); -1 -gap> RadicalOfForm(form); - -gap> Dimension(last); -3 -gap> mat := IdentityMat(6,GF(5)); -[ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5) ], - [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,GF(5)); -< quadratic form > -gap> WittIndex(form); -3 -gap> mat := IdentityMat(6,GF(7)); -[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ], - [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] -gap> form := QuadraticFormByMatrix(mat,GF(7)); -< quadratic form > -gap> WittIndex(form); -2 -gap> quit; diff --git a/examples/preamble_sws.g b/examples/preamble_sws.g deleted file mode 100644 index ecb41b8..0000000 --- a/examples/preamble_sws.g +++ /dev/null @@ -1,3 +0,0 @@ -Print("true\n"); -output := Filename(dir,file); -LogTo(output); \ No newline at end of file diff --git a/make_archive.sh b/make_archive.sh index b9e09a3..363752c 100755 --- a/make_archive.sh +++ b/make_archive.sh @@ -1,6 +1,6 @@ cd .. -COPYFILE_DISABLE=1 tar --exclude=.* -cf forms-`cat ./forms/VERSION`.tar forms/doc forms/examples forms/lib forms/init.g forms/makedoc.g forms/PackageInfo.g forms/read.g forms/tst forms/VERSION forms/README -zip -rq forms-`cat ./forms/VERSION`-win.zip forms/doc forms/examples forms/lib forms/init.g forms/makedoc.g forms/PackageInfo.g forms/read.g forms/tst forms/VERSION forms/README +COPYFILE_DISABLE=1 tar --exclude=.* -cf forms-`cat ./forms/VERSION`.tar forms/doc forms/lib forms/init.g forms/makedoc.g forms/PackageInfo.g forms/read.g forms/tst forms/VERSION forms/README +zip -rq forms-`cat ./forms/VERSION`-win.zip forms/doc forms/lib forms/init.g forms/makedoc.g forms/PackageInfo.g forms/read.g forms/tst forms/VERSION forms/README gzip -c9 forms-`cat ./forms/VERSION`.tar > forms-`cat ./forms/VERSION`.tar.gz bzip2 -9 forms-`cat ./forms/VERSION`.tar cd forms From e722012e94a8d4ca992782ddc1f9a03231575b7a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 18 May 2021 23:00:31 +0200 Subject: [PATCH 3/4] Test manual examples --- doc/construct_basic.xml | 15 +- doc/examples.xml | 9 +- doc/morphisms.xml | 5 +- doc/theory.xml | 7 +- makedoc.g | 2 +- tst/forms01.tst | 147 +++++++++ tst/forms02.tst | 291 ++++++++++++++++++ tst/forms03.tst | 639 ++++++++++++++++++++++++++++++++++++++++ tst/forms04.tst | 208 +++++++++++++ 9 files changed, 1297 insertions(+), 26 deletions(-) create mode 100644 tst/forms01.tst create mode 100644 tst/forms02.tst create mode 100644 tst/forms03.tst create mode 100644 tst/forms04.tst diff --git a/doc/construct_basic.xml b/doc/construct_basic.xml index 61c6893..798802d 100644 --- a/doc/construct_basic.xml +++ b/doc/construct_basic.xml @@ -282,14 +282,9 @@ GF(2^2)[x_1,x_2] gap> pol := r.1*r.2; x_1*x_2 gap> form := BilinearFormByPolynomial(pol,r); -Error, No orthogonal form can be associated with a quadratic polynomial in even chara\ -cteristic - called from -BilinearFormByPolynomial( pol, pring, n - ) at ./pkg/forms/lib/forms.gi:470 called from -( ) - called from read-eval loop at line 14 of *stdin* -you can 'return;' to continue +Error, No orthogonal form can be associated with a quadratic polynomial in eve\ +n characteristic + ]]> @@ -1195,14 +1190,12 @@ itself is none of these, although it can behave as a sesquilinear or a quadratic form, depending on its arguments. gap> mat := [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(3)^0; [ [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ] ] gap> form := BilinearFormByMatrix(mat,GF(3)); < trivial form > -gap> v := Random(GF(3)^4); -[ Z(3), Z(3), 0*Z(3), Z(3) ] +gap> v := Random(GF(3)^4);; gap> [v,v]^form; 0*Z(3) gap> v^form; diff --git a/doc/examples.xml b/doc/examples.xml index a453cfc..21dc9f3 100644 --- a/doc/examples.xml +++ b/doc/examples.xml @@ -39,8 +39,7 @@ gap> gf := GF(8); GF(2^3) gap> vec := gf^3; ( GF(2^3)^3 ) -gap> r := PolynomialRing( gf, 3); -PolynomialRing(..., [ x_1, x_2, x_3 ]) +gap> r := PolynomialRing( gf, 3);; gap> poly := r.1^2 + r.2 * r.3; x_1^2+x_2*x_3 gap> form := QuadraticFormByPolynomial( poly, r ); @@ -52,6 +51,7 @@ Gram Matrix: . . 1 . . . Polynomial: x_1^2+x_2*x_3 + gap> IsDegenerateForm( form ); #I Testing degeneracy of the *associated bilinear form* true @@ -92,8 +92,9 @@ gap> hom := BaseChangeHomomorphism( b, GF(8) ); [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] gap> newgo := Image(hom, go); Group( -[ [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^3), 0*Z(2) ], [ 0*Z(2), 0*Z(2), - Z(2^3)^6 ] ], +[ + [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^3), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^3)^6 ] ], [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ Z(2)^0, Z(2)^0, Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] ]) ]]> diff --git a/doc/morphisms.xml b/doc/morphisms.xml index 43642e9..882204a 100644 --- a/doc/morphisms.xml +++ b/doc/morphisms.xml @@ -912,10 +912,7 @@ gap> form := BilinearFormByMatrix(mat,GF(8)); gap> IsDegenerateForm(form); false gap> TypeOfForm(form); -Error, is a pseudo form and has no defined type called from -( ) - called from read-eval loop at line 30 of *stdin* -you can 'return;' to continue +Error, is a pseudo form and has no defined type ]]> diff --git a/doc/theory.xml b/doc/theory.xml index 837e7d1..d27aa7b 100644 --- a/doc/theory.xml +++ b/doc/theory.xml @@ -188,12 +188,7 @@ gap> mat := [[1,0,0],[0,1,4],[1,2,1]]*Z(5)^0; [ Z(5)^0, Z(5), Z(5)^0 ] ] gap> form := BilinearFormByMatrix(mat,GF(5)); Error, Invalid Gram matrix - called from -BilinearFormByMatrixOp( MutableCopyMat( m ), f - ) at ./pkg/forms/lib/forms.gi:164 called from -( ) - called from read-eval loop at line 8 of *stdin* -you can 'return;' to continue + ]]> It is clear that the matrix used is not defining a reflexive bilinear form, which causes the system to generate the error message. diff --git a/makedoc.g b/makedoc.g index adcd16a..e845ab4 100644 --- a/makedoc.g +++ b/makedoc.g @@ -11,8 +11,8 @@ if fail = LoadPackage("AutoDoc", ">= 2019.04.10") then Error("AutoDoc 2019.04.10 or newer is required"); fi; AutoDoc(rec( + extract_examples := true, scaffold := rec( MainPage := false ), gapdoc := rec( main := "forms.xml" ), )); QUIT; - diff --git a/tst/forms01.tst b/tst/forms01.tst new file mode 100644 index 0000000..9659365 --- /dev/null +++ b/tst/forms01.tst @@ -0,0 +1,147 @@ +# Forms, chapter 2 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST( "forms01.tst"); + +# doc/examples.xml:37-66 +gap> gf := GF(8); +GF(2^3) +gap> vec := gf^3; +( GF(2^3)^3 ) +gap> r := PolynomialRing( gf, 3);; +gap> poly := r.1^2 + r.2 * r.3; +x_1^2+x_2*x_3 +gap> form := QuadraticFormByPolynomial( poly, r ); +< quadratic form > +gap> Display( form ); +Quadratic form +Gram Matrix: + 1 . . + . . 1 + . . . +Polynomial: x_1^2+x_2*x_3 + +gap> IsDegenerateForm( form ); +#I Testing degeneracy of the *associated bilinear form* +true +gap> IsSingularForm( form ); +false +gap> WittIndex( form ); +1 +gap> IsParabolicForm( form ); +true +gap> RadicalOfForm( form ); + + +# doc/examples.xml:72-77 +gap> canonical := IsometricCanonicalForm( form ); +< parabolic quadratic form > +gap> form = canonical; +true + +# doc/examples.xml:79-99 +gap> go := GO(3,8); +GO(0,3,8) +gap> mat := InvariantQuadraticForm( go )!.matrix; +[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] +gap> gapform := QuadraticFormByMatrix( mat, GF(8) ); +< quadratic form > +gap> b := BaseChangeToCanonical( gapform ); +[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] +gap> hom := BaseChangeHomomorphism( b, GF(8) ); +^[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0 ] ] +gap> newgo := Image(hom, go); +Group( +[ [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^3), 0*Z(2) ], [ 0*Z(2), 0*Z(2), + Z(2^3)^6 ] ], + [ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ Z(2)^0, Z(2)^0, Z(2)^0 ], + [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] ]) + +# doc/examples.xml:103-110 +gap> conic := Filtered(vec, x -> IsZero( x^form ));; +gap> Size(conic); +64 +gap> orbs := Orbits(newgo, conic, OnRight);; +gap> List(orbs,Size); +[ 1, 63 ] + +# doc/examples.xml:138-182 +gap> f := GF(3); +GF(3) +gap> gram := [ +> [0,0,0,1,0,0], +> [0,0,0,0,1,0], +> [0,0,0,0,0,1], +> [-1,0,0,0,0,0], +> [0,-1,0,0,0,0], +> [0,0,-1,0,0,0]] * One(f);; +gap> form := BilinearFormByMatrix( gram, f ); +< bilinear form > +gap> IsSymplecticForm( form ); +true +gap> Display( form ); +Symplectic form +Gram Matrix: + . . . 1 . . + . . . . 1 . + . . . . . 1 + 2 . . . . . + . 2 . . . . + . . 2 . . . +gap> b := BaseChangeToCanonical( form ); +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> Display( b ); + 1 . . . . . + . . . 1 . . + . 1 . . . . + . . . . 1 . + . . 1 . . . + . . . . . 1 +gap> Display( b * gram * TransposedMat(b) ); + . 1 . . . . + 2 . . . . . + . . . 1 . . + . . 2 . . . + . . . . . 1 + . . . . 2 . + +# doc/examples.xml:197-219 +gap> go := GO(5, 5); +GO(0,5,5) +gap> x := +> [ [ Z(5)^0, Z(5)^3, 0*Z(5), Z(5)^3, Z(5)^3 ], +> [ Z(5)^2, Z(5)^3, 0*Z(5), Z(5)^2, Z(5) ], +> [ Z(5)^2, Z(5)^2, Z(5)^0, Z(5), Z(5)^3 ], +> [ Z(5)^0, Z(5)^3, Z(5), Z(5)^0, Z(5)^3 ], +> [ Z(5)^3, 0*Z(5), Z(5)^0, 0*Z(5), Z(5) ] +> ];; +gap> go2 := go^x; + +gap> forms := PreservedSesquilinearForms( go2 ); +[ < bilinear form > ] +gap> Display( forms[1] ); +Bilinear form +Gram Matrix: + 4 2 4 3 3 + 2 2 2 3 3 + 4 2 3 1 4 + 3 3 1 2 4 + 3 3 4 4 3 + +# +gap> STOP_TEST("forms01.tst", 1 ); diff --git a/tst/forms02.tst b/tst/forms02.tst new file mode 100644 index 0000000..c22a8e4 --- /dev/null +++ b/tst/forms02.tst @@ -0,0 +1,291 @@ +# Forms, chapter 3 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST( "forms02.tst"); + +# doc/theory.xml:185-197 +gap> mat := [[1,0,0],[0,1,4],[1,2,1]]*Z(5)^0; +[ [ Z(5)^0, 0*Z(5), 0*Z(5) ], [ 0*Z(5), Z(5)^0, Z(5)^2 ], + [ Z(5)^0, Z(5), Z(5)^0 ] ] +gap> form := BilinearFormByMatrix(mat,GF(5)); +Error, Invalid Gram matrix + called from +BilinearFormByMatrixOp( MutableCopyMat( m ), f + ) at ./pkg/forms/lib/forms.gi:164 called from +( ) + called from read-eval loop at line 8 of *stdin* +you can 'return;' to continue + +# doc/theory.xml:203-226 +gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,-1]]*Z(9)^0; +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3) ] ] +gap> form := BilinearFormByMatrix(mat,GF(9)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 2 +gap> IsReflexiveForm(form); +true +gap> IsSymmetricForm(form); +true +gap> IsAlternatingForm(form); +false +gap> r := RadicalOfForm(form); + +gap> Dimension(r); +0 + +# doc/theory.xml:230-250 +gap> mat := [[0,0,-2],[0,0,1],[2,-1,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^0 ], + [ Z(7)^2, Z(7)^3, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat,GF(7)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + . . 5 + . . 1 + 2 6 . +gap> IsSymmetricForm(form); +false +gap> IsAlternatingForm(form); +true +gap> r := RadicalOfForm(form); + +gap> Dimension(r); +1 + +# doc/theory.xml:253-281 +gap> mat := [[0,1,0,0,0,0],[1,0,0,0,0,0],[0,0,0,0,0,1], +> [0,0,0,0,1,0],[0,0,0,1,0,0],[0,0,1,0,0,0]]*Z(16)^0; +[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := BilinearFormByMatrix(mat,GF(16)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + . 1 . . . . + 1 . . . . . + . . . . . 1 + . . . . 1 . + . . . 1 . . + . . 1 . . . +gap> IsSymmetricForm(form); +true +gap> IsAlternatingForm(form); +true +gap> IsDegenerateForm(form); +false +gap> WittIndex(form); +3 + +# doc/theory.xml:289-335 +gap> mat := [[0*Z(5),0*Z(5),0*Z(25),Z(25)^3],[0*Z(5),0*Z(5),Z(25)^3,0*Z(25)], +> [0*Z(5),-Z(25)^3,0*Z(5),0*Z(5)],[-Z(25)^3,0*Z(5),0*Z(25),0*Z(25)]]; +[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5^2)^3 ], [ 0*Z(5), 0*Z(5), Z(5^2)^3, 0*Z(5) ], + [ 0*Z(5), Z(5^2)^15, 0*Z(5), 0*Z(5) ], + [ Z(5^2)^15, 0*Z(5), 0*Z(5), 0*Z(5) ] ] +gap> form := HermitianFormByMatrix(mat,GF(25)); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: +z = Z(25) + . . . z^3 + . . z^3 . + . z^15 . . + z^15 . . . +gap> WittIndex(form); +2 +gap> form2 := BilinearFormByMatrix(mat,GF(25)); +< bilinear form > +gap> Display(form2); +Bilinear form +Gram Matrix: +z = Z(25) + . . . z^3 + . . z^3 . + . z^15 . . + z^15 . . . +gap> IsAlternatingForm(form2); +true +gap> Display(IsometricCanonicalForm(form)); +Hermitian form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 1 +Witt Index: 2 +gap> Display(IsometricCanonicalForm(form2)); +Bilinear form +Gram Matrix: + . 1 . . + 4 . . . + . . . 1 + . . 4 . +Witt Index: 2 + +# doc/theory.xml:341-378 +gap> V := GF(25)^4; +( GF(5^2)^4 ) +gap> u := [Z(5)^0,Z(5^2)^11,Z(5)^3,Z(5^2)^13 ]; +[ Z(5)^0, Z(5^2)^11, Z(5)^3, Z(5^2)^13 ] +gap> [u,u]^form; +0*Z(5) +gap> v := [Z(5)^0,Z(5^2)^5,Z(5^2),Z(5^2)^13 ]; +[ Z(5)^0, Z(5^2)^5, Z(5^2), Z(5^2)^13 ] +gap> [v,v]^form; +0*Z(5) +gap> [u,v]^form; +Z(5^2)^7 +gap> ([v,u]^form)^5; +Z(5^2)^7 +gap> w := [Z(5^2)^21,Z(5^2)^19,Z(5^2)^4,Z(5)^3 ]; +[ Z(5^2)^21, Z(5^2)^19, Z(5^2)^4, Z(5)^3 ] +gap> [w,w]^form; +Z(5) +gap> v := [Z(5)^0,Z(5^2)^10,Z(5^2)^15,Z(5^2)^3 ]; +[ Z(5)^0, Z(5^2)^10, Z(5^2)^15, Z(5^2)^3 ] +gap> u := [Z(5)^3,Z(5^2)^9,Z(5^2)^4,Z(5^2)^16 ]; +[ Z(5)^3, Z(5^2)^9, Z(5^2)^4, Z(5^2)^16 ] +gap> w := [Z(5)^2,Z(5^2)^9,Z(5^2)^23,Z(5^2)^11 ]; +[ Z(5)^2, Z(5^2)^9, Z(5^2)^23, Z(5^2)^11 ] +gap> [u,v]^form; +0*Z(5) +gap> [u,w]^form; +0*Z(5) +gap> [v,w]^form; +0*Z(5) +gap> s := Subspace(V,[v,u,w]); + +gap> Dimension(s); +2 +gap> WittIndex(form); +2 + +# doc/theory.xml:511-529 +gap> V := GF(4)^3; +( GF(2^2)^3 ) +gap> mat := [[Z(2^2)^2,Z(2^2),Z(2^2)^2],[Z(2^2)^2,Z(2)^0,Z(2)^0], +> [0*Z(2),Z(2)^0,0*Z(2)]]; +[ [ Z(2^2)^2, Z(2^2), Z(2^2)^2 ], [ Z(2^2)^2, Z(2)^0, Z(2)^0 ], + [ 0*Z(2), Z(2)^0, 0*Z(2) ] ] +gap> qform := QuadraticFormByMatrix(mat, GF(4)); +< quadratic form > +gap> Display( qform ); +Quadratic form +Gram Matrix: +z = Z(4) + z^2 1 z^2 + . 1 . + . . . +gap> PolynomialOfForm( qform ); +Z(2^2)^2*x_1^2+x_1*x_2+Z(2^2)^2*x_1*x_3+x_2^2 + +# doc/theory.xml:533-551 +gap> r := PolynomialRing(GF(8),4); +GF(2^3)[x_1,x_2,x_3,x_4] +gap> poly := r.1*r.2+r.3*r.4; +x_1*x_2+x_3*x_4 +gap> qform := QuadraticFormByPolynomial(poly, r); +< quadratic form > +gap> Display(qform); +Quadratic form +Gram Matrix: + . 1 . . + . . . . + . . . 1 + . . . . +Polynomial: x_1*x_2+x_3*x_4 + +gap> RadicalOfForm(qform); + + +# doc/theory.xml:553-592 +gap> mat := [[Z(16)^3,1,0,0],[0,Z(16)^5,0,0], +> [0,0,Z(16)^3,1],[0,0,0,Z(16)^12]]*Z(16)^0; +[ [ Z(2^4)^3, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2^2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^4)^3, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^12 ] + ] +gap> qform := QuadraticFormByMatrix(mat,GF(16)); +< quadratic form > +gap> Display( qform ); +Quadratic form +Gram Matrix: +z = Z(16) + z^3 1 . . + . z^5 . . + . . z^3 1 + . . . z^12 +gap> mat2 := [[Z(16)^7,1,0,0],[0,0,0,0], +> [0,0,Z(16)^2,1],[0,0,0,Z(16)^9]]*Z(16)^0; +[ [ Z(2^4)^7, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^4)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^4)^9 ] ] +gap> qform2 := QuadraticFormByMatrix(mat2, GF(16)); +< quadratic form > +gap> Display( qform2 ); +Quadratic form +Gram Matrix: +z = Z(16) + z^7 1 . . + . . . . + . . z^2 1 + . . . z^9 +gap> biform := AssociatedBilinearForm( qform2 ); +< bilinear form > +gap> Display( biform ); +Bilinear form +Gram Matrix: + . 1 . . + 1 . . . + . . . 1 + . . 1 . + +# doc/theory.xml:595-621 +gap> mat := [ [ Z(2^2), Z(2^2), Z(2^2), Z(2^2), Z(2^2) ], +> [ 0*Z(2), Z(2^2), Z(2^2)^2, 0*Z(2), Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ] ];; +gap> qform := QuadraticFormByMatrix(mat,GF(4)); +< quadratic form > +gap> IsSingularForm(qform); +false +gap> IsDegenerateForm(qform); +#I Testing degeneracy of the *associated bilinear form* +true +gap> biform := AssociatedBilinearForm(qform); +< bilinear form > +gap> Display(biform); +Bilinear form +Gram Matrix: +z = Z(4) + . z^1 z^1 z^1 z^1 + z^1 . z^2 . 1 + z^1 z^2 . 1 1 + z^1 . 1 . 1 + z^1 1 1 1 . +gap> IsDegenerateForm(biform); +true + +# +gap> STOP_TEST("forms02.tst", 1 ); diff --git a/tst/forms03.tst b/tst/forms03.tst new file mode 100644 index 0000000..1541dce --- /dev/null +++ b/tst/forms03.tst @@ -0,0 +1,639 @@ +# Forms, chapter 4 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST( "forms03.tst"); + +# doc/construct_basic.xml:72-117 +gap> mat := IdentityMat(4, GF(9)); +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> form := BilinearFormByMatrix(mat,GF(9)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 1 +gap> mat := [[0*Z(2),Z(16)^12,0*Z(2),Z(4)^2,Z(16)^13], +> [Z(16)^12,0*Z(2),0*Z(2),Z(16)^11,Z(16)], +> [0*Z(2),0*Z(2),0*Z(2),Z(4)^2,Z(16)^3], +> [Z(4)^2,Z(16)^11,Z(4)^2,0*Z(2),Z(16)^3], +> [Z(16)^13,Z(16),Z(16)^3,Z(16)^3,0*Z(2) ]]; +[ [ 0*Z(2), Z(2^4)^12, 0*Z(2), Z(2^2)^2, Z(2^4)^13 ], + [ Z(2^4)^12, 0*Z(2), 0*Z(2), Z(2^4)^11, Z(2^4) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2^4)^3 ], + [ Z(2^2)^2, Z(2^4)^11, Z(2^2)^2, 0*Z(2), Z(2^4)^3 ], + [ Z(2^4)^13, Z(2^4), Z(2^4)^3, Z(2^4)^3, 0*Z(2) ] ] +gap> form := BilinearFormByMatrix(mat,GF(16)); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: +z = Z(16) + . z^12 . z^10 z^13 + z^12 . . z^11 z^1 + . . . z^10 z^3 + z^10 z^11 z^10 . z^3 + z^13 z^1 z^3 z^3 . +gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> WittIndex(form); +1 +gap> form := BilinearFormByMatrix(mat,GF(49)); +< bilinear form > +gap> WittIndex(form); +2 + +# doc/construct_basic.xml:135-163 +gap> mat := [[1,0,0,0],[0,3,0,0],[0,0,0,6],[0,0,6,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^3 ], [ 0*Z(7), 0*Z(7), Z(7)^3, 0*Z(7) ] ] +gap> form := QuadraticFormByMatrix(mat,GF(7)); +< quadratic form > +gap> Display(form); +Quadratic form +Gram Matrix: + 1 . . . + . 3 . . + . . . 5 + . . . . +gap> gf := GF(2^2); +GF(2^2) +gap> mat := InvariantQuadraticForm( SO(-1, 4, 4) )!.matrix; +[ [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2^2)^2, Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2^2)^2 ] ] +gap> form := QuadraticFormByMatrix( mat, gf ); +< quadratic form > +gap> Display(form); +Quadratic form +Gram Matrix: +z = Z(4) + . 1 . . + . . . . + . . z^2 1 + . . . z^2 + +# doc/construct_basic.xml:166-180 +gap> mat := +> [[Z(2)^0,Z(2)^0,0*Z(2),0*Z(2)],[0*Z(2),Z(2)^0,0*Z(2),0*Z(2)], +> [0*Z(2),0*Z(2),0*Z(2),Z(2)^0],[0*Z(2),0*Z(2),0*Z(2),0*Z(2)]]; +[ [ Z(2)^0, Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> WittIndex(form); +1 +gap> form := QuadraticFormByMatrix(mat,GF(4)); +< quadratic form > +gap> WittIndex(form); +2 + +# doc/construct_basic.xml:197-224 +gap> gf := GF(3^2); +GF(3^2) +gap> mat := IdentityMat(4, gf); +[ [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> form := HermitianFormByMatrix( mat, gf ); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: + 1 . . . + . 1 . . + . . 1 . + . . . 1 +gap> mat := [[Z(11)^0,0*Z(11),0*Z(11)],[0*Z(11),0*Z(11),Z(11)], +> [0*Z(11),Z(11),0*Z(11)]]; +[ [ Z(11)^0, 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), Z(11) ], + [ 0*Z(11), Z(11), 0*Z(11) ] ] +gap> form := HermitianFormByMatrix(mat,GF(121)); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: + 1 . . + . . 2 + . 2 . + +# doc/construct_basic.xml:266-297 +gap> r := PolynomialRing( GF(11), 4); +GF(11)[x_1,x_2,x_3,x_4] +gap> vars := IndeterminatesOfPolynomialRing( r ); +[ x_1, x_2, x_3, x_4 ] +gap> pol := vars[1]*vars[2]+vars[3]*vars[4]; +x_1*x_2+x_3*x_4 +gap> form := BilinearFormByPolynomial(pol, r, 4); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: + . 6 . . + 6 . . . + . . . 6 + . . 6 . +Polynomial: x_1*x_2+x_3*x_4 + +gap> r := PolynomialRing(GF(4),2); +GF(2^2)[x_1,x_2] +gap> pol := r.1*r.2; +x_1*x_2 +gap> form := BilinearFormByPolynomial(pol,r); +Error, No orthogonal form can be associated with a quadratic polynomial in even chara\ +cteristic + called from +BilinearFormByPolynomial( pol, pring, n + ) at ./pkg/forms/lib/forms.gi:470 called from +( ) + called from read-eval loop at line 14 of *stdin* +you can 'return;' to continue + +# doc/construct_basic.xml:313-337 +gap> r := PolynomialRing( GF(8), 3); +GF(2^3)[x_1,x_2,x_3] +gap> poly := r.1^2 + r.2^2 + r.3^2; +x_1^2+x_2^2+x_3^2 +gap> form := QuadraticFormByPolynomial(poly, r); +< quadratic form > +gap> RadicalOfForm(form); + +gap> r := PolynomialRing(GF(9),4); +GF(3^2)[x_1,x_2,x_3,x_4] +gap> poly := Z(3)^2*r.1^2+r.2^2+r.3*r.4; +x_1^2+x_2^2+x_3*x_4 +gap> qform := QuadraticFormByPolynomial(poly,r); +< quadratic form > +gap> Display(qform); +Quadratic form +Gram Matrix: + 1 . . . + . 1 . . + . . . 1 + . . . . +Polynomial: x_1^2+x_2^2+x_3*x_4 + + +# doc/construct_basic.xml:357-376 +gap> r := PolynomialRing( GF(9), 4); +GF(3^2)[x_1,x_2,x_3,x_4] +gap> vars := IndeterminatesOfPolynomialRing( r ); +[ x_1, x_2, x_3, x_4 ] +gap> poly := vars[1]*vars[2]^3+vars[1]^3*vars[2]+ +> vars[3]*vars[4]^3+vars[3]^3*vars[4]; +x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 +gap> form := HermitianFormByPolynomial(poly,r); +< hermitian form > +gap> Display(form); +Hermitian form +Gram Matrix: + . 1 . . + 1 . . . + . . . 1 + . . 1 . +Polynomial: x_1^3*x_2+x_1*x_2^3+x_3^3*x_4+x_3*x_4^3 + + +# doc/construct_basic.xml:407-450 +gap> mat := [ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], +> [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], +> [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], +> [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], +> [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ]; +[ [ Z(3^2)^7, Z(3)^0, Z(3^2)^2, 0*Z(3), Z(3^2)^5 ], + [ Z(3)^0, Z(3^2)^7, Z(3^2)^6, Z(3^2)^5, Z(3^2)^2 ], + [ Z(3^2)^2, Z(3^2)^6, Z(3^2)^7, Z(3^2)^2, Z(3^2)^2 ], + [ 0*Z(3), Z(3^2)^5, Z(3^2)^2, Z(3^2)^6, Z(3^2)^7 ], + [ Z(3^2)^5, Z(3^2)^2, Z(3^2)^2, Z(3^2)^7, Z(3) ] ] +gap> form := BilinearFormByMatrix(mat,GF(9)); +< bilinear form > +gap> Q := QuadraticFormByBilinearForm(form); +< quadratic form > +gap> Display(form); +Bilinear form +Gram Matrix: +z = Z(9) + z^7 1 z^2 . z^5 + 1 z^7 z^6 z^5 z^2 + z^2 z^6 z^7 z^2 z^2 + . z^5 z^2 z^6 z^7 + z^5 z^2 z^2 z^7 2 +gap> Display(Q); +Quadratic form +Gram Matrix: +z = Z(9) + z^7 2 z^6 . z^1 + . z^7 z^2 z^1 z^6 + . . z^7 z^6 z^6 + . . . z^6 z^3 + . . . . 2 +gap> Set(List(GF(9)^5),x->[x,x]^form=x^Q); +[ true ] +gap> PolynomialOfForm(form); +Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2\ +*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2\ +)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 +gap> PolynomialOfForm(Q); +Z(3^2)^7*x_1^2-x_1*x_2+Z(3^2)^6*x_1*x_3+Z(3^2)*x_1*x_5+Z(3^2)^7*x_2^2+Z(3^2)^2\ +*x_2*x_3+Z(3^2)*x_2*x_4+Z(3^2)^6*x_2*x_5+Z(3^2)^7*x_3^2+Z(3^2)^6*x_3*x_4+Z(3^2\ +)^6*x_3*x_5+Z(3^2)^6*x_4^2+Z(3^2)^3*x_4*x_5-x_5^2 + +# doc/construct_basic.xml:466-495 +gap> r := PolynomialRing(GF(9),4); +GF(3^2)[x_1,x_2,x_3,x_4] +gap> poly := -r.1*r.2+Z(3^2)*r.3^2+r.4^2; +-x_1*x_2+Z(3^2)*x_3^2+x_4^2 +gap> qform := QuadraticFormByPolynomial(poly,r); +< quadratic form > +gap> Display( qform ); +Quadratic form +Gram Matrix: +z = Z(9) + . 2 . . + . . . . + . . z^1 . + . . . 1 +Polynomial: -x_1*x_2+Z(3^2)*x_3^2+x_4^2 + +gap> form := BilinearFormByQuadraticForm( qform ); +< bilinear form > +gap> Display(form); +Bilinear form +Gram Matrix: +z = Z(9) + . 1 . . + 1 . . . + . . z^1 . + . . . 1 +gap> Set(GF(9)^4, x -> [x,x]^form = x^qform); +[ true ] + +# doc/construct_basic.xml:513-531 +gap> r:= PolynomialRing(GF(121),6); +GF(11^2)[x_1,x_2,x_3,x_4,x_5,x_6] +gap> poly := r.1*r.5-r.2*r.6+r.3*r.4; +x_1*x_5-x_2*x_6+x_3*x_4 +gap> form := QuadraticFormByPolynomial(poly,r); +< quadratic form > +gap> aform := AssociatedBilinearForm(form); +< bilinear form > +gap> Display(aform); +Bilinear form +Gram Matrix: + . . . . 1 . + . . . . . 10 + . . . 1 . . + . . 1 . . . + 1 . . . . . + . 10 . . . . + +# doc/construct_basic.xml:554-576 +gap> mat := [[Z(8),0,0,0],[0,0,Z(8)^4,0],[0,0,0,1],[0,0,0,0]]*Z(8)^0;; +gap> form := QuadraticFormByMatrix(mat,GF(8)); +< quadratic form > +gap> u := [ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ]; +[ Z(2^3)^4, Z(2^3)^4, Z(2)^0, Z(2^3)^3 ] +gap> EvaluateForm( form, u ); +Z(2^3)^6 +gap> u^form; +Z(2^3)^6 +gap> gram := [[0,0,0,0,0,2],[0,0,0,0,2,0],[0,0,0,1,0,0], +> [0,0,1,0,0,0],[0,2,0,0,0,0],[2,0,0,0,0,0]]*Z(3)^0;; +gap> form := BilinearFormByMatrix(gram,GF(3)); +< bilinear form > +gap> u := [ [ Z(3)^0, 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), Z(3)^0 ], +> [ 0*Z(3), 0*Z(3), Z(3)^0, Z(3)^0, Z(3), 0*Z(3) ] ];; +gap> v := [ [ Z(3)^0, 0*Z(3), Z(3)^0, Z(3), 0*Z(3), Z(3) ], +> [ 0*Z(3), Z(3)^0, 0*Z(3), Z(3), Z(3), Z(3) ] ];; +gap> EvaluateForm( form, u, v); +[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] +gap> [u,v]^form; +[ [ Z(3)^0, Z(3)^0 ], [ 0*Z(3), 0*Z(3) ] ] + +# doc/construct_basic.xml:597-637 +gap> mat := [[0,0,0,-2],[0,0,-3,0],[0,3,0,0],[2,0,0,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^5 ], [ 0*Z(7), 0*Z(7), Z(7)^4, 0*Z(7) ], + [ 0*Z(7), Z(7), 0*Z(7), 0*Z(7) ], [ Z(7)^2, 0*Z(7), 0*Z(7), 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> v := [0*Z(7),Z(7)^0,Z(7)^3,Z(7)^5]; +[ 0*Z(7), Z(7)^0, Z(7)^3, Z(7)^5 ] +gap> vperp := OrthogonalSubspaceMat(form,v); +[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ Z(7)^0, 0*Z(7), Z(7)^0, 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] +gap> List(vperp,x->[x,v]^form); +[ 0*Z(7), 0*Z(7), 0*Z(7) ] +gap> sub := [[1,1,0,0],[0,0,1,2]]*Z(7)^0; +[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^0, Z(7)^2 ] ] +gap> subperp := OrthogonalSubspaceMat(form,sub); +[ [ Z(7)^0, Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^4, Z(7)^0 ] ] +gap> List(subperp,x->List(sub,y->[x,y]^form)); +[ [ 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7) ] ] +gap> mat := [[1,0,0],[0,0,1],[0,0,0]]*Z(2)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> v := [Z(2)^0,Z(2)^0,0*Z(2)]; +[ Z(2)^0, Z(2)^0, 0*Z(2) ] +gap> vperp := OrthogonalSubspaceMat(form,v); +[ , ] +gap> bil_form := AssociatedBilinearForm(form); +< bilinear form > +gap> List(vperp,x->[x,v]^bil_form); +[ 0*Z(2), 0*Z(2) ] +gap> sub := [[1,0,1],[1,0,0]]*Z(2)^0; +[ [ Z(2)^0, 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2), 0*Z(2) ] ] +gap> subperp := OrthogonalSubspaceMat(form,sub); +[ , ] +gap> List(subperp,x->List(sub,y->[x,y]^bil_form)); +[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] + +# doc/construct_basic.xml:647-675 +gap> mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(41)^0; +[ [ Z(41)^0, 0*Z(41), 0*Z(41), 0*Z(41) ], + [ 0*Z(41), Z(41)^20, 0*Z(41), 0*Z(41) ], + [ 0*Z(41), 0*Z(41), 0*Z(41), Z(41)^0 ], + [ 0*Z(41), 0*Z(41), Z(41)^0, 0*Z(41) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> v := [1,1,0,0]*Z(41)^0; +[ Z(41)^0, Z(41)^0, 0*Z(41), 0*Z(41) ] +gap> IsIsotropicVector(form,v); +true +gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> v1 := [1,0,0,0,0]*Z(8)^0; +[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> v2 := [0,1,0,0,0]*Z(8)^0; +[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> IsIsotropicVector(form,v1); +true +gap> IsIsotropicVector(form,v2); +true + +# doc/construct_basic.xml:687-708 +gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> v1 := [1,0,0,0,0]*Z(8)^0; +[ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> v2 := [0,1,0,0,0]*Z(8)^0; +[ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] +gap> IsSingularVector(form,v1); +false +gap> IsSingularVector(form,v2); +true +gap> IsIsotropicVector(form,v1); +true +gap> IsIsotropicVector(form,v2); +true + +# doc/construct_basic.xml:722-746 +gap> mat := [[1,0,0,0],[0,-1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^3, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat); +< bilinear form > +gap> sub:= [[Z(7)^0,0*Z(7),Z(7)^0,Z(7)],[0*Z(7),Z(7)^0,Z(7)^0,Z(7)^4]]; +[ [ Z(7)^0, 0*Z(7), Z(7)^0, Z(7) ], [ 0*Z(7), Z(7)^0, Z(7)^0, Z(7)^4 ] ] +gap> IsTotallyIsotropicSubspace(form,sub); +true +gap> mat := IdentityMat(6,GF(2)); +[ , , + , , + , ] +gap> form := HermitianFormByMatrix(mat,GF(4)); +< hermitian form > +gap> sub := [[Z(2)^0,0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2)^0], +> [0*Z(2),Z(2)^0,0*Z(2),Z(2^2)^2,Z(2^2),Z(2)^0], +> [0*Z(2),0*Z(2),Z(2)^0,Z(2)^0,Z(2^2),Z(2^2)^2]]; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2)^0 ], + [ 0*Z(2), Z(2)^0, 0*Z(2), Z(2^2)^2, Z(2^2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), Z(2)^0, Z(2)^0, Z(2^2), Z(2^2)^2 ] ] +gap> IsTotallyIsotropicSubspace(form,sub); +true + +# doc/construct_basic.xml:760-775 +gap> mat := [[1,0,0,0,0],[0,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0],[0,0,0,0,0]]*Z(8)^0; +[ [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := QuadraticFormByMatrix(mat); +< quadratic form > +gap> sub := [[Z(2)^0,0*Z(2),Z(2^3)^6,Z(2^3),Z(2^3)^3], +> [0*Z(2),Z(2)^0,Z(2^3)^6,Z(2^3)^2,Z(2^3)]]; +[ [ Z(2)^0, 0*Z(2), Z(2^3)^6, Z(2^3), Z(2^3)^3 ], + [ 0*Z(2), Z(2)^0, Z(2^3)^6, Z(2^3)^2, Z(2^3) ] ] +gap> IsTotallySingularSubspace(form,sub); +true + +# doc/construct_basic.xml:954-965 +gap> r := PolynomialRing( GF(8), 3 ); +GF(2^3)[x_1,x_2,x_3] +gap> poly := r.1^2 + r.2 * r.3; +x_1^2+x_2*x_3 +gap> form := QuadraticFormByPolynomial( poly, r ); +< quadratic form > +gap> r := RadicalOfForm( form ); + +gap> Dimension(r); +0 + +# doc/construct_basic.xml:977-987 +gap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; +gap> form := QuadraticFormByMatrix(mat,GF(8)); +< quadratic form > +gap> PolynomialOfForm(form); +Z(2^3)*x_1^2+x_2^2+Z(2^3)^5*x_2*x_3+x_4*x_5 + +# doc/construct_basic.xml:1008-1014 +gap> gram := InvariantQuadraticForm(GO(-1,4,5))!.matrix;; +gap> qform := QuadraticFormByMatrix(gram, GF(5)); +< quadratic form > +gap> DiscriminantOfForm( qform ); +"nonsquare" + +# doc/construct_basic.xml:1043-1056 +gap> group := GO(-1,4,4); +GO(-1,4,4) +gap> pres_forms := PreservedForms(group); +[ < quadratic form > ] +gap> group := GO(1,6,9); +GO(+1,6,9) +gap> pres_forms := PreservedForms(group); +[ < quadratic form > ] +gap> group := SU(4,16); +SU(4,16) +gap> pres_forms := PreservedForms(group); +[ < hermitian form > ] + +# doc/construct_basic.xml:1060-1084 +gap> gens := [ +> [ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], +> [ 0*Z(5), 0*Z(5), Z(5)^3, Z(5^2)^21 ], +> [ 0*Z(5), Z(5), Z(5), Z(5^2)^3 ], +> [ 0*Z(5), Z(5^2)^21, Z(5^2)^15, Z(5)^2 ] ], +> [ [ Z(5)^3, Z(5^2)^7, Z(5^2)^16, Z(5^2)^15 ], +> [ 0*Z(5), Z(5)^0, Z(5^2)^4, Z(5)^3 ], +> [ Z(5^2)^22, Z(5^2)^10, Z(5^2)^21, Z(5)^2 ], +> [ Z(5^2)^7, Z(5^2)^23, Z(5^2)^9, Z(5^2)^11 ] ], +> [ [ 0*Z(5), Z(5^2), 0*Z(5), 0*Z(5) ], +> [ Z(5^2)^5, 0*Z(5), 0*Z(5), 0*Z(5) ], +> [ 0*Z(5), 0*Z(5), Z(5)^0, Z(5^2)^4 ], +> [ 0*Z(5), 0*Z(5), Z(5^2)^20, Z(5)^2 ] ] ];; +gap> group := Group(gens); + +gap> PreservedForms(group); +[ < quadratic form > ] +gap> PreservedForms(group); +[ < quadratic form > ] +gap> PreservedForms(group); +[ < quadratic form > ] +gap> PreservedForms(group); +[ < quadratic form > ] + +# doc/construct_basic.xml:1098-1110 +gap> g := SU(4,3); +SU(4,3) +gap> forms := PreservedSesquilinearForms(g); +[ < hermitian form > ] +gap> Display( forms[1] ); +Hermitian form +Gram Matrix: + . . . 2 + . . 2 . + . 2 . . + 2 . . . + +# doc/construct_basic.xml:1116-1139 +gap> a := [ [ -1, 0, 0, -1, 0, 1 ], [ 0, -1, -1, 0, 0, 1 ], +> [ -1, 0, 0, 1, 0, 0 ], [ 0, -1, 1, 0, 0, -1 ], +> [ 0, 0, 0, 0, 0, -1 ], [ 0, -1, -1, 1, 1, 1 ] ] * One(GF(3));; +gap> b := [ [ 1, -1, 1, -1, 1, -1 ], [ 1, 1, -1, 1, 1, 0 ], +> [ -1, 0, 1, 0, 0, 0 ], [ 0, -1, 0, 0, 0, 1 ], +> [ 1, 1, 1, 1, 1, 1 ], [ -1, 1, 1, 1, -1, 0 ] ] * One(GF(3));; +gap> g := Group( a, b ); + +gap> forms := PreservedSesquilinearForms( g ); +[ < bilinear form > ] +gap> Display( forms[1] ); +Bilinear form +Gram Matrix: + . 1 . . . . + 1 . . . . . + . . . 1 . . + . . 1 . . . + . . . . . 1 + . . . . 1 . +gap> m := GModuleByMats( [a,b], GF(3) );; +gap> usemeataxe := MTX.InvariantBilinearForm(m); +fail + +# doc/construct_basic.xml:1153-1162 +gap> group := GO(-1,4,8); +GO(-1,4,8) +gap> pres_forms := PreservedQuadraticForms(group); +[ < quadratic form > ] +gap> group := GO(1,6,9); +GO(+1,6,9) +gap> pres_forms := PreservedQuadraticForms(group); +[ < quadratic form > ] + +# doc/construct_basic.xml:1176-1196 +gap> mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7) ] ] +gap> form1 := BilinearFormByMatrix(mat,GF(7)); +< trivial form > +gap> form2 := QuadraticFormByMatrix(mat,GF(7)); +< trivial form > +gap> form1 = form2; +true +gap> IsQuadraticForm(form1); +false +gap> IsSesquilinearForm(form1); +false +gap> mat := [[0,0],[0,0]]*Z(4)^0; +[ [ 0*Z(2), 0*Z(2) ], [ 0*Z(2), 0*Z(2) ] ] +gap> form3 := BilinearFormByMatrix(mat,GF(4)); +< trivial form > +gap> form3 = form1; +false + +# doc/construct_basic.xml:1204-1217 +gap> +gap> mat := [[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(3)^0; +[ [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ] ] +gap> form := BilinearFormByMatrix(mat,GF(3)); +< trivial form > +gap> v := Random(GF(3)^4); +[ Z(3), Z(3), 0*Z(3), Z(3) ] +gap> [v,v]^form; +0*Z(3) +gap> v^form; +0*Z(3) + +# doc/construct_basic.xml:1222-1251 +gap> mat := [[0,0,0],[0,0,0],[0,0,0]]*Z(11)^0; +[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], + [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] +gap> form := QuadraticFormByMatrix(mat,GF(121)); +< trivial form > +gap> IsReflexiveForm(form); +true +gap> IsAlternatingForm(form); +true +gap> IsSymmetricForm(form); +true +gap> IsOrthogonalForm(form); +false +gap> IsPseudoForm(form); +false +gap> IsSymplecticForm(form); +true +gap> IsDegenerateForm(form); +true +gap> IsSingularForm(form); +true +gap> BaseField(form); +GF(11^2) +gap> GramMatrix(form); +[ [ 0*Z(11), 0*Z(11), 0*Z(11) ], [ 0*Z(11), 0*Z(11), 0*Z(11) ], + [ 0*Z(11), 0*Z(11), 0*Z(11) ] ] +gap> RadicalOfForm(form); + + +# +gap> STOP_TEST("forms03.tst", 1 ); diff --git a/tst/forms04.tst b/tst/forms04.tst new file mode 100644 index 0000000..34226d8 --- /dev/null +++ b/tst/forms04.tst @@ -0,0 +1,208 @@ +# Forms, chapter 5 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. +# +gap> START_TEST( "forms04.tst"); + +# doc/morphisms.xml:600-620 +gap> gf := GF(3); +GF(3) +gap> gram := [ +> [0,0,0,1,0,0], +> [0,0,0,0,1,0], +> [0,0,0,0,0,1], +> [-1,0,0,0,0,0], +> [0,-1,0,0,0,0], +> [0,0,-1,0,0,0]] * One(gf);; +gap> form := BilinearFormByMatrix( gram, gf ); +< bilinear form > +gap> b := BaseChangeToCanonical( form );; +gap> Display( b * gram * TransposedMat(b) ); + . 1 . . . . + 2 . . . . . + . . . 1 . . + . . 2 . . . + . . . . . 1 + . . . . 2 . + +# doc/morphisms.xml:632-659 +gap> gl:=GL(3,3); +GL(3,3) +gap> go:=GO(3,3); +GO(0,3,3) +gap> form := PreservedSesquilinearForms(go)[1]; +< bilinear form > +gap> gram := GramMatrix( form ); +[ [ 0*Z(3), Z(3), 0*Z(3) ], [ Z(3), 0*Z(3), 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> b := BaseChangeToCanonical(form);; +gap> hom := BaseChangeHomomorphism(b, GF(3)); +^[ [ 0*Z(3), Z(3)^0, 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], + [ Z(3)^0, Z(3), 0*Z(3) ] ] +gap> newgo := Image(hom, go); +Group( +[ + [ [ Z(3)^0, Z(3)^0, 0*Z(3) ], [ 0*Z(3), Z(3), 0*Z(3) ], + [ Z(3), Z(3)^0, Z(3) ] ], + [ [ Z(3)^0, Z(3), 0*Z(3) ], [ Z(3), Z(3), Z(3)^0 ], + [ 0*Z(3), Z(3)^0, 0*Z(3) ] ] ]) +gap> gens := GeneratorsOfGroup(newgo);; +gap> canonical := b * gram * TransposedMat(b); +[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), 0*Z(3), Z(3) ], + [ 0*Z(3), Z(3), 0*Z(3) ] ] +gap> ForAll(gens, y -> y * canonical * TransposedMat(y) = canonical); +true + +# doc/morphisms.xml:673-702 +gap> mat := [ [ Z(8) , 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), Z(2)^0, Z(2^3)^5, 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], +> [ 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2), 0*Z(2) ] ];; +gap> form := QuadraticFormByMatrix(mat,GF(8)); +< quadratic form > +gap> iso := IsometricCanonicalForm(form); +< parabolic quadratic form > +gap> Display(form); +Parabolic quadratic form +Gram Matrix: +z = Z(8) + z^1 . . . . + . 1 z^5 . . + . . . . . + . . . . 1 + . . . . . +Witt Index: 2 +gap> Display(iso); +Parabolic quadratic form +Gram Matrix: + 1 . . . . + . . 1 . . + . . . . . + . . . . 1 + . . . . . +Witt Index: 2 + +# doc/morphisms.xml:719-736 +gap> gram := [ [ 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], +> [ Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3), 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0 ], +> [ 0*Z(3), 0*Z(3), 0*Z(3), 0*Z(3), Z(3)^0, 0*Z(3) ] ];; +gap> form := BilinearFormByMatrix( gram, GF(3) ); +< bilinear form > +gap> m := [ [ Z(3)^0, Z(3)^0, Z(3), 0*Z(3), Z(3)^0, Z(3) ], +> [ Z(3), Z(3), Z(3)^0, 0*Z(3), Z(3)^0, Z(3) ], +> [ 0*Z(3), Z(3), 0*Z(3), Z(3), 0*Z(3), 0*Z(3) ], +> [ 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3), Z(3) ], +> [ Z(3)^0, Z(3)^0, Z(3), Z(3), Z(3)^0, Z(3)^0 ], +> [ Z(3)^0, 0*Z(3), Z(3), Z(3)^0, Z(3), Z(3) ] ];; +gap> ScalarOfSimilarity( m, form ); +Z(3) + +# doc/morphisms.xml:749-786 +gap> mat := [[0,0,1,0,0],[0,0,0,0,0],[-1,0,0,0,0],[0,0,0,0,0],[0,0,0,0,0]]*Z(7)^0; +[ [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ Z(7)^3, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat,GF(7)); +< bilinear form > +gap> WittIndex(form); +1 +gap> RadicalOfForm(form); + +gap> Dimension(last); +3 +gap> mat := IdentityMat(6,GF(5)); +[ [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0, 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^0 ] ] +gap> form := QuadraticFormByMatrix(mat,GF(5)); +< quadratic form > +gap> WittIndex(form); +3 +gap> mat := IdentityMat(6,GF(7)); +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ] ] +gap> form := QuadraticFormByMatrix(mat,GF(7)); +< quadratic form > +gap> WittIndex(form); +2 + +# doc/morphisms.xml:859-917 +gap> mat := [[0,0,0,-1],[0,0,3,0],[0,-3,0,0],[1,0,0,0]]*Z(25)^0; +[ [ 0*Z(5), 0*Z(5), 0*Z(5), Z(5)^2 ], [ 0*Z(5), 0*Z(5), Z(5)^3, 0*Z(5) ], + [ 0*Z(5), Z(5), 0*Z(5), 0*Z(5) ], [ Z(5)^0, 0*Z(5), 0*Z(5), 0*Z(5) ] ] +gap> form := BilinearFormByMatrix(mat,GF(25)); +< bilinear form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +0 +gap> mat := IdentityMat(3,GF(7)); +[ [ Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7) ], + [ 0*Z(7), 0*Z(7), Z(7)^0 ] ] +gap> form := QuadraticFormByMatrix(mat,GF(7)); +< quadratic form > +gap> IsSingularForm(form); +false +gap> TypeOfForm(form); +0 +gap> mat := [[0,1,0,0],[-1,0,0,0],[0,0,0,0],[0,0,0,0]]*Z(5)^0; +[ [ 0*Z(5), Z(5)^0, 0*Z(5), 0*Z(5) ], [ Z(5)^2, 0*Z(5), 0*Z(5), 0*Z(5) ], + [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ], [ 0*Z(5), 0*Z(5), 0*Z(5), 0*Z(5) ] ] +gap> form := BilinearFormByMatrix(mat,GF(5)); +< bilinear form > +gap> IsDegenerateForm(form); +true +gap> TypeOfForm(form); +0 +gap> mat := [[1,0,0,0],[0,1,0,0],[0,0,0,1],[0,0,1,0]]*Z(7)^0; +[ [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7) ], [ 0*Z(7), Z(7)^0, 0*Z(7), 0*Z(7) ], + [ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^0 ], [ 0*Z(7), 0*Z(7), Z(7)^0, 0*Z(7) ] ] +gap> form := BilinearFormByMatrix(mat,GF(7)); +< bilinear form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +-1 +gap> mat := IdentityMat(3,GF(9)); +[ [ Z(3)^0, 0*Z(3), 0*Z(3) ], [ 0*Z(3), Z(3)^0, 0*Z(3) ], + [ 0*Z(3), 0*Z(3), Z(3)^0 ] ] +gap> form := HermitianFormByMatrix(mat,GF(9)); +< hermitian form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +-1/2 +gap> mat := [[0,0,0,1],[0,1,0,0],[0,0,1,0],[1,0,0,0]]*Z(8)^0; +[ [ 0*Z(2), 0*Z(2), 0*Z(2), Z(2)^0 ], [ 0*Z(2), Z(2)^0, 0*Z(2), 0*Z(2) ], + [ 0*Z(2), 0*Z(2), Z(2)^0, 0*Z(2) ], [ Z(2)^0, 0*Z(2), 0*Z(2), 0*Z(2) ] ] +gap> form := BilinearFormByMatrix(mat,GF(8)); +< bilinear form > +gap> IsDegenerateForm(form); +false +gap> TypeOfForm(form); +Error, is a pseudo form and has no defined type called from +( ) + called from read-eval loop at line 30 of *stdin* +you can 'return;' to continue + +# +gap> STOP_TEST("forms04.tst", 1 ); From 4c9794ec3f3be975e564d26d4263076f7bcaaec7 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 19 May 2021 10:33:04 +0200 Subject: [PATCH 4/4] Add changesources.g script for updating manual examples --- changesources.g | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 changesources.g diff --git a/changesources.g b/changesources.g new file mode 100644 index 0000000..5baedf7 --- /dev/null +++ b/changesources.g @@ -0,0 +1,7 @@ +# Update the examples in the manual to match the output of the GAP +# version used to process this file +example_tree := ExtractExamples( Directory("./doc/"), "forms.xml",[], 500);; +RunExamples(example_tree, rec( + changeSources:=true, + width := 80, +));