Principle
Matneh al mah she-katuv ba-Torahמַתְנֶה עַל מַה שֶּׁכָּתוּב בַּתּוֹרָה
MAT-NEH AL MAH SHE-KA-TUV BA-TO-RAH
Stipulating against Torah law is void
A condition or instruction that contradicts a law fixed by the Torah has no effect. In monetary matters a person can sometimes waive his own rights, but where the Torah sets the outcome itself — such as the order of heirs or the firstborn's double portion — a private decree cannot override it, and the attempt is simply void.
Where it comes up
1 mishnah