Short answer
- The Büchi–Elgot–Trakhtenbrot equivalence (MSO on finite words = WS1S on N with finite-set quantification) is robust under adding any relations that are already MSO-definable in the basic signature; in particular, all “regular” and modular-counting predicates preserve both equivalence and decidability.
- A much wider class also works: adding Presburger-style cardinality constraints on monadic variables (e.g., |X|<|Y|, |X|≡r mod m, and more general linear constraints on sizes of MSO-definable sets) preserves the MSO↔WS1S equivalence on words and remains decidable. Your specific example |X|<|Y| does not make WS1S undecidable.
- By contrast, adding arithmetic on positions (e.g., first-order addition +) breaks decidability (already on the WS1S side), hence the equivalence.
What exactly can you add?
- Anything already MSO-definable over words
- If the added predicate/relation is definable in plain MSO over words (equivalently: recognized by a finite-state “regular” mechanism), then adding it to the signature doesn’t increase expressive power. This includes, for example:
- successor, first/last position,
- local neighborhood relations,
- modular counting on sets or on the length of the word (CMSO).
- Your E(X) “X has even cardinality” falls into this case; it is MSO-definable and so adds no power.
- Presburger cardinality constraints on monadic variables
- A much stronger extension is to allow linear arithmetic constraints on sizes of MSO-definable sets, e.g., |X|<|Y|, |X|≡r (mod m), a1|X1|+…+ak|Xk| ≤ b, and Boolean combinations of such constraints. Over words, both WS1S and MSO remain decidable under this extension, and the classical MSO↔WS1S correspondence continues to hold (they define the same languages).
- This is precisely the setting studied by:
- F. Klaedtke and H. Rueß, Monadic Second-Order Logics with Cardinalities. (ICALP 2003; journal versions follow.)
They show decidability of WS1S/MSO extended with Presburger constraints on cardinalities of (weak) monadic variables. In particular, your example |X|<|Y| is allowed and decidable.
- Note: This extension strictly increases expressive power beyond regular languages on the MSO side (e.g., it can define {a^n b^m : n < m}), but the WS1S side increases in lockstep; the two logics still coincide on words when both are given the same cardinality predicates.
- Arithmetic on positions (first-order numeric relations)
- If you add arithmetic on element variables (e.g., + or × on positions), the monadic second-order theory becomes undecidable (already over (N,<,+)). Hence, adding such relations destroys decidability and therefore the practical MSO↔WS1S correspondence.
- Classical references include results originating with Semenov and others on the (un)decidability of monadic second-order theories of arithmetic expansions of (N,<).
A clean way to see when the correspondence survives
- The usual MSO↔WS1S-on-words translation goes through as soon as the interpretation of any added predicates on the infinite model N(w) is determined by, and only depends on, the finite prefix {0,…,|w|−1} (i.e., it is “prefix dependent” and ignores the infinite tail). Cardinality constraints on finite sets satisfy this, as do all MSO-definable predicates. Arithmetic on positions does not.
Is this of interest?
- Yes. There is a substantial literature on “MSO with arithmetic” and “MSO with counting/cardinality,” with sharp decidability frontiers:
- CMSO (modular counting) does not increase expressiveness over words.
- Presburger cardinality constraints (Klaedtke–Rueß) increase expressiveness but remain decidable and preserve the MSO↔WS1S correspondence on words.
- Adding first-order arithmetic like + typically yields undecidability.
Related areas include BAPA (Boolean Algebra with Presburger Arithmetic), cost/MSO and WMSO+U on infinite structures, and descriptive complexity connections.
Takeaways for your examples
- E(X): already MSO-definable; no change.
- |X|<|Y|: decidable on both sides (contra the claim in the question); it increases expressiveness beyond regular languages, but MSO and WS1S remain equivalent when both are extended by the same cardinality predicates.
References
- F. Klaedtke and H. Rueß, Monadic Second-Order Logics with Cardinalities, ICALP 2003; Information and Computation 2004/2005. They give decision procedures for WS1S/MSO with Presburger cardinality constraints and discuss complexity.
- For undecidability with arithmetic on positions, see results on the monadic second-order theory of (N,<,+), e.g., A. L. Semenov’s work on monadic theories of arithmetic.