macsyma on Tue, 20 Aug 2019 05:29:25 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: the minimal polynomial over the composite field


Thank you, Bill.

> 1) Whenever you can, use nfisincl rather than nffactor.
> 2) Since q is Galois over Q, instead of nfsubfields+nffactor,
> you should use G=galoisinit(q); galoisfixedfield(G,...,2)

I cannot determine which part of my code your advice points to.
Could you explain using the step i = 3 
of tst002(nfsubfields(x^35-2,840)), for example.

tst002(gx) =
{
  my(P = select(r -> r - 2, factor(poldegree(gx))[, 1]),
     p, q, s, t, u, A = gx, gi);
  for(i = 1, #P,
    q = polcyclo(p = P[i], u = eval(concat("c", p)));
    [s, t] = nfsubfields(q)[-2..-2][1];
    gi = nffactor(q, subst(liftpol(nffactor(s, gx)[1, 1]), u, t))[1, 1];
    A = if(#variables(A) == 1, gi, if(#variables(gi) == 1, A, RgX_gcd_simple(A, gi) )));
  liftpol(A/pollead(A))
};

macsyma