--- ethRoot the implementation of the I_e() operation as described in --- various papers, e.g. --- M Katzman's "Parameter test ideals of Cohen Macaulay rings" and --- J. Alvarez-Montaner, M. Blickle and G. Lyubeznik's "Generators of D-modules in positive characteristic." --- Input: --- ideals A and B of the same polynomial ring R OVER A PRIME FIELD. --- a positive integer e --- a prime pp which is the characteristic of R --- Output: --- the smallest ideal J of R containing B with the property that A is in J^{[p^e]} ethRoot = (A,B,e) ->( R:=ring(A); pp:=char(R); F:=coefficientRing(R); n:=rank source vars(R); vv:=first entries vars(R); R1:=F[vv, Y_1..Y_n, MonomialOrder=>ProductOrder{n,n},MonomialSize=>16]; J0:=apply(1..n, i->Y_i-substitute(vv#(i-1)^(pp^e),R1)); S:=toList apply(1..n, i->Y_i=>substitute(vv#(i-1),R1)); ---print((gens substitute(A,R1))%gens(ideal(J0))); G:=first entries compress( (gens substitute(A,R1))%gens(ideal(J0)) ); ---print(G); L:=ideal 0_R1; apply(G, t-> { L=L+ideal((coefficients(t,Variables=>vv))#1); }); L1:=L+substitute(B,R1); L2:=mingens L1; L3:=first entries L2; L4:=apply(L3, t->substitute(t,S)); use(R); substitute(ideal L4,R) ) --- star is the implementaion of the star closure operation desribed in --- M Katzman's "Parameter test ideals of Cohen Macaulay rings" --- Input: --- ideals I and element u of the same polynomial ring R OVER A PRIME FIELD. --- a positive integer e --- a prime p which is the characteristic of R --- Output: --- the smallest ideal J of R containing I with the property that u^(1+p+...+p^(e-1)) J is in J^{[p^e]} star = (I,u,e) ->( R:=ring(u); p:=char(R); f:=true; Ne:=sum toList(apply(0..(e-1), i->p^i)); lastI:=I; while (f) do { f=false; I1:=ethRoot((u^Ne)*lastI,lastI,e); t1:=compress (gens(I1))%(gens(lastI)); if (t1!=0) then { f=true; lastI=I1; }; }; I1 ) --- Input: --- an element u of the polynomial ring R OVER A PRIME FIELD. --- Output: --- Let E the injective hull of the polynomial ring modulo the ideal generated by the variables. --- Let T be the natural Frobenius action on E. --- Let N be the submodule of nilpotent elements of E under the Frobenius action uT. --- Then the output is the annihilator of N. findNilpotents = (u) ->( local i; R:=ring(u); p:=char(R); e:=1; nu:=1; f:=true; lastJ:=ideal(1_R); while (f) do { J:=ethRoot (ideal(u^nu),ideal(0_R),e); if (((gens lastJ)%(gens J))==0) then f=false; e=e+1; nu=sum toList apply (0..(e-1), i-> p^i); lastJ=J; }; J ) --- this is a not terribly interesting ad-hoc function which takes a description of a canonical module as --- a cokernel of a matrix and finds an ideal isomorphic to it. canonicalIdeal= (M,I) ->( R:=ring(M); answer:=0; S:=R/ideal(I); s1:=syz transpose substitute(M,S); s2:=entries transpose s1; use R; apply(s2, t-> { s3:=substitute(syz gens ideal t,R); --- print(s3%M); if ((s3%M)==0) then { answer=substitute(mingens ideal t,R); break; }; }); answer ) ---------------------------------------------------------------------------------------- frobeniusPower=method() frobeniusPower(Ideal,ZZ) := (I,e) ->( R:=ring I; p:=char R; local u; local answer; G:=first entries gens I; if (#G==0) then answer=ideal(0_R) else answer=ideal(apply(G, u->u^(p^e))); answer ); frobeniusPower(Matrix,ZZ) := (M,e) ->( R:=ring M; p:=char R; G:=entries M; local i; local j; L:={}; apply(G, i-> { L=append(L,apply(i, j->j^(p^e))); }); matrix L ); ---------------------------------------------------------------------------------------- --- Input: --- an element u of the polynomial ring R OVER A PRIME FIELD. --- Output: --- A list of all prime ideals P such that --- (a) u P \subseteq P^{[p]}, and --- (b) the action of uT on the the annihilator of P on the injective hull of the residue field of R --- is not the zero Frobenius map. findAllCompatibleIdeals = (u) ->( L:={}; R:=ring u; p:=char R; P:=ideal(0_R); J:=ethRoot(ideal(u),ideal(0),1); t:=1_R % (gens J); if (t != 0_R) then print("*** WARNING *** Frobenius action has nilpotent elements"); findAllCompatibleIdealsInnards (u,L,P) ) findAllCompatibleIdealsInnards = (u,L,P) ->( R:=ring u; p:=char R; local tau; local Plist; P1:=frobeniusPower(P,1); C1:=ideal((singularLocus(P)).relations); tau=ideal mingens star(C1,u,1) ; Plist=minimalPrimes tau; local Q; local T; apply(Plist, Q-> { f:= any(L,T -> T == Q); ---print(L,Q,f); if (not f) then { L=append(L,Q); L=unique(L | findAllCompatibleIdealsInnards(u,L,Q)); }; }); --- C2:=(P1+ideal(u)):(P1:P); tau=ideal mingens star(C2,u,1) ; Plist=minimalPrimes tau; local Q; local T; apply(Plist, Q-> { f:= any(L,T -> T == Q); ---print(L,Q,f); if (not f) then { L=append(L,Q); L=unique(L | findAllCompatibleIdealsInnards(u,L,Q)); }; }); --- L )