Vector field

30 views
Skip to first unread message

amal

unread,
Mar 4, 2022, 11:54:45 AMMar 4
to Macaulay2
Hello,
I am a beginner in Macaulay2.And I really need some help to solve this problem :
I am working on finite field F_2 and i have the following vector field v defined as follow :
v= f  d_x + g d_y + x d_t  where f and g are polynomials over F_2[x,y,t]
And i want to find all the polynomials such that v(h) =0  and the generators of the set that verifies this proprety.
Thank you very much !
Best

Brian Pike

unread,
Mar 7, 2022, 9:01:19 AMMar 7
to maca...@googlegroups.com
Hi Amal,
This is just a vector space of polynomials, right?  I would either: compute the module of vector fields perpendicular to v (i.e., ker(matrix {{f,g,x}}) ) and then determine which of these are the gradient of a function; or I would convert this problem into a finite-dimensional linear algebra problem over F_2 by constructing the F_2 linear map F_2[x,y,t]->F_2[x,y,t] that represents application of v (truncating it up to some degree to make it finite-dimensional), then taking the kernel of that map.  Maybe there's a better way to take advantage of F_2.

Here's an example of Macaulay2 code that uses the latter approach:
R=ZZ/2[x,y,t];
f=x*y;
g=y+t;
toCoeffRing=map(coefficientRing(R),R);
applyVF= (h) -> (
  f*diff(x,h)+g*diff(y,h)+x*diff(t,h)
);
solveToDegree=10;
monomialsSource=basis(0,solveToDegree,R);
monomialsTarget=basis(0,solveToDegree,R);
L=apply(
  flatten(entries(monomialsSource)),
  h -> toCoeffRing((coefficients(applyVF(h),Monomials=>monomialsTarget))#1)
);
-- Build the matrix
M=fold((a,b)->(a|b),L);
-- Compute examples of F_2-generators of h
hFunctions=flatten(entries(monomialsSource * promote(gens ker(M),R)))
-- Check the answers
apply(hFunctions,applyVF)

Thanks,
Brian Pike

--
You received this message because you are subscribed to the Google Groups "Macaulay2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to macaulay2+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/macaulay2/c4f195af-fe1d-4e9d-8bf0-241a37802337n%40googlegroups.com.

amal

unread,
Mar 12, 2022, 4:17:04 AMMar 12
to Macaulay2
Dear Brian,
Thank you very much for your reply!
I prefer the second approach you proposed however I see how I can find the set of generators? Is it possible to find it using Macaulay2?
For example id, i take v= dx and K=F_2[x,y,t] then the set of generators is F_2[x^2,y]. I would very much appreciate it if you can help me find a way to write down the generators.
Thank you very much!

Best,
Amal

Reply all
Reply to author
Forward
0 new messages