  The ring of ad\`eles of a global field and its group of units, the group of
id\`eles, are fundamental objects in modern number theory. We discuss a
formalization of their definitions in the Lean 3 theorem prover. As a
prerequisite, we formalized adic valuations on Dedekind domains. We present
some applications, including the statement of the main theorem of global class
field theory and a proof that the ideal class group of a number field is
isomorphic to an explicit quotient of its id\`ele class group.
