The field of p-adic numbers Q p and the ring of p-adic integers Z p are essential constructions of modern number theory. Hensel's lemma, described by Gouvêa as the "most important algebraic property of the p-adic numbers, " shows the existence of roots of polynomials over Z p provided an initial seed point. The theorem can be proved for the p-adics with significantly weaker hypotheses than for general rings. We construct Q p and Z p in the Lean proof assistant, with various associated algebraic properties, and formally prove a strong form of Hensel's lemma. The proof lies at the intersection of algebraic and analytic reasoning and demonstrates how the Lean mathematical library handles such a heterogeneous topic.