עַל־פִּ֣י שְׁנַ֣יִם עֵדִ֗ים א֛וֹ שְׁלֹשָׁ֥ה עֵדִ֖ים יוּמַ֣ת הַמֵּ֑ת לֹ֣א יוּמַ֔ת עַל־פִּ֖י עֵ֥ד אֶחָֽד׃
A person shall be put to death only on the testimony of two or more witnesses; no one shall be put to death on the testimony of a single witness.—
Torah Temimah points to Yerushalmi Sanhedrin 5:1.
Sefaria · Yerushalmi Sanhedrin 5:1
תניא, רבי שמעון בן יוחאי אומר, מניין להתראה מה״ת, שנאמר על פי שנים עדים יומת המת, וכי מת הוא, אלא להודיעו באיזה מיתה הוא מת.
English: It was taught: Rabbi Shimon ben Yochai says, From where in the Torah do we learn the requirement of warning? From the verse “on the testimony of two witnesses shall the dead be put to death.” Is he already dead? Rather, [the language is] to inform him by which death he is to die.
The phrase “the dead shall be put to death” is taken as the source for the requirement that the accused be warned of the specific form of capital punishment that awaits him.
Derash on the verse (Yerushalmi) — not a formal named middah of the 13. The paradoxical language is resolved as the source of hatra’ah (formal warning).
Before a capital sentence may be carried out, the accused must have been formally warned of the specific death penalty that applies to his act.