In mathematical logic, monadic second-order logic is the fragment of second-order logic where the second-order quantification is limited to quantification over sets. It is particularly important in the logic of graphs, because of Courcelle's theorem, which provides algorithms for evaluating monadic second-order formulas over graphs of bounded treewidth. It is also of fundamental importance in automata theory, where the Büchi-Elgot-Trakhtenbrot theorem gives a logical characterization of the regular languages.
Second-order logic allows quantification over predicates. However, MSO is the fragment in which second-order quantification is limited to monadic predicates. This is often described as quantification over "sets" because monadic predicates are equivalent in expressive power to sets.