  We study Lindstrom quantifiers that satisfy certain closure properties which
are motivated by the study of polymorphisms in the context of constraint
satisfaction problems (CSP). When the algebra of polymorphisms of a finite
structure B satisfies certain equations, this gives rise to a natural closure
condition on the class of structures that map homomorphically to B. The
collection of quantifiers that satisfy closure conditions arising from a fixed
set of equations are rather more general than those arising as CSP. For any
such conditions P, we define a pebble game that delimits the distinguishing
power of the infinitary logic with all quantifiers that are P-closed. We use
the pebble game to show that the problem of deciding whether a system of linear
equations is solvable in Z2 is not expressible in the infinitary logic with all
quantifiers closed under a near-unanimity condition.
