# Vector field

30 views

### amal

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

Mar 7, 2022, 9:01:19 AMMar 7
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)))
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.

### amal

Mar 12, 2022, 4:17:04 AMMar 12
to Macaulay2
Dear Brian,