Is 'set' over an equal sign correct? Recently friend of mine showed me a way to write $f(x)=0$, however I could not find anything about that in the Internet. Is it correct?
$f(x)=x^2-1\stackrel{set}{=}0 \\
x = 1 \lor x = -1$
 A: There's no right or wrong here, it's simply a matter of convention. I personally do not use it as I find the word too small to be legible, but of course this is much less of an issue in typesetting and personal preferences vary. There's nothing right or wrong about that notation. Another one is $\stackrel{\mathrm{def}}{=}$, which is sometimes used to mean "defined to be", though in this case the notation $:=$ is much more widespread.
A: Answering to expand on @RyleeLyman 's comment.
I have never seen this. If I encountered it in a paper or text or a student's homework I would be able to guess what the writer meant, but I'd be annoyed. 
There is indeed ambiguity in the way we use equations. Sometimes they are definitions like

Let $f(x) = x^2 -1$.

Sometimes they are identities, like

For every $x$, $x^2 - 1 = (x-1)(x+1)$.

Sometimes they are meant to be solved, as in

Find the values of $x$ for which $ x^2 - 1 = 0$.

In the somewhat cryptic two lines in the question you are implicilty using all three.
The right way to help your readers understand what you are trying to say is with lots of words surrounding those parts you can best write with symbols. I would like to see somthing like

Let $f(x) = x^2 -1$. I know $x^2 - 1 = (x-1)(x+1)$ for every $x$.
  SInce a product of numbers is $0$ only when at least one of the
  factors is $0$, the only solutions to $f(x) = 0$ are $x=1$ and $x=-1$.

Programming languages (python for example) distinguish between
x = 2 # set the value of x to 2 

and 
x == 2 # is the value of x equal to 2?

What exactly is an equation?
