(*<*) (* Author: Dmitriy Traytel *) section ‹A Codatatype of Formal Languages› theory Coinductive_Language imports Main begin hide_const (open) Inter (*>*) section ‹Introduction› text ‹ We define formal languages as a codataype of infinite trees branching over the alphabet @{typ 'a}. Each node in such a tree indicates whether the path to this node constitutes a word inside or outside of the language. ›