The Gibbs lemma is broadly used in games theory and in mathematical economics (optimal distributions of resourses, Cournot competition e.t.c.). Here it is:

**Lemma (Gibbs).** $f_1,f_2,\ldots,f_n$ be differentiable functions on $[0,A]$. Consider the optimisation problem
$$
f_1(x_1)+\ldots+f_n(x_n) \to \max, \; x_1+\ldots+x_n = A, \; x=(x_1,\ldots,x_n) \in \mathbb R^n_+.
$$
The if $x^\ast = (x_1^\ast,\ldots,x_n^\ast)$ is the solution of this problem then there exists $\lambda \in \mathbb R$ such that
$$ \begin{array}{c}
x_i^\ast > 0 \implies f_i'(x_i^\ast) = \lambda, \newline
x_i^\ast = 0 \implies f_i'(x_i^\ast) \leq \lambda.
\end{array}
$$

The proof is easy but the further specification seems nontrivial. My question is if it is possible to specify constant $\lambda$? Using rude calculations involving Lagrange's function I've obtained the following. If we define $\varphi(A)$ to be an optimal value of functional in the above problem then if all $x_i^\ast > 0$ we will have $\varphi'(A) = \lambda$. But is it possible to say the same in the general case? Maybe this specification of the Gibbs lemma is well known?

The question may be reformulated in terms specific to convex analysis: is it true that derivative of infimal convolution (supremal convolution) of smooth functions is always equal to mimimal (maximal) of derivatives of functions to be convolved in optimal point? If it isn't true in general, is it true in the case of functions $f_i$ for which $f_i' \geq 0$, $f_i'' > 0$?