I am currently working on a problem to classify the following set:
$A = \{e \mid W_e \subset \{0,1\}\}$, where $W_e$ is the domain of some recursive function with code $e$.
I originally formulated it as the following FOL:
$e \in A \iff (\forall x)[ x \in W_e \implies x \leq 1] \iff (\forall x)(\exists y)[ T(e,x,y) \implies x \leq 1 ]$
EDIT: I have since found a better upper bound:
$e \in A \iff (\forall z)[ (z)_0 \leq 1 \lor \lnot T(e,(z)_0, (z)_1)]$
Where $T$ predicate is true when the program $e$ taking in $x$ halts with some intermediate computations $y$. Since $T$ is (primitive) recursive, this is in canonical form. I stated that the upper bound for $A$ is $\Pi_1^0$, but am having trouble proving that the lower bound is $\Pi_1^0$ as well.
Is this upper bound tight? And if so, any hints on approaches to prove the problem would be greatly appreciated.
First, a slight correction. The calculation $$e \in A \iff (\forall x)[ x \in W_e \implies x \leq 1] \iff (\forall x)(\exists y)[ T(e,x,y) \implies x \leq 1 ]$$ is not quite correct. The existential quantifier is in the wrong place. It should be $$e \in A \iff (\forall x)[ x \in W_e \implies x \leq 1] \iff (\forall x)[(\exists y) T(e,x,y) \implies x \leq 1 ]$$
Now, using the rule that $[(\exists x) \phi] \to \psi$ is equivalent to $(\forall x)[ \phi \to \psi]$ (when $\psi$ doesn't mention $x$), we get $$e \in A \iff (\forall x)[ x \in W_e \implies x \leq 1] \iff (\forall x)(\forall y)[ T(e,x,y) \implies x \leq 1 ]$$
This is a $\Pi^0_1$ statement, just like your second calculation.
To show that this bound is tight, you need to find an $m$-reduction from some other $\Pi^0_1$-hard set to your set. One typical $\Pi^0_1$ hard set is the set of $e$ so that $W_e = \emptyset$, and you can make a reduction from that set to that set in the question. In other words you want a computable $f$ so that, for all $e$, $W_e = \emptyset$ if and only if $W_{f(e)} \subseteq \{0,1\}$.