To Solomon, give Your judgments, O God, and Your righteousness to the king. This is what the scripture says, "Say ye of the righteous, that it shall be well with him" (Isaiah 3:10). Rabbi Isaac Luria explains that who is called a righteous person? This is the Holy One, blessed be He, as it says, "For the Lord is righteous; He loves righteous deeds" (Psalms 11:7).

Why do we say that if we have merit, He will give us from our own, but if not, He will give us from His own righteousness? Is there a greater righteous person than God? Therefore, we say, "Say ye of the righteous, that it shall be well with him." Another interpretation is that "Say ye of the righteous, that it shall be well with him."

Rabbi Ibo said, at the time when God created the world, He looked at what He had made and saw that it was very good (Genesis 1:31). Rabbi Yosei bar Chanina said that when God wanted to send Moses to Egypt, Moses asked Him, "What is Your name?" God replied, "I am that I am" (Exodus 3:14). You find written three times: "I will be," said the Lord, "mercifully, I created the world, and mercifully I will govern it."

When Moses went and asked them, "What should we say to the righteous one of the world, who is good?" They replied, "The righteous one is good, and thus it says (Psalms 136:1), 'Give thanks to the Lord.' Another explanation: 'The fruit of His deeds' refers only to those righteous ones who leave the fruit of their actions to their children. Even David left the fruit of his actions to his son Solomon, as it says (2 Samuel 8:15), 'David administered justice and righteousness.'

And even regarding Solomon, it says (Psalms 72:1), 'Give Your judgments to the king,' which means 'Give your judgments.' David said before the Lord, 'Master of the universe, give Your judgments to the king.' Just as You judge without witnesses and without warning, so may Solomon judge without witnesses and without warning.' The Lord replied, 'By your life, that is what I do,' as it says (1 Chronicles 29:23), 'And Solomon sat on the throne of the Lord.'

Is it possible for a person to sit on the throne of the Lord? Isn't it written (Daniel 7:9), 'Thrones were set up, and the Ancient of Days sat.' Rather, [it means] that he judged as His agent, without witnesses and without warning. This is the judgment of prostitutes, as it says (1 Kings 3:16): "Then two women who were prostitutes came to the king."

Rav said they were spirits, and Shmuel said they were actual prostitutes. Rabbi Benjamin said in the name of Rabbi Yehuda that they were prostitutes who had come before the king to be judged, as it says (ibid. 22-23): "One woman said, 'Please, my lord, this woman and I live in the same house,' etc. And the other woman said, 'No, the living child is mine, and the dead child is yours.'" Rabbi Simon said that the judge must weigh their arguments, for since the king heard their case and ordered that the child be cut in two, he began to speak wisdom, saying, "The Holy One, blessed be He, foresaw that this judgment was to come before Him, therefore He created for man two eyes, two ears, two nostrils, two legs, and two hands."

He began by saying, "Cut the living child in two," but Rabbi Elazar ben Rabbi Elai said, "If I had been there, I would have put the executioner's cord around his neck. It was not enough that one died, but he would have sentenced the other to death as well." When they saw the king's scepter, they began to say (Ecclesiastes 10:16): "Woe to you, O land, when your king is a child." But when he said, "Give the living child to her and do not kill him," a heavenly voice came forth and said, "She is his mother."

When Israel saw this, they said (1 Kings 10:8), "Happy are your people! How blessed are these servants of yours, who stand before you always, listening to your wisdom!" Rabbi Elazar said, "God appeared in three places: in the court of Shem, as it says (Genesis 38:26), 'She is more righteous than I'; in the court of Samuel, as it says (1 Samuel 12:5), 'And they said, 'I am a witness in this matter.'

In the court of Shlomo, as it is said (1 Kings 3:27), 'Do not kill him, he is his mother.' How did Shlomo know this, since it is possible that the women exchanged the babies, and only a bat kol came forth and said, 'She is his mother.'