Classification theory for abelian groups with an endomorphism