I'm trying to determine whether defining a type of mathematical object requires us to know what we mean by another object being "equal" to it. For example, when we define a type of object like set, function, category, or class, is it also necessary to include within our definition what is meant by, for instance, two sets, functions, categories, or classes being "equal"? I would appreciate any commentary.
For some background:
I came upon this question when I was thinking about vector spaces. For example, if we want to study the real vector space of functions from $\mathbb R$ to $\mathbb R$, not only do we need to define the operations of addition and scalar multiplication, but I think we also need to define the binary relation of equality in order to check that the vector space axioms hold. For example, to check whether or not for all functions $f,g$ from $\mathbb R$ to $\mathbb R$ and for every real number $\lambda$, that $$ \lambda(f + g) = \lambda f + \lambda g, $$ I think it is necessary to also define what we mean by '$=$' in the above equation, i.e., that $$ ``f = g" \text{ if and only if } f(x) = g(x) \text{ for all } x\in \mathbb R. $$ At what point do we define what is meant by equality of functions? Is it something that is necessary to do as soon as we define what a "function" is?
In the set theory paradigm, which is the general workframe of today mathematics, everything is supposed to be a set, so equality has a very clear meaning, given by the extensionality axiom : $x=y$ iff they have the same elements.
For instance a function is a set of the form $(A,B,\Gamma)$ where $\Gamma\subset A\times B$ satisfies some axioms. Then equality of functions is just the equality of the corresponding sets.
Of course this is just in set theory, in different paradigms (like type theory) you are supposed to define equality in a specific way for all types.