I'm reading the fifth edition of Computability and Logic and stumbling across a seeming contradiction. There is a paragraph on page 223 which states that according to Corollaries 15.4 and 15.5 the sets of valid sentences and theorems of any axiomatizable theory are semirecursive. Later on in the same paragraph there is a statement that according to theorems 17.5 and 17.6 these sets are not recursive. How to understand these two statements at the same time?
More specifically, how should one understand these two theorems together: Theorem 15.5 (Gödel completeness theorem, abstract form): the sets of valid sentences are semirecursive. Theorem 17.6 (Church's theorem): the set of valid sentences is not decidable.
And these two together: Corollary 15.4: the sets of sentences deducible from given recursive set of sentences is semirecursive. Theorem 17.4: the set of Gödel numbers of sentences of arithmetic that are true in the standard interpretation is not recursive.
To me it seems that the former ones of both pairs of theorems tell that the certain set is semirecursive and the latter ones that the same set cannot be semirecursive. I'm probably missing something very crucial here, so I would appreciate if anybody could explain where this misunderstanding could come from.
It looks like you're confused over the distinction between provability from a given theory and truth in a given model.
A sentence is valid if it is true in every model. By the Completeness Theorem, this is the same as being provable from the empty theory $\emptyset$. The set of valid sentences is indeed semirecursive; more generally, ...
... for any recursive set of sentences $T$, the set $Ded(T)$ of things provable from $T$ is semirecursive. That said, $Ded(T)$ is not always recursive, even if $T$ is; there are some recursive $T$ for which $Ded(T)$ is recursive (e.g. the theory of real closed fields), and some for which it isn't (e.g. (first-order) Peano arithmetic). But meanwhile ...
... the sentences true in the standard model of arithmetic - often denoted "$Th(\mathbb{N})$" - is quite a different animal altogether. Remember that being provable from $T$ means being true in every model of $T$; here, instead, we're fixing a specific model and asking what is true in it.
So there is no contradiction between the statements $$\mbox{The set of consequences of a recursive theory is semirecursive}$$ and $$\mbox{$Th(\mathbb{N})$ is not arithmetically definable (in particular, not semirecursive)}$$ since $Th(\mathbb{N})$ is not, in fact, the set of consequences of any recursive theory.
Note that the previous sentence is in fact what the incompleteness theorem says (or one of its versions, anyways) - that any recursive set of sentences true of the standard model is not complete. (And Tarski improves this greatly.)