Cocentral implies centralizer-dense

Cocentral subgroup
A subgroup $$H$$ of a group $$G$$ is termed cocentral if $$HZ(G) = G$$ where $$Z(G)$$ denotes the center of $$G$$.

Proof
Given:A group $$G$$ with center $$Z(G)$$, a cocentral subgroup $$H$$. In other words, $$HZ(G) = G$$.

To prove: $$C_G(H) = Z(G)$$, where $$C_G(H)$$ denotes the centralizer of $$H$$ in $$G$$.

Proof: Suppose $$K = C_G(H)$$. Then $$H \le C_G(K)$$. Also, $$Z(G) \le C_G(K)$$. Thus, $$HZ(G) \le C_G(K)$$, so $$G \le C_G(K)$$, forcing $$C_G(K) = G$$, forcing $$K \le Z(G)$$. On the other hand, $$Z(G) \le K$$ since anything in the center of $$G$$ centralizes $$H$$. Thus, $$K = Z(G)$$, completing the proof.