[David] said: 'He has certainly wronged you by asking for your ewe to be added to his ewes.'
Muhammad said: The meaning is 'added to his ewes,' but he omitted 'added.' It is called a 'na'jah' (ewe) because it is soft; 'al-na'j' in the language refers to softness, and 'al-na'j' also refers to whiteness in the eye.
'And David realized,' meaning: he knew.
Muhammad said: The meaning of 'realized' is 'became certain,' though it is not a certainty born of direct observation; for direct observation, one only says 'he knew.'
'That We had only tried him' means: We tested him. 'So he sought the forgiveness of his Lord, and fell down bowing,' meaning: prostrating, for forty days, not raising his head except for an obligatory prayer he was performing, or for a necessity he could not avoid, or for food to sustain himself.
﴿قَالَ لَقَدْ ظَلَمَكَ بِسُؤَالِ نَعْجَتِكَ إِلَى نعاجه﴾.
قَالَ محمدٌ: الْمَعْنى: مَضْمُومَة إِلَى نعاجة؛ فاختصر مَضْمُومَة وَإِنَّمَا سُمِّيت: نعجة؛ لأنّها رخوةٌ , النعجُ فِي اللُّغَة اللين , والنعجُ أَيْضا الفتونُ فِي الْعين.
﴿وَظن دَاوُد﴾ أَي: علم.
قَالَ مُحَمَّد: معنى ﴿ظن﴾ أَيقَن , إِلَّا أَنَّهُ لَيْسَ بِيَقِين عيان؛ فَأَما العيان فَلَا يُقَال فِيهِ إِلَّا: علم.
﴿أَنَّمَا فَتَنَّاهُ﴾ ابتليناه ﴿فَاسْتَغْفَرَ رَبَّهُ وَخَرَّ رَاكِعًا﴾ أَي: سَاجِدا أَرْبَعِينَ يَوْمًا لَا يرفع رَأسه إِلَّا لصلاةٍ مَكْتُوبَة يقيمها أَو لحَاجَة لَا بُدّ لَهُ مِنْهَا أَو لطعام يتبلَّغ بِهِ،