  We construct a model in which the cosmological constant is canceled from the
gravitational equations of motion. Our model relies on two key ingredients: a
nonlocal constraint on the action, which forces the spacetime average of the
Lagrangian density to vanish, and a dynamical way for this condition to be
satisfied classically with arbitrary matter content. We implement the former
condition with a spatially-constant Lagrange multiplier associated with the
volume form and the latter by including a free four-form gauge field strength
in the action. These two features are enough to remove the cosmological
constant from the Einstein equation. The model is consistent with all
cosmological and experimental bounds on modification of gravity and allows for
both cosmic inflation and the present epoch of acceleration.
