Halacha

הלכה א
אֵין אָדָם חַיָּב חַטָּאת עַל שִׁגְגָתוֹ עַד שֶׁיִּהְיֶה שׁוֹגֵג מִתְּחִלָּה וְעַד סוֹף אֲבָל אִם שָׁגַג בַּתְּחִלָּה וְהֵזִיד בַּסּוֹף אוֹ הֵזִיד בַּתְּחִלָּה וְשָׁגַג בַּסּוֹף פָּטוּר מִקָּרְבַּן חַטָּאת. כֵּיצַד. כְּגוֹן שֶׁהוֹצִיא חֵפֶץ מֵרְשׁוּת לִרְשׁוּת בְּשַׁבָּת עָקַר בְּזָדוֹן וְהִנִּיחַ בִּשְׁגָגָה אוֹ שֶׁעָקַר בִּשְׁגָגָה וְהִנִּיחַ בְּזָדוֹן פָּטוּר עַד שֶׁיַּעֲקֹר בִּשְׁגָגָה וְיַנִּיחַ בִּשְׁגָגָה. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
1.
A person is not liable for a sin-offering for an inadvertent transgression unless he acts inadvertently from the beginning to the end. If, however, he acted inadvertently at the beginning, but acted willfully at the end or began acting willfully, but acted inadvertently at the end, he is exempt from the obligation to bring a sin-offering.
What is implied? A person transferred an article from one domain to another on the Sabbath. If one lifted up the article willfully, but placed it down inadvertently or lifted it up inadvertently, but placed it down willfully, he is exempt. To be liable for a sin-offering, he must lift it up inadvertently and place it down inadvertently. Similar laws apply in all analogous situations.

הלכה ב
עָבַר עֲבֵרָה וְיוֹדֵעַ שֶׁהִיא בְּלֹא תַּעֲשֶׂה אֲבָל אֵינוֹ יוֹדֵעַ שֶׁחַיָּבִין עָלֶיהָ כָּרֵת הֲרֵי זוֹ שְׁגָגָה וּמֵבִיא חַטָּאת. אֲבָל אִם יָדַע שֶׁהִיא בְּכָרֵת וְשָׁגַג בְּקָרְבָּן וְלֹא יָדַע אִם חַיָּבִין עָלֶיהָ קָרְבָּן אִם לָאו הֲרֵי זֶה מֵזִיד. שֶׁשִּׁגְגַת קָרְבָּן אֵינָהּ שְׁגָגָה בַּעֲבֵרוֹת אֵלּוּ שֶׁחַיָּבִין עֲלֵיהֶן כָּרֵת:
כסף משנה
2.
If a person violated a transgression knowing that involved violation of a negative commandment, but he did not know that he is liable for karet for its violation, he is considered to have transgressed inadvertently and he must bring a sin-offering. If, however, he did know that it was punishable by karet, but was unaware of the obligation for a sacrifice, i.e., he did not know whether or not he was liable for a sacrifice for the transgression, he is considered to have acted willfully. For the lack of knowledge concerning a sacrifice is not considered as a lack of knowledge concerning these transgressions for which one is liable for karet.

הלכה ג
מִי שֶׁלֹּא נוֹדַע לוֹ עַצְמוֹ שֶׁל חֵטְא שֶׁחָטָא. אַף עַל פִּי שֶׁיָּדַע בְּוַדַּאי שֶׁעָבַר עַל לֹא תַּעֲשֶׂה שֶׁיֵּשׁ בּוֹ כָּרֵת. הֲרֵי זֶה פָּטוּר מִקָּרְבַּן חַטָּאת. שֶׁנֶּאֱמַר (ויקרא ד כג) "אֲשֶׁר חָטָא בָּהּ" עַד שֶׁיֵּדַע הַחֵטְא שֶׁחָטָא בּוֹ. כֵּיצַד. חֵלֶב וְנוֹתָר לְפָנָיו וְאָכַל אֶת אֶחָד מֵהֶם וְאֵין יָדוּעַ אֵי זֶה אָכַל. אִשְׁתּוֹ נִדָּה וַאֲחוֹתוֹ בַּבַּיִת וְשָׁגַג וּבָא עַל אַחַת מֵהֶן וְאֵין יָדוּעַ אֵי זוֹ מֵהֶן בָּעַל. שַׁבָּת וְיוֹם הַכִּפּוּרִים לְפָנָיו וְעָשָׂה מְלָאכָה בְּאֶחָד מֵהֶן וְאֵין יָדוּעַ בְּאֵי זֶה מֵהֶן עָשָׂה הֲרֵי זֶה פָּטוּר מִקָּרְבַּן חַטָּאת:
כסף משנה
3.
When a person does not know the nature of the transgression that he violated, even though he definitely knows that he violated a negative commandment punishable by karet, he is exempt from bringing a sin-offering, as implied by Leviticus 4:23: "that he transgressed with regard to it," implying that he must know the transgression that he violated.
What is implied? There was a piece of forbidden fat and meat from a sacrifice left beyond its permitted time before him and he partook of one of them, but did not know which he ate; his wife who was in the niddah state and his sister were at home, he inadvertently was intimate with one of them, but did not know with whom he had relations; the Sabbath and Yom Kippur passed, he performed a forbidden labor on one of them, but did not know on which, he is exempt from the obligation to bring a sin-offering.

הלכה ד
חָטָא וְנוֹדַע לוֹ חַטָּאתוֹ וְחָזַר וּשְׁכָחוֹ הֲרֵי זֶה מֵבִיא חַטָּאת לְשֵׁם מַה שֶּׁהוּא וְתֵאָכֵל כִּשְׁאָר חַטָּאוֹת הַנֶּאֱכָלוֹת:
כסף משנה
4.
If a person transgressed, became aware of the transgression, and then forgot which transgression he violated, he should bring a sin-offering for whichever transgression he violated. This offering should be eaten, like the other sin-offerings that are eaten.

הלכה ה
שָׁגַג בְּשֵׁם אֶחָד וְהֵם שְׁנֵי גּוּפִין חַיָּב. כֵּיצַד. שְׁתֵּי נִדּוֹת וְשָׁגַג בְּאַחַת מֵהֶן וְאֵין יָדוּעַ אֵי זוֹ הִיא. שְׁתֵּי אֲחָיוֹת וְשָׁגַג בְּאַחַת מֵהֶן וְאֵין יָדוּעַ אֵי זוֹ הִיא חַיָּב חַטָּאת שֶׁהֲרֵי יָדַע עַצְמוֹ שֶׁל חֵטְא. לְמָה זֶה דּוֹמֶה לִשְׁתֵּי נֵרוֹת דּוֹלְקוֹת שֶׁכָּבָה אַחַת מֵהֶן וְאֵין יָדוּעַ אֵי זוֹ נֵר הִיא. אוֹ לִשְׁנֵי תַּמְחוּיִין שֶׁל חֵלֶב שֶׁאָכַל מֵאֶחָד מֵהֶן וְאֵין יָדוּעַ מֵאֵי זֶה תַּמְחוּי מֵהֶן אָכַל שֶׁהוּא חַיָּב. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
5.
If one inadvertently committed one transgression, but there are two persons involved and he is unaware of the one with whom he committed the transgression, he is liable.
What is implied? There were two women in the niddah state. Inadvertently, he was intimate with one of them, but he did not know with whom. He had two sisters. Inadvertently, he was intimate with one of them, but he did not know with whom. In these instances, he is liable for a sin-offering. To what can this be compared? To two lamps that are burning and one extinguished one of them on the Sabbath without knowing which one he extinguished or two pots of forbidden fat from which he ate one and yet, he did not know the identity of the one from which he ate.In these instances, he is liable. Similar laws apply in all analogous situations.

הלכה ו
כָּל הַמְחֻיָּב חַטָּאת קְבוּעָה עַל שִׁגְגָתוֹ וְעָשָׂה בִּשְׁגָגָה וְנוֹדַע לוֹ אַחַר שֶׁחָטָא אַף עַל פִּי שֶׁלֹּא הָיְתָה לוֹ יְדִיעָה בַּתְּחִלָּה שֶׁזֶּה חֵטְא הוּא הֲרֵי זֶה חַיָּב חַטָּאת. כֵּיצַד. תִּינוֹק שֶׁנִּשְׁבָּה לְבֵין הָעַכּוּ''ם וְגָדַל וְהוּא אֵינוֹ יוֹדֵעַ מַה הֵם יִשְׂרָאֵל וְלֹא דָּתָם וְעָשָׂה מְלָאכָה בְּשַׁבָּת וְאָכַל חֵלֶב וְדָם וְכַיּוֹצֵא בָּהֶן. כְּשֶׁיִּוָּדַע לוֹ שֶׁהוּא יִשְׂרָאֵל ומְצֻוֶּה עַל כָּל אֵלּוּ חַיָּב לְהָבִיא חַטָּאת עַל כָּל עֲבֵרָה וַעֲבֵרָה. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
6.
In all situations when a person is obligated to bring a fixed sin-offering for his inadvertent transgression and he transgressed inadvertently and he becomes aware of the transgression after violating it, he is liable for a sin-offering, even though initially, he was not aware that this act is a a transgression.
What is implied? A child was captured by gentiles and raised by them without knowing who are the Jewish people or what their faith is. He performed labor on the Sabbath, ate forbidden fat, blood, and the like. When he discovers that he is Jewish and commanded to eschew all of the above, he is obligated to bring a sin-offering for every particular sin. Similar laws apply in all analogous situations.

הלכה ז
הַשּׁוֹגֵג בְּלֹא כַּוָּנָה בַּעֲרָיוֹת אוֹ בְּמַאֲכָלוֹת אֲסוּרוֹת חַיָּב חַטָּאת. בְּשַׁבָּת פָּטוּר מֵחַטָּאת. כֵּיצַד. הָיָה מִתְעַסֵּק עִם אִשָּׁה וּבְעָלָהּ בְּלֹא כַּוָּנָה לִבְעִילָה וַהֲרֵי הִיא עֶרְוָה עָלָיו. דִּמָּה שֶׁזֶּה שֶׁבְּפִיו רֹק הוּא וּבְלָעוֹ בְּלֹא כַּוָּנָה לְשֵׁם אֲכִילָה בָּעוֹלָם וַהֲרֵי הוּא חֵלֶב הֲרֵי זֶה חַיָּב חַטָּאת. נִתְכַּוִּן לְהַגְבִּיהַּ אֶת הַתָּלוּשׁ וְחָתַךְ אֶת הַמְחֻבָּר בְּלֹא כַּוָּנָה לַחֲתִיכָתוֹ פָּטוּר. מְלֶאכֶת מַחֲשֶׁבֶת אָסְרָה תּוֹרָה כְּמוֹ שֶׁבֵּאַרְנוּ בִּמְקוֹמוֹ:
כסף משנה
7.
When a person transgresses unintentionally by engaging in forbidden sexual relations or partaking of forbidden foods, he is liable for a sin-offering. If he does so with regard to the Sabbath, he is exempt from the obligation of a sin-offering.
What is implied? If he was acting casually with a woman and engaged in relations with her without intending to engage in relations and she is forbidden to him as an ervah, he is liable for a sin-offering. This ruling also applies if he thought that what was in his mouth was spittle and he swallowed it without the intent of eating at all and then he discovered that it was forbidden fat. If, by contrast, his intent was to lift up produce that was already cut and instead, he cut off a plant that was growing without intending to cut it off, he is exempt from a sin-offering, for the Torah forbade only the performance of purposeful labor, as explained in the appropriate place.

הלכה ח
כָּל הָעוֹשֶׂה מִצְוָה מִן הַמִּצְוֹת וּבִכְלַל עֲשִׂיָּתָהּ נַעֲשֵׂית עֲבֵרָה שֶׁחַיָּבִין עָלֶיהָ כָּרֵת בִּשְׁגָגָה הֲרֵי זֶה פָּטוּר מֵחַטָּאת מִפְּנֵי שֶׁעָשָׂה בִּרְשׁוּת. כֵּיצַד. הַבָּא עַל יְבִמְתּוֹ וַהֲרֵי הִיא נִדָּה וְהוּא לֹא יָדַע. הֲרֵי זֶה פָּטוּר מֵחַטָּאת שֶׁהֲרֵי עֲשָׂאָהּ בִּרְשׁוּת. אֲבָל אִם בָּא עַל אִשְׁתּוֹ וַהֲרֵי הִיא נִדָּה חַיָּב חַטָּאת מִפְּנֵי שֶׁלֹּא שְׁאָלָהּ וְאַחַר כָּךְ יִבְעל. אֲבָל יְבִמְתּוֹ אֵינוֹ רָגִיל בָּהּ כְּדֵי שֶׁיִּשְׁאַל לָהּ. וְכֵן מִי שֶׁהָיוּ לוֹ שְׁנֵי תִּינוֹקוֹת אֶחָד לָמוּל בְּשַׁבָּת וְאֶחָד לָמוּל בְּעֶרֶב שַׁבָּת אוֹ בְּאֶחָד בְּשַׁבָּת וְשָׁכַח וּמָל שְׁנֵיהֶן בְּשַׁבָּת. פָּטוּר מֵחַטָּאת שֶׁהֲרֵי יֵשׁ לוֹ רְשׁוּת לָמוּל אֶחָד מֵהֶן בְּשַׁבָּת וְשַׁבָּת דְּחוּיָה הִיא אֶצְלוֹ וּמִצְוָה עָשָׂה אַף עַל פִּי שֶׁהֵם שְׁנֵי גּוּפִין הוֹאִיל וּזְמַנּוֹ בְּחל אֵינוֹ מְדַקְדֵּק. אֲבָל אִם לֹא הָיָה אֶחָד מֵהֶן רָאוּי לָמוּל בְּשַׁבָּת וְשָׁכַח וּמָל בְּשַׁבָּת מִי שֶׁאֵינוֹ רָאוּי לָמוּל בְּשַׁבָּת חַיָּב חַטָּאת:
כסף משנה
8.
Whenever one performs one of the mitzvot and while he was performing it, a transgression punishable by karet was violated inadvertently, he is not liable for a sin-offering, because the person was acting with license.
What is implied? A man engaged in intimacy with his yevamah. She was in the niddah state, but he was unaware. He is exempt from a sin-offering, for he acted with license. If, by contrast, one was intimate with his wife when she was in the niddah state, he is liable, because he did not ask her before engaging in relations. With regard to his yevamah, however, he is not familiar with her, so that he might ask her.
Similarly, if a person had two infants to circumcise, one, on the Sabbath, and one on Friday or on Sunday, should he have forgotten and circumcised them both on the Sabbath, he is exempt from bringing a sin-offering. For he was licensed to circumcise one of them on the Sabbath, the Sabbath laws are suspended in his regard, and he performed a mitzvah. Even though two bodies are involved, since it is a pressing time, he is not precise. If, however, neither of the children was scheduled to be circumcised on the Sabbath and on the Sabbath, he circumcised a person who was not fit to be circumcised on the Sabbath, he is liable for a sin-offering.

הלכה ט
אֻמָּן שֶׁבָּא לָמוּל לִפְנוֹת הַיּוֹם בְּיוֹם הַשַּׁבָּת וְאָמְרוּ לוֹ לֹא נִשְׁאַר פְּנַאי בַּיּוֹם כְּדֵי שֶׁתָּמוּל וְאִם תַּתְחִיל לָמוּל לֹא תַּשְׁלִים עַד יְצִיאַת הַשַּׁבָּת וְנִמְצֵאתָ חוֹבֵל בְּשַׁבָּת וְלֹא עוֹשֶׂה מִצְוָה. וְאָמַר רָגִיל אֲנִי וְזָרִיז וּבִמְהֵרָה אָמוּל. אִם לֹא הִשְׁלִים אֶלָּא עַד יְצִיאַת הַשַּׁבָּת הֲרֵי זֶה חַיָּב חַטָּאת שֶׁהֲרֵי הִתְרוּ בּוֹ:
כסף משנה
9.
The following rules apply when a proficient expert comes to circumcise a child before sunset on the Sabbath and he is told: "There is not enough time in the day left to perform the circumcision. If you begin circumcising, you will not be able to complete the act before the Sabbath departs. Thus you will have made a wound on the Sabbath without performing a mitzvah." If he says: "I am familiar with the task and deft and I will circumcise him speedily," should he not complete the circumcision until after the conclusion of the Sabbath, he is liable for a sin-offering, for they warned him.

הלכה י
הַמּוֹצִיא אֶת הַלּוּלָב בְּיוֹם טוֹב הָרִאשׁוֹן שֶׁל חַג שֶׁחָל לִהְיוֹת בְּשַׁבָּת כְּדֵי לְצֵאת בּוֹ וְהֶעֱבִירוֹ אַרְבַּע אַמּוֹת בִּרְשׁוּת הָרַבִּים בְּשׁוֹגֵג פָּטוּר שֶׁהֲרֵי בִּרְשׁוּת הוֹצִיא. וְכֵן הַשּׁוֹחֵט אֶת הַפֶּסַח בְּיוֹם אַרְבָּעָה עָשָׂר שֶׁחָל לִהְיוֹת בְּשַׁבָּת וְנוֹדַע לוֹ אַחַר כֵּן שֶׁמָּשְׁכוּ הַבְּעָלִים אֶת יְדֵיהֶם אוֹ שֶׁמֵּתוּ אוֹ נִטְמְאוּ קֹדֶם שְׁחִיטָה. אוֹ שֶׁנִּמְצָא טְרֵפָה בַּסֵּתֶר כְּגוֹן נְקוּב מֵעַיִם אוֹ רֵאָה. הֲרֵי זֶה פָּטוּר מִפְּנֵי שֶׁשָּׁחַט בִּרְשׁוּת. אֲבָל נִמְצָא בַּעַל מוּם אוֹ שֶׁהָיְתָה טְרֵפָה גְּלוּיָה הֲרֵי זֶה חַיָּב חַטָּאת מִפְּנֵי שֶׁהָיָה לוֹ לִבְדֹּק וְאַחַר כָּךְ יִשְׁחֹט. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
10.
When a person takes a lulav out to the public domain on the first day of Sukkot which falls on the Sabbath in order to fulfill his obligation or carries it four cubits in the public domain inadvertently, he is exempt from a sin-offering, because he acted with license.
Similarly, if one slaughters an animal for a Paschal sacrifice on the fourteenth of Nisan which fell on the Sabbath and afterwards, he discovered that the owners removed their connection from it, they died or became impure before it was slaughtered, or it became tereifah in a hidden place, e.g., its intestines or lungs were perforated, he is exempt, because he slaughtered it with license. If, however, it was discovered to be blemished or there was a readily apparent factor that caused it to be deemed tereifah, he is liable for a sin-offering, since he should have checked it before slaughtering. Similar laws apply in all analogous situations.

הלכה יא
שָׁחַט אֶת הַפֶּסַח בְּשַׁבָּת שֶׁלֹּא לִשְׁמוֹ בְּטָעוּת פָּטוּר מִפְּנֵי שֶׁהַזֶּבַח כָּשֵׁר שֶׁעֲקִירַת שְׁמוֹ בְּטָעוּת אֵינוֹ עֲקִירָה כְּמוֹ שֶׁבֵּאַרְנוּ בְּהִלְכוֹת פְּסוּלֵי הַמֻּקְדָּשִׁין:
כסף משנה
11.
If one slaughtered a Paschal sacrifice on the Sabbath for the sake of another sacrifice in error, he is exempt, because the sacrifice is acceptable. For supplanting the designation of a sacrifice in error is not considered of consequence, as explained in Hilchot Pesulei HaMukdashim.

הלכה יב
שָׁחַט זְבָחִים אֲחֵרִים לְשֵׁם פֶּסַח בְּטָעוּת. אִם רְאוּיִין הֵם לְקָרְבַּן פֶּסַח פָּטוּר מִקָּרְבַּן חַטָּאת מִפְּנֵי שֶׁשָּׁחַט בִּרְשׁוּת. אִם אֵינָן רְאוּיִין כְּגוֹן שֶׁהָיְתָה נְקֵבָה אוֹ בֶּן שְׁתַּיִם חַיָּב חַטָּאת שֶׁהֲרֵי אֵינוֹ רָאוּי לְקָרְבַּן פֶּסַח. וְכֵן אִם שָׁגַג וּשְׁחָטוֹ בְּשַׁבָּת שֶׁלֹּא לְאוֹכְלָיו אוֹ שֶׁלֹּא לִמְנוּיָיו אוֹ לַעֲרֵלִים אוֹ לִטְמֵאִים חַיָּב חַטָּאת. שְׁחָטוֹ לְאוֹכְלָיו וְשֶׁלֹּא לְאוֹכְלָיו לִמְנוּיָיו וְשֶׁלֹּא לִמְנוּיָיו לְמוּלִים וְלַעֲרֵלִים לִטְמֵאִים וְלִטְהוֹרִים פָּטוּר. שֶׁהֲרֵי הַפֶּסַח כָּשֵׁר. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
12.
The following rules apply if, on the Sabbath, one slaughtered animals designated for other sacrifices for the sake of a Paschal sacrifice in error. If they are fit to serve as a Paschal sacrifice, he is free from the obligation of bringing a sin-offering, because he slaughtered with license. If they are not fit to serve as a Paschal sacrifice, e.g., the animal was female or in its second year of life, he is liable for a sin-offering, because they are not fitting for this sacrifice.
Similarly, one is liable for a sin-offering if he slaughtered an animal as a Paschal sacrifice on the Sabbath for the sake of individuals who cannot partake of it, for those who were not enumerated on it, for the uncircumcised, or for the ritually impure. If, however, he slaughtered it on the Sabbath for the sake of individuals who can partake of it and for those who cannot partake of it, for those enumerated on it and for those who were not enumerated on it, for the circumcised and for the uncircumcised, or for the pure and for the impure, he is exempt from bringing a sin-offering, because the Paschal sacrifice is acceptable. Similar laws apply in all analogous situations.

הלכה יג
הַשּׁוֹחֵט בְּשַׁבָּת קָרְבַּן צִבּוּר שֶׁלֹּא לִשְׁמוֹ הֲרֵי זֶה חַיָּב חַטָּאת וְיַקְטִיר אֵימוּרִים לָעֶרֶב. וְכֵן אִם שָׁחַט יֶתֶר עַל חוֹבַת הַיּוֹם חַיָּב חַטָּאת עַל הַתּוֹסֶפֶת:
כסף משנה
13.
When a person slaughters an animal designated for a communal sacrifice on the Sabbath for an intent other than that for which it was designated, he is obligated to bring a sin-offering. Nevertheless, the fats and the organs from the sacrificial animal should be offered on the altar's pyre on Saturday evening. Similarly, if on the Sabbath one slaughtered other animals besides those required as the day's obligations, he is liable for a sin-offering for the additional animal.

הלכה יד
שָׁחַט קָרְבְּנוֹת יָחִיד שֶׁאֵין דּוֹחִים אֶת הַשַּׁבָּת בְּשַׁבָּת בִּשְׁגָגָה חַיָּב חַטָּאת וְהַבָּשָׂר מֻתָּר בַּהֲנָאָה. וְאֵין זוֹרְקִין אֶת הַדָּם. וְאִם עָבַר וְזָרַק דָּמָם לִשְׁמָן בֵּין בְּשׁוֹגֵג בֵּין בְּמֵזִיד עָלוּ לַבְּעָלִים לְשֵׁם חוֹבָה. וְיַקְטִיר אֵימוּרִין לָעֶרֶב וְהַבָּשָׂר יֵאָכֵל וְיָבִיא הַשּׁוֹחֵט חַטָּאת עַל שִׁגְגָתוֹ:
כסף משנה
14.
A person who slaughters animals for individual sacrifices whose offering does not supersede the Sabbath prohibitions on the Sabbath inadvertently is liable for a sin-offering. One is, however, permitted to benefit from the meat of those sacrifices and the blood should not be cast on the altar. If he transgressed and cast the blood on the altar for the intent of those sacrifices whether without knowing it is a transgression or knowingly, the owner is considered to have fulfilled his obligation, the organs and fats may be offered on the altar's pyre, and the meat should be eaten. The one who slaughtered the animal should bring a sin-offering for his inadvertent violation.

הלכה טו
הָיוּ לְפָנָיו שְׁתֵּי בְּהֵמוֹת שֶׁל צִבּוּר אַחַת כְּחוּשָׁה וְאַחַת שְׁמֵנָה וְהָיְתָה חוֹבַת הַיּוֹם בְּאַחַת בֵּין חַטָּאת בֵּין עוֹלָה וְשָׁגַג וְשָׁחַט הַשְּׁתַּיִם. אִם שָׁחַט כְּחוּשָׁה בַּתְּחִלָּה וְאַחַר כָּךְ שָׁחַט הַשְּׁמֵנָה פָּטוּר מִקָּרְבַּן חַטָּאת וְלֹא עוֹד אֶלָּא שֶׁאוֹמְרִים לוֹ הָבֵא שְׁמֵנָה וּשְׁחֹט לְכַתְּחִלָּה. אֲבָל אִם שָׁחַט הַשְּׁמֵנָה תְּחִלָּה וְאַחַר כָּךְ הַכְּחוּשָׁה חַיָּב חַטָּאת עַל הַתּוֹסֶפֶת. נִמְצֵאת הָרִאשׁוֹנָה הַשְּׁמֵנָה טְרֵפָה בִּבְנֵי מֵעַיִם אַף עַל פִּי שֶׁלֹּא יָדַע שֶׁהִיא טְרֵפָה בְּעֵת שֶׁשָּׁחַט הַכְּחוּשָׁה וְלֹא לָזֶה נִתְכַּוֵּן הוֹאִיל וְנִשְׁחֲטָה הָאַחֲרוֹנָה כְּמִצְוָתָהּ הֲרֵי זֶה פָּטוּר מֵחַטָּאת. וְכֵן הַפּוֹרֵס מְצוּדָה לְהַעֲלוֹת דָּגִים מִן הַיָּם בִּשְׁגָגָה וְהֶעֱלָה תִּינוֹק עִם הַדָּגִים בֵּין שֶׁשָּׁמַע שֶׁטָּבַע תִּינוֹק בֵּין שֶׁלֹּא שָׁמַע הוֹאִיל וְהֶעֱלָה תִּינוֹק הֲרֵי זֶה פָּטוּר מֵחַטָּאת אַף עַל פִּי שֶׁלֹּא הָיְתָה כַּוָּנָתוֹ אֶלָּא לָצוּד מִפְּנֵי שֶׁהָיָה שׁוֹגֵג. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
15.
The following laws apply when, on the Sabbath, there were two animals designated for communal offerings before a priest, one lean, and one stocky, and the sacrificial obligation of the day required - as either a sin-offeringor a burnt-offering - the offering of only one of them and he inadvertently slaughtered them both. If he slaughtered the lean one first and afterwards, slaughtered the stocky one, he is exempt from the obligation to bring a sin-offering. Indeed, he is told: "Bring the stocky animal and slaughter it as an initial preference." If, however, he slaughtered the stocky animal initially and then the lean one, he is liable for a sin-offering for the additional slaughter.
Nevertheless, in the latter instance, there is room for leniency if the stocky animal was slaughtered first and discovered to be tereifah because of a disqualifying factor in its intestines. Even though he did not know that the stocky one was tereifah when he slaughtered the lean one and he did not have that intent, since the last one was slaughtered as required by law, he is exempt from a sin-offering for its slaughter.
A similar law also applies if one spreads out a net to catch fish at sea on the Sabbath unknowingly and lifts up a child with the fish, he is exempt from bringing a sin-offering. Even though his intent was only to catch fish, since he acted unknowingly and lifted up a child with the fish, he is exempt whether he heard that a child had fallen into the sea or not, he is exempt. Similar laws apply in all analogous situations.

הלכה טז
מִי שֶׁהָיָה לְפָנָיו בְּלֵילֵי הַפֶּסַח צָלִי שֶׁל פֶּסַח וְנוֹתָר מִן הַקָּדָשִׁים וְנִתְכַּוֵּן לֶאֱכל צָלִי שֶׁהוּא מִצְוָה וְשָׁגַג וְאָכַל הַנּוֹתָר הֲרֵי זֶה חַיָּב חַטָּאת שֶׁהֲרֵי לֹא עָשָׂה מִצְוָה בַּאֲכִילָה זוֹ. וְכֵן כָּל כַּיּוֹצֵא בָּזֶה:
כסף משנה
16.
When, on the night of Pesach, a person had roasted meat from the Paschal sacrifice and meat that was left over from other sacrifices before him and intended to partake of the roasted meat which is a mitzvah and inadvertently partook of the leftover meat, he is liable for a sin-offering, since he did not perform a mitzvah when eating. Similar laws apply in all analogous situations.

קורבנות הלכות שגגות פרק ב
Korbanot Shegagos Chapter 2