Mathematician (no longer practicing) here.
Mathematical statements are highly context-specific, far more so than most non-mathematicians realize. And so, almost any concept, such as "flatness", "prime", "representation", "multiplication" and indeed "equality" depends on highly specific circumstances.
In different contexts, for example, the word "prime" refers to a kind of integer. In others, to a kind of polynomial, or a kind of algebraic group.
Consider the following abstract from a journal article "On the arithmetic moduli schemes of PEL Shimura varieties" published in the year 2000:
A detailed study of the Shimura varieties associated to unitary groups U(r,s) over an imaginary quadratic field K is done. It turns out that, when |rs|>1, the models given by Rapoport-Zink’s construction are not flat over those primes P of K that divide the discriminant of K
. This fact contradicts the flatness conjecture stated in the above-mentioned work of Rapoport and Zink. However, the author proves that the moduli scheme for the modified moduli problem is flat in the case of unitary groups of type U(r,1).
Even to understand what this abstract is saying would require most mathematicians to spend weeks of study (the exception being algebraic geometers who presumable already know what Rapoport and Zink did, and what a Shimura variety is). The words prime and flat in this abstract do not mean what lay readers would expect.
Picking on the concept of equality (equivalence classes, whatever) seems like an almost trivially small part of the problem in relating real mathematics to computation. There's a gulf between solving that problem and having a computer actually understand what a unitary group is in a mathematical context.
Specifically with respect to different concepts of equality, I will add that this is one of those places where operator overloading makes a ton of sense. If you are doing integer math, equality is the usual thing, and if you have infinite sequences of rationals (e.g. when constructing the real numbers), equality is something quite different.