  Basic derivative formulas are presented for hypoelliptic heat semigroups and
harmonic functions extending earlier work in the elliptic case. Emphasis is
placed on developing integration by parts formulas at the level of local
martingales. Combined with the optional sampling theorem, this turns out to be
an efficient way of dealing with boundary conditions, as well as with finite
lifetime of the underlying diffusion. Our formulas require hypoellipticity of
the diffusion in the sense of Malliavin calculus (integrability of the inverse
Malliavin covariance) and are formulated in terms of the derivative flow, the
Malliavin covariance and its inverse. Finally some extensions to the nonlinear
setting of harmonic mappings are discussed.
