In category theory, how do you model substituting a variable in a function for another function?

134 Views Asked by At

Say you have a function $f(x,y)$ and another function $z(y)$, which you can easily transform into $y(z)$, by solving for $y$. Then, by substituting $y$ with $y(z)$ into $f(x,y)$, you can easily construct another function $f(x,z)$, but how would one model this in category theory?

Could this be related? http://math.andrej.com/2012/09/28/substitution-is-pullback/

I'm just trying to understand what my economy professor really means when he says that maximizing utility and minimizing expenditure is a dual problem. I want to build a category, flip de arrows and verify that indeed they are dual.