  We propose a method for reduction of quantum systems with arbitrary first
class constraints. An appropriate mathematical setting for the problem is
homology of associative algebras. For every such an algebra $A$ and its
subalgebra B with an augmentation e there exists a cohomological complex which
is a generalization of the BRST one. Its cohomology is an associative graded
algebra Hk^{*}(A,B) which we call the Hecke algebra of the triple (A,B,e). It
acts in the cohomology space H^{*}(B,V) for every left A- module V. In
particular the zeroth graded component Hk^{0}(A,B) acts in the space of B-
invariants of V and provides the reduction of the quantum system.
