  We use the requirement of diffeomorphism invariance in the Bianchi I context
to derive the form of the quantum Hamiltonian constraint. After imposing the
correct classical behavior and making a certain minimality assumption, together
with a certain restriction to "planar loops", we then obtain a unique
expression for the quantum Hamiltonian operator for Bianchi I to both leading
and subleading orders in $\hbar$. Specifically, this expression is found to
exactly match the form proposed by Ashtekar and Wilson-Ewing in the loop
quantum cosmology (LQC) literature. Furthermore, by using the projection map
from the quantum states of the Bianchi I model to the states of the isotropic
model, we constrain the dynamics also in the homogeneous isotropic case, and
obtain, again to both leading and subleading order in $\hbar$, a quantum
constraint which exactly matches the standard `improved dynamics' of Ashtekar,
Pawlowski and Singh. This result in the isotropic case does not require a
restriction to planar loops, but only the minimality assumption. Our results
strengthen confidence in LQC dynamics and its observational predictions as
consequences of more basic fundamental principles. Of the assumptions made in
the isotropic case, the only one not rigidly determined by physical principle
is the minimality principle, our work also shows the exact freedom allowed when
this assumption is relaxed.
