Why does it say "Gil Yagil Avi Tzadik"?
R. Yonah: Gilah is less than Simchah. A Tzadik has only Gilah; for he lacks the additional attribute of Chachmah (refer to 23:24:3:1).
Why is "v'Yoled" written regarding a Chacham?
R. Yonah, Malbim (from Nidah 16b): It is decreed on a person if he will be a Chacham 1 or foolish, poor or rich, but not if he will be Tzadik or Rasha. The choice is in his hand. Malbim - therefore, Yoled Tzadik does not rejoice, for the Tzadik's virtue is not due to his father. "Av" includes anyone who raises and instructs him; Molid is specifically the one who fathered him. Aviv rejoices, for he trained him to deeds of Tzedek. His Simchah is not constant, for the son can falter from his virtue, since he did not receive the laws of Chachmah. He rejoices when he sees him persist in his virtue.
R. Yonah writes here that he is called a Chacham only if he is also a Tzadik! Perhaps he means that cleverness is decreed, which enables one to be called Chacham, if he will also be a Tzadik. (PF)
Why does it say "v'Yoled Chacham Yismach Bo"?
R. Yonah: A Chacham has Simchah (which is greater than Gilah), for he has two attributes - he is a Tzadik and Chacham. [Shlomo] would not praise a Chacham who is not a Tzadik. One is called a Chacham only if he is drawn after the Nefesh of Chachmah, just like we do not call one Yashar if he recognizes straightness, but his heart is not drawn after straightness. Do not think that you are a Chacham, as long as you see that your Nefesh is drawn after desires. One whose Nefesh is drawn after desiring Chachmah and conducting according to it, even if he did not learn so much Chachmah, is closer to being called a Chacham than one who learned Chachmah, but he is drawn after desire.
Malbim: A Chacham received the laws of Chachmah and conducts with them. A Tzadik is not necessarily a Chacham, just he accustomed himself to do Tzedek, even if he did not accept the laws of Chachmah in the way of learning. Simchah is constant; Gil is for a new matter, e.g. finding something or good news. Chachmah depends on birth, therefore Yoled (who fathered him) rejoices. This is constant, due to the son's good nature and intellect.