-1

Suppose that for all $g : A \to A$ , $f \circ g = f $. To prove that $f$ is constant function

I tried to work by contradiction by letting $x_1, x_2 \in A $, $x_1 \neq x_2$ such that $f(x_1) \neq f(x_2)$

$(f \circ g) (x_1) = f(x_1)$

$(f \circ g) (x_2) = f(x_2)$

$\exists c_1$ such that $(x_1,c_1) \in g$ and $(c_1, f(x_1)) \in f$

$\exists c_2$ such that $(x_2,c_2) \in g$ and $(c_2, f(x_2)) \in f$

How do i solve ? Thanks

Sophie Clad
  • 2,474

1 Answers1

3

One way to do this would be to let $g$ be any constant function $x \mapsto c$ for $c \in A$.

Then this claim is that $f(g(x)) = f(x)$ for all $x \in A$; that is, $f(c)=f(x)$ for all $x \in A$.

So $f$ is the constant function $x \mapsto f(c)$.

(I would add that if $A$ is empty then are empty functions constant? I think so???)

  • Why is g constant function ? Question asks to show for every g. Thanks – Sophie Clad Oct 28 '24 at 17:50
  • @SophieClad We are allowed to assume that $f \circ g = f$ for any $g$. So we can pick and choose which $g$ we use. This is the power of a "for all" statement. For instance, if we knew that "for all natural numbers $n$, $n$ is even or odd" then we can conclude in particular that "4 is even or odd". – mathperson314 Oct 28 '24 at 18:05
  • 3
    I guess whether or not the empty function is constant depends on your definition. If it is that for all $x,y \in A$, $f(x) = f(y)$, then when $A = \emptyset$ the condition is vacuously satisfied and so $f$ is constant. If you have the definition that $f: A \to B$ is constant if there exists $b \in B$ so that $f(x) = b$ for all $x$, then when $A = \emptyset$ $f$ is constant (since you can choose any $b \in B$ and the condition is vacuously satisfied) unless $B = \emptyset$ as well, in which case it's nonconstant. Well, that seems annoying, so I'd prefer the first definition. – Jair Taylor Oct 28 '24 at 18:50