completed proof of p/g(p) lemma