Proof of every finite group is finitely presented. I'm reading the proof that every finite group is finitely presented from Dummit's Abstract Algebra, but there's a part that I don't understand. In the proof below, what are the elements $\tilde{g_i}$? I think they are the cosets $g_iN$, but how do we know that they generate $\tilde{G}$? And why does $|\tilde{G}|=|G|$ lead to $N=\ker \pi$? And finally, how do we get the sufficient condition (ii) in the final sentence? 
I really do not understand these parts and I'd greatly appreciate any explanations.

 A: I'll try to clarify the proof though you might have done it already (I was struggling with this theorem too so the answer could be useful for someone).
First of all, let's check that $N$ $\leq$ ker $\pi$. It is true since $N$ is the intersection of all normal subgroups containig $R_0$, and ker $\pi$ is one of such subgroups. Now we apply the following theorem. Let $h:A\rightarrow B$ be a homomorphism and $A$ $\rhd$ $X$ $\leq$ ker $h$, then for the projection $p:A\rightarrow A/X$ there is a unique homomorphism $f$ such that the following diagram commutes ($h=f\circ p$):
$\hskip2.8in$
Let say that in our case there is a unique homomorphism $\phi$ such that the following diagram has to commute:
$\hskip2.8in$
Now consider the cosets $g_1N,...,g_nN\in F(S)/N$. Note that they are pairwise distinct. Indeed, we have $i\neq j\rightarrow\pi(g_i)=g_i\neq g_j=\pi(g_j)$, and the commutativity implies $\pi(g_i)=\phi(p(g_i))=\phi(g_iN)$, $\pi(g_j)=\phi(p(g_j))=\phi(g_jN)$. Thus $i\neq j\rightarrow\phi(g_iN)\neq\phi(g_jN)$. So it's not the case that $g_iN=g_jN$ for $i\neq j$.
It's easy to verify that $F(S)/N=\langle g_1N,...,g_nN\rangle$. With this if we'll prove that $\{g_1N,...,g_nN\}$ is closed under the multiplication and inversion, then we'll get $F(S)/N=\{g_1N,...,g_nN\}$.
Let's begin from the multiplication. We have $g_iNg_jN=g_ig_jN$. Let $g_ig_j=g_k$ then $g_ig_jN=g_kN$. Indeed, $g_ig_jg_k^{-1}\in N$ thus $g_ig_j\in Ng_k=g_kN$. Further we have $(g_jN)^{-1}=g_j^{-1}N$. Let $g_j^{-1}=g_k$ then $g_j^{-1}N=g_kN$. Indeed, let $g_i=e_G$ then $g_ig_kg_j\in N$. So $g_ig_k\in Ng_j^{-1}=g_j^{-1}N$. This implies $g_j^{-1}N=g_ig_kN$. But $g_ig_kN=g_kN$ as we have proved.
We conclude that $F(S)/N$ consists of $n$ distinct elements: $\{g_1N,...,g_nN\}$. The commutativity of our diagram implies $\phi(g_iN)=g_iN$. This means $\phi$ is injective. Now, if we assume that ker $\pi$ - $N$ contains some element $a$, then $aN\neq N$ and $\phi(aN)=e_G$. This gives a contradiction with the injectivity. Thus we have $N$ $=$ ker $\pi$ and $G\cong(S|R_0)$.         
