Does the envelope theorem hold at a corner solution? Suppose we have the following production function:

$$F(L,K)=\max_{L_K}H(L,L_K,K)=\max_{L_K}\left[(L-L_K+1)^\alpha(L_K+K)^{1-\alpha}\right]=(L-L_K^*+1)^\alpha(L_K^*+K)^{1-\alpha}$$

With the constraint $L_K\in[0,L]$.

We know that $$\frac {dH}{dL_K}=\alpha(L-L_K+1)^{-1}H+(1-\alpha)(L_K+K)^{-1}H=0$$
Hence the value for $L_K$ at which the derivative is zero is $L_K^0=\frac {(1-\alpha)(L+1)+\alpha K}{1-2\alpha}$. And the optimal value $L_K^*$ is: 
$$
L_K^*=\begin{cases}
L_K^0 &amp;\text{ if } &amp;0&lt;L_K&lt;L &amp;(1)\\
L&amp;\text { if } &amp;L&lt;L_K^0&amp;(2)\\
0 &amp;\text { if } &amp;L_K^0&lt;0 &amp;(3)
\end{cases}
$$

It is clear that if $L_K^*\in(0,L)$, (case $(1)$ ), then the envelope theorem holds:

$$\frac d {dL} F(L,K)=\frac \partial {\partial L}H(L,L_K^*,K)=\alpha(L-L_K^*+1)^{-1}\cdot F(L,K)$$

Moreover, in the third case (3), it is also clear to me that the envelope theorem holds. However, I am not so sure about the second case (2). I would say that the envelope theorem does not hold in this case, because if we substitute $L_K^*$ back into the original production function, we get 
$$F(L,K)=1^\alpha(L+K)^{1-\alpha}$$
And the derivative with respect to $L$ in this case is 
$$ (1-\alpha)(L+K)^{-1}\cdot F(L,K)$$

For the envelope theorem to hold in case 3, this would require $\alpha= (1-\alpha)(L+K)^{-1}$, which Almost-Always doesn't hold. 



But the reason this confuses me is that in this question I was referred to this paper, which has a theorem that states: 


  
  
  




So my question is: 


Am I right that the envelope theorem doesn't hold when $L_K$ is at a corner solution? 
Does this contradict the theorem, or do I misunderstand the theorem? If not, is the theorem correct?
First, you made a sign error in the computations. After correcting for your error, a crucial hypothesis you miss is that $X$, the choice set, does not depend on the variable $t$ in the theorem (with the notations of the theorem). To apply the theorem properly, the interval $[0,L]$ should not depend on $L$.

A) The sign error

$$\frac{\partial H}{\partial L_K}=-\alpha (L-L_K+1)^{-1}H+(1-\alpha)(L_K+K)^{-1}H=0$$
We define $L_K^0= (1-\alpha)(L+1)-\alpha K$.

B) Why we could think the envelop theorem's result may fail

Presuming that $0&lt;\alpha&lt;1$, there are four possible cases.

(1) $L_K^0\in [0,L]$. One can check the objective function is concave, thus $L_K^*=L_K^0$.

(2.i) $L_K^0\notin [0,L]$ and $H(L,0,K)&lt; H(L,L,K)$. Then $L_K^*=0$.

(2.ii) $L_K^0\notin [0,L]$ and $H(L,0,K)&gt; H(L,L,K)$. Then $L_K^*=L$. 

(2.iii) (just to be exhaustive) $L_K^0\notin [0,L]$ and $H(L,0,K)= H(L,L,K)$. Then there are two solutions, $0$ and $L$. 

In case (1), $$\frac{\partial F}{\partial L}(L,K)=\frac{\partial H}{\partial L}(L,L^*_K,K)+\frac{\partial L^*_K}{\partial L}.\frac{\partial H}{\partial L_K}(L,L^*_K,K).$$
The second term of the right-hand side is equal to zero thanks to the first-order condition. This is compatible with the envelop theorem's result for an interior solution.

In case (2.i), $F(L,K)=H(L,0,K)$ and so $$\frac{\partial F}{\partial L}(L,K)=\frac{\partial H}{\partial L}(L,0,K).$$
This is compatible with the envelop theorem's result for a corner solution here.

In case (2.ii), $F(L,K)=H(L,L,K)$ and so $$\frac{\partial F}{\partial L}(L,K)=\frac{\partial H}{\partial L}(L,L_K=L,K)+\frac{\partial H}{\partial L_K}(L,L_K=L,K).$$

We have to be cautious about the notations here, $\frac{\partial H}{\partial L}$ means the partial derivative corresponding to the first argument, and $\frac{\partial H}{\partial L_K}$ to the second one. The second term of the right-hand side is nonzero, which does not fit with the envelop theorem's result.

C) Why it actually does not fail

Write the problem as $F(L,K)=\max_{x\in [0,1]}H(x,L,K)$, with
$$H(x,L,K)=(L-x L+1)^\alpha(x L+K)^{1-\alpha}.$$
This problem is equivalent to the initial one.
The key difference is that the interval $[0,1]$ does not depend on $L$ or $K$. This is the reason why we can apply the envelop theorem, whereas it was wrong to apply it before. 

We can check that the case (2.ii) is compatible with the envelop theorem, we have $F(L,K)=H(x=1,L,K)$ and so $$\frac{\partial F}{\partial L}(L,K)=\frac{\partial H}{\partial L}(x=1,L,K).$$