I'm looking through some lecture notes, and found that the author defined two functions f and g to be equal if:
- they have the same domain, say S,
- they have the same codomain, and
- f(x)=g(x) for all x in S.
This seems peculiar to me. In the notation of relations, for instance, this implies that
- the relation $R=\{(t,\sqrt{t}): t \in \mathbb{R}^{\geq 0}\} \subseteq \mathbb{R}^{\geq 0} \times \mathbb{R}$ and
- the relation R'=\{(t,\sqrt{t}): t \in \mathbb{R}^{\geq 0}\} \subseteq \mathbb{R}^{\geq 0} \times \mathbb{R}^{\geq 0}
are not equal (despite $R=R'$).
Question: Is there any reason to define two functions as non-equal based solely on their codomains?