f(b1b2...bn) = v(b1)*kn-1 + v(b2)*kn-2 + ... + v(bn)*k0where v(ai) = i. It is easy to see that f is injective (it is similar to the function used to represent numbers in base k; the only difference is that we assign to ai the value i instead of i-1 in order to count also the prewsence of the initial a1's in a string.
Another injective function g : S1 -> N which we could have used is
g(b1b2...bn) = p1v(b1)*p2v(b2)*... *pnv(bn)where v(ai) is defined as before and pi = i-th prime number.
Assume (by contradiction) that S2 is countable. Then consider some indexing of the elemenst of S2 = {s1, s2, ... , sn, ...}. Define a string s as follows:
the i-th symbol of s is h(i-th symbol of si)where h(a1) = a2, h(a2) = a3, ... h(ak) = a1. Since s belongs to S2, it must have an index (as we are assuming that S2 is countable). Let j be the index of s, i.e. s = sj. Let b be the j-th symbol of sj. Then we have that b = h(b), which is impossible.
p(L) =def= L is emptyis not upward closed. Hence if L1 were RE it would contadict Point 1 of the Lemma of Effective Discontinuity.
Alternatively, one could use the theorem of Rice-Shapiro. In fact, the set of non-empty languages can be written as the union of all the upward closure of the sets {x}, for any string x. These sets are finite, and they are indexed on the strings on {0,1}, which constitite a RE (even Rec) set.
To prove that L2 is not Rec, consider the property
p(L) =def= L is not empty.This property is not-trivial, hence, by the theorem of Rice, L1 cannot be upward closed.
Another proof that L2 is not Rec is the following. Note that L1 is the complement of L2 union the set NE = {x in {0,1}* | x is not the encoding of any TM}. Since NE is Rec, if L2 were Rec then L1 would be Rec as well. But we have proved that L1 is not even RE.
p(L) =def= L = {0,1}*is not finitely reachable. Hence if L3 were RE it would contradict Point 2 of te Lemma of Effective Discontinuity.