Skip to content

Conversation

@GalaxyCo
Copy link

Formspace

grafik

In the above definition g* in G is understood to be g* := TransposedMat(g) or g* := TransposedMat(g)^hom where hom is a field automorphism of order two.

For these functions to work, the package nofoma by M. Geck needs to be loaded. This provides the function FrobeniusNormalForm which is used to compute the Frobenius Normal Form, since the function RationalCanonicalFormTransform provided by gap is too slow.

I added a function PreservedFormspace(G, Lambda, unitary) which computes a basis of the formspace of the group G with respect to the scalars given by Lambda. The boolean unitary decides which definition of g* is used. Namely, if unitary is false we take hom to be the identity, otherwise we try to use a field automorphism of order two.

I have also added a function PreservedFormspace(G) which assumes all scalars Lambda to equal one and computes the formspace both for unitary = false and unitary = true.

These functions always work (at least they should) no matter if G is irreducible or not.

Future Work

Limitations by Forms Package

Currently the Forms Package only allows bilinear forms with symplectic or symmetric Gram Matrix to be created. This restriction seems quite arbitrary and it would be nice to be able to use any form.

On Fixing PreservedForms(G)

Here I am talking about the issues 78, 39 and 22.

To use the PreservedFormspace() function to fix PreservedForms(G) the following is still missing:

  • We need some methods that 'filter' the computed forms space for symmetric, symplectic or hermitian matrices. For the case of the symmetric and symplectic forms this can be acomplished by solving a system of linear equations. (Or we ignore this and also return non symmetric bilinear forms and so on...?)
  • Somehow compute the scalars Lambda or use a subgroup of the commutator group. If we use the commutator group, we also need a function that then ensures that the found forms are also forms preserved by the original group G.

To use in recog

  • A function that given a supspace of the formspace, consisting of symmetric, symplectic or hermitian forms then tries to return a non-degenerate form.

Testing

To better test the function PreservedFormspace() some more examples would be nice namely

  • Groups that preserve forms with respect to some scalars that are not equal to one
  • Groups that preserve forms with respect to multiple, different non trivial sets of scalars

Ideas for optimization

Here are some ideas to further increase the speed of the PreservedFormspace() function.

  • In the polynomial evaulation of the Conditions Matrices, we get a factorization p(g) = S * C where S is invertible. However we only compute this matrix to then compute its Kernel ker(p(g)). So we might be able to save some time by computing ker(C) instead and applying S later.
  • In the function PreservedFormspace(G) we compute the Frobenius normal form of an element and reuse it, which leads to computing a^hom, b^hom for two matrices. However one could also compute only apply ^hom once and compute an extra Frobenius Normal Form and Invert a matrix. I am not sure what is cheaper.
  • Add some sort of heuristic that says after we have intersected k kernels, and the dimension stayed the same we might want to interrupt and just check if we have found all forms, instead of continuing the computation.

@GalaxyCo GalaxyCo changed the title Formspace Formspace (Work towards fixing Issues 78, 39, 22) Dec 11, 2025
@fingolfin
Copy link
Member

Hi @johnbamberg @jdebeule just some background: @GalaxyCo is a BSc student of @aniemeyer and did this work in this Bachelor's thesis. We are currently sitting in Aachen at our "recog days" workshop, and I asked Peter to submit this PR.

We'd like to discuss with you how best to go about this... While @GalaxyCo could also create a new package, it seemed sensible to me to just enhance the forms package. Perhaps you'd like to discuss this, though, we could have a Zoom call?

And of course feel free to ask questions

…tian matrices: TODO: The case of characteristic two is still open for hermitian matrices and probably very poorly implemented for symmetric matrices
Copy link
Member

@fingolfin fingolfin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a bunch of nitpicks and minor comments.

Comment on lines +308 to +309
symmetric_base := MutableBasis(F, [NullMat(n, n, F)]);
symplectic_base := MutableBasis(F, [NullMat(n, n, F)]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates an $n \times n$ matrix, which MutableBasis then has to reduce to determine that it should start with an empty basis. Better to start with an empty basis:

Suggested change
symmetric_base := MutableBasis(F, [NullMat(n, n, F)]);
symplectic_base := MutableBasis(F, [NullMat(n, n, F)]);
symmetric_base := MutableBasis(F, [], ZeroVector(F, n));
symplectic_base := MutableBasis(F, [], ZeroVector(F, n));

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried this change, however this resulted in issues when calling CloseMutableBasis (only tested this in the function that filters unitary forms)

lib/formspace.gi Outdated
CloseMutableBasis(symplectic_base, form - transposed_form);
od;

# this does not create compressed matrices, rather it returns lists consisting of compressed vectors... TODO: investigate how MutableBasis works on the inside, and maybe change it to use compressed matrices since they are faster to deal with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A basis consists of vector, and isn't a matrix, so I think semantically it is doing the right thing her.

If you want to turn it into a matrix afterwards, that's perfectly fine, but it should be done here, e.g. by calling ConvertToMatrixRep(list_of_vectors, F) or so

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Mutable Basis used here, is a basis of a matrix vector space. What i mean by this line is the question how these objects are used internally. Maybe a custom implementation that ensures that matrix objects are used can be faster.

i have now added some code that then tries to turn each basis vector into a matrix obj.

@GalaxyCo
Copy link
Author

It ist still open to change the FORMS_IsSymplecticMatrix and FORMS_IsSymmetricMatrix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants