# Prove all cost functions are concave in input prices and demand for inputs is downward

I've seen proofs that cost functions are concave of the form

$C(\lambda w + (1-\lambda)w',q) \ge \lambda c(w,q) + (1-\lambda)c(w',q)$

although this neither feels convincing nor does it seem like a path towards also proving that input demands are downward sloping.

To be more concise in my question, it is two parts.

First, prove that all cost functions, regardless of the production function, are concave.

Second, using the first step, also show that input demands are downward sloping.

Let $x(w, q)$ denote the solution to the cost minimization problem :
\begin{eqnarray*} \min_{x} & \ w\cdot x \\ \text{s.t.} & \ \ f(x) \geq q \end{eqnarray*} where $f$ is the production function. Since $x(w, q)$ minimizes cost at $(w, q)$, following holds for all $w$ and for all $q$ : \begin{eqnarray*} w\cdot x(w, q) \leq w\cdot x(w', q) \ \ \ \forall w' \end{eqnarray*}
First, we'll show that $C$ is concave in $w$. Consider any arbitrary $w'$, $w''$ and an arbitrary $\lambda \in [0, 1]$. \begin{eqnarray*} C(\lambda w' + (1-\lambda) w'', q) & = & (\lambda w' + (1-\lambda) w'')\cdot x(\lambda w' + (1-\lambda) w'', q) \\ & = & \lambda w' \cdot x(\lambda w' + (1-\lambda) w'', q) + (1-\lambda) w''\cdot x(\lambda w' + (1-\lambda) w'', q) \\ & \geq & \lambda w' \cdot x(w', q) + (1-\lambda) w''\cdot x(w'', q) \\ & = & \lambda C(w' , q) + (1-\lambda) C(w'', q) \end{eqnarray*} Therefore, $C$ is concave in $w$.
To show that input demand is downward sloping, consider any arbitrary $w'$, and $w''$, \begin{eqnarray*} w'\cdot x(w', q) & \leq & w'\cdot x(w'', q) \\ w''\cdot x(w'', q) & \leq & w''\cdot x(w', q) \end{eqnarray*} Adding them we get \begin{eqnarray*} (w'-w'')\cdot (x(w', q) - x(w'', q)) & \leq & 0 \end{eqnarray*} We now consider a special case where $w'$ and $w''$ differ only in the $j$th input's price. Consequently, \begin{eqnarray*} (w'-w'')\cdot (x(w', q) - x(w'', q)) = (w_j'-w_j'') (x_j(w', q) - x_j(w'', q)) & \leq & 0 \end{eqnarray*} Therefore, demand for $j$th input is inversely related to its price.