Disambiguating the Equals Sign

2017-10-25·Alok Singh·231 words

Depending on context, x=yx = y can mean any of:

  • xx is known to be equal to yy
  • xx is assigned to be equal to y
  • xx is defined to be equal to yy.
  • We're trying to show xx is equal to yy
  • The Boolean relation of x=yx = y

I get around this by using distinct forms of the equals sign for each of the nuances above.

I only use the equals sign when I know xx is equal to yy.

If I'm using x=yx = y to mean "let xx be equal to yy", I use either x←yx \gets y or x:=yx := y.

If I'm defining xx to be equal to yy, I use x≡yx \equiv y or more often x=defyx \stackrel{def}{=} y because my triple equals sign looks terrible when handwritten. The spacing is always off.

When I'm trying to show 2 sides are equal, I use =?\stackrel{?}{=}. This has the advantage of making it clear that it's wrong to transform both sides because I don't know that they're equal.The question mark conveys the idea of "dunno if they're equal".

For the last one, I use == like in programming. I'm used to it.

These distinctions may be overkill, but I think they make intent clearer, which is all the more valuable when you're in a thicket of symbols without a map.