לֹא יִבָּטֵל אָדָם מִפְּרִיָּה וּרְבִיָּה, אֶלָּא אִם כֵּן יֶשׁ לוֹ בָנִים. בֵּית שַׁמַּאי אוֹמְרִים, שְׁנֵי זְכָרִים. וּבֵית הִלֵּל אוֹמְרִים, זָכָר וּנְקֵבָה, שֶׁנֶּאֱמַר, (בראשית ה) זָכָר וּנְקֵבָה בְּרָאָם. נָשָׂא אִשָּׁה, וְשָׁהָה עִמָּהּ עֶשֶׂר שָׁנִים, וְלֹא יָלְדָה, אֵינוֹ רַשַּׁאי לִבָּטֵל. גֵּרְשָׁהּ, מֻתֶּרֶת לִנָּשֵׂא לְאַחֵר. וְרַשַּׁאי הַשֵּׁנִי לִשְׁהוֹת עִמָּהּ עֶשֶׂר שָׁנִים. וְאִם הִפִּילָה, מוֹנֶה מִשָּׁעָה שֶׁהִפִּילָה. הָאִישׁ מְצֻוֶּה עַל פְּרִיָּה וּרְבִיָּה, אֲבָל לֹא הָאִשָּׁה. רַבִּי יוֹחָנָן בֶּן בְּרוֹקָא אוֹמֵר, עַל שְׁנֵיהֶם הוּא אוֹמֵר (בראשית א), וַיְבָרֶךְ אֹתָם אֱלֹהִים וַיֹּאמֶר לָהֶם אֱלֹהִים פְּרוּ וּרְבוּ:
One may not desist from (the mitzvah of) procreation unless he has children. Beth Shammai say: Two males, [deriving it from Moses, who separated from his wife after he had begotten two males.] And Beth Hillel say: A male and a female, it being written (Genesis 1:27): "Male and female He created them." [And Moses cannot serve as a precedent, for he acted by Divine fiat.] If one married a woman and lived with her ten years without having children, he may not desist (from the mitzvah). [As we find with Abraham. After living with Sarah for ten years and not having children, he married Hagar. The time that he lived with her outside of Eretz Yisrael is not included, for living outside the land may have contributed (to her childlessness). And all of the time that a man or a woman are sick, or incarcerated, or in any other state where cohabitation is precluded, this is not included in the ten year period.] If he divorced her, she is permitted to marry another. [For it (the childlessness) may be due not to her, but to him. And when he divorces her, he gives her (the amount of) her kethubah, if she claims that it is due to his "not shooting like an arrow." And we impose a ban upon her if she knows otherwise and makes a false claim against him.] The second is permitted to live ten years with her. And if she miscarries, he counts from the time she miscarries. The mitzvah of begetting children devolves upon the man and not upon the woman, [it being written (Genesis 1:27): "Be fruitful and multiply … and subdue it" ("vekivshuhah"). It is written defective, without the vav after the shin (implying that only one is being addressed and that the mitzvah of procreation devolves upon the man, the "subduer" of the woman.)] R. Yochanan b. B'roka said: Of both (man and woman) it is written (Ibid. 28): "And G d blessed them, and G d said to them: 'Be fruitful and multiply.'" [The halachah is not in accordance with him.]
Shir HaShirim Rabbah
[This is analogous] to a noblewoman whose husband the king, her sons, and her sons-in-law went to a country overseas. [Her servants] told her: ‘Your sons have come [home].’ She said: ‘What do I care? Let my daughters-in-law rejoice.’ They said to her: ‘Your sons-in-law have come.’ She said: ‘What do I care? Let my daughters rejoice.’ They said to her: ‘Your husband the king has come.’ She said: ‘This is complete joy, joy compounded by joy.’ So too, in the future, the prophets will come and say to Jerusalem: “Your sons will come from afar” (Isaiah 60:4), and it will say to them: What do I care? “Your daughters are carried on the side” (Isaiah 60:4), and it will say to them: What do I care? When they say to it: “Behold, your king is coming to you, righteous and victorious” (Zechariah 9:9), it says: This is complete joy, as it is written: “Rejoice greatly, daughter of Zion, [behold your king is coming to you]” (Zechariah 9:9), and it is written: “Sing and rejoice, daughter of Zion [for behold I am coming]” (Zechariah 2:14). At that moment, it says: “I will be gladdened in the Lord, my soul will exult in my God” (Isaiah 61:10).