-
Notifications
You must be signed in to change notification settings - Fork 161
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
New 'AlgebraicExtensionNC' operation. #1665
New 'AlgebraicExtensionNC' operation. #1665
Conversation
- provides a variant of 'AlgebraicExtension' that does not check the input polynomial for irreducibility - documents the new operation - also document the optional argument of a string for printing the generator of the extension - added a test file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me apart from some minor formatting suggestions (which you might, or might not want to use).
[IsField,IsUnivariatePolynomial],0,DoAlgebraicExt); | ||
[IsField,IsUnivariatePolynomial],0, | ||
function(k,f) return DoAlgebraicExt(k,f,true); | ||
end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could use {k,f} -> DoAlgebraicExt(k,f,true)
here, which is slightly more concise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm aware of this new syntax. But I prefer to have code which is also readable with older GAP versions which I'm still using.
InstallMethod(AlgebraicExtensionNC,"generic",true, | ||
[IsField,IsUnivariatePolynomial],0, | ||
function(k,f) return DoAlgebraicExt(k,f,false); | ||
end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
[IsField,IsUnivariatePolynomial,IsString],0, | ||
function(k,f,nam) return DoAlgebraicExt(k,f,nam,true); | ||
end); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{k,f,nam} -> DoAlgebraicExt(k,f,nam,true)
|
||
RedispatchOnCondition(AlgebraicExtension,true,[IsField,IsRationalFunction], | ||
[IsField,IsUnivariatePolynomial],0); | ||
|
||
RedispatchOnCondition(AlgebraicExtensionNC,true,[IsField,IsRationalFunction], | ||
[IsField,IsUnivariatePolynomial],0); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you format this in the same way as below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know what you mean here. I have just copied the existing lines and added the NC
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean I like it better if it's formatted like this for reasons of line lengths (as it is done in lines 243 ff for AlgebraicExtension(NC))
RedispatchOnCondition(AlgebraicExtensionNC,true,
[IsField,IsRationalFunction],
[IsField,IsUnivariatePolynomial],0);
the input polynomial for irreducibility
generator of the extension