Our Rabbis taught: A woman who miscarries something in the form of a domesticated animal, a wild animal, or a bird, whether of unclean or clean species, if it is male she observes the days of purity for a male, and if female she observes them for a female; if its sex is unknown she observes them for both male and female. These are the words of Rabbi Meir. But the Sages say: Anything that does not have the form of a human being is not a viable offspring. What is Rabbi Meir's reasoning? Since the term "formation" (yetzirah) is stated regarding such creatures just as it is regarding the human, and since the term is free for an inference from two sides [a gezeira shava that is unencumbered on both ends and therefore binding]. It is free on the side of the human and free on the side of the beast. How is it free on the side of the beast? As it is written, "And God made the wild animal of the earth after its kind" (Genesis 1:25), and it is written below (verse 19), "And He formed out of the ground" (Genesis 2:19). And a word that is free for inference from both sides, we derive from it and no one may refute the derivation.
Rabbi Meir and the Word Formation Shared by Man and Beast
Yalkut Shimoni on Torah 20:11
שָׁנוּ רַבּוֹתֵינוּ, הַמַּפֶּלֶת כְּמִין בְּהֵמָה חַיָּה וָעוֹף בֵּין טְמֵאִים בֵּין טְהוֹרִים, אִם זָכָר, תֵּשֵׁב לְזָכָר אִם נְקֵבָה, תֵּשֵׁב לִנְקֵבָה אֵין יָדוּעַ תֵּשֵׁב לְזָכָר וְלִנְקֵבָה דִּבְרֵי רַבִּי מֵאִיר. וַחֲכָמִים אוֹמְרִים, כָּל שֶׁאֵין בּוֹ מִצּוּרַת הָאָדָם אֵינוֹ וָלָד. מַאי טַעְמָא דְּרַבִּי מֵאִיר, הוֹאִיל וְנֶאֶמְרָה בָּהֶן יְצִירָה כְּאָדָם וּמֻפְנֶה מִשְּׁנֵי צְדָדִין, מֻפְנֶה גַּבֵּי אָדָם וּמֻפְנֶה גַּבֵּי בְּהֵמָה, מַאי מֻפְנֶה גַּבֵּי בְּהֵמָה, דִּכְתִיב "וַיַּעַשׁ אֱלֹהִים אֶת חַיַּת הָאָרֶץ לְמִינָהּ", וּכְתִיב (להלן פסוק יט) "וַיִּצֶר מִן הָאֲדָמָה", וּמֻפְנֶה מִשְּׁנֵי צְדָדִין לְמֵדִין וְאֵין מְשִׁיבִין.