Irreducibility via Prime Ideals