2

Let $f$ be a function with domain $A$ and codomain $B$.

It seems that there are two formal definitions of a function:

  1. As a set of ordered pairs: $f=S\subseteq A\times B$
  2. As an ordered triple: $f=(A,B,S)$.

Consider these two functions:

  • $f:\mathbb \{0\} \rightarrow \mathbb R$ defined by $f(x)=1$
  • $g:\mathbb \{0\} \rightarrow \mathbb R^+_0$ defined by $g(x)=1$

Under Definition 1, $f=g=\{(0,1)\}$.

But under Definition 2, $f \neq g$ because $f=(\{0\},\mathbb R,\{(0,1)\})$, while $g=(\{0\},\mathbb R^+_0,\{(0,1)\})$.

So, which is the "correct" definition that we should use?

  • 1
    Under the first definition the corresponding S set for f and g are subsets of different products, and while they may look the same from a set theory point of view, they're not EQUAL (as I said, they're subsets of different sets so they can't be the same set). – Felipe Pérez Mar 10 '20 at 10:51
  • 1
    Your second "definition" says nothing about $S$ (not even what it is), we can't answer your question (nor conclude that $f\ne g$). –  Mar 10 '20 at 10:54

1 Answers1

0

You are misinterpreting your first definition. The function is not $S $, but $S $ as a subset of $A\times B $. And your $f $ and $g $ have different $B$.

The codomain is part of the definition of function. Functions with the same domain and "rule" (i,e., same formula or same $S $) but distinct codomains are not equal.

Martin Argerami
  • 205,756
  • So are the two definitions simply the same? –  Mar 10 '20 at 11:03
  • Absolutely. A function consist of a domain, a codomain, and the pairing $(a,f (a)) $ for each element $a $ in the domain. How you pack that information may vary. – Martin Argerami Mar 10 '20 at 11:08
  • So, in the example given above, under Definition 1, $f={(0,1)}$ and $g={(0,1)}$, but $f\neq g$? Can you explain this (or point out what my error is)? –  Mar 10 '20 at 11:12
  • I pointed it out in my answer. You are using different codomains. – Martin Argerami Mar 10 '20 at 11:53