Formalization of context-free language theory