Different phase leads to different transport behavior in Pb
9Cu(PO
4)
6O compounds
This study computationally investigates the structural and electronic origins of the debated transport behavior in Cu-doped lead apatite (LK-99). The parent Pb$_{10}$(PO$_4$)$_6$O is an indirect-gap semiconductor. Cu doping at the 4$f$ Pb site induces a semiconductor-to-half-metal transition, with two half-filled flat bands crossing the Fermi level via Cu-$d$ and O-$p$ hybridization. In contrast, the 6$h$ phase forms a bipolar magnetic semiconductor with spin-polarized band edges. These distinct phase-dependent electronic structures explain the diverse experimental transport properties reported for LK-99.