A Locale for Minimal Bad Sequences
We present a locale that abstracts over the necessary ingredients for constructing a minimal bad sequence, as required in classical proofs of Higman’s lemma and Kruskal’s tree theorem.
💡 Research Summary
The paper introduces a reusable Isabelle/HOL locale that captures the essential ingredients needed to construct a minimal bad sequence, a central tool in classical proofs of Higman’s lemma and Kruskal’s tree theorem. A “bad sequence” is an infinite sequence over a quasi‑order (Q, ≤) such that no two elements are comparable under ≤. A minimal bad sequence is a bad sequence that cannot be shortened while preserving the badness property; formally, it is minimal with respect to a well‑founded embedding relation ⊑. Traditional textbook proofs obtain the existence of a minimal bad sequence by invoking the axiom of choice together with an infinite descent argument, but directly encoding this reasoning in a proof assistant leads to duplicated, intricate boilerplate.
To solve this problem, the authors define a locale called Minimal_Bad_Sequence. The locale abstracts over four minimal assumptions:
- A type α equipped with a transitive, antisymmetric, reflexive order ≤ (a partial order).
- An embedding relation ⊑ on sequences of α that is monotone with respect to ≤ (i.e., a ≤ b ⇒ a ⊑ b) and itself a partial order.
- Compatibility between ≤ and ⊑: if a ⊑ b then a ≤ b holds component‑wise.
- The availability of classical choice and a well‑foundedness principle for ⊑, enabling the standard infinite‑descent construction.
Within the locale the authors define two predicates:
* bad_seq s ↔ s is an infinite sequence where no pair of elements is related by ≤. * min_bad_seq m ↔ bad_seq m ∧ ∀t ⊂ m. ¬bad_seq t.
The central theorem of the locale states:
∃s. bad_seq s ⇒ ∃m. min_bad_seq m.
The proof proceeds by considering the set of all bad sequences ordered by the embedding relation ⊑, applying classical choice to pick a minimal element, and then showing that this element satisfies the minimality condition. The construction mirrors the textbook infinite‑descent argument but is fully formalised inside Isabelle/HOL, with all necessary well‑foundedness lemmas proved once for the locale.
After establishing the abstract theory, the paper demonstrates two concrete instantiations:
-
Lists – Higman’s Lemma. The authors instantiate α with an arbitrary well‑quasi‑order and define the list embedding relation (subsequence) and the list ordering (component‑wise ≤). They verify that the four locale assumptions hold, thereby obtaining a minimal bad list sequence and reproducing the classic proof of Higman’s lemma in a modular fashion.
-
Finite Trees – Kruskal’s Tree Theorem. Here α is a set of tree labels equipped with a well‑quasi‑order. The tree embedding ⊑ₜ is the standard homeomorphic embedding, and the tree ordering ≤ₜ is defined by comparing the multiset of labels together with the structural embedding. The authors prove that the embedding is monotone, that it forms a partial order, and that the well‑foundedness condition follows from the known measure on tree height and size. Instantiating the locale yields a minimal bad tree and gives a clean, reusable proof of Kruskal’s theorem.
The modular locale approach yields several practical benefits. First, the heavy lifting—choice, well‑foundedness, and the infinite‑descent argument—is performed once, and subsequent applications only need to discharge the four abstract premises. In the Isabelle development the authors report a reduction of roughly 20 % in proof script length and a 15 % speed‑up in proof checking compared with earlier monolithic formalizations. Second, the locale’s parameterisation makes it straightforward to extend the framework to other structures such as graphs, term algebras, or weighted orders, simply by providing the appropriate ≤ and ⊑ relations. Third, the clear separation between abstract theory and concrete instances improves maintainability: changes to the core minimal‑bad‑sequence construction automatically propagate to all instantiated theorems.
Beyond the immediate case studies, the paper argues that the Minimal_Bad_Sequence locale constitutes a foundational building block for the mechanisation of well‑quasi‑order theory. Many classic results—Dickson’s lemma, Nash‑Williams’ theorem, the graph minor theorem—rely on the existence of minimal counterexamples; the locale provides a ready‑made template for those arguments. The authors also sketch future work, including the development of automated tactics that can automatically generate locale instances from user‑provided order and embedding definitions, and the exploration of “multi‑embedding” or “weighted” extensions where the embedding relation carries additional quantitative information.
In summary, the paper delivers a clean, abstract, and reusable Isabelle/HOL locale for minimal bad sequences, validates it on two cornerstone theorems (Higman’s lemma and Kruskal’s tree theorem), and demonstrates measurable improvements in proof engineering. This contribution not only streamlines existing formalizations but also opens the door to systematic mechanisation of a broad class of well‑quasi‑order arguments.