Yahya said: This is his saying: "And when your Lord took from the children of Adam from their loins their descendants" (Al-A'raf: 172) the verse. Indeed, the first thing Allah created was the Pen; so He said: "Write." It asked: "O Lord, what shall I write?" He said: "What is to be." It said: So the Pen proceeded with what is to be until the Day of Resurrection. The deeds of the servants are presented every Monday and Thursday, fifty-two times, and they find them according to what is in the Book. Then He wiped over the back of Adam after that and brought forth from it every soul He is the Creator of, and He brought them forth like tiny ants. He said: "Am I not your Lord? They said: Yes, we have testified." Then He returned them to the loin of Adam. Then, when the servant is in his mother’s womb, He writes him as wretched or happy, according to the first Book. So whoever was written as wretched in the first Book will be given a long life until the Pen runs against him, and he breaks the covenant that was taken from him in the loin of Adam through polytheism. Whoever was written as happy in the first Book will be given a long life until the Pen runs against him, [and he believes], and he becomes happy. As for whoever dies young among the children of the believers before the Pen runs against him, they will be with their fathers in [Paradise, among the kings of] the people of Paradise. As for those who were among the children of the polytheists and died before the Pen ran against them, they will not be with their fathers in the Fire, because they died upon the covenant that was taken from them in the loin of Adam, and they did not break the covenant.
Yahya said: Al-Walid ibn [Muslim] narrated to me from al-Rabi' ibn Sabih, from Yazid...