Theorem on quotient rings modulo an ideal I've to prove the following theorem:

Let R a ring, I one of its two-sided ideal and π: R ⟶ R/I, the
canonical projection. Then

*  
*S subring (ideal) of R ⇒ π(S) = (S + I)/I is a subring
(ideal) of R/I;  
*S subring (ideal) of R/I ⇒
π−1(S') is a subring (ideal) of R containing I.

The map $\pi$ is $r ⟼ r + I$ with $r \in R$, so considering $s ⟼ s + I$ with $s \in S$, it should follow S + I ⊂ R + I, since S ⊂ R.
But I'm confused on why $\pi(S) = (S + I)/I$ and not $\pi(S) = S/I$.
 A: Yes $S+ I\subset R+I$ (since the cosets of S in I will certainly all be cosets of R in I). I would just consider that ring homomorphism $\pi:S\to \pi(S)$. If we show that the kernel of this homomorphism is $S\cap I$, then we're done by the first isomorphism theorem (since $S/(S\cap I) \cong (S+I)/I$).
A: 
But I'm confused on why $\pi(S) = (S + I) / I$ and not $\pi(S) = S/I$.

If you take a ring $R$ and a two-sided ideal $I$ of $R$ you get that, for an arbitrary subset $S$ of $R$
\begin{equation}
\pi(S) = \left \{ s + I ~|~ s \in S \right \}
\end{equation}
By an extension of that fact that $R/I = \{ r + I ~|~ r \in R\}$ you might then be tempted to assert that
$$
\pi(S) = \color{red}{S/I}
$$
However, you should bear in mind that any expression of the form $X/I$, with $X \subseteq R$, denotes a ring quotient an ideal, a construction that we can perform only when $I$ is an ideal of $X$. This might not always be the case as, for example, when $I$ is not a subset of $X$.
To counter these edge cases, one writes $\pi(S) = (S + I)/I$. Indeed

*

*$I$ is an ideal of $S + I$

*$\pi(S + I) = \{ s + I ~|~ s \in S) = \pi(S)$
which you can easily verify on your own.
