NB: In the above table values that are semantically identical have been collapsed into a single row.
We can consider each row in the above table to be a Boolean value and construct the next table.
|==||False||True||undefined :: Bool|
|undefined||(Runtime Error)||(Runtime Error)||(Runtime Error)|
NB: The type annotation on undefined informs the type checker it is expected to be a Boolean value; undefined represents the "bottom" value, an instance of every type.
Learn (and use) Haskell. It has less complected elements than other languages. It is simpler and more expressive. Also, Boolean equality is transitive, commutative, and reflexive, as it should be.