Admittedly this is a really boring subject for most people, but I find "comparability" in coding and maths a common problem that I've given quite a bit of though to and find interesting.
The most common comparability trap for coders is that "sets" are usually under the hood memory addresses (aka pointers). I discovered how this confuses nearly every novice programmer years ago when I did a MooC teaching matrices using Python. I think languages like Python which do away with C's &x and *p notation actually confuse novices more than they help because it's not obvious that x = [1,2,3] is a "reference" which will be globally mutated in whatever function it gets changed. I passed course by first converting the "matrices" as in nested arrays to text, and then back which I thought was an awful hack, but later discovered JSON basically makes that technique the norm.
In classical logic, there's equality and "implication" which once I went "aha", found helped improve my database queries a lot. Thinking of logic as "two value algebra", specifically 0 and 1, equality is pretty simple whereas that the truth table for implications (commonly written p => q) actually means p <= q took me some time to figure out. For p and q to be equal, implication has to work both ways, ie p <= and q <= p.
That might not seem useful and required knowing another thing I only grasped fairly late in life: classical logic and set theory are related, and that for lots of ps and qs that means P and Q are equal if P subset Q union Q subset P is not the empty set.
My notes on how to write that in SQL or Prolog for database I've put on the web at https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Ffrontiersoftware.co.za... if there's anyone who shares my weird interest in this.