La Procréation médicalement assistée: insémination artificielle et fécondation "In vitro"
בשעה שקבלו ישראל את התורה נתקנאו אומות העולם בהן מה ראו להתקרב יותר מן האומות, סתם פיהן הקב"ה אמר להן הביאו לי ספר יוחסין שלכם שנאמר הבו לה' משפחות עמים כשם שבני מביאין, ויתילדו על משפחותם

וְחָיְישִׁינַן שֶׁמָּא בְּאַמְבָּטִי עִיבְּרָה

I can engage in intercourse several times without blood. In other words, I can have relations with a woman while leaving her hymen intact. If this is so, it is possible that the assumed virgin had intercourse in this manner and is forbidden to the High Priest. Or, perhaps a person who can act like Shmuel is not common and the halakha is not concerned with this case. He said to them: One like Shmuel is not common, and we are concerned that she may have conceived in a bath. Perhaps she washed in a bath that contained a man’s semen, from which she became impregnated while remaining a virgin.

באמבטי - כלי שרוחצין בו כל הגוף וי"ל שהטיח שם אדם שכבת זרע ונכנס במעיה:
מַתְנִי׳ הַיְּבָמָה לֹא תַּחֲלוֹץ וְלֹא תִּתְיַיבֵּם עַד שֶׁיֵּשׁ לָהּ שְׁלֹשָׁה חֳדָשִׁים וְכֵן כׇּל שְׁאָר הַנָּשִׁים לֹא יִתְאָרְסוּ וְלֹא יִנָּשְׂאוּ עַד שֶׁיְּהוּ לָהֶן שְׁלֹשָׁה חֳדָשִׁים אֶחָד בְּתוּלוֹת וְאֶחָד בְּעוּלוֹת אֶחָד גְּרוּשׁוֹת וְאֶחָד אַלְמָנוֹת אֶחָד נְשׂוּאוֹת וְאֶחָד אֲרוּסוֹת
MISHNA: A yevama may neither perform ḥalitza nor enter into levirate marriage until she has waited three months from the time of her husband’s death. And similarly, all other women may not be betrothed and may not marry until they have waited three months since their previous marriage ended. This waiting period is necessary so that, should a woman give birth shortly after remarrying, it will be obvious who the father of the child is. This applies both to virgins and non-virgins, both to divorcées and widows, and both to women who were married to their previous husbands and women who were only betrothed. All of these women must wait three months before remarrying even though for some of them the reason for doing so does not apply.
אָמַר רַב נַחְמָן אָמַר שְׁמוּאֵל מִשּׁוּם דְּאָמַר קְרָא לִהְיוֹת לְךָ לֵאלֹהִים וּלְזַרְעֲךָ אַחֲרֶיךָ לְהַבְחִין בֵּין זַרְעוֹ שֶׁל רִאשׁוֹן לְזַרְעוֹ שֶׁל שֵׁנִי
Rav Naḥman said that Shmuel said: It is due to the fact that the verse states with regard to Abraham: “To be a God to you and your seed after you” (Genesis 17:7), which indicates that the Divine Presence rests with someone only when his seed can be identified as being descended from him, i.e., there are no uncertainties with regard to their lineage. Therefore, to prevent any uncertainties concerning the lineage of her child, the woman must wait so that it will be possible to distinguish between the seed of the first husband and the seed of the second husband. After three months, if she has conceived from her previous husband, the pregnancy will already be noticeable.
ולזרעך אחריך - שאין השכינה שורה אלא על הוודאים שזרעו מיוחס אחריו והכי נמי קיימא לן בנדרים (דף כ:) וברותי מכם המורדים והפושעים בי אלו בני ערבוביא:
משרשי מצוה זו, כדי שתתישב העולם כאשר חפץ השם, והשם ברוך הוא רצה שיהיו כל עולמו עשין פרותיהן כל אחד ואחד למינהו ולא שיתערבו מין במין אחר. וכן רצה שיהיה זרע האנשים ידוע של מי הוא ולא יתערבו זה עם זה.
It is from the roots of this commandment [that it is] so that the world be settled as God desired. And God, blessed be He, wanted that all of His world make their fruit, each and every one according to their species, and not that one specie mix with another specie. And so [too], did He want that the seed of men be known to whom it is, and not that they be mixed, one with the other. And also, there are several losses found with adultery: That it would be the cause of negating several of the commandments of God to us, as He commanded us in the honor of fathers and they would not be recognized by their children due to adultery; and there would be a stumbling block in that which we were also commanded not to have intercourse with the sisters and with many women - and it is all uprooted by reason of adultery, as people will not recognize their relatives. And there is an angle of theft, which is something clear that everybody pushes off. It is also a cause for the destruction of life, as it is very known in the nature of people that they are jealous about the adultery of their spouse with others, and [so] they will fight [to the death] with the adulterer. And there are several other mishaps besides these.
לא יסתכל כו'. והעונש על זה בגמ' דהויין ליה בנים שאינם מהוגני':
מצאתי בהג"ה סמ"ק ישן בשם מהר"ר פרץ אשה נדה יכולה לשכוב אסדיני בעלה ונזהרות מסדינים ששכב עליהם איש אחר פן תתעבר משכבת זרע של אחר ואמאי אינה חוששת פן תתעבר בנדותה משכבת זרע של בעלה ויהא הולד בן הנדה והשיב כיון דאין כאן ביאת איסור הולד כשר לגמרי אפילו תתעבר משכבת זרע של אחר כי הלא בן סירא כשר היה אלא דמשכבת זרע של אחר קפדינן אהבחנה וגזירה שמא ישא אחותו מאביו כדאיתא ביבמות עכ"ל הועתק מספר מו"ח ז"ל:
איסור הוצאת זרע לבטלה ודברים המביאים לכך ובו ז סעיפים:
אסור להוציא שכבת זרע לבטלה ועון זה חמור מכל עבירות שבתורה לפיכך לא יהיה אדם דש מבפנים וזורה מבחוץ ולא ישא קטנה שאינה ראויה לילד:
It is prohibited to spill seed needlessly and this sin is more severe than all Torah transgressions. For this reason a man should not thresh inside and sprinkle [his semen] outside [of a woman], and he should not marry a girl who is unable to have children.