When do phase space functions' Poisson brackets inherit the Lie algebra structure of a symmetry? I've seen several examples of phase space functions whose Poisson brackets (or Dirac brackets) have the same algebra as the Lie algebra of some symmetry. For example, for plain old particle motion in Minkowski space with coordinates $x^i$, $i=0...3$, and momenta $p_j$, we can define
$M_{ij}\equiv x_i p_j - x_j p_i$
and examine the canonical Poisson brackets
$\{ p_i, p_j \}, \{p_i, M_{jk}\}, \{ M_{ij}, M_{jk} \}$
which will have the algebra structure of the Poincare group.
Another example (I think) is particle motion in Euclidean 3-space but restricted to the surface of a 2-sphere, $x\cdot x=1$. In this case there should be phase space variables $L_i$ whose (Dirac?) bracket structure is that of SO(3).
In these cases it seems that some phase space functions $\psi_i$ are acting both as some representation upon which a group $G$ acts, $G\circlearrowleft\psi$; and apparently their Hamiltonian vector fields $X_{\Psi_i}$ seem to act as representations of the Lie algebra $\mathfrak{g}$ of $G$, now with the bracket-of-vector-fields acting as Lie bracket. This seems to lead to the Poisson/Dirac bracket structure
$\{ \psi_i, \psi_j \}=c_{ij}{}^k \psi_k$
with the structure constants $c$ of the algebra.
My question is essentially how to precisely formulate the above. When does some group $G$ which acts on some phase space functions give rise to a Poisson/Dirac bracket structure whose algebra mirrors the Lie algebra of $\mathfrak{g}$?
 A: In this answer we will consider a Lie algebra $L$ (rather than a Lie group). Then:

*

*If $M$ is a manifold, let there be a Lie algebra homomorphism
$$ L~~\stackrel{\rho}{\longrightarrow}~~  \Gamma(TM)\tag{1}$$
into the Lie algebra of vector fields on $M$. The map $\rho$ is called an anchor.


*If the manifold $(M,\{\cdot,\cdot\}_{PB})$ is a Poisson manifold, it is natural to require that the vector fields $X\in {\rm Im}(\rho)$ preserve the Poisson structure $$ {\cal L}_X\{f,g\}_{PB}~=~ \{{\cal L}_Xf,g\}_{PB}+\{f,{\cal L}_Xg\}_{PB}.\tag{2}$$


*Note that the Poisson algebra $(C^{\infty}(M),\{\cdot,\cdot\}_{PB})$ of smooth functions on a Poisson manifold is an infinite dimensional Lie algebra.


*Note that the map
$$\begin{align} C^{\infty}(M)~\ni ~h~~\mapsto~ X_h~\equiv~&\{h,\cdot\}_{PB}\cr~\in~&\Gamma(TM) \end{align}\tag{3}$$
from smooth functions to Hamiltonian vector fields is a Lie algebra homomorphism
$$ (C^{\infty}(M),\{\cdot,\cdot\}_{PB})~~\longrightarrow~~(\Gamma(TM),[\cdot,\cdot]_{LB}). \tag{4} $$
Hamiltonian vector fields automatically preserves the Poisson structure from point 2.


*Let us additionally demand that all the vector fields $X\in {\rm Im}(\rho)$ are Hamiltonian vector fields $X_h$.


*Note that the choice of Hamiltonian $h\in C^{\infty}(M)$ for a Hamiltonian vector field $X$ is not unique. [For a connected symplectic manifold, the Hamiltonian $h$ is unique up to a constant.]


*Let us furthermore assume that there exists a linear map
$$ L ~\ni~\xi~~\stackrel{\tilde{\mu}}{\mapsto}~~h_{\xi}~\in~C^{\infty}(M)\tag{5} $$
that makes the following diagram commutative
$$ \begin{array}{ccc} L  & ~\stackrel{\tilde{\mu}}{\longrightarrow} & C^{\infty}(M) \cr
 &\rho \searrow~ & \downarrow  X \cr
       && \Gamma(TM), 
\end{array}\tag{6}$$
i.e.
$$\forall \xi~\in~L:~~  \rho(\xi)~=~X_{h_{\xi}}.\tag{7}$$


*One may show that the map
$$\begin{align} \Lambda^2L ~\ni~\xi_1\wedge\xi_2~~\stackrel{P}{\mapsto}~&~
\{h_{\xi_1},h_{\xi_2}\}_{PB}~\cr
\equiv~&X_{h_{\xi_1}}[h_{\xi_2}] \cr~\in~&C^{\infty}(M)\end{align}\tag{8}$$
is then a 2-cocycle
$$\begin{align}\sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}& P([\xi_1,\xi_2]\wedge\xi_3)\cr
~\stackrel{(8)}{=}~& \sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}X_{h_{[\xi_1,\xi_2]}}[h_{\xi_3}]\cr
~\stackrel{(7)}{=}~& \sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}\rho([\xi_1,\xi_2])[h_{\xi_3}] \cr
 ~\stackrel{(1)}{=}~& \sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}[\rho(\xi_1),\rho(\xi_2)]_{LB}[h_{\xi_3}]\cr
~\stackrel{(7)}{=}~& \sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}[X_{h_{\xi_1}},X_{h_{\xi_2}}]_{LB}[h_{\xi_3}]\cr
~\stackrel{(4)}{=}~& \sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}X_{\{h_{\xi_1},h_{\xi_2}\}_{PB}}[h_{\xi_3}]\cr
~\equiv~& \sum_{\xi_1,\xi_2,\xi_3~{\rm cycl.}}\{\{h_{\xi_1},h_{\xi_2}\}_{PB},h_{\xi_3}\}_{PB}\cr
~=~&0. \end{align} \tag{9} $$


*Let us furthermore demand that the map $\tilde{\mu}: \xi\mapsto h_{\xi}$ should be a Lie algebra homomorphism
$$ (L,[\cdot,\cdot])~~ \stackrel{\tilde{\mu}}{\longrightarrow}~~(C^{\infty}(M),\{\cdot,\cdot\}_{PB}). \tag{10} $$
This is equivalent to that the 2-cocycle $P$ should be a 2-coboundary
$$ P(\xi_1\wedge\xi_2)~=~h_{[\xi_1,\xi_2]}.\tag{11} $$
There can be a 2-cocycle obstruction/classical anomaly that prevents this.


*In affirmative case, the map $\tilde{\mu}$ is called a Hamiltonian action. The dual map $\mu:M\to L^{\ast}$ is called a moment map.
A: The basic idea is the following one. For the sake of simplicity, I henceforth assume  that every function does not depend explicitly on time (with a little effort, everything could be generalized dealing with a suitable fiber bundle over the axis of time whose fibers are spaces of phases at time $t$).
On a symplectic $2n$ dimensional manifold (a space of phases), $(M, \omega)$, where $\omega$ is the symplectic 2-form, you first define the Hamiltonian  vector field $X_f$ associated to a smooth function $f: M \to \mathbb R$ as the unique vector field such that:
$$\omega(X_f, \cdot) = df\:.\tag{1}$$
The definition is well-posed because $\omega$ is non degenerate by hypotheses. $\omega$ is also antisymmetric and closed by hypotheses, therefore due to a theorem due to Darboux, on a suitable atlas which always exists $\omega = \sum_{i=1}^n dq^i \wedge dp_i$. In this picture you recover the standard $q-p$ formulation of Hamiltonian mechanics.
Next, you have the  Poisson bracket of two smooth functions defined as
$$\{f, g\}:= \omega(X_f,X_g)\:.\tag{2}$$
The (generally local) one-parameter group of diffeomorphisms generated by $X_f$
turns out to be made of canonical transformations in the standard sense of Hamiltonian mechanics. $f$ is said to be the Hamiltonian generator of that transformation.  Using Darboux' atlas, i.e. coordinates, $q^1,\ldots, q^n, p_1,\ldots, p_n$, both Hamilton equations and Poisson brackets assume the standard form  more familiar to physicists.
If $H$ is a preferred function $f$ called the Hamiltonian function, the integral lines of $X_H$ are nothing but the solution of Hamilton equations.
With these definition it turns out that, if $[\:.,\:.]$ is the standard commutator of vector fields,
$$[X_f,X_g] = X_{\{f,g\}}\:.\tag{3}$$
As an immediate consequence of (3), you see that if $\{f,H\}=0$, then the integral lines of $X_H$ remains integral lines of $X_H$ also under the action of the group generated by $X_f$. In this case you have a dynamical symmetry.
Moreover, from (1) and (2), $$X_H(f) = \{f,H\}$$
so that $\{f,H\}=0$ also implies that $f$ is invariant under the Hamiltonian flow, i.e., it is a constant of motion.
The fact that $f$ is a constant of motion and that it generates (canonical) transformations which preserve the evolution of the system are equivalent facts.
This fantastic equivalence does not hold within the Lagrangian formulation of mechanics.
In this scenario, suppose that the $N$ dimensional Lie group $G$ freely acts on $M$ in terms of diffeomorphisms bijective. The one-parameters of the group define corresponding one parameter groups of diffeomorphisms whose generators have the same Lie algebra as that of $G$. So if $e_1,\ldots, e_n$ is a basis of $\mathbb g$ (the Lie algebra of $G$), with
$$[e_i,e_j] = \sum_{k=1}^N c^k_{ij}e_k$$
you correspondingly find, for the associated vector fields defining th corresponding one-parameter groups of diffeomorphisms
$$[X_i,X_j] = \sum_k c^k_{ij}X_k\:.$$
Suppose eventually that each $X_i$ can be written as $X_{f_i}$ for a corresponding smooth function $f_i : M \to \mathbb R$. In this case, the one-parameter group of diffeomorphisms generated by $X_f$ is a one-parameter group of canonical transformations. (This automatically happens when the action of $G$ preserves the symplectic form.)
Consequently,
$$X_{\{f_i,f_j\}} = [X_{f_i},X_{f_j}] =  \sum_k c^k_{ij}X_{f_k}\:.$$
Using the fact that the Poisson brakes are bi-linear:
$$X_{\{f_i,f_j\} - \sum_k c^k_{ij}f_k} =0$$
and thus, since $f \mapsto X_f$ is injective up an additive constant to $f$,
$$\{f_i,f_j\} = q_{ij} +\sum_k c^k_{ij}f_k$$
the constants $q_{ij}$ generally appear, sometime (as it happens if $G=SO(3)$) you can re-absorb them in the definition of the $f_i$ which, in turn, are defined up to additive constants. (It is a co-homological problem depending on $G$).
A: Great question!
One way to look at what is going on is to use the Hamiltonian version of Noether's theorem. The Noether procedure generates a conserved charge $Q$ associated with the symmetry with parameter $\theta$. It turns out that $Q$ is the generator of that symmetry, in the sense that for some function $A$ of phase space variables
\begin{equation}
\{A,Q\} = \frac{\partial A}{\partial\theta}
\end{equation}
In fact the proof is not hard (do it for the case where the momentum does not change under the symmetry, $\delta_\theta p =0, \delta_\theta q \neq 0$). You simply take the definition of the Noether charge and plug and chug. 
Now let's say I have some non-Abelian symmetry group $G$ with generators $T^a$. Associated with each generator is a conserved charge $Q^a$. How do the charges act on each other? It must be another symmetry transformation!
\begin{equation}
\{Q^a,Q^b\} = \frac{\partial Q^a}{\partial \theta^b} = \frac{\partial Q^b}{\partial \theta^a} = f^{abc} Q^c
\end{equation}
where the $f^{abc}$ are the structure constants of the group (up to likely missing factors of $i$ or $2$).
A related statement is Frobenius's Theorem. The idea is that a set of vector fields is integrable only if their algebra closes. The symmetry transformations of the system should leave the system inside of some submanifold on phase space, and so the set of vector fields associated with the symmetry generators should be integrable. Thus the algebra of the generators should close.
