Bukhari said without a complete isnad that al-Hasan (i.e. al-Hasan al-Basri (21-110. A.H )) recited Fatihat al-Kitab over an infant and said, “O God, make him for us a righteous deed which has gone before us, a recompense gone ahead, a treasure and a reward.”
Jabir reported the Prophet as saying, “Prayer should not be said over an infant which has not uttered a sound, neither may he inherit nor leave an inheritance.”
Tirmidhi and Ibn Majah transmitted it, but the latter did not mention “nor leave an inheritance”.
Sa'id b. al-Musayyib said he prayed behind Abu Huraira at the funeral of a boy who had never sinned and heard him say, “O God, protect him from the punishment in the grave.”
Abu Mas'ud al-Ansari said God’s messenger forbade that the imam should stand on anything when the people were behind him, meaning on a lower level than he was.
Daraqutnl transmitted it in al-Mujtaba in Kitab al-jana’iz.