M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Frobenius powers

Open DanGrayson opened this issue 8 years ago • 1 comments

This operation on ideals is not well defined, i.e., equal ideals don't provide equal results. We should make it mathematically sensible.

      Ideal ^ Array := (I, e) -> (
         R := ring I;
         n := numgens R;
         -- Error if input is not correct.
         if any(e, i -> i < 0) then error "Expected nonnegative exponents.";
         if #e != 1 and n != #e then error "Expected single integer array, or array with length equal to the number of variables.";
         -- if only one element, then make vector the same as the length of
         -- the number of variables with the same number in each entry
         if #e == 1 then e = new Array from n:(e_0);
         -- build a ring homomorphism that will perform this substitution for us
         phi := map(R,R,matrix {apply(numgens R, i -> (R_i)^(e_i))});
         -- apply the ring homomorphism and create the new ideal
         ideal phi generators I
      )

DanGrayson avatar Jul 27 '17 16:07 DanGrayson