וַעֲשִׂ֣יתֶם ל֔וֹ כַּאֲשֶׁ֥ר זָמַ֖ם לַעֲשׂ֣וֹת לְאָחִ֑יו וּבִֽעַרְתָּ֥ הָרָ֖ע מִקִּרְבֶּֽךָ׃
Uczyńcie mu wtedy, jako zamyślał uczynić bratu swojemu: i wyplenisz zło z pośród siebie.
Mishneh Torah, Murderer and the Preservation of Life
Wenn Jemand, der eine innere tödlichen Wunde hat אָדָם טְרֵפָה, einen Andern tötet, so wird er hingerichtet, denn es steht geschrieben: »Und du sollst den Bösen vertilgen aus eurer Mitte« (Deut. 13:6). Dies gilt aber nur, wenn er den Mord in Gegenwart des Gerichts בֵּית דִּין begeht. Geschieht es aber nur in Gegenwart von Zeugen, so ist er frei, denn, wenn die Zeugen als falsch überführt wären שֶׁמָּא יוּזְמוּ, unterlägen sie doch nicht der Todesstrafe, weil ihr falsches Zeugnis nur die Folge hätte haben können, dass ein innerlich tödlich Verwundeter dem Tode zugeführt worden wäre. Nun wird in Prozessen kein Zeugnis als authentisch angesehen, dessen Urheber nicht des Gegenteils überführt, ebenfalls zur Strafe gezogen werden kann. [Die falschen Zeugen werden immer mit der gleichen Strafe bestraft, welche sie verursachen wollten. In diesem Fall gilt es nicht, da die Zeugen keine טְרֵפָה sind.]
Mishneh Torah, Testimony
If they were refuted after the execution of the person against whom they had testified, they are not put to death through an [a fortiori] inference. As it is written: "You shall do to him as he schemed to do" (Deuteronomy 19:19), but has not yet done. This interpretation is based on tradition. However, if the accused against whom they had testified was lashed, they are lashed. So too, if by the evidence submitted by them, money was handed over from the defendant to the plaintiff, it is returned to the defendant and they make restitution to him.
Sefer HaChinukh
And [it] is practiced in every place and at all time by males, but not by females. As women are not [included] in the category of testimony, since testimony requires focus and much concentration. And the verse put a limit on the punishment of the one who transgresses this negative prohibition and testifies falsely against his fellow, to do unto him as he thought to do his fellow (Deuteronomy 19:19). And there are also lashes for it (Makkot 2a). And it is also elucidated there in Sanhedrin.