Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The functions GO, GU, Omega, SO, SU, and Sp now allow to specify an invariant form for the group in question; the methods that do the work are provided by the Forms package #4489

Merged

Conversation

ThomasBreuer
Copy link
Contributor

@ThomasBreuer ThomasBreuer commented May 12, 2021

Text for release notes

The documentation and the code of the functions GO, GU, Omega, SO, SU, and Sp have been extended such that one can specify an invariant form for the group in question. The methods that do the work will be provided via the Forms package.

(End of text for release notes)

See gap-packages/forms/pull/4 for the proposed corresponding changes in the Forms package.
The pull request is intended to resolve issue #500.

The documentation and the code of the functions `GO`, `GU`, `Omega`, `SO`, `SU`, `Sp` have been extended such that the Forms package can provide the additional methods for the new feature.
@ThomasBreuer ThomasBreuer added kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements topic: library release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels May 12, 2021
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.

Thanks for working on this, I like the direction, but have some suggestions / nitpicks

grp/classic.gd Outdated
if Length( arg ) = 1 then
# form (matrix, form object, or group with stored form)
return GeneralOrthogonalGroupCons( IsMatrixGroup, arg[1] );
elif Length( arg ) = 2 and IsInt( arg[1] ) then
Copy link
Member

Choose a reason for hiding this comment

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

Any reason why "final argument is ring or integer" is not checked here, but is checked in the three argument case below?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My aim is to add new variants of arguments. For that, I have to perform enough tests to distinguish the possible cases, and I have tried not to introduce more tests. (In the original code for the two-argument case, none of the argument types is checked.)
It was not my aim to clean the available code.

grp/classic.gd Outdated Show resolved Hide resolved
grp/classic.gd Outdated Show resolved Hide resolved
grp/classic.gd Outdated Show resolved Hide resolved
grp/classic.gd Outdated
return GeneralOrthogonalGroupCons( IsMatrixGroup,arg[1],arg[2],arg[3] );
elif Length( arg ) = 3 and IsInt(arg[1]) and
(IsInt(arg[2]) or IsRing(arg[2])) and
Copy link
Member

Choose a reason for hiding this comment

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

Actually, it seems the possibility to pass in a ring is undocumented for GO, SO, etc. (however, it is documented for GL and SL). That seems like an oversight to me, perhaps we should also fix that (not necessarily in this PR, of course).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure whether this was an oversight.
For GL, SL, and Sp, we have also methods for constructing the group in question over a residue class ring of the integers, but finite fields are the only supported rings for the orthogonal groups.

It would not be a problem to admit also GO( 3, GF(5) ), etc.; the documentation should then state that currently only finite fields are supported, analogous to GL, SL, and Sp.

Copy link
Member

Choose a reason for hiding this comment

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

We already admit GO(3,GF(5)), it just is undocumented

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Perhaps the word "admit" was not a good choice.
I wrote in a commit message:

Concerning the possibility to enter GF(q) instead of q (or more generally a ring) as an argument:
This was already documented and supported for Sp, and supported but not documented for GO and SO.
Now it will be supported but not documented also for Omega.
(For GU and SU, supporting GF(q) (or GF(q^2)?) would be asking for trouble:
The GAP library uses q where the Forms package expects GF(q^2).)

@@ -193,13 +192,17 @@ DeclareConstructor( "GeneralOrthogonalGroupCons",

#############################################################################
##
#F GeneralOrthogonalGroup( [<filt>, ][<e>, ]<d>, <q> ) . gen. orthog. group
#F GO( [<filt>, ][<e>, ]<d>, <q> )
#F GeneralOrthogonalGroup( [<filt>, ][<e>, ]<d>, <q>[, <form>] )
Copy link
Member

Choose a reason for hiding this comment

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

But doesn't the form already imply the value for d and e? If we accept all three, how are they supposed to interact / be sanity checked?

I guess only the base field would perhaps we in need of overriding (i.e., it seems reasonably to say: "use this form given over GF(2) but create a group over GF(8)").

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My idea was the following:
One can write GO( 3, 5, form ) in order to express that one wants the group in question, with the given form as an additional requirement. One can also write GO( form ) (which is also a documented variant), if one wants to express that the given form determines the other parameters.
In code examples, I would probably prefer the former variant.

Copy link
Member

Choose a reason for hiding this comment

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

But if the former is done, shouldn't we then also check that the form matches the given values for d and q? Or do we expect all installed methods to re-implement that check?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The GAP library does not know about form objects, and the code dealing with this argument belongs to the Forms package.
We could check some conditions about a matrix or a group with stored form in the global functions in the GAP library, but only the code in the Forms package can decide whether the given argument makes sense.

grp/classic.gd Show resolved Hide resolved
- rewrote/simplified the global functions `GO`, `GU`, `SO`, `SU` as suggested
  (introduced auxiliary functions `DescribesInvariantQuadraticForm`, etc.);
  now the argument checks are more uniform

- concerning the possibility to enter `GF(q)` instead of `q`
  (or more generally a ring) as an argument:
  This was already documented and supported for `Sp`,
  and supported but not documented for `GO` and `SO`.
  Now it will be supported but not documented also for `Omega`.
  (For `GU` and `SU`, supporting `GF(q)` (or `GF(q^2)`?) would be
  asking for trouble:
  The GAP library uses `q` where the Forms package expects `GF(q^2)`.)

- fixed the `IsPermGroup` constructor for `OmegaCons`
  (strange, there were even tests for the error messages
  that were caused by the wrong installation)

- added/changed a few manual examples for `GU`, `SU`, etc.

- adjusted some error messages in the test files
about the parameters [e, ], d, q in the case that a form is
prescribed in GO, GU, Omega, SO, Sp, SU:
They can be omitted, and one gets an error message if they are given
and contradict the given form.
@fingolfin fingolfin closed this Jul 29, 2021
@fingolfin fingolfin reopened this Jul 29, 2021
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.

There was a new release of the forms package today (version 1.2.6). So let's move forward with this PR. As far as I understand, we can merge it now, independent of forms, right?

I'll wait with merging for (a) the CI tests which I just restarted by closing and reopening this PR, and (b) for @ThomasBreuer to comment if this PR is ready from his perspective

@ThomasBreuer
Copy link
Contributor Author

@fingolfin This pull requests depends on the new version of the Forms package in the sense that the documentation of the GAP functions in question promises that certain functionality is available if the Forms package is available.
If it is sure that the next released version of GAP will contain at least Forms 1.2.6 then we can merge the pull request.
Formally, it would be perhaps the safest to state explicitly in the abovementioned documentation that Forms >= 1.2.6 is needed for the promised functionality; shall I adjust the pull request this way?

@fingolfin
Copy link
Member

Yes, please update the PR accordingly

that is needed in order to get the new feature
@ThomasBreuer
Copy link
Contributor Author

@fingolfin O.k.; I have updated the PR, the tests have passed, I will merge the PR.

@ThomasBreuer ThomasBreuer merged commit 53ee4a3 into gap-system:master Jul 30, 2021
@ThomasBreuer ThomasBreuer deleted the TB_support_form_as_argument branch July 30, 2021 07:13
@fingolfin fingolfin changed the title admit specifying a form for classical groups The functions GO, GU, Omega, SO, SU, and Sp now allow to specify an invariant form for the group in question; the methods that do the work are provided by the Forms package Aug 17, 2022
@fingolfin fingolfin added release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Label for issues suggesting enhancements; and for pull requests implementing enhancements release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants