An Extended action for the effective field theory of dark energy: a
  stability analysis and a complete guide to the mapping at the basis of
  EFTCAMB
  We present a generalization of the effective field theory (EFT) formalism for
dark energy and modified gravity models to include operators with higher order
spatial derivatives. This allows the extension of the EFT framework to a wider
class of gravity theories such as Horava gravity. We present the corresponding
extended action, both in the EFT and the Arnowitt-Deser-Misner (ADM) formalism,
and proceed to work out a convenient mapping between the two, providing a self
contained and general procedure to translate a given model of gravity into the
EFT language at the basis of the Einstein-Boltzmann solver EFTCAMB. Putting
this mapping at work, we illustrate, for several interesting models of dark
energy and modified gravity, how to express them in the ADM notation and then
map them into the EFT formalism. We also provide for the first time, the full
mapping of GLPV models into the EFT framework. We next perform a thorough
analysis of the physical stability of the generalized EFT action, in absence of
matter components. We work out viability conditions that correspond to the
absence of ghosts and modes that propagate with a negative speed of sound in
the scalar and tensor sector, as well as the absence of tachyonic modes in the
scalar sector. Finally, we extend and generalize the phenomenological basis in
terms of $\alpha$-functions introduced to parametrize Horndeski models, to
cover all theories with higher order spatial derivatives included in our
extended action. We elaborate on the impact of the additional functions on
physical quantities, such as the kinetic term and the speeds of propagation for
scalar and tensor modes.
