mathmari said:
A language that contains 1 is for example $0^n10^n$ and a language that doesn't contain 1 is for example $0^{\star}$, right?
Yes.
mathmari said:
In my notes there is the following version of the theorem:
Let $P$ a nontrivial property of Turing machines (where trivial is a property that either all Turing machines have or none). Then the set (language) $L_P=\{n \in \mathbb{N} \mid \text{ the machine } T_n \text{ has the property } P\}$ is not recursive.
This statement is actually false. Comparing it with the correct Rice's theorem and determining why it is false is an excellent exercise.
I assume that $T_n$ denotes the machine with code $n$ and that each machine has a unique code. Consider the property $P(T)$ as follows: "$T$ has at most 10 states". By recovering the machine from a code $n$ and inspecting it we can definitely tell if the machine has at most 10 states or not. Therefore, $\{n\mid P(T_n)\text{ holds}\}$ is decidable.
As I said, Rice's theorem talks about properties of r.e. languages or, alternatively, of computable functions. When there is a question about recognizing some property of languages, the first question is how to feed a language into a computer. Since languages are in general infinite, we cannot feed it as a set, so we have to come up with some representation. One option is regular expressions, but they cover only a portion of languages, i.e., regular ones. Therefore we choose to represent a language by a TM that accepts it. Thus we may deal only with r.e. languages.
As I said, we want a property of languages, and each language has many TMs that accept it. Suppose we want to decide if a language is infinite. We write a program that instead of languages accepts their representations, i.e., TMs. Then it would be wrong if one TM leads to one answer (the language that it accepts is infinite), while another TM
accepting the same language leads to a different answer (the language is finite). Thus, if we are talking about the properties of TMs that we want to recognize, they must be "language-invariant" (my term). A property $Q$ of TMs is called language-invariant if
\[
\forall L,M_1,M_2.\;M_1\text{ accepts }L\text{ and }M_2\text{ accepts }L\implies (Q(M_1)\Leftrightarrow Q(M_2)).
\]
In other words, $Q$ does not distinguish TMs that accept the same language. Thus, each language-invariant property of TMs corresponds to a property of languages.
Let $L(T)$ be the language accepts by a TM $T$. Rice's theorem for languages can be stated in two forms.
1. If $P$ be a nontrivial property of languages, then $\{n\mid P(L(T_n))\text{ holds}\}$ is undecidable.
2. If $Q$ be a nontrivial language-invariant property of TMs, then $\{n\mid Q(T_n)\text{ holds}\}$ is undecidable.
I recommend reading the textbook by Sipser.