Is there any lambda function which takes as input a lambda term $\lambda x_1x_2...x_n.f$ which is a function of $n$ variables and produces, $\lambda x_1x_2...x_n.\sim f$ . $\sim$ denotes "not". If we know the value of $n$, we can come up with the desired function easily.
Example: $n=2$. Desired function is : $\lambda px_1x_2.\sim p@x_1@x_2$ which will do this operation. $\lambda x_1x_2.f(x_1,y_1) -> \lambda x_1x_2.\sim f(x_1,y_1)$
I am looking for a for a lambda function which can do this operation and which does not change depending on the value of n.
Thanks a lot.