||The Atiyah-Singer index theorem on a closed manifold is well understood and appreciated in physics. On the other hand, the Atiyah-Patodi-Singer index, which is an extension to a manifold with boundary, is physicist-unfriendly, in that it is formulated with a nonlocal boundary condition. Recently we proved that the same index as APS is obtained from the domain-wall fermion Dirac operator. Our theorem indicates that the index can be expressed without any nonlocal conditions, in such a physicist-friendly way that application to the lattice gauge theory is straightforward. The domain-wall fermion provides a natural mathematical foundation for understanding the bulk-edge correspondence of the anomaly inflow.