Let $A$ be a graded Artinian ring. An element $r$ of degree $i$ has the strong Lefschetz property if multiplication by $r$ on each graded component, $A_d \xrightarrow{r} A_{d+i}$ is of full rank possible given the size of $A_{d}$ and $A_{d+i}$, i.e., is injective or surjective.
Does Macualay2 already have a method to test if an element has the strong Lefschetz property? This seems like something I can probably code by hand (at least in the basic cases where I want it), but it also seems like something that would already exist!
Edit: I made something that I'm sure is not as efficient as it could be, that I will leave up in case someone else has this question some day (or in case it can be obviously improved).
Given a module M and an element r, I think this will return if r is Lefschetz on M or not:
i=(degree r)_0
maxDeg=(degree numerator reduceHilbert hilbertSeries M)_0;
lefschetz=true;
for j from 0 to maxDeg do(
f=r*basis(j,M)//basis(j+i,M);
lefschetz = lefschetz or (((isInjective f) or (isSurjective f)));)