Skip to content

Commit 83eb172

Browse files
committed
added test
1 parent ad31c2d commit 83eb172

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

lib/formspace.gi

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -261,19 +261,10 @@ FORMS_FilterBilinearForms := function(Forms, F, n)
261261
symmetric_base_vecs := BasisVectors(ImmutableBasis(symmetric_base));
262262
symplectic_base_vecs := BasisVectors(ImmutableBasis(symplectic_base));
263263

264-
# for mat in symmetric_base_vecs do
265-
# ConvertToMatrixRep(mat, F);
266-
# od;
267-
268-
# for mat in symplectic_base_vecs do
269-
# ConvertToMatrixRep(mat, F);
270-
# od;
271-
272264
if Size(symmetric_base_vecs) + Size(symplectic_base_vecs) <> Size(Forms) then
273265
Error("This should not have happend!! there are supposedly ", Size(symmetric_base_vecs), " linearly independent symmetric forms and ", Size(symplectic_base_vecs), " linearly independent symplectic forms, yet the dimension of the formspace is ", Size(Forms), "\n");
274266
fi;
275267
return [symmetric_base_vecs, symplectic_base_vecs];
276-
277268
fi;
278269
# TODO: ignore the diagonal entries for the symmetric matrices, for symplectic these need to be zero.
279270
# TODO: solve this in some efficient way that does not formulate this by solving sets of linear equations of matrices. Instead it would be better to gradually consider entries of the matrices. Then use some heuristic to determine we are done and just check wether the resulting matrices are infact symmetric. this should be faster because now worst case we are solving a system of linear equations that consists of n^2 equations and Size(Forms) indeterminates.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
gap> START_TEST("Formspace: Filter Bilinear Forms"); # todo test char 2
2+
gap> F := GF(5^2);;
3+
gap> Forms := [[[0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0]]*One(GF(5)), [[0, 0, 0, 1], [0, 0, 1, 0], [0, 0, 0, 0], [0, 0, 0, 0]]*One(GF(5))];; # This should give a symmetric form and a syplectic form
4+
gap> L := FORMS_FilterBilinearForms(Forms, F, 4);;
5+
gap> Size(L);
6+
2
7+
gap> Size(L[1]);
8+
1
9+
gap> Size(L[2]);
10+
1
11+
gap> FORMS_IsSymmetricMatrix(L[1][1]);
12+
true
13+
gap> FORMS_IsSymplecticMatrix(L[2][1], GF(5^2));
14+
true
15+
gap> STOP_TEST("Formspace: Filter Bilinear Forms");

0 commit comments

Comments
 (0)