Let $1\in S\subseteq G$ such that the left cosets $aS$ with $a \in G$ partition the group $G$. Prove that $S\le G$. I am a complete beginner at group theory and I was looking at the following problem.

Let $S$ be a subset of a group $G$ that contains the identity element $1$ and such that the left cosets $aS$ with $a \in G$ partition $G$.Prove that $S$ a is a subgroup of $G$.

I tried the following:
If we want to show that $S$ is a subgroup of $G$, then we need to satisfy the following:

*

*$S \subseteq G$

*$1 \in S$

*$a,b\in S \implies ab \in S$

*$\forall a\in S,\, \exists a^{-1} \in S,\, aa^{-1}=a^{-1}a=1$
I know that $S$ is a subset of $G$ so the first requirement is satisfied. It is also given that $1 \in S$, so the second requirement is satisfied.
To prove closure under composition (3), suppose $p,q \in S$. Then $ap,aq \in aS$. We want to show that $a(pq) \in aS$ as well, for some arbitrary $a \in S$.
If we let $b = ap$ and $c = aq$, we have $a^{-1}b = p$ and $a^{-1}c = q$. Left multiplying the equations gives $pq = a^{-1}ba^{-1}c$. since $a^{-1} \in G$, I can say that $pq$ is in another partition $a^{-1}S$, and so it must be the case that $pq \in a^{-1}S$.
Now this is where I'm stuck because I want to get rid of that $a^{-1}$ in front of the $S$, but I don't know how. I've also read this question here Let $S$ be a subset of a group $G$ that contains the identity element $1$ and such that the left cosets $aS$ with $a$ in $G$, partition $G$., but I can't understand what the top answer is trying to argue at all, even after reading the comments below it.
Can I please have some help with this problem?
 A: The solution posted in August 8, 2020, is not correct.
The error/gap is in the sentence
Thus $st^{-1}=ar$ for some $r\in S$, so that $s=a(rt)\in aS$.

The problem is that we don't know $a(rt)\in aS$, since we don't know $rt\in S$.

Let me repair that solution. I will use the same notation.
Assume that $S\subseteq G$, $1\in G$,
and $\Pi=\{gS\;|\;g\in G\}$ is a partition of $G$.
Given $s, t\in S$, we argue that $st^{-1}\in S$.
Since $\Pi$ is a partition of $G$, there exists $a\in G$
with $st^{-1}\in aS$. Hence, there exists $r\in S$ such that
$st^{-1}=ar$, which yields $s=art\in arS$. Now $s\in S\cap arS$,
implying that $S\cap arS\neq \emptyset$, so $S=arS$.
Now $ar\in aS$ (since $r\in S$) and $ar=ar1\in arS$
(since $1\in S$), hence $aS\cap arS\neq\emptyset$.
This yields $aS=arS\;(=S)$.
This completes the argument, since now $st^{-1}\in aS=arS=S$.
A: One way to do this is the one-step subgroup test.
We have $1\in S$, so $S\neq \varnothing $. We are given that $S\subseteq G$.
Let $s,t\in S$. We aim to show that $st^{-1}\in S$.
Suppose $st^{-1}\notin S$. Since $S\subseteq G$ and the cosets of $S$ partition $G$, we have some $a\in G$ such that $a\notin S$ with $st^{-1}\in aS$. Thus $st^{-1}=ar$ for some $r\in S$, so that $s=a(rt)\in aS$. But $s\in S$, so $s\in S\cap aS$. Thus $S=aS$ by definition of a partition, so, since $1\in S$, we have $a\in S$, a contradiction.
Hence $S\le G$.
