A recent construction of the electroweak theory, based on perturbative quan
tum gauge invariance alone, is extended to the case of more generations of
fermions with arbitrary mixing. The conditions implied by second order gaug
e invariance lead to an isolated solution for the fermionic couplings in ag
reement with the standard model. Third order gauge invariance determines th
e Higgs potential. The resulting massive gauge theory is manifestly gauge i
nvariant, after construction.