  Setting the cosmological constant to be dynamical, we study the bulk and
boundary thermodynamics of charged Anti-de Sitter black holes. We develop
mass/energy formulas in terms of thermodynamic state functions for the extended
thermodynamics, mixed thermodynamics, and boundary conformal field theory
thermodynamics. We employ the residue method to study the topological
properties of the phase transitions. Our analysis reveals that the bulk and
boundary thermodynamics are topologically equivalent for both criticalities and
first-order phase transitions in the canonical ensembles, as well as for the
Hawking-Page(-like) phase transitions in the grand canonical ensembles.
Additionally, those three kinds of phase transitions are shown to be
distinguished by their unique topological charges. Our results exemplify the
gravity-gauge duality in terms of topology.
