Notation for intersection of points with function

article-writingnotation

Suppose I have a function $f:\mathbb{R}\rightarrow\mathbb{R}$ and a set of points $S\subseteq\mathbb{R}^2$. How can I concisely convey the following idea?

All points $(x,y)\in S$ such that $f(x)=y$

I was thinking of writing $S\cap f$, as if $f$ were also a set of points, but I was thinking this could be seen as abuse of notation (since $f$ is described as a function and not a set of points). Is there a more standard notation for this?

Ideally this notation should be applicable to non-real-valued functions. In reality, $f$ is actually a computer program mapping inputs to outputs, and $S$ is a set of desired input-output pairs, and I want to describe the subset of $S$ that is "consistent" with $f$'s behavior. However I'm using a function analogy to provide intuition first in my writing.

Best Answer

For $f :A \mapsto B$, I would set $G:=\{(x,f(x)),x \in A\}$ and then the set you want to define can be expressed as $G \cap S$.

Note that $G$ stands for graph.