or did you think that the Companions of the Cave and the Inscription were a [unique] marvel from among Our signs? In other words, if you have witnessed such origination and annihilation, then the state of the Companions of the Cave is not a marvel from among Our signs. Rather this [origination and annihilation] is more marvelous. Know that the Companions of the Cave are the perfect seven, those who always uphold the command of the Truth, the ones through whom the world is sustained and of whom no age is [ever] devoid. [Their number] is the same as and corresponds to the number of the planets, the seven orbiting ones. And just as God, exalted be He, has disposed these to manage the order of the world of form, as alluded to in His words, By those that race forward, and by those that direct the affair [Q. 79:4-5], according to some commentaries, so He delegated [the management of] the order of the world of meaning and the perfecting of the order of [the world of] form to seven souls from among the former [generations], each one of whom is related, in accordance with formal existence, to one of these [planets]. The pole (qu?b) belongs to the sun; the Cave is the inner aspect of the body, while al-Raqīm ('inscription') is its outer aspect, which has been engraved with the forms of the senses and organs - if it is to be explained as [referring to] the [Preserved] Tablet wherein their names have been inscribed (ruqqimat); or [al-Raqīm is] the corporeal world, if [al-Raqīm is] taken to be the name of the valley wherein lies the mountain and [its] cave; or [it represents] the animal soul, if [al-Raqīm is] taken to be the name of the dog; or [it represents] the upper world, if [al-Raqīm is] takent to be the name of the town from which they came, [all of these interpretations] being in accordance with the varying opinions of the commentaries. Among these [seven souls] are the seven well-known prophets that were sent during the [various] generations and eras, even though each of these prophets followed a [separate] Remembrance. They are Adam, Enoch (Idrīs), Noah, Abraham, Moses, Jesus as well as Muḥammad, blessings and peace be upon them, since he [Muḥammad] is the seventh one, the one designated for the miracle of the splitting of the moon [cf. Q. 54:1], that is to say, [the miracle of] its being cleft from him because of his having appeared in the period of the sealing of prophethood and [because] through him the divine religion has been perfected, as alluded to by him in his statement: 'Time has come full circle back to how it was the day God created the heavens and the earth'. For the one who comes at the later stages in terms of time and manifestation, that is, [in terms of] sensory existence, is the one who secures the attributes of the All and their perfections, much like the human in relation to all the other animals. That is why he said, 'It is as though the edifice of prophethood is complete except for a single brick the space for which still remains. I am that brick'. The divine sages of ancient Persia were all of the view that in terms of the descending order, the irradations of the levels of intellects and spirits, according to their school of thought, intensify, such that the later the level the more ample and the greater that share of the irradiations of the Truth, [of] His lights and [of] the august glories of His countenance and [of] the irradiations of the lights of intermediaries. Likewise is the case with [order in terms of] time. Thus he is the one who combines and encompasses the attributes of the All and their perfections, the one who comprises their specific qualities and their meanings in addition to the perfection that is specific to him and concomitant of the configuration of all-comprehensiveness, just as he [himself] said, 'I was sent to complete the noble character traits'. From this becomes his precedence over them [the other prophets] in terms of honour and merit is apparent and considered from the aspect that Abraham, peace be upon him, was the locus for the manifestation of the Essential and Greatest affirmation of Oneness and the middle one in chronological sequence, being equal to the station of the sun in terms of [his] level, he was also the pole of prophethood and all [of the prophets] were obliged to follow him even if he was not manifest for those who came after him chronologically, [this] being similar to the connectedness of the six planets to its [the sun's] orbit, but not like the moon. Thus in reality Muḥammad, may God bless him and grant him peace, followed him. Know that the spirits have designated levels in their world and ranks according to a hierarchy as well as varying preparednesses configured from pre-eternity as result of the pure original solicitude and holiest effusion. Thus those of the first rank are the foremost, the isolated individuals who are brought near, the beloved ones who are singled out for His solicitude and His preceding generosity, who recognise one another by His light and love one another through Him. The rest [of those spirits] differ in degrees and recognise or do not recognise one another in accordance with the proximity or distance between these [degrees]. Accordingly, those [spirits] that recognise one another become familiar with one another and those that do not recognise one another differ, all the way [down] to the last of the ranks. Thus these [spirits] have fixed points and firm roots in the upper world. So, upon their attachment to bodies, the degrees of their perfections [necessarily] and the goals of their felicities vary in accordance with the capital each [spirit] possesses in the way of its initial preparedness, the one specific to it from its point of origin since pre-eternity, as he [the Prophet], blessings and peace be upon him, said, 'People are like ores, such as gold and silver ores'. [Thus continue the degrees of rank] until the degrees in terms of loftiness terminate with annihilation in the affirmation of the Oneness of the Essence. Considered thus then, Muḥammad, peace be upon him, is the very entity of Adam, nay, the very entity of all of the seven [souls]. Similarly, considering that he [Muḥammad] is the one who combines [all of] their attributes - as related in the case of Abū Yazīd [Bas?āmī], may God's mercy be upon him, who when asked, 'Are you among the seven?', said, 'I am [all of] the seven' - and considering the loftiness of his level and his station, his eternal precedence and the high degree of his perfection and merit, he [Muḥammad] is the most eternal, the first and the most excellent of all of them, as he himself once said, 'The first thing that God created was my light and I was a prophet while Adam was still water and clay'. Consequently, he precedes them in terms of level, loftiness, honour and merit, succeeding them [only] in terms of time. He is them from the point of view of the mystery and essential unity with the result that their differing and varying spirits, hearts and souls does not contradict their being one in reality. Likewise, their separation in time does not contradict their togetherness from pre-eternity to eternity and at the source of the union, just as He has said Those messengers some We have preferred above others [Q. 2:253] but also said we make no distinction between any of them [Q. 3:84].
It is also possible that by 'the Companions of the Cave' is meant the spiritual aspects of man, those that subsist after the decay of the body. As for the statement of those who said 'they were three', that is an allusion to the spirit, the intellect and the heart, while the dog represents the soul that adheres to the entrance of the cave. As for those who said 'they were five', that is an allusion to the spirit, the heart, the considerative intellect, the practical intellect and the holy faculty that belongs to prophets, which for others is [the faculty of] reflection. As for those who said 'they were seven', then those five in addition to the mystery and concealment. But God knows best.