TITLE: What are some examples of third, fourth, or fifth order logic sentences?
QUESTION [19 upvotes]: I know this seems like an obvious question, but I haven't been able to find any examples of sentences in logic higher than second order, so my intuition on how it's supposed to behave is failing me. There are descriptions describing third order logic as 'properties of properties' but without example syntax, I'm not sure if I'm on the wrong track or not.
Propositional logic sentences are simple propositions connected by logical connectives:
$\phi$ $\land$ $\psi$
$\phi \lor \psi$
$\lnot \phi \rightarrow \psi$
First order logic sentences are quantified objects with free predicates and functions:
$\exists$x $\forall$y P(f(x)) $\rightarrow$ Q(y)
Second order logic sentences don't just quantify the objects, but the functions and predicates:
$\forall$Q $\exists$P $\exists$f $\exists$x $\forall$y    P(f(x)) $\rightarrow$ Q(y)
How do we go higher than second order? What are some examples of third, fourth, or fifth order logic sentences?

REPLY [14 votes]: In the context of higher-order arithmetic, there are many natural third-order statements.  In arithmetic, quantifiers over natural numbers are first-order, quantifiers over sets of natural numbers are second-order, and quantification over sets of sets of natural numbers is third-order. 
Using standard coding methods, quantifying over real numbers is second-order, so quantifying over sets of real numbers is third-order. 
Some English sentences that are expressed as third-order statements in the language of arithmetic, but not as second-order statements, include:

There is an nonprincipal ultrafilter on $\mathbb{N}$.
Every subset of the unit interval $[0,1]$ has a cluster point. 
There is a discontinuous function from $\mathbb{R}$ to $\mathbb{R}$. 

Similarly, one can obtain fourth-order statements by quantifying over arbitrary subsets of $\mathbb{R}$.