"So if you are in doubt about what We have revealed to you"
(i.e., in a minor doubt). As for the address, it is said: it is to him, peace and blessings be upon him, and the intent is that if you were in such a state, it is by way of supposition and hypothesis. For doubt is inconceivable from him, peace and blessings be upon him, because the veil has been lifted for him. This is why "if" (in)—which is used mostly for what has no reality, to the point of being used for what is rationally and customarily impossible—was employed, as in His, the Exalted’s, saying: "Say: If the Most Merciful had a son," and His saying: "But if you are able to seek a tunnel into the earth." The truth of a conditional sentence does not depend on its occurrence, as is obvious.
The intent of the relative pronoun is the stories, meaning: if you are in doubt about the stories revealed to you, among which is the story of Pharaoh and his people and the reports of the Children of Israel, "then ask those who read the Book before you," for that is confirmed with them and established in their scriptures just as We revealed it to you. The stories were specified because the laws revealed to him, peace and blessings be upon him, are abrogators of their laws and contradictory to them, so it is inconceivable to ask them about those [laws]. "The Book" refers to the genus, thus including the Torah and the Gospel; this is what is narrated from Ibn Abbas, may Allah be pleased with them both, and it is supported by the fact that it was read as al-kutub (the Books) in the plural.
Some interpreted the relative pronoun as those who have not believed from the People of the Book, because their reports—agreeing with what was revealed—are more effective for the intended purpose when resulting from the questioning. Others interpreted it as the believers among them, such as Abdullah bin Salam and Tamim al-Dari, and this is attributed to Ibn Abbas, al-Dahhak, and Mujahid. This has been countered by noting that Ibn Salam and others only embraced Islam in Medina, whereas this surah is Meccan.
It is appropriate that the intent is to argue for the truth of what has been revealed and to offer as testimony what is in the previous scriptures, and that the Quran confirms them. The essence of this is that the benefit is to dispel doubt—if it were to occur to anyone other than him, peace and blessings be upon him—through evidence, or to describe the People of the Book as firmly established in knowledge regarding the truth of his prophethood, peace and blessings be upon him, and to rebuke them for abandoning faith, or to stimulate the Messenger, peace and blessings be upon him, and increase his steadfastness. The intention is not the possibility of doubt occurring to him, peace and blessings be upon him, at all. This is why he, peace and blessings be upon him, said when the verse came to him, as reported by Abd al-Razzaq and Ibn Jarir from Qatadah: "I do not doubt, nor do I ask."
Al-Zajjaj claimed that the "if" (in) is negative, and His, the Exalted’s, saying "then ask" is the response to a suppressed condition, meaning: "You were not in doubt about what We revealed to you; if you wish to increase in certainty, then ask." This is contrary to the apparent meaning, and what has been mentioned above renders it unnecessary. Similar to this is what was said: that "doubt" here means distress and difficulty due to what he, peace and blessings be upon him, was witnessing of the obstinacy and harm of his people—meaning: if you are distressed by the harm and obstinacy you receive from your people, then ask the People of the Book how the prophets, peace be upon them, endured the harm and obstinacy of their people, and be patient likewise. But this is much further from the truth.
It is also said: The address is to him, peace and blessings be upon him, but the intent is his nation, or everyone who hears, meaning: if you—O listener—are in doubt about what We have revealed upon the tongue of our Prophet to you, then ask. "Then We revealed to you" in this context is similar to His, the Exalted’s, saying: "And We have sent down to you a clear light."
In making the "reading" the link to the relative pronoun, there is an indication that the answer does not depend on anything more than it. The verse contains an admonition that whoever is beset by doubt in religion should consult those who can remove it from among the people of knowledge, or rather, hasten to do so, as indicated by the consequential fa (f-as'al), based on the fact that it implies immediate succession.
"The truth has come to you" (the clear [truth] from which there is no turning away and regarding whose authenticity there is no doubt) "from your Lord" (the One who sustains what corrects your affairs). "So do not ever be among the doubters" (i.e., by wavering from the firmness and certainty you possess, and remain on that as you were before). Imtira' (doubting) is doubt and hesitation, and it is lighter than takdhib (denying/calling a lie), which is why it was mentioned first, followed by His, the Exalted’s, saying: [The following verse].