Talmud for Sanhedrin 10:4
אַנְשֵׁי עִיר הַנִּדַּחַת אֵין לָהֶן חֵלֶק לָעוֹלָם הַבָּא, שֶׁנֶּאֱמַר (שם יג) יָצְאוּ אֲנָשִׁים בְּנֵי בְלִיַּעַל מִקִּרְבֶּךָ וַיַּדִּיחוּ אֶת ישְׁבֵי עִירָם. וְאֵינָן נֶהֱרָגִים עַד שֶׁיִּהְיוּ מַדִּיחֶיהָ מֵאוֹתָהּ הָעִיר וּמֵאוֹתוֹ הַשֵּׁבֶט, וְעַד שֶׁיֻּדַּח רֻבָּהּ, וְעַד שֶׁיַּדִּיחוּם אֲנָשִׁים. הִדִּיחוּהָ נָשִׁים וּקְטַנִּים אוֹ שֶׁהֻדַּח מִעוּטָהּ אוֹ שֶׁהָיוּ מַדִּיחֶיהָ חוּצָה לָהּ, הֲרֵי אֵלּוּ כִיחִידִים. וּצְרִיכִין שְׁנֵי עֵדִים וְהַתְרָאָה לְכָל אֶחָד וְאֶחָד. זֶה חֹמֶר בַּיְּחִידִים מִבַּמְּרֻבִּים, שֶׁהַיְּחִידִים בִּסְקִילָה, לְפִיכָךְ מָמוֹנָם פָּלֵט. וְהַמְּרֻבִּים בְּסַיִף, לְפִיכָךְ מָמוֹנָם אָבֵד:
The men of a city condemned (for idolatry) have no share in the world to come, viz. (Deuteronomy 13:14): "There have gone out men of wickedness (belial) from your midst, and they have turned astray the inhabitants of their city." [("men of belial":) men who do not rise (einam olim) at the resurrection. And those who are turned astray are like those who turn astray (in this regard)]. And they are not killed (by the sword) unless the inciters (to idolatry) be from the same city, [it being written: "and they have turned astray the inhabitants of their city," and not the inhabitants of a different city], and from the same tribe, [it being written: "from your midst" — from the midst of the tribe itself], and (they are not killed by the sword) unless the majority [of the city] are incited, [it being written: "the inhabitants of their city," connoting the "habitation" of the city, i.e., the majority.], and unless men incite them. If they were incited by women or minors, or if only a minority were incited, or if the inciters were outside it, [i.e., from a different city], they are as individuals, [who served idolatry. They are executed by stoning and their property "escapes."] and they [the men of a condemned city] require two witnesses and warning for each one. [They would multiply courts, and whoever was found to have served idolatry with witnesses and warning was separated until it was determined whether they (the separated ones) were the majority. If they were, they were brought to the great beth-din, where their judgment was concluded and they were executed by the sword and their property was destroyed. And if they were found not to be the majority of the city, they were executed by stoning and their property "escaped."] This is a stringency of individuals (executed for idolatry) over a populace — that individuals (are executed) by stoning, for which reason their property escapes; and the populace (are executed) by the sword, for which reason their property is destroyed.