אמר רב קיים אברהם אבינו כל התורה כולה שנאמר (בראשית כו, ה) עקב אשר שמע אברהם בקולי וגו' א"ל רב שימי בר חייא לרב ואימא שבע מצות הא איכא נמי מילה ואימא שבע מצות ומילה א"ל א"כ מצותי ותורותי למה לי
The Sages taught in a baraita: The descendants of Noah, i.e., all of humanity, were commanded to observe seven mitzvot: The mitzva of establishing courts of judgment; and the prohibition against blessing, i.e., cursing, the name of God; and the prohibition of idol worship; and the prohibition against forbidden sexual relations; and the prohibition of bloodshed; and the prohibition of robbery; and the prohibition against eating a limb from a living animal.
(יד) וְכֵיצַד מְצֻוִּין הֵן עַל הַדִּינִין. חַיָּבִין לְהוֹשִׁיב דַּיָּנִין וְשׁוֹפְטִים בְּכָל פֶּלֶךְ וּפֶלֶךְ לָדוּן בְּשֵׁשׁ מִצְוֹת אֵלּוּ. וּלְהַזְהִיר אֶת הָעָם. וּבֶן נֹחַ שֶׁעָבַר עַל אַחַת מִשֶּׁבַע מִצְוֹת אֵלּוּ יֵהָרֵג בְּסַיִף. וּמִפְּנֵי זֶה נִתְחַיְּבוּ כָּל בַּעֲלֵי שְׁכֶם הֲרִיגָה. שֶׁהֲרֵי שְׁכֶם גָּזַל וְהֵם רָאוּ וְיָדְעוּ וְלֹא דָּנוּהוּ. וּבֶן נֹחַ נֶהֱרָג בְּעֵד אֶחָד וּבְדַיָּן אֶחָד בְּלֹא הַתְרָאָה וְעַל פִּי קְרוֹבִין. אֲבָל לֹא בְּעֵדוּת אִשָּׁה. וְלֹא תָּדוּן אִשָּׁה לָהֶם:
(14) What must they do to fulfill their requirement regarding the Law of Justice? They have to set up magistrates and judges in each district to judge the people with regard to these Six Commandments; and they must issue warnings (about them) to the people. A non-Jew who violates one of the Seven Commandments is executed by means of the sword. 101This entire passage is absent in most versions.How is this so? Anyone who worships idols or blasphemed or murdered or had sexual relations with one of those forbidden to him or stole even less than the value of a Prutah or ate any amount from a limb or the flesh of a live animal or saw someone else violate one of these and failed to judge and execute him, is himself executed by means of the sword. It was for this reason all residents of the City of Shechem deserved to be executed. For Shechem kidnapped102Dinah., and they saw and knew and failed to judge him. A non-Jew is executed by the testimony of one, and with one judge, without forewarning, and by the testimony of relatives, but not by the testimony of a woman103Other editions are missing the words, “but not by the testimony”.. A woman may not judge for them.