Higher-order abstract syntax is a natural way to formalize programming languages with binders, like the π-calculus, because α-conversion, instantiations and capture avoidance are delegated to the meta-level of the provers, making tedious substitutions superfluous. However, such formalizations usually lack structural induction, which makes syntax-analysis impossible. Moreover, when applied in logical frameworks with object-logics, like Isabelle/HOL or standard extensions of Coq, exotic terms can be defined, for which important syntactic properties become invalid. The paper presents a formalization of the π-calculus in Isabelle/HOL, using well-formedness predicates which both eliminate exotic terms and yield structural induction. These induction-principles are then used to derive the Theory of Contexts fully within the mechanization. 1 Motivation The π-calculus was introduced to model and analyse mobile systems [18,17]. In it, communication channels and messages belong to the same sort, called names. This simplicity gives the π-calculus the power to encode the λ-calculus [16], as well as higher-order object-oriented and imperative languages [27,26]. Communications are synchronous, that is, a senderāb.P transmits a message b to a recipient ax.Q, in a transitionāb.P | ax.Q τ −→ P | Q{b/x}. Usually, a substitution is applied to describe that b replaces x in Q. This can be tedious for processes with binders, like Q = (νb)Q , where a further substitution is necessary to avoid name-capture: Q{b/x} = α (νb)Q {b /b, b/x}. Higher-order abstract syntax builds upon a functional view, considering binders as abstractions with respect to an underlying λ-calculus to which the replacement of names and capture-avoidance are delegated. The above transition could thus be rewritten asāb.P | ax.f Q (x) τ −→ P | f Q (b), where the function f Q (x) = (νb)f Q (b, x) corresponds to the process Q, and the process f Q (b) represents Q{b/x}. Proofs in the π-calculus, and in particular bisimulation proofs, tend to be very large and tedious, hence machine-assistance is necessary to prevent errors.