  We elucidate the relationship between 2d integrable field theories and 2d
integrable lattice models, in the framework of the 4d Chern-Simons theory. The
2d integrable field theory is realized by coupling the 4d theory to multiple 2d
surface order defects, each of which is then discretized into 1d defects. We
find that the resulting defects can be dualized into Wilson lines, so that the
lattice of discretized defects realizes integrable lattice models. Our
discretization procedure works systematically for a broad class of integrable
models (including trigonometric and elliptic models), and uncovers a rich web
of new dualities among integrable field theories. We also study the
anomaly-inflow mechanism for the integrable models, which is required for the
quantum integrability of field theories. By analyzing the anomalies of chiral
defects, we derive a new set of bosonization dualities between generalizations
of massless Thirring models and coupled Wess-Zumino-Witten (WZW) models. We
study an embedding of our setup into string theory, where the thermodynamic
limit of the lattice models is realized by polarizations of D-branes.
