What is the complexity (e.g. is it $\Sigma^0_1$, arithmetic, fully $\Pi^1_1$) of the relation $|a| < |b|$ given two notations $a, b \in \mathscr{O}$ (Kleene's O)?

What about the case where only one of the notations must be in $\mathscr{O}$ (where $b \not\in \mathscr{O} \implies |b| = \infty$)?

For instance, what is the complexity of a predicate $P(a,b)$ which is true whenever $a \in \mathscr{O} \land b \not\in \mathscr{O}$ and false whenever $a \not\in \mathscr{O} \land b \in \mathscr{O}$ (no restriction on the other cases)?

Note that P(a,b) is sorta the analog of a PA degree for well-foundedness.

--

For backgound, the Selection and Reduction chapter in Higher Recursion Theory tells us that there is a *computable* function t(a,b) such that t(a,b) is in $\mathscr{O}$ iff either a or b is in $ \mathscr{O}$ and $|t(a,b)| \geq \min(|a|,|b|)$ (but this doesn't obviously guarantee that $t(a,b) >_{\mathscr{O}} a$ or $t(a,b) >_{\mathscr{O}} b$).

However, I'm guessing that despite this being able to guess which of two relations is well-founded is pretty powerful. So I'm guessing that P(a,b) can be either $\Pi^1_1$ or $\Sigma^1_1$ depending on how you define it on the unrestrained cases but can't be $\Delta^1_1$.