Cohomology theory of a complex with a transformation of prime period and its applications