Suppose $f,g,h$ are functions. Prove $f \circ (g \circ h) = (f\circ g) \circ h $

46 Views Asked by At

Proposition Suppose $f,g,h$ are functions. Prove $f \circ (g \circ h) = (f\circ g) \circ h $

My attempt:

$(\rightarrow)$

Take $(x,y) \in f \circ (g \circ h)$.

Then exists $a$ such that $(x,a) \in g \circ h$ and $(a,y) \in f$

There also exists $b$ such that $(x,b) \in h$ and $(b,a) \in g$

Since $(a,y) \in f$ and $(b,a) \in g$, $(b,y) \in f \circ g$

Since $(x,b) \in h$, $(x,y) \in (f\circ g) \circ h $

$(\leftarrow)$

Take $(x,y) \in (f\circ g) \circ h$

Then exists $a$ such that $(x,a) \in h$ and $(a,y) \in f \circ g$

There also exist $b$ such that $(a,b) \in g$ and $(b,y) \in f$

Since $(a,b) \in g$ and $(x,a) \in h$, $(x,b) \in g \circ h$

Since $(b,y) \in f$, $(x,y) \in f \circ (g \circ h)$.

Hence $f \circ (g \circ h) = (f\circ g) \circ h $

$\Box$


  1. Is it correct?

  2. Is there a better way?

1

There are 1 best solutions below

0
On BEST ANSWER
  1. It is correct, except that you need to check that they are defined on same domains.

2.Yes, we don't need such intricate details as you are using. The value of function in LHS at $x$ is $$(f\circ(g\circ h))(x)=f((g\circ h)(x))$$ $$=f(g(h(x)))$$ The value of function in RHS at $x$ is $$((f\circ g)\circ h)(x)=(f\circ g)(h(x))$$ $$=f(g(h(x)))$$ Check that domain of functions in both LHS and RHS is $\{x|x\in dom(h), h(x)\in dom(g), g\circ h(x)\in dom(f)\}$.

Now, since the functions in LHS and RHS have same domain and take same value in the common domain, they are same functions.