4

The following are two definitions of the concept that two mappings $ f:A\mapsto B $ and $ g:A^\prime\mapsto B^\prime $ are equivalent.

  1. Def1 : Both the domains and codomains are the same, i.e., $A=A^\prime, B=B^\prime$, and $\forall x\in A, f(x) = g(x)$.

  2. Def2 : Only the domains are the same , i.e., $A=A^\prime$, and $\forall x\in A, f(x) = g(x)$.

We see that Def2 in principle only requires that $f(A) \subseteq B\bigcap B^\prime$, which is looser than Def1 which requires $f(A) \subseteq B=B^\prime$

I am asking which one is correct and why.

To be more precise, I haven't encountered those two definitions written explicitly. I am inferring Def1 from some other definitions. One example is the morphism in the category theory discussed below. The second one comes from my naive argument that mapping takes one thing to another, so as long as with the same input we obtain the same output then no one can differentiate those two mappings at all.

Example in category theory

The definition of the category requires that if $A\neq A^\prime$ or $B\neq B^\prime$, then $\mathrm{Mor}(A,B)$ and $\mathrm{Mor}(A^\prime,B^\prime)$ are disjoint.
Let's take the category $\mathrm{\mathbf{Grp}}$ as an example. The morphism here is the group homomorphism, which down in the deep is just a mapping. If $A\neq A^\prime$, then both definitions of mapping equivalence indicate that $\mathrm{Mor}(A,B) \bigcap \mathrm{Mor}(A^\prime,B^\prime) = \emptyset$. But what if $A = A^\prime, B\subsetneq B^\prime$? Under Def2 we would then have $\mathrm{Mor}(A,B) \subsetneq \mathrm{Mor}(A^\prime,B^\prime)$. Clearly, Def1 is what is implicit in the definition of category.

Function understood as a subset of Cartesian product

Another example is an alternate interpretation of function as a subset of Cartesian product. $f:A\mapsto B$ can be defined as a subset of $A\times B$, where $\forall a\in A$ there exists one and only one elements in $f\subseteq A\times B$ whose first element is $a$. Under this interpretation, Def1 of mapping equivalence requires not only that this subset $f$ is the same but also that it comes out of the same total set $A\times B$. This seems a little bit over-definition for me.

Prem
  • 9,669
Qi Tianluo
  • 203
  • 1
  • 5
  • 3
    My question is what do you mean by "equivalent"?

    If you mean "equal", then only definition 1 works, two functions with a different codomain are not the same functions even if the outputs are all identical. Otherwise, concepts like "surjective function" would not be well defined.

    It you mean equivalent in some other way, definition 2 does in fact enduce an equivalence relation on functions between sets (tho, that equivalence relation would be "too big" to be definable in ZFC set theory, as it'd be a proper class). It's likely not a particularly useful notion of equivalence tho

    – kabel abel Jan 26 '24 at 19:55
  • I had the same thought about equal & equivalent , @kabelabel , though without getting into ZFC & Classes , I think Def2 is more interesting. Something like $3=3$ (equality , no other Integer is equal to 3 , nothing more to think) & $3 \equiv 9 \mod 6$ (equivalent , many Integers are equivalent , let us explore which Integers are equivalent $\mod 6$ & $\mod 5$ at the same time) , though that is Opinion. – Prem Jan 26 '24 at 20:16

2 Answers2

4

I make comments that are relevant here, but that question addresses the issue of "codomain" vs. "range", so let me recap.

There are two ways of viewing functions. They are both important and play roles in different settings.

  • We can view functions simply as sets $f$ satisfying that:

    1. Every element of $f$ is an ordered pair; and
    2. If $(x,y),(x,y')\in f$ for some $x$, then $y=y'$.

    In this case, the domain is the set $\{x\mid \exists y(x,y)\in f\}$, the range is the set $\{y\mid \exists x(x,y)\in f\}$, and two functions are equal when they are identical as sets.

    This would be your second definition.

  • Or we can view functions as ordered triples, $(X,Y,f)$, where $x$ and $y$ are sets, $f$ is a function in the set-theoretic sense given above, the domain of $f$ is $X$, and the rang eof $f$ is contained in $Y$.

    If we view functions this way, then equality of functions means equality of ordered triples, which means that you are dealing with the equality you give in your first definition.

Which one is "correct"? Both. It depends on what you want to do with them.

For example, note that in the first definition, although functions are inherently either injective or not injective, they are not "inherently" surjective or not surjective. You cannot ask "Is $f$ surjective?" and instead you have to ask "If $f$ surjective onto $Y$?" while specifying $Y$ and making sure that $Y$ contains the range. Important duality results about cancellation of functions, one-sided inverses, and the like become much more cumbersome to state and use. So one may prefer the second definition, where both domain and codomain are important. This is the case in Category Theory, as you note.

On the other hand, sometimes the codomain is not really relevant to think about functions; we do want two functions with the same domain and same values at every point in the domain to be "the same function", even if we consider different codomains, because the distinction between them would make things awkward or very difficult, whereas taking them as equal simplifies things enormously. In those situations, we want to use your second definition (equality as sets) rather than the first (equality as ordered triples of sets).

We generally elide which one we are using, and in most situations it doesn't matter. There are some situations where one definition will get you in trouble and the other will not, and vice-versa. In the end, it is good to have both notions in the tool-box, and just take out the one that will be most convenient in any particular setting.

Arturo Magidin
  • 398,050
  • Though I make the same Points in my answer , this answer is more well-written with more terminology , hence +1 from me ! ((1)) I too claim that both are valid , though situation & context will dictate which is more useful ((2)) I too claim that Def2 is more interesting to think about existence of inverses & other such ideas ((3)) One Point where I differ is that I make a Distinction between Equality (Def1 ) & Equivalence ( Def2 ) which gives richer structures to explore ! – Prem Jan 27 '24 at 04:37
0

DISCUSSION :

Both are absolutely valid in general , though Situation & Context will make one more suitable than the other. I think you have yourself given 2 Situations where the nuance is useful.

Extending the thought that it is Equivalence relation , according to your tagging , I think it more appropriate to say that Def1 more suitably covers Equality ( $f = g$ ) , while Def2 more suitably covers Equivalence ( $f \equiv g$ )

Def1 requires that $f$ & $g$ are Exactly Same , even to the deepest level which is not observable at high level.

Def2 allows that $f$ & $g$ are Observably Same only at the visible high level , though there might be changes & variations at the unobservable deeper levels.

OPINION :

Consider Def1 $f = g = h$ : It requires that all Domains & CoDomains are same & all 3 are same , which is not really interesting.
Even when we consider inverses $f^{-1},g^{-1},g^{-1}$ , all are exactly same : all might exist or all might not exist (depending on whether there are non-invertible elments in the CoDomain) where we have nothing more to explore.

Consider Def2 $f \equiv g \equiv h$ : It requires that all Domains are same though the 3 might not be same , which is is more interesting & allows exploration to what occurs when we take inverses.
When we consider inverses $f^{-1},g^{-1},g^{-1}$ , all might not be same & some might not even exist , while some might exist. We will have richer structure to explore here.

Prem
  • 9,669