Abstract
We develop, in Isabelle/HOL, three embeddings of monadic second-order logic
(MSO) into classical higher-order logic side by side: a deep embedding
(an inductive datatype with an explicit satisfaction relation), a
maximal-shallow embedding, and a minimal-shallow embedding
— the last a locale parametrised by an interpretation and by first- and
second-order assignments. The enabling ingredient is a two-sorted
capture-avoiding substitution apparatus (predication, substitution, alphabetic
renaming, and a substitution lemma, developed once for each binder namespace),
in which each binder is transparent for the other. Faithfulness of all three
embeddings is mechanised and automated.
The central result is a fully mechanised two-sorted downward
Löwenheim–Skolem theorem. Its corollary identifies range-relative
validity with the general (Henkin-style) reading of MSO, while comprehension
witnesses that the standard reading is strictly stronger; an
elementary-substructure refinement recovers the standard reading from the
minimal embedding as well, so the two readings become one device under two
interpretation classes. We further exercise the embeddings on classical MSO
landmarks: Boolean closure and graph operations hold under the standard (full
second-order) reading and fail under the general one, making the dichotomy
concrete, while reachability and 2-colorability are non-theorems, refuted
throughout with nitpick countermodels.
License
Note
Generative AI use: The authors used generative AI assistants (Anthropic’s Claude family of models) to draft and shorten prose, to propose and shorten some proofs (in particular parts of the two- sorted Löwenheim–Skolem construction), and to maintain the LaTeX presentation of this entry. The mathematical content, the theory development, and the design choices are the authors’; all text and proofs in the final entry have been verified by the authors, who take full responsibility for the content.
Topics
- Logic/General logic
- Logic/General logic/Classical first-order logic
- Computer science/Programming languages/Logics
- Computer science/Semantics and reasoning
- Logic/General logic/Mechanization of proofs
Session MSOinHOL
- MSOinHOL_preliminaries
- MSOinHOL_deep
- MSOinHOL_deep_subst_lemma
- MSOinHOL_shallow
- MSOinHOL_shallow_minimal_locale
- MSOinHOL_faithfulness_locale
- MSOinHOL_shallow_minimal
- MSOinHOL_faithfulness
- MSOinHOL_experiments
- MSOinHOL_experiments_classic
- MSOinHOL_experiments_locale
- MSOinHOL_subst_extras
- MSOinHOL_comprehension
- MSOinHOL_lowenheim_skolem_lemmas
- MSOinHOL_lowenheim_skolem
- MSOinHOL_shallow_minimal_elementary
- MSOinHOL_experiments_classic_elementary
- MSOinHOL_experiments_extra