"From the animal": to exclude the animal that mounted [a human] and the animal that was mounted [by a human]. But is this not derived by logic? If a blemished animal, with which no transgression was committed, is disqualified from the altar, then an animal that mounted or was mounted, with which a transgression was committed, all the more so should be disqualified for the altar. But consider one who plowed with an ox and a donkey together: this proves otherwise, for a transgression was committed with them and yet they are valid for the altar. No: if you spoke of one who plowed with an ox and a donkey, where they are not subject to death, would you say the same of an animal that mounted or was mounted, which are subject to death? Take back what you brought. I have only the case where the transgression was established by two witnesses; whence the case established by one witness or by the owner? Rabbi Yishmael said: I shall reason. If a blemished animal, where the testimony of two does not disqualify it from being eaten, yet the testimony of one disqualifies it from being offered, then an animal that mounted or was mounted, where the testimony of two disqualifies it from being eaten, is it not logical that the testimony of one witness should disqualify it from being offered? Rabbi Akiva said to him: no; if you spoke of a blemished animal, whose blemish is visible, would you say the same of an animal that mounted or was mounted, whose disqualification is not visible? Since their disqualification is not visible, they should not be disqualified for the altar; therefore Scripture says "from the animal," to exclude the animal that mounted and the one that was mounted. Then why do I need the verse, since this comes from logic? Rav Ashi said to him: because the original logic can be refuted, for one might object, what of a blemished animal whose blemish is recognizable, would you say the same of an animal that mounted or was mounted whose disqualification is not recognizable; since their disqualification is not recognizable they should be valid for the altar; therefore Scripture says "from the animal," to exclude the one that mounted. Rabbi Yishmael says: the Torah is expounded by thirteen principles: from the argument of lesser to greater, from a general statement and a specific one. How so? "From the animal" is a general statement, "from the cattle and from the flock" is a specific one; in a general statement followed by a specific one, the general includes only what is in the specific.
Why the Animal Used for Sin Is Barred from the Altar
Yalkut Shimoni on Torah 435:4
מִן הַבְּהֵמָה לְהוֹצִיא אֶת הָרוֹבֵעַ וְאֶת הַנִּרְבָּע, וַהֲלֹא דִּין הוּא, וּמַה אִם בַּעַל מוּם שֶׁלֹּא נֶעֶבְדָה בּוֹ עֲבֵרָה פָּסוּל מֵעַל גַּבֵּי הַמִּזְבֵּחַ, רוֹבֵעַ וְנִרְבָּע שֶׁנֶּעֶבְדָה בָּהֶן עֲבֵרָה אֵינוֹ דִּין שֶׁיְּהוּ פְּסוּלִין לְגַבֵּי מִזְבֵּחַ. הֲרֵי מִי שֶׁחָרַשׁ בְּשׁוֹר וַחֲמוֹר יוֹכִיחַ שֶׁנֶּעֶבְדָה בָּהֶן עֲבֵרָה וְכָשֵׁר לְגַבֵּי מִזְבֵּחַ לֹא אִם אָמַרְתָּ בְּחוֹרֵשׁ בְּשׁוֹר וַחֲמוֹר שֶׁאֵינָן בְּמִיתָה, תֹּאמַר בְּרוֹבֵעַ וְנִרְבָּע שֶׁהֵן בְּמִיתָה, טֹל לְךָ מַה שֶּׁהֵבֵאתָ אֵין לִי אֶלָּא שֶׁנֶּעֶבְדָה בּוֹ עֲבֵרָה עַל פִּי שְׁנַיִם נֶעֶבְדָה בּוֹ עֲבֵרָה עַל פִּי עֵד אֶחָד אוֹ עַל פִּי בְּעָלִים מִנַּיִן אָמַר רַבִּי יִשְׁמָעֵאל הֲרֵינִי דָּן, וּמַה אִם בַּעַל מוּם (שֶׁהִיא) [שֶׁאֵין] יְעִידַת שְׁנַיִם פּוֹסַלְתּוֹ מִן אֲכִילָה, יְעִידַת אֶחָד פּוֹסַלְתּוֹ מֵהַקְרָבָה רוֹבֵעַ וְנִרְבָּע שֶׁיְּעִידַת שְׁנַיִם פּוֹסַלְתּוֹ מֵאֲכִילָה אֵינוֹ דִּין שֶׁתְּהֵא יְעִידַת עֵד אֶחָד פּוֹסַלְתּוֹ לְהַקְרָבָה. אָמַר לוֹ רַבִּי עֲקִיבָא לֹא אִם אָמַרְתָּ בְּבַעַל מוּם שֶׁמּוּמוֹ בְּגָלוּי תֹּאמַר בְּרוֹבֵעַ וְנִרְבָּע שֶׁאֵין מוּמָן בְּגָלוּי, הוֹאִיל וְאֵין מוּמָן בְּגָלוּי לֹא יְהוּ פְּסוּלִין לְגַבֵּי מִזְבֵּחַ, תַּלְמוּד לוֹמַר "מִן הַבְּהֵמָה" לְהוֹצִיא אֶת הָרוֹבֵעַ וְהַנִּרְבָּע. הָא לָמָּה לִי קְרָא, הָא אַתְיָא מִדִּינָא אָמַר לֵיהּ רַב אַשִּׁי, מִשּׁוּם דְּאִכָּא לְמֵימַר מֵעִיקָרָא דְדִינָא פִּרְכָא, מַה לְבַעַל מוּם שֶׁמּוּמוֹ נִכָּר תֹּאמַר בְּרוֹבֵעַ וְנִרְבָּע שֶׁאֵין מוּמָן נִכָּר, הוֹאִיל וְאֵין מוּמָן נִכָּר יִהְיוּ כְּשֵׁרִים לְגַבֵּי מִזְבֵּחַ, תַּלְמוּד לוֹמַר "מִן הַבְּהֵמָה" לְהוֹצִיא רוֹבֵעַ. רַבִּי יִשְׁמָעֵאל אוֹמֵר בִּשְׁלֹשׁ עֶשְׂרֵה מִדּוֹת הַתּוֹרָה נִדְרֶשֶׁת, מִקַּל וָחֹמֶר, מִכְּלָל וּפְרָט. כֵּיצַד, מִן הַבְּהֵמָה כְּלָל, מִן הַבָּקָר וּמִן הַצֹּאן פְּרָט, כְּלָל וּפְרָט אֵין בַּכְּלָל אֶלָּא מַה שֶּׁבַּפְּרָט.