This paper discusses an application of the higher-order abstract syntax technique to general-purpose theorem proving, yielding shallow embeddings of the binders of formalized languages.
Higher-order abstract syntax has been applied with success in specialized logical frameworks
which satisfy a closed-world assumption. As more general environments (like Isabelle/HOL
or Coq) do not support this closed-world assumption, higher-order abstract syntax may yield
exotic terms, that is, datatypes may produce more terms than there should actually be in the
language. The work at hand demonstrates how such exotic terms can be eliminated by means
of a two-level well-formedness predicate, further preparing the ground for an implementation
of structural induction in terms of rule induction, and hence providing fully-fledged syntax
analysis. In order to apply and justify well-formedness predicates, the paper develops a proof
technique based on a combination of instantiations and reabstractions of higher-order terms.
As an application, syntactic principles like the theory of contexts (as introduced by Honsell,
Miculan, and Scagnetto) are derived, and adequacy of the predicates is shown, both within a
formalization of the π-calculus in Isabelle/HOL.