Consistency of substitution of a canonical variable from EoM back into (momentum-less) action I was reading this answer, where the issue of substituting equations of motion (eoms) into the action is addressed. I am fine with the basic idea that the action principle is destroyed when the eoms are substituted back, since the variation over all paths is not the same as before.
However, as @Qmechanic pointed out, there may be a measure-zero set of exceptions.
More generally consider an action
$$L \equiv L (\Pi_i, X_i, X_j), \quad i \in (1,N), \quad j \in (N+1, M),\tag{1}$$
such that $X_j$ appears non-linearly in the action. Since variables $X_j$ do not have a conjugate momenta, can we simply substitute them back into the action, even if they are non-linear, unlike linear Lagrange multipliers. What is the proof for the same?
More specifically consider the case of an action which does not have a canonical momentum, e.g. in equation 2.1, page 13 of this review, where they consider linearized massive gravity.
$$ S = \int d^D x  \left(-\frac{1}{2} \partial_\lambda h_{\mu\nu}\partial^\lambda h^{\mu\nu} + \partial_\mu h_{\nu\lambda}\partial^\nu h^{\mu\lambda}-\partial_\mu h^{\mu\nu}\partial^\nu h  +\frac{1}{2} \partial_\lambda h\partial^\lambda h -\frac{1}{2} m^2(h_{\mu\nu}h^{\mu\nu}-h^2)\right).\tag{2}$$
One can check that if $m=0$, then $h_{0i}$ are simply Lagrange multipliers. This gives rise to standard constraints which arise since $h_{0i}$ act as Lagrange multipliers. However if $m\neq 0$, then there is no Lagrange multiplier since the there exists a quadratic term in $h_{0i}$ as well.
What the authors do is in the case $m\neq 0$ to use the equation of motion to solve for $h_{0i}$ in eqn 2.7, and substitute it back into the action. Again, is it a valid operation here, and does its validity have any relation to the fact that the momentum $\Pi_{0i}$ conjugate to $h_{0i}$ vanishes?
 A: *

*Generically OP's action principle (1) gets destroyed if we apply EOMs in the action, cf. the linked Phys.SE post.


*One the other hand, in the massive case $m\neq 0$ of the Pauli-Fierz action (2) we are allowed to use the EOM for $h_{0i}$.
The reason is similar to the following simplified toy model:
$$\widetilde{L}(q,B)~=~ L(q,\dot{q},t) + \frac{\xi}{2}B^2+B\chi(q,\dot{q},t),\tag{I}$$
where $B$ is a Lautrup-Nakanishi (LN) auxiliary field [which plays the role of $h_{0i}$], and $\xi$ is parameter [which plays the role of $m$ in eq. (2)].

*

*Case $\xi=0$: Then $B$ is a Lagrange multiplier that imposes the constraint $\chi\approx 0$. We are generically not allowed to use EOM.


*Case $\xi\neq 0$: We can complete the square in the Lagrangian (I):
$$\widetilde{L}~=~ L + \frac{\xi}{2}\underbrace{\left(B+\frac{\chi}{\xi}\right)}_{=:\widetilde{B}}{}^2 -\frac{\chi^2}{2\xi}. \tag{II}$$
We can get away with using the EOM $B~\approx~ -\frac{\chi}{\xi}$ in the Lagrangian (I), because we are allowed to make coordinate transformations, viz. $B\to \widetilde{B}$. Then the Lagrangian (II) does not contain mixed terms in $q$ and $\widetilde{B}$. Using the EOM for $\widetilde{B}$ cannot alter the action principle for $q$, and vice-versa!
