PR or not PR?: @frankluebeck extensions - #15
Conversation
These files contains the function PositionConjugacyClass(G, x) for identifying the number of the G-conjugacy class of the element x in G. This uses a tree structure to compute class invariants until the class is determined, see ConjugacyClassInvariants(G). In this version only very basic invariants are used, e.g. cycle types for permutations, characteristic and minimal polynomial for matrices, and as fallback always conjugation tests against candidates. This could be enhanced with more functions that find other invariants.
The function PowerMapsOfAllClasses(G) computes efficiently all powermaps of all conjugacy classes of G using some orbit stabilizer algorithm, and reusing the information from classes already considered. There are also utility functions as applications: MaximalCyclics(G) RationalClassSets(G) InduceAllFromCyclicSubgroup(G, i) InducedFromAllMaximalCyclicSubgroups(G) PowerMapCharacters(G, n) SmallPowerMapCharacters(G)
NaturalCharacters(G) using given representation of G pPrimeCharacter(chi, p) pPrimeRestriction(chi, p) which use for primes p the decomposition of finite order group elements x = y z = z y into unique elements y of order p and z of order not divible by p
So far, the new code is just loaded when the package is loaded, but nothing is changed for InduceReduce.
Now we use the new functionality provided by the previous commits
in InduceReduce:
- substitute FindClass, PowMap and InduceCyc
- since it is pretty fast now, we make DoCyclicFirst the default
- afterwards we use natural characters and power map characters
- a general utility 'ImportGeneralizedCharacters' for importing
characters from other functions
- scalar products of generalized characters are speeded up
a bit by using chi(g^-1) instead of ComplexConjugate(chi(g))
(using the precomputed power map of -1)
- we now skip elementary subgroups where the p-subgroup is cyclic
(since then the whole elementary subgroup is cyclic)
MaximalNonCyclicElementarySubgroups(G) up to conjugacy
<x> x P is denoted [i,p] if x is in class i and P a Sylow-p
of the centralizer of x
InducedFromElementary(G, i, p[, "linear"/"nonlinear"])
induce irreducibles from elementary subgroup [i,p] (see above),
optionally only linear/nonlinear irreducibles
With this huge parts of the code in InduceRestrict.gi are no longer used. This avoids redundant elementary subgroups and the computation of the induced characters from an elementary subgroup is sometimes much faster. Large parts of the Unger record are no longer used.
|
Thanks. Comparing the timings from #5 (the comment from August 8), we get speedup for the simple groups among the examples considered there. Below are the analogous timings but with the code from the current branch. For small PC groups of order up to 100, we get no speedup. Larger simple groups are interesting from the viewpoint that Unger's algorithm is better than Dixon's algorithm. |
ThomasBreuer
left a comment
There was a problem hiding this comment.
Yes, parts of the code are of general interest.
I think the class identification would fit best into the GAP library. The Dixon-Schneider implementation uses already something similar, but the data are hidden inside the Dixon record, and cannot be used for other purposes.
The improvements for inducing from cyclic subgroups could replace existing GAP library code.
And the improved power map handling could also be unified with the corresponding parts of the Dixon-Schneider code.
| local r, funcs, tree, find; | ||
| if IsBound(G!.ConjugacyClassInvariants) then | ||
| return G!.ConjugacyClassInvariants; | ||
| fi; |
There was a problem hiding this comment.
So the idea is to create the value once, perhaps depending on individual args, to store the value (as for an attribute), and later return this stored value, independent of the args given then. This may lead to unexpected behaviour.
There was a problem hiding this comment.
I had not used an attribute here such that one can just remove this component and compute invariants with different arguments.
| GR.B:=GR.B-mat*I; | ||
| Append(GR.Ir,Set(I)); # add the new irreducible characters to I | ||
| GR.foundDim := Length(GR.Ir)+Length(GR.Gram); | ||
| GR.foundDet := DeterminantMat(GR.Gram); |
There was a problem hiding this comment.
In IrrUnger( SmallGroup( 1, 1 ) ), we get that GR.Gram is the empty list, and we get an error.
(In fact, we run into a similar error already a few lines earlier, in GR.B:=temp.transformation*GR.B, where temp.transformation is empty. This did not happen in the old code.)
| # for permutation groups: cycle structures on orbits of points | ||
| CCInvFuncs.CycStruct := function(r, tree) | ||
| local o, fu; | ||
| o := Orbits(r.G, MovedPoints(r.G)); |
There was a problem hiding this comment.
| o := Orbits(r.G, MovedPoints(r.G)); | |
| o := Orbits(r.G); |
(Then we compute this only once.)
| t := CharacterTable(G); | ||
| cls := ConjugacyClasses(G){IdentificationOfConjugacyClasses(t)}; | ||
| reps := List(cls, Representative); | ||
| orb := Orbits(G, MovedPoints(G)); |
There was a problem hiding this comment.
| orb := Orbits(G, MovedPoints(G)); | |
| orb := Orbits(G); |
| od; | ||
|
|
||
| # so far we have in res[i][k] the class of reps[i]^k, | ||
| # now we shift it to reps[i]^(k-1), so that the trivial class comes first |
There was a problem hiding this comment.
Just for curiosity: Why is this shifted data format better than the one without the shift?
There was a problem hiding this comment.
0-based allows accessing k-th power as l[k mod n + 1] while 1-based one needs extra code to handle k mod n = 0.
|
Probably we don't want to merge this pull request here. I have now also written code to substitute That code avoids calling To compare with the new package try: |
This pull request provides various additions and changes. See the not so short commit messages for more details.
Several functions are probably of more general interest and should be documented (not yet done).
In fact, much of the original code in
InduceRestrict.giis disabled and no longer needed.And it would be sensible and not much additional effort to substitute all of the original code completely by some simpler bookkeeping with hooks for interactive use.
So, the question is how to proceed? Would it be better to create a new package with this code (instead of substituting the whole content of the
InduceReducepackage)?There is a good speedup for all of the examples (and more) discussed here, but one major bottleneck in GAP remains the slow conjugacy testing. E.g., for G=PSL(3,17) computing all power maps now takes about 11 seconds on my machine and then computing all irreducible characters takes another 11 seconds.
I have some more ideas for changes, but let us first discuss how to proceed.