"Whether it gores a son or gores a daughter" and so forth (Exodus 21:31), why is this said? Because it says, "and it killed a man or a woman" (Exodus 21:29), I would know only of adults; from where do I derive minors? Scripture teaches, saying, "whether it gores a son or gores a daughter." I would know only a fully developed son or daughter; from where do I derive one of indeterminate sex and a hermaphrodite? Scripture teaches, saying, "whether it gores a son" and so forth. I would know only the son or daughter of another; from where do I derive his own son or daughter? Scripture teaches, saying, "according to this judgment it shall be done to him." I would know only an Israelite; from where do I derive converts? Scripture teaches, saying, "according to this judgment it shall be done to him."
The Goring Ox and Liability for Children and Converts Alike
Yalkut Shimoni on Torah 341:2
(שמות כא לא) אוֹ בֵן יִגָּח אוֹ בַת יִגָּח וְגוֹ', לָמָּה נֶאֱמַר, לְפִי שֶׁנֶּאֱמַר (לעיל פסוק כט) וְהֵמִית אִישׁ אוֹ אִשָּׁה, אֵין לִי אֶלָּא גְּדוֹלִים, קְטַנִּים מִנָּיִן, תַּלְמוּד לוֹמַר אוֹ בֵן יִגַּח אוֹ בַת יִגָּח. אֵין לִי אֶלָּא בֵן אוֹ בַת גָּמוּר, טוּמְטוּם וְאַנְדְּרוֹגִינוֹס, מִנָּיִן, תַּלְמוּד לוֹמַר אוֹ בֵן יִגָּח וְגוֹ'. אֵין לִי אֶלָּא בְּנוֹ וּבִתּוֹ שֶׁל אַחֵר, בְּנוֹ וּבִתּוֹ שֶׁל עַצְמוֹ, מִנָּיִן, תַּלְמוּד לוֹמַר כַּמִּשְׁפָּט הַזֶּה יֵעָשֶׂה לּוֹ. אֵין לִי אֶלָּא יִשְׂרָאֵל, גֵּרִים מִנָּיִן, תַּלְמוּד לוֹמַר כַּמִּשְׁפָּט הַזֶּה יֵעָשֶׂה לּוֹ.