Skip to content
New issue

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

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

Already on GitHub? # to your account

WIP: Classical groups. Express elements in LGO (nice) generators. #293

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

danielrademacher
Copy link
Collaborator

Include functions to express arbitrary elements in terms of LGO generators. We use the LGO generators as "nice" generators for the constructive recognition of classical groups.

@danielrademacher danielrademacher force-pushed the ClassicalGroupsExpressWordsInLGOGens branch from faa0ab0 to 893c388 Compare September 17, 2021 13:58
@danielrademacher danielrademacher changed the title Classical groups. Express elements in LGO (nice) generators. WIP: Classical groups. Express elements in LGO (nice) generators. Sep 17, 2021
@danielrademacher danielrademacher marked this pull request as draft September 17, 2021 14:48
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 am not keen on adding binaries like PDFs into this repository. There is also the copyright issue (I have not yet looked at them). Also .DS_Store files should not be in there (perhaps add those to a global .gitignore list, on Mac's they can otherwise creep in quite easily.

Comment on lines +31 to +32
Print("The element g is not an element of one of the classical groups in their natural representation. \n");
Print("Abort.");
Copy link
Member

Choose a reason for hiding this comment

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

Hmm, why not an error?

Suggested change
Print("The element g is not an element of one of the classical groups in their natural representation. \n");
Print("Abort.");
Error("The element g is not an element of one of the classical groups in their natural representation");

# Originally implemented subfunctions
####################

InfoBruhat := NewInfoClass("InfoBruhat");;
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
InfoBruhat := NewInfoClass("InfoBruhat");;
DeclareInfoClass("InfoBruhat");

As a general rule of thumb: a regular GAP file should never include double semicolons; if it does, something is wrong :-)

a := 0;
while res mod 2 = 0 do
a := a + 1;
res := Int(res*0.5);
Copy link
Member

Choose a reason for hiding this comment

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

Another rule of thumb: if you use floating point in GAp other than for printing some statistics, something is wrong.

Here, you should have used either

Suggested change
res := Int(res*0.5);
res := res / 2;

which works since you know res is divisible by 2; or in situations where you also want to divde odd numbers by 2 and round down, use QuoInt.

But actually, do neither, and instead replace that whole loop by a := PValuation(n-1, 2);.

Comment on lines +45 to +46
Error("LGOStandardGens: d has to be at least 6\n");
return;
Copy link
Member

Choose a reason for hiding this comment

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

Never end an Error message with newline. And don't follow it by areturn(the control flow ends here. Well, technically the user can try to edit values and resume execution, but then let them; doing areturnwill break that case. If you really want to prevent it, useErrorNoReturn`, although personally, I see no need for that).

Suggested change
Error("LGOStandardGens: d has to be at least 6\n");
return;
Error("LGOStandardGens: d has to be at least 6");

return __LGOStandardGensSOCircle(d,q);
fi;

Error("e has to be 1, -1 or 0.");
Copy link
Member

Choose a reason for hiding this comment

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

Also, don't end error messages with a period

Suggested change
Error("e has to be 1, -1 or 0.");
Error("e has to be 1, -1 or 0");

w := PrimitiveElement(fld);

s := IdentityMat( d, fld );
s[1][1] := Zero(fld);
Copy link
Member

Choose a reason for hiding this comment

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

Ideall use the new syntax for element access everywhere:

Suggested change
s[1][1] := Zero(fld);
s[1,1] := Zero(fld);

@danielrademacher danielrademacher force-pushed the ClassicalGroupsExpressWordsInLGOGens branch from 5c9ede7 to 1b638f6 Compare October 7, 2021 09:30
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants