gap-system / gap

Main development repository for GAP - Groups, Algorithms, Programming, a System for Computational Discrete Algebra
https://www.gap-system.org
GNU General Public License v2.0
804 stars 163 forks source link

SymmetricPower undocumented and broken over finite fields. #1362

Open dimpase opened 7 years ago

dimpase commented 7 years ago

While one can do

gap> Display(SymmetricPower([[1,2],[3,4]],3));
[ [   1,   2,   4,   8 ],
  [   9,  16,  28,  48 ],
  [  27,  42,  64,  96 ],
  [  27,  36,  48,  64 ] ]

it is not documented. It is implemented in lib/algrep.gi. Once in a while people search for it in vain, including longterm GAP devs (e.g. @hulpke asked for such a function on gap-dev list in 2014). Even if this will be re-implemented at some point, it seems strange to keep it hidden,

hulpke commented 7 years ago

Just as an aside:

The method your example calls is in matrix.gi, I added it after finding no such function available.

fingolfin commented 6 years ago

See also https://github.com/gap-system/gap/issues/1796

stevelinton commented 5 years ago

I just ran into the same problem. Also the methods run into a divide by zero over finite fields.

jackschmidt commented 3 years ago

I've worked on this a little. I have some simple but longer code with the following properties:

Should I just paste the undocumented code here, or put it in a pull request, or document and test it?

Documentation and testing will take a bit more time -- the code is meant to be easily documented, except that I seem to have misunderstood something (a missing dual space?) and so the code currently confuses me.

Algorithmic complexity also worries me: why is the Permanent method faster for higher powers? It appears to do a divide and conquer approach. Is there a similar technique to compute the symmetric power (without division)?

It was also unclear to me if it would be nice to have all the SchurFunctors (not just symmetric and exterior powers). Would it be much more work? M2 computes a tensor product of exterior powers and then sums up some rows and columns. I don't read M2 code very well, and so was unable to port it to GAP on my first attempt.