'Does not necessarily equal' symbol

What symbol would I use if I wanted to express that, in the context of some binary relation $P$ implied from context, that $\exists (a,b)\in P: a\ne b$, but not to the extent that $\forall (a,b) \in P: a\ne b$.

The use of this would be if one were discussing a more restricted system, but then move to discussing a less restricted one. Like, "if we know for sure that $a\cdot b=b\cdot a$, then .... However, if $a\cdot b \mathrel{\rlap{=}\,?} b\cdot a$, then the previous reasoning doesn't apply, so ...". ("$\mathrel{\rlap{=}\,?}$" instead replaced with the real symbol)


Solution 1:

tl;dr: the formal notation for this is:$~~~~\neg\square(a=b)$


Explanation:

Modal logic formally defines the following dual operators:

  • Operator "$\square$" meaning "it is necessary", and
  • Operator "$\lozenge$" meaning "it is possible".

For any proposition P, the following are true:

  • $\square P \leftrightarrow \neg \lozenge \neg P~~~~~~~~$, i.e. : "P is necessarily true" is equivalent to "P cannot possibly be false"
  • $\lozenge P \leftrightarrow \neg \square \neg P~~~~~~~~$, i.e. : "P may be true" is equivalent to saying "P is not necessarily false"

Therefore, if you're happy to concede that your 'equality' is a logical statement, then you can express such statements formally as follows: $$ \lozenge(A = B) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\text{(i.e. $A$ can be a $B$)}$$ or $$ \lozenge(A \neq B) ~~~~~~~~~\text{(i.e. $A$ can be something other than $B$)}$$ depending where you want to place the emphasis.
Or if you really want to express it in terms of necessity: $$ \neg\square(a = b) ~~~~~~~~~\text{(i.e. it is not necessary that a = b)}$$ etc.


PS. I suppose, if you preferred a "one-symbol-only" binary operator, like your $\overset?=$, you could define in your article the symbols $\overset{\square}=$, $\overset{\lozenge}=$, $\overset{\square}\neq$, and $\overset{\lozenge}\neq$ respectively in terms of the modal operator syntax stated above, and I'm sure these would be straightforward to follow in your text.


Having said that, if a strict logical statement is not needed in context, my preferred alternative answer here is the one given below by Dragon (i.e. \not\equiv: $\not\equiv$ ); to me this is fairly straightforward and intuitive, without requiring further explanation: stating that two quantities are not equivalent implies that they are independent variables that could nonetheless simply happen to take on an equal value.

Solution 2:

There is a lecture series on Digital Signal Processing available on Youtube, in which a symbol appears which quite elegantly states "not necessarily equal to" by subscripting the "not equals" sign with the letter n.

Symbol for "not necessarily equal to"

Screenshot source: Prof. S.C Dutta Roy, Department of Electrical Engineering, IIT Delhi

Solution 3:

You may find $\equiv$, used to denote $\forall x (f(x)=g(x))$, to be useful, eg.:

$$a\cdot b \not\equiv b\cdot a$$

For reference, see Identity (mathematics) on Wikipedia.