  Motivated by the geometric theory of differential equations and the
variational approach to the equivalence problem for geometric structures on
manifolds, we consider the problem of equivalence for distributions with fixed
submanifolds of flags on each fiber. We call them flag structures. The
construction of the canonical frames for these structures can be given in the
two prolongation steps: the first step, based on our previous works, gives the
canonical bundle of moving frames for the fixed submanifolds of flags on each
fiber and the second step consists of the prolongation of the bundle obtained
in the first step. The bundle obtained in the first step is not as a rule a
principal bundle so that the classical Tanaka prolongation procedure for
filtered structures can not be applied to it. However, under natural
assumptions on submanifolds of flags and on the ambient distribution, this
bundle satisfies a nice weaker property. The main goal of the present paper is
to formalize this property, introducing the so-called quasi-principle frame
bundles, and to generalize the Tanaka prolongation procedure to these bundles.
Applications to the equivalence problems for systems of differential equations
of mixed order, bracket generating distributions, sub-Riemannian and more
general structures on distributions are given.
