40. Grounds for which a candidate other than the returned candidate may be declared to have been elected.

(a) that in fact the petitioner or such other candidate received a majority of the valid votes ; or
(b) that but for the votes obtained by the returned candidate by a corrupt practice the petitioner or such other candidate would have obtained a majority of the valid votes;