(*<*) theory Trie imports Main begin (*>*) text‹ To minimize running time, each node of a trie should contain an array that maps letters to subtries. We have chosen a representation where the subtries are held in an association list, i.e.\ a list of (letter,trie) pairs. Abstracting over the alphabet \<^typ>‹'a› and the values \<^typ>‹'v› we define a trie as follows: ›