If you want to prove $\forall a\in S:P(a)$, you might proceed as follows:
Let $x$ be any element of set $S$, i.e. you assume that $x\in S$, where $x$ was not previously introduced as a free variable in your proof.
If you can subsequently prove that $P(x)$ is true, then you can generalize,
$\forall a\in S: P(a) $ provided:
$a$ is does not occur in $P(x)$
No free variables occur in $P(x)$ that were introduced after the above assumption
No other assumptions were made after the above assumption that were not already discharged (i.e not still active).
For related methods of mathematical proof, you might have a look at the tutorial that is included with my proof software available free at my website.