Usul al-Kafi
Book 3: The Book of Excellence of Knowledge

Chapter 12
Attributes of the absolute reality of God

206. 1. Imam Jafar as-Sadiq (p): Our Lord, the Exalted, the Glorious God, has existed eternally. Knowledge was His Essence when there was nothing to be known; Hearing was His Essence when there was nothing to be heard. Seeing was His Essence when there was nothing to be seen. Power was His Essence when there was nothing on which power could be exercised. When He created things, His knowledge applied to the objects, His hearing to audibles and His seeing to visible objects and His power to objects on which power could be exercised.
The Imam (p) was further asked: Has God always been in motion?
Imam Jafar as-Sadiq (p): God is High and Exalted above that. Verily, movement is a phenomenon which appears with action.
Again the Imam (p) was asked: Has God always been speaking?
The Imam (p): Verily, speech is an attribute which came into being later and is not eternal. God, the Mighty, the Majestic, existed when there was nothing to be spoken to.

207. 2. Imam Muhammad al-Baqir (p): God, the Mighty, the Majestic, existed eternally even when nothing else existed. He had been eternally knowing whatever would come into being and His knowledge of a thing before it comes into being is exactly the same as it is after come, into being.

208. 3. A believer wrote a letter to Imam Ali ar-Reza (p) beginning with the words:
All praise be to God to the utmost limit of His knowledge.
The Imam (p) wrote back to him: Never say ‘to the utmost limit of His knowledge’ since there is no limit to His knowledge. Say ‘To His greatest possible pleasure.’

209. 4. A person wrote to Imam Ali ar-Reza (p) asking him about God, the Mighty, the Majestic: Did He know the things before He created them and fashioned them or He did not know that before He created them and willed to create and fashion them so that He came to know about the creatures when He created and fashioned what He fashioned?
Imam Ali ar-Reza (p) wrote in reply: God always had the knowledge about things before He created them and His knowledge about things before their creation remained unchanged after He created those things.