כֵּֽן־תַּעֲשֶׂ֥ה לְשֹׁרְךָ֖ לְצֹאנֶ֑ךָ שִׁבְעַ֤ת יָמִים֙ יִהְיֶ֣ה עִם־אִמּ֔וֹ בַּיּ֥וֹם הַשְּׁמִינִ֖י תִּתְּנוֹ־לִֽי׃
Gayundin ang gagawin mo sa iyong baka at sa iyong tupa: pitong araw itong mananatili sa kanyang ina; sa ikawalong araw ay ibibigay mo ito sa Akin.
Mekhilta DeRabbi Yishmael
(Exodus 22:29) "Thus shall you do with your ox": Just as with the first-born of an ox, miscarriages exempt (the next birth) from (the laws of) the first-born, so, with the first-born of a human being. Just as with the first-born of a human being you are permitted to redeem the first-born through any Cohein, wherever you wish, so, with the first-born of a beast, you are permitted to give it to any Cohein wherever you wish.
Sifra
4) R. Yossi Haglili says: What is the intent of "it shall be seven days under its mother"? Because it is written (Shemoth 22:19) "seven days shall it be with its mother," I might think that it must be with its mother all seven days; it is, therefore, written "under its mother" (negating [in the Hebrew] the above assumption). If under its mother I might think (that it is acceptable) even if it left the mother's womb after she died; it is, therefore, written "with its mother." How is this to be reconciled? Even if its mother survives for only one moment (after its birth, it is acceptable).
Sifra
5) "and from the eighth day and on it shall be acceptable": I might think that from the eighth day on it is permitted, but on the eighth day itself it is forbidden. It is, therefore, written in respect to a bechor (a first-born male animal, Shemoth 22:29) "On the eighth day you shall give it to Me." I might think that a bechor is permitted on the eighth day, but that from the eighth day on it is forbidden; it is, therefore, written of the holy things (here) "and from the eighth day and on it shall be acceptable." But why do I not rule that a bechor is permitted (only) in the eighth day, and the holy things from the eighth day and on? Whence do I derive that I apply what is stated in respect to bechor (also) in respect to the holy things, and what is stated in respect to the holy things also in respect to bechor? From "its mother" (here, in respect to the holy things) - "its mother" (there, in respect to bechor), a gezeirah shavah (identity).