My theorem to match Euclid’s useless theorem. If you can find no path from upper OR left edge, to the right OR lower edge, where the 2 threads represented by the rows and columns, interferes with the valid state of the object, then it is thread-safe. It has to be a valid path. Meaning a synchronized block like “lock” cannot have a path changing direction from across to down, or vice versa.

I think this metaphor works. Single core, only horizontal and vertical lines. Multi-core, I think it’s possible for 2 threads to change state simultaneously running separately on separate 2 cores. The red line is just a sample path. I’m not saying it’s not thread-safe execution order, for the code in question. But you should be able to draw a path and say “That isn’t thread-safe” and to fix it.