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

Feature request: Factors, Conjugates, ... for field extensions #5493

Open olexandr-konovalov opened 1 year ago

olexandr-konovalov commented 1 year ago

The following example, about which I was told by @nzidaric, does not work:

F:=GF(2);
x:=Indeterminate(F,"x");
poly:=RandomPrimitivePolynomial(F,17);
K:=FieldExtension(F,poly);
r:=Random(K);
Conjugates(K,r);

For example,

gap> F:=GF(2);
GF(2)
gap> x:=Indeterminate(F,"x");
x
gap> poly:=RandomPrimitivePolynomial(F,17);
x^17+x^16+x^15+x^14+x^13+x^12+x^10+x^9+x^8+x^5+Z(2)^0
gap> K:=FieldExtension(F,poly);
<field of size 131072>
gap> r:=Random(K);
a^15+a^12+a^11+a^10+a^8+a^7+a^6+a^5+a^4+a^2+Z(2)^0
gap> Conjugates(K,r);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `Factors' on 2 arguments at /Users/obk1/GITREPS/gap/lib/methsel2.g:250 called from
Factors( L, pol ) at /Users/obk1/GITREPS/gap/lib/field.gi:725 called from
Conjugates( F, LeftActingDomain( F ), z ) at /Users/obk1/GITREPS/gap/lib/field.gi:702 called from
<function "Conjugates for a field and a scalar (delegate to version with two fields)">( <arguments> )
 called from read-eval loop at *stdin*:6
type 'quit;' to quit to outer loop
brk> 

and I haven't managed to find out why so far. Maybe someone knows? Thanks.

hulpke commented 1 year ago

The fields created by FieldExtension do not embed the base field in a natural way. (I.e. in this example GF(2) is not a subset of K. Dis makes some of the generic Galois conjugacy code not work. Fixing this probably would require a significant rewrite of FieldExtension.

fingolfin commented 1 year ago

I found that in general, many things don't work when using FieldExtension or AlgebraicExtension. In this example, it fails because it tries to factor over that field and cannot do it.

(That's one of the many nice things we have in Oscar: a full blown number theory component with a rich support for number fields and operations over them, easily accessible from GAP code (and vice versa))