Barring the foregoing scenario, does the “fresh election” contemplated under Article 140(3) bear the same meaning as the one contemplated under Article 138(5) and (7)" The answer depends on the nature of the petition that invalidated the original election. If the petitioner was only one of the candidates, and who had taken the second position in vote-tally to the President-elect, then the “fresh election” will, in law, be confined to the petitioner and the President-elect. And all the remaining candidates who did not contest the election of the President-elect, will be assumed to have either conceded defeat, or acquiesced in the results as declared by IEBC; and such candidates may not participate in the “fresh election.” (RAILA ODINGA & 5 others v INDEPENDENT ELECTORAL AND BOUNDARIES COMMISSION & 3 others  eKLR)
It is entirely possible that I was completely wrong when I declared with absolute certainty that,
This means, for the illiterate, all the presidential candidates on the ballot on the 8th August shall be on the ballot at the next presidential election.
Paragraph 291 of the Judgment of the Supreme Court, upon further reflecting on its import, addresses the effect of a petition to invalidate the election of a president-elect under Article 140. The Supreme Court found a neat solution to the question of whether a "fresh election" entailed the participation of all the candidates who had participated in the invalidated presidential election or only of the candidate whose election was invalidated and the candidate who petitioned the Supreme Court for the invalidation.
The logic in paragraph 291 is simple enough. When the election commission declares a winner, all the candidates who participated in the presidential election may petition the court to invalidate the election of the president-elect. If they do so an the election of the president-elect is invalidated, then they may participate in the fresh election. But if only one of them petitions the court and he or she prevails, then the fresh election will be between the candidate whose election was invalidated and the successful petitioner. The other candidates, it shall be presumed, either conceded defeat or accepted the election results and shall not participate in the fresh election. In other words, they cannot benefit from the labour of the successful petitioner.
I don't think it is an unfair reading of the provisions of Article 140. However, the Supreme Court in 2013 assumed that the petitioner had to be the candidate who had garnered the second highest number of votes in the presidential election. This is not necessarily true. In the aftermath of the 2017 presidential election, Raila Odinga had initially indicated he would not petition the election of Uhuru Kenyatta before changing his mind. The Constitution didn't prevent, for example, Dr Ekuru Aukot, one of the candidates, from petitioning the election of Uhuru Kenyatta. Had he done so, then he would have had the benefit of the reasoning by the Supreme Court in paragraph 291 of the 2013 judgment.
Further, the Supreme Court did not consider the import of the words "A person may" in the opening sentence of Article 140(1). The right to petition the Supreme Court to invalidate the election of the president-elect can be exercised by any person which is why the petitions by Gladwell Otieno and Florence Sergon were heard by the Supreme Court (before being consolidated with that of Raila Odinga) even though thy were not candidates in the election. If none of the candidates had petitioned the election of the president-elect, but some other person had, and this other person successfully invalidated the election of the president-elect, it is unlikely the fresh election would between the successful petitioner and the candidate whose election was invalidated.
Two possible scenarios present themselves. Either the fresh election would be with the participation of all the candidates in the previous election or it would require all eligible persons to be nominated in order to participate in a fresh presidential election. Paragraph 291 only works if the successful petitioner was a candidate in the presidential election. I find myself torn between what I claimed earlier and what the Supreme Court reasoned in 2013 but, because of the use of the words "a person may" in Article 140(1), I am inclined to persist with my earlier declaration that the fresh election should be with the participation of all the candidates from the previous election, whether or not they petitioned the election of the president-elect.