Let us denote $L \subseteq \Sigma^*$ a languague where $\Sigma$ is an alphabet. I want to show that
$$L \subseteq \Sigma^* \ is \ decidable \iff I_L \ is \ computable,$$
where $I_L$ is an indicator function.
I have those definitions:
$L$ is decidable if there exists a Turing Machine (TM) M which decides $L$, which means, that $x \in L \implies$ M accepts $x$ and $x \notin L \implies$ M rejects $x$.
Function $f$ is said to be computable, if $dom(f)=\Sigma^*$ and there exists TM which computes $f$, which means that $L(M)=dom(f)$ and $\forall x \in dom(f)$ there is a sequence of configurations $c_0,...,c_n$ such that $c_0$ is initial, $c_i$ yields $c_{i+1}$ and $c_n = [q_{acc},h,f(x){\sqcup}^{\omega}]$.
I feel like I am missing something. If $y\in \Sigma^* \setminus L$, then if $L \subseteq \Sigma^*$ is decidable, then $M$ rejects $y$, therefore $y \notin L(M)$. However $dom(f)=\Sigma^*$ so it holds that $L(M) \neq dom(f)$ and therefore $I_L$ is not computable. And i get he same problem for the implication "from right to left".
Where is the problem? Did I made mistake while writing definitions?
Edit: Sorry, I did not write all definitions. So
$L(M)=\{ x\in \Sigma^* |M \ accepts \ x \}$
$M$ accepts $x$ if there exists a sequence of configurations $c_0,...,c_n$ such that $c_0$ is initial, $c_i$ yields $c_{i+1}$ and $c_n$ is accepting configuration.
$M$ rejects $x$ if there exists a sequence of configurations $c_0,...,c_n$ such that $c_0$ is initial, $c_i$ yields $c_{i+1}$ and $c_n$ is rejecting configuration.
$q_{acc}$ is an accepting configuration
$h$ is position of the reading and writing head.
$f(x){\sqcup}^{\omega}$ means that in the first cell of TM is the value of $f(x)$ and in the rest cells there are blank symbols.