Hooley's theorem and its avatars