אָמַר רַב יְהוּדָה אָמַר רַב: בְּהֵמָה שֶׁנָּפְלָה לְאַמַּת הַמַּיִם — מֵבִיא כָּרִים וּכְסָתוֹת וּמַנִּיחַ תַּחְתֶּיהָ, וְאִם עָלְתָה — עָלְתָה.
GEMARA: Rav Yehuda said that Rav said: With regard to an animal that fell into an aqueduct, one brings cushions and blankets, and throws them into the water ditch, and places them beneath the animal in the aqueduct. And if the animal thereby emerges, it emerges.
מֵיתִיבִי: בְּהֵמָה שֶׁנָּפְלָה לְאַמַּת הַמַּיִם — עוֹשֶׂה לָהּ פַּרְנָסָה בִּמְקוֹמָהּ בִּשְׁבִיל שֶׁלֹּא תָּמוּת. פַּרְנָסָה — אִין, כָּרִים וּכְסָתוֹת — לָא!
The Gemara raises an objection from a Tosefta: With regard to an animal that fell into an aqueduct on Shabbat, one provides it with sustenance in its place so that it will not die. This implies that providing it with sustenance, yes, that is permitted, providing it with cushions and blankets, no, that it is prohibited.
לָא קַשְׁיָא, הָא — דְּאֶפְשָׁר בְּפַרְנָסָה, הָא — דְּאִי אֶפְשָׁר בְּפַרְנָסָה. אֶפְשָׁר בְּפַרְנָסָה — אִין, וְאִי לָא — מֵבִיא כָּרִים וּכְסָתוֹת וּמַנִּיחַ תַּחְתֶּיהָ.
The Gemara answers: This is not difficult, as there is room to distinguish between the cases. This, the Tosefta in which it was taught that one provides the animal with sustenance, is referring to a case where it is possible to provide it with sustenance. That, the mishna in which Rav said that one brings cushions and blankets, is referring to a case where it is impossible to provide it with sustenance. Where it is possible to provide it with sustenance, yes, he does so. And if it is not possible to provide it with sustenance, he brings cushions and blankets and places them beneath the animal.
וְהָא קָא מְבַטֵּל כְּלִי מֵהֵיכֵנוֹ! סָבַר מְבַטֵּל כְּלִי מֵהֵיכֵנוֹ דְּרַבָּנַן, צַעַר בַּעֲלֵי חַיִּים דְּאוֹרָיְיתָא, וְאָתֵי דְּאוֹרָיְיתָא וְדָחֵי דְּרַבָּנַן.
The Gemara asks: Does he not, by placing the cushions and blankets, negate a vessel’s preparedness? The cushions and blankets are no longer fit for their designated use on Shabbat, and this negation of their designated use is similar to the prohibited labor of dismantling. The Gemara answers: Rav holds that negating a vessel’s preparedness is prohibited by rabbinic law. Causing a living creature to suffer is a Torah prohibition. And a matter prohibited by Torah law comes and overrides a matter prohibited by rabbinic law.
Tzaar Baalei Chaim is when one is מצער a בעל חי. Here he is causing the בעל חי no צער???