This question is essentially the question I asked on Mathoverflow.
Monadic Second Order (MSO) logic is second order logic with quantification over unary predicates. That is, quantification over sets. There are several MSO logics that are fundamental to structures studied in computer science.
Question 1. Is there a categorical semantics for Monadic Second Order Logics?
Question 2. Treatments of categorical logic often talk about "higher order intuitionistic logic." Am I right to assume that they are referring to higher order functions, rather than quantification over second order predicates?
Question 3. (Added, 08 Nov 2013, after Neel's answer) My understanding of first-order quantification (in terms of the presentation of Pitts mentioned below) is that it is defined with respect to the pullback $\pi^*$ of a projection morphism $\pi$. Specifically, universal quantification is interpreted as the right adjoint of $\pi^*$ and existential quantification is interpreted as the left adjoint of $\pi^*$. These adjoints have to satisfy some conditions, which I have sometimes seen referred to as Beck-Chevalley and Frobenius-Reciprocity conditions.
Now if we want to quantify over predicates I assume I'm in a Cartesian closed category, the picture is nearly the same, except that $X$ below has a different structure from before.
$$ \exists_{I,X}, \forall_{I,X}: P_C(I\times X) \to P_C(I) $$
Is that right?
I believe my mental block was because I was previously dealing with first-order hyperdoctrines and did not need the category to be Cartesian closed and did not consider it later.
Background and Context. I have been working with the presentation of categorical logic by Andy Pitts in his Handbook of Logic in Computer Science article, but I'm also familiar with the treatment of Tripos theory in his doctoral dissertation, as well as the notes of Awodey and Bauer. I started out studying Crole's Categories for Types and the book by Lambek and Scott but it's been a while since I consulted the last two texts.
For motivation, I am interested in the kind of MSO logics appearing in the theorems below. I do not want to deal with a logic that is expressively equivalent to one of these. Meaning, I do not want to encode monadic predicates in terms of higher order functions and then deal with another logic, but I'm happy to study a semantics that includes such an encoding under the hood.
- (Buechi and Elgot Theorem) When the universe of structures is finite words over a finite alphabet, a language is regular exactly if it is definable in MSO with an interpreted predicate for expressing consecutive positions.
- (Buechi's Theorem) When the universe of structures is $\omega$-words over a finite alphabet, a language is $\omega$-regular exactly if it is definable in MSO with an appropriate interpreted predicate.
- (Thatcher and Wright Theorem) A set of finite trees is recognizable by a bottom-up finite tree automaton exactly if it is definable in MSO with an interpreted predicate.
- WS1S is the Weak Monadic Second order theory of One Successor. Formulae define sets of natural numbers and second order variables can only be interpreted as finite sets. WS1S can be decided by finite automata by encoding tuples of natural numbers as finite words.
- (Rabin's Theorem) S2S is the Second order theory of Two Successors. S2S can be decided by Rabin automata.