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