(ז) עַל פִּי שְׁנַיִם עֵדִים אוֹ שְׁלשָׁה עֵדִים יוּמַת הַמֵּת (שם יז), אִם מִתְקַיֶּמֶת הָעֵדוּת בִּשְׁנַיִם, לָמָּה פָרַט הַכָּתוּב בִּשְׁלשָׁה, אֶלָּא לְהַקִּישׁ שְׁלשָׁה לִשְׁנַיִם, מַה שְּׁלשָׁה מַזִּימִין אֶת הַשְּׁנַיִם, אַף הַשְּׁנַיִם יָזוֹמּוֹ אֶת הַשְּׁלשָׁה. וּמִנַּיִן אֲפִלּוּ מֵאָה, תַּלְמוּד לוֹמַר, עֵדִים. רַבִּי שִׁמְעוֹן אוֹמֵר, מַה שְּׁנַיִם אֵינָן נֶהֱרָגִין עַד שֶׁיְּהוּ שְׁנֵיהֶם זוֹמְמִין, אַף שְׁלשָׁה אֵינָן נֶהֱרָגִין עַד שֶׁיִּהְיוּ שְׁלָשְׁתָּן זוֹמְמִין. וּמִנַּיִן אֲפִלּוּ מֵאָה, תַּלְמוּד לוֹמַר, עֵדִים. רַבִּי עֲקִיבָא אוֹמֵר, לֹא בָא הַשְּׁלִישִׁי אֶלָּא לְהַחְמִיר עָלָיו וְלַעֲשׂוֹת דִּינוֹ כַיּוֹצֵא בָאֵלּוּ. וְאִם כֵּן עָנַשׁ הַכָּתוּב לַנִּטְפָּל לְעוֹבְרֵי עֲבֵרָה כְעוֹבְרֵי עֲבֵרָה, עַל אַחַת כַּמָּה וְכַמָּה יְשַׁלֵּם שָׂכָר לַנִּטְפָּל לְעוֹשֵׂי מִצְוָה כְעוֹשֵׂי מִצְוָה:

(7) “A person shall be put to death only on the testimony of two witnesses or three witnesses” (Deuteronomy 17:6).If the testimony is sufficiently established by two witnesses, why does Scripture [further] specify three? This is to compare two to three: just as three are competent to incriminate two as perjurers, so are two competent to incriminate three as perjurers. How do we know [that two or three can even incriminate] a hundred? The Torah states “witnesses”. Rabbi Shimon says: “Just as two witnesses are not put to death until both have been incriminated as perjurers, so three are not put to death until all three have been incriminated as perjurers. How do we know [that two or three can even incriminate] a hundred? The Torah states “witnesses”. Rabbi Akiba says: “The third witness was only mentioned in order to be stringent upon him and make his judgement the same as the other two. And if Scripture thus penalizes one who consorts with those who commit a transgression, as [if he is actually] one of those who commits the transgression, how much more so shall he who consorts with those who perform commandments receive a reward as [if he is actually] one of those who performs the commandments!”

(ו) עַל־פִּ֣י ׀ שְׁנַ֣יִם עֵדִ֗ים א֛וֹ שְׁלֹשָׁ֥ה עֵדִ֖ים יוּמַ֣ת הַמֵּ֑ת לֹ֣א יוּמַ֔ת עַל־פִּ֖י עֵ֥ד אֶחָֽד׃
(6) A person shall be put to death only on the testimony of two or more witnesses; he must not be put to death on the testimony of a single witness.—

Rabbi Shimon: the 2 or 3 comparison teaches a leniency: if 2 of 3 are zomemim they are not executed

מתני׳ (דברים יז, ו) על פי שנים עדים או שלשה עדים יומת המת אם מתקיימת העדות בשנים למה פרט הכתוב בשלשה אלא להקיש (שלשה לשנים) מה שלשה מזימין את השנים אף השנים יזומו את הג' ומנין אפי' מאה ת"ל עדים
MISHNA: It is written: “At the mouth of two witnesses or three witnesses shall he who is to die be executed” (Deuteronomy 17:6). The question is: If the testimony is valid with two witnesses, why did the verse specify that it is valid with three? Rather, it is to juxtapose and liken three to two: Just as three witnesses can render the two witnesses conspiring witnesses, so too, the two witnesses can render the three wit-nesses conspiring witnesses. And from where is it derived that two witnesses can render even one hundred witnesses conspiring witnesses? It is derived from a verse, as the verse states: “Three witnesses.” Since the verse is obviously discussing witnesses, the term witnesses is superfluous, as it could have stated: Two or three. The term “witnesses” teaches that two witnesses can render a set of witnesses conspiring witnesses irrespective of their number.
ר' שמעון אומר מה שנים אינן נהרגין עד שיהיו שניהם זוממין אף שלשה אינן נהרגין עד שיהיו שלשתן זוממין ומנין אפי' מאה ת"ל עדים
Rabbi Shimon says that three witnesses are mentioned in the verse in order to teach: Just as two witnesses who testified that a person is liable to be executed are not killed for this testimony unless both of them are found to be conspiring witnesses, so too, three witnesses who testified together are not killed unless all three of them are found to be conspiring witnesses. And from where is it derived that the same halakha applies even to one hundred witnesses? It is derived from a verse, as the verse states: “Three witnesses.” The superfluous term “witnesses” teaches that the status of all witnesses who come to court as a single set of witnesses is that of one testimony with regard to this halakha.
רבי עקיבא אומר לא בא השלישי להקל אלא להחמיר עליו ולעשות דינו כיוצא באלו
Rabbi Akiva says: The third witness mentioned in this verse does not come for the judges to be lenient concerning him; rather, its mention comes for the judges to be stringent concerning him and to render his halakhic status like that of these two witnesses who testified with him. One could claim that since the testimony of the third witness is superfluous, as the testimony of the other two witnesses sufficed, the third witness and any other witnesses beyond the first two should be exempt. Therefore, the verse teaches that since he testified with them and was rendered a conspiring witness with them, he too is executed.
ואם כן ענש הכתוב לנטפל לעוברי עבירה כעוברי עבירה על אחת כמה וכמה ישלם שכר לנטפל לעושי מצוה כעושי מצוה
One can learn a moral from this halakha: And if the verse punished one who associates with transgressors with a punishment like the one received by the transgressors, even though his role in the transgression is ancillary, all the more so will God pay a reward to one who associates with those who perform a mitzva like the reward of those who perform the mitzva themselves, even though his role in performing the mitzva is ancillary.

מַה שְּׁנַיִם נִמְצָא אַחַד מֵהֶן קָרוֹב אוֹ פָסוּל עֵדוּתָן בְּטֵלָה, אַף שְׁלשָׁה נִמְצָא אֶחָד מֵהֶן קָרוֹב אוֹ פָסוּל, עֵדוּתָן בְּטֵלָה. מִנַּיִן אֲפִלּוּ מֵאָה, תַּלְמוּד לוֹמַר, עֵדִים. אָמַר רַבִּי יוֹסֵי, בַּמֶּה דְבָרִים אֲמוּרִים, בְּדִינֵי נְפָשׁוֹת. אֲבָל בְּדִינֵי מָמוֹנוֹת, תִּתְקַיֵּם הָעֵדוּת בַּשְּׁאָר. רַבִּי אוֹמֵר, אֶחָד דִּינֵי מָמוֹנוֹת וְאֶחָד דִּינֵי נְפָשׁוֹת. בִּזְמַן שֶׁהִתְרוּ בָהֶן, אֲבָל בִּזְמַן שֶׁלֹּא הִתְרוּ בָהֶן, מַה יַּעֲשׂוּ שְׁנֵי אַחִין שֶׁרָאוּ בְאֶחָד שֶׁהָרַג אֶת הַנָּפֶשׁ:

Just as in the case of two witnesses, if one of them was found to be a relative or [otherwise] disqualified, their whole evidence is rendered void, so it is with three, if one of them was found to be a relative or [otherwise] disqualified, the whole evidence is void. How do we know that this is the case even with a hundred? The Torah states “witnesses”. Rabbi Yose said: “When is this true? With regards to capital cases; but in monetary suits, the evidence may be established by the rest. Rabbis says: “It is one and the same rule, be it in monetary suits or capital cases.” This is the rule when both [disqualified] witnesses warned the trasngressor, but when they did not warn him, what could two brothers do that saw someone killing a person?

בַּמֶּה דְבָרִים אֲמוּרִים

In What Case are These Things Said? An expression used in Tannaitc sources to limit the application of a particular ruling to specific circumstances.

אמר רבי יוסי במה דברים אמורים בדיני נפשות אבל בדיני ממונות תתקיים העדות בשאר רבי אומר אחד דיני ממונות ואחד דיני נפשות
Rabbi Yosei says: In what case is this statement, that if one of the three witnesses is disqualified the entire testimony is voided, said? It is said with regard to cases of capital law, which are adjudicated stringently. But with regard to cases of monetary law, which are adjudicated more leniently, even if one of the witnesses is disqualified, the testimony will be validated with the testimony of the rest of the witnesses, and if it is sufficient the case can be adjudicated on that basis. Rabbi Yehuda HaNasi disagrees and says: If one of the three witnesses is disqualified the entire testimony is voided in both cases of monetary law and cases of capital law.
ואימתי בזמן שהתרו בהן אבל בזמן שלא התרו בהן מה יעשו שני אחין שראו באחד שהרג את הנפש:
And when does one disqualified witness void the entire testimony? Only when the witnesses forewarned them before they performed the transgression, thereby demonstrating their desire to fill the role of witnesses in that case. But when they did not forewarn them, what shall two brothers do in a case where they, together with others, saw someone who killed a person? Will the murderer escape punishment because two relatives happened to be there at the time of the murder and their presence voids the entire testimony? No, the testimony is voided by the presence of relatives or disqualified witnesses only when their intent was to testify. If that was not their intent, they do not void the testimony.
אמר רבי יוסי במה דברים אמורים וכו' מה יעשו שני אחים כו': היכי אמרינן להו
§ The mishna teaches that Rabbi Yosei says: In what case is this statement said…what shall two brothers do in a case where they, together with others, saw someone who killed a person? Rabbi Yosei says that it is only with regard to cases of capital law that one disqualified witness voids the entire testimony, and Rabbi Yehuda HaNasi says that this is the halakha even with regard to cases of monetary law. The mishna continues and says that it is only if the witnesses forewarned the perpetrators that they are classified as witnesses capable of voiding the entire testimony. The Gemara poses a question: How do we, the members of the court, formulate what we say to the witnesses in order to ascertain whether their intent was to testify?
אמר רבא הכי אמרי' להו למיחזי אתיתו או לאסהודי אתיתו אי אמרי לאסהודי אתו נמצא אחד מהן קרוב או פסול עדותן בטלה אי אמרי למיחזי אתו מה יעשו שני אחין שראו באחד שהרג את הנפש:
Rava says: This is what we say to the witnesses who come to the court: Did you come to observe the proceedings or did you come to testify? If the witnesses say they came to testify, then if one of them is found to be a relative or otherwise disqualified, their entire testimony is voided. If the witnesses say that they came to observe, in that situation, what shall two brothers do in a case where they saw someone who killed a person? It is certainly unusual for those who witnessed the murder to not even attend the court hearing.
איתמר אמר רב יהודה אמר שמואל הלכה כר' יוסי ורב נחמן אומר הלכה כרבי:
With regard to the dispute in the mishna, it was stated that there is an amoraic dispute: Rav Yehuda says that Shmuel says: The halakha is in accordance with the opinion of Rabbi Yosei, and Rav Naḥman says: The halakha is in accordance with the opinion of Rabbi Yehuda HaNasi.
א"ר ירמיה הכא במאי עסקינן כגון שהתרו בו סתם והאי תנא הוא דתניא ושאר חייבי מיתות שבתורה אין ממיתין אותן אלא בעדה ועדים והתראה ועד שיודיעוהו שהוא חייב מיתת ב"ד רבי יהודה אומר עד שיודיעוהו באיזה מיתה הוא נהרג
Rabbi Yirmeya rejects that proof and says: With what are we dealing here? It is a case where the witnesses forewarned the individual that if he violates the prohibition he is liable to be executed, without specification of the mode of execution. And this halakha is in accordance with the opinion of this tanna, as it is taught in a baraita: With regard to all the others, those who are liable for the various death penalties stated in the Torah other than the inciter to idol worship, the court executes them only when the following elements are present: The congregation, represented by the court, and witnesses, and forewarning just before the defendant commits the transgression. And the court does not execute him unless the witnesses informed the defendant that he is liable to receive the death penalty from the court. Rabbi Yehuda says: The defendant is not executed unless the witnesses informed the defendant by which form of death penalty he is to be executed.
ת"ק יליף ממקושש ורבי יהודה אומר מקושש הוראת שעה היתה:
Based on the statement of Rabbi Yehuda, it may be inferred that according to the first tanna, although they must inform him that he is liable to be executed, they are not required to inform him of the specific mode of execution. The Gemara explains the basis for the dispute between the first tanna and Rabbi Yehuda: The first tanna derived forewarning from the incident of the wood gatherer (see Numbers 15:32–36), who was executed even though even Moses did not know with which death penalty he was to be executed. Clearly, the mode of execution could not have been included in his forewarning. Rabbi Yehuda says: The execution of the wood gatherer was a provisional edict based on the word of God. The halakha throughout the generations cannot be derived from it.
(לב) וַיִּהְי֥וּ בְנֵֽי־יִשְׂרָאֵ֖ל בַּמִּדְבָּ֑ר וַֽיִּמְצְא֗וּ אִ֛ישׁ מְקֹשֵׁ֥שׁ עֵצִ֖ים בְּי֥וֹם הַשַּׁבָּֽת׃ (לג) וַיַּקְרִ֣יבוּ אֹת֔וֹ הַמֹּצְאִ֥ים אֹת֖וֹ מְקֹשֵׁ֣שׁ עֵצִ֑ים אֶל־מֹשֶׁה֙ וְאֶֽל־אַהֲרֹ֔ן וְאֶ֖ל כָּל־הָעֵדָֽה׃ (לד) וַיַּנִּ֥יחוּ אֹת֖וֹ בַּמִּשְׁמָ֑ר כִּ֚י לֹ֣א פֹרַ֔שׁ מַה־יֵּעָשֶׂ֖ה לֽוֹ׃ (ס) (לה) וַיֹּ֤אמֶר יְהוָה֙ אֶל־מֹשֶׁ֔ה מ֥וֹת יוּמַ֖ת הָאִ֑ישׁ רָג֨וֹם אֹת֤וֹ בָֽאֲבָנִים֙ כָּל־הָ֣עֵדָ֔ה מִח֖וּץ לַֽמַּחֲנֶֽה׃ (לו) וַיֹּצִ֨יאוּ אֹת֜וֹ כָּל־הָעֵדָ֗ה אֶל־מִחוּץ֙ לַֽמַּחֲנֶ֔ה וַיִּרְגְּמ֥וּ אֹת֛וֹ בָּאֲבָנִ֖ים וַיָּמֹ֑ת כַּאֲשֶׁ֛ר צִוָּ֥ה יְהוָ֖ה אֶת־מֹשֶֽׁה׃ (פ)
(32) Once, when the Israelites were in the wilderness, they came upon a man gathering wood on the sabbath day. (33) Those who found him as he was gathering wood brought him before Moses, Aaron, and the whole community. (34) He was placed in custody, for it had not been specified what should be done to him. (35) Then the LORD said to Moses, “The man shall be put to death: the whole community shall pelt him with stones outside the camp.” (36) So the whole community took him outside the camp and stoned him to death—as the LORD had commanded Moses.