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

Added Documentation for DecomPoly and NormalizerViaRadical #2360

Merged
merged 2 commits into from
Apr 17, 2018

Conversation

hulpke
Copy link
Contributor

@hulpke hulpke commented Apr 13, 2018

Apart from a minor syntax change, this PR installs DecomPoly and NormalizerViaRadical as proper functions and adds basic documentation.

This comes as a PR, since git told me I had to do a PR and could not just push the changes.

@hulpke hulpke requested a review from fingolfin April 13, 2018 14:30
@codecov
Copy link

codecov bot commented Apr 13, 2018

Codecov Report

Merging #2360 into master will increase coverage by 0.21%.
The diff coverage is 87.5%.

@@            Coverage Diff             @@
##           master    #2360      +/-   ##
==========================================
+ Coverage   73.21%   73.42%   +0.21%     
==========================================
  Files         482      482              
  Lines      246200   246196       -4     
==========================================
+ Hits       180251   180778     +527     
+ Misses      65949    65418     -531
Impacted Files Coverage Δ
lib/norad.gi 44.67% <ø> (+44.67%) ⬆️
lib/algfld.gi 45.16% <87.5%> (+15.23%) ⬆️
lib/ratfunul.gi 74.64% <0%> (+0.15%) ⬆️
lib/arith.gi 63.46% <0%> (+0.64%) ⬆️
lib/fitfree.gi 55.78% <0%> (+4.13%) ⬆️

@fingolfin
Copy link
Member

We disabled direct pushes to master months ago; all changes have to go through review (and automatic testing).

lib/algfld.gd Outdated
## called an ideal decomposition. In the context of field
## extensions, if <M>\alpha</M> is a root of <M>f</M> in a suitable extension
## and <M>Q</M> the field of rational numbers, such a decomposition corresponds
## to (proper) subfields <M>Q\lt Q(\beta)\lt Q(\alpha)</M>, where <M>g</M> is the
Copy link
Member

Choose a reason for hiding this comment

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

"such a decomposition" vs. "subfields" -- shouldn't either both be in plural, or both be in singular?
I guess technically you can argue that of course Q and Q(\alpha) are also subfields of Q(\alpha), but I still find this mildly irritating to read... But really only mildly, I think I got the gist, thanks :-)

## decomposition exists). If the option <A>onlyone</A> is given it returns at
## most one such decomposition (and performs faster).
## <Example><![CDATA[
## gap> x:=X(Rationals,"x");;pol:=x^8-24*x^6+144*x^4-288*x^2+144;;
Copy link
Member

Choose a reason for hiding this comment

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

Offtopic: the reference manual says this on X:

X is simply a synonym for Indeterminate. However, we do not recommend to use this synonym which is supported only for the backwards compatibility.

Now, don't get me wrong, I am not suggesting you should change the examples; rather, I always use X myself, so I am wondering if this last sentence in the manual should just be deleted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. (At the time when this was written there was a push to make X obsolete as operation.)

lib/algfld.gd Outdated
@@ -188,3 +188,45 @@ DeclareGlobalFunction("AlgExtEmbeddedPol");

DeclareGlobalFunction("AlgExtSquareHensel");

#############################################################################
##
#F DecomPoly( <f> [:"onlyone"] ) finds ideal decompositions of rational f
Copy link
Member

Choose a reason for hiding this comment

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

Open question: should the name of this function stay DecomPoly? Wouldn't e.g. DecompositionsOfPolynomial more "GAPish"? I don't mind much either way, but once we document the name, we are more or less stuck with it, so I just want this to be a conscious decision.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we want to change it, then IdealDecompositionsOfPolynomial would be the longish name.

Copy link
Member

Choose a reason for hiding this comment

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

If we document it, I'd kind of prefer the longish name (a shorter alias can still be added). That said, I don't terribly mind if you greatly prefer the shorter name.

lib/algfld.gd Outdated
## [ [ x^2+72*x+144, x^6-20*x^4+60*x^2-36 ] ]
## ]]></Example>
## In this example the given polynomial is regular with Galois group
## <M>Q_8</M>, thus exposing the four proper subfields.
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand the last part of this sentence. How does the fact that the Galois group is Q_8 "expose" the four proper subfields?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Q8 is the only group of order 8 with four proper subgroups.

Copy link
Member

Choose a reason for hiding this comment

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

With that hint, I see what you are getting at, but I still don't see how that sentence possibly could convey it... How about this formulation instead:

In this example the given polynomial is regular with Galois group Q_8, which has exactly four proper subgroups, and hence four proper subfields, which are exposed by the decompositions we obtained.

## gap> g:=TransitiveGroup(30,2030);;
## gap> s:=SylowSubgroup(g,5);;
## gap> Size(NormalizerViaRadical(g,s));
## 28800
Copy link
Member

Choose a reason for hiding this comment

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

Sounds good to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This example of course is slower than the backtrack Normalizer. I have yet to find an example that is while being short enough for the manual.

Copy link
Member

Choose a reason for hiding this comment

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

That's OK, I think (though we might want to mention that the given example is not actually one where NormalizerViaRadical is faster?)

Copy link
Contributor

Choose a reason for hiding this comment

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

The function thus provided as a
there is an is missing here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a line about example and inserted is.

@ssiccha
Copy link
Contributor

ssiccha commented Apr 15, 2018

Just a general question: Is there any rough complexity estimate known for that algorithm @hulpke?

@fingolfin fingolfin added topic: documentation Issues and PRs related to documentation topic: library labels Apr 16, 2018
@fingolfin fingolfin added this to the GAP 4.10.0 milestone Apr 16, 2018
@hulpke
Copy link
Contributor Author

hulpke commented Apr 17, 2018

@ssiccha
The worst case cost (regular Galois group 2^n) is exponential in the input, as the output is.

As for best complexity there is a paper by Klüners, van Hoeij and Belabas (I think) that presents a better method (that is harder to implement).

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.

Other than a typo, this looks good. Ideally, fix that typo, then push again, then we can merge this. Thanks!

lib/grp.gd Outdated
## non-automated tool for advanced users.
## <Example><![CDATA[
## gap> g:=TransitiveGroup(30,2030);;
## gap> s:=SylowSubgroup(g,5);;
## gap> Size(NormalizerViaRadical(g,s));
## 28800
## ]]></Example>
## Note that this example only demonstartes usage, but that in this case
Copy link
Member

Choose a reason for hiding this comment

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

Typo: demonstartes -> demonstrates

@fingolfin fingolfin merged commit 8ff53d6 into gap-system:master Apr 17, 2018
@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Sep 20, 2018
@olexandr-konovalov
Copy link
Member

This is not what the title says. This results in new IdealDecompositionsOfPolynomial being documented, but not DecomPoly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: added PRs introducing changes that have since been mentioned in the release notes topic: documentation Issues and PRs related to documentation topic: library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants