For example, if someone's mother makes egg salad for the whole family on Shabbos but peels the eggs a few hours before the meal when it's supposed to be peeled immediately before the meal. If the person told their mother what they are doing is wrong however the mother refuses to listen is the child allowed to continue eating the egg salad every Shabbos?
I agree with Danny Schoemann, but my answers tend to be longer :)
The Short Version:
1) The child can keep eating the egg salad.
2) The child should not be telling their parent that they are wrong.
The Detailed Version With Sources:
Peeling a hard boiled egg on Shabbos, is not the melachah of Dosh (threshing), nor is it the melachah of Borer (selecting/sorting from a mixture) according to some opinions.
A) It is not Dosh as the Maharshag (Rav Shimon Greenfeld; 1860-1930) and other Poskim explain. He says that peeling a hard boiled egg is something the householder does, not the farmer, in processing the food. Dosh is only possible with industrial labor done with the food item in the fields. Other Poskim give alternate reasons why it is not Dosh as well. This is also why peeling bananas and oranges etc. cannot be Dosh. The farmers send these fruits to market in their peels. It is the householder's job to peel them before eating.
B) It should not be Borer to peel fruits/eggs according to Rabbeinu Channanel (Shabbos 74a). This Rishon explains that Dosh is removing a cover from the fruit/food. When the useless cover's pieces, and the food, are now mixed up, then separating them is Borer. Borer cannot occur with peeling because the peel and fruit are not halachically called a "mixture".
The Aruch HaShulchan 319:22 (R' Yechiel Michel Epstein; 1829-1908)(who interprets the Rema this way too),and the Eglei Tal, (Borer #6 and #11) (R' Avraham Borenstein known as the Sochatchover Rebbe and author of Avnei Nezer; 1838-1910), both say that peeling fruits (and therefore eggs) has nothing to do with Borer at all, since that combination is not a mixture, but rather a food blocked by a cover.
Therefore, not peeling a hard boiled egg on Shabbos may only be a Rabbinical decree (or may be permitted according to some).
Furthermore, R' Moshe Feinstein (Igros Moshe Orach Chaim 4, 74, Borer, #13) asks about the requirement to perform borer "miyad" (immediately) before the meal to avoid breaking Shabbos. He wants to know if the usual "hour" before the meal to prepare (mentioned by stricter poskim) is a 60 minute hour, or more or less?
R' Moshe concludes: "This hour is not an hour per se, but rather the amount of time that it takes this homemaker to arrange the food for the meal..etc..."
So, even if the peeling of the egg would be "Assur D'Oraisa", this particular mother may have many guests, table cloths, silverware, and other things to prepare for; and/or she may be the type to go slow, or not have as many children helping that week etc., so that 3 hours before the meal is normal, and halachically considered "right before the meal" as far as she is concerned. So now it becomes permitted for her to peel the egg.
Also, The Beis Yosef (to Siman 319) brings the opinion of Rabbeinu Yerucham, who says that the time called "right before the meal" can be from the morning meal until the afternoon meal! As long as the Borer preparation is done for the very next meal, it is OK and is not considered Borer for the sake of storage. This could easily be 3-4 hours (or more) !
The Prohibition to Benefit from Breaking Shabbos:
After all of the above we can see that it is permitted for the mother and child and anyone else, to eat the egg salad based on the following:
The prohibition to benefit from chilul Shabbos, is itself a Rabbinical penalty according to how we pasken. Therefore, if there is any doubt about someone's action being a melachah or not, according to any valid halachic opinion, we do not forbid the product (the egg salad) after the fact. This is according to the Chafetz Chaim. (see Mishneh Berurah 318:2 in the name of the Pri Megadim and Magen Avraham) This is based on the rule that a doubt about a Rabbinical law (the penalty in this case to maybe forbid the egg salad) is decided leniently.
The Mishneh Berurah further says (318:7) that if the person didn't know any better, (lets say mom thought she knew the halachah is lenient and she didn't believe her child was right when warning her), then we rely on the Vilna Gaon who says that we pasken like Tosafos in the name of R' Meir. In the case of inadvertant negligence, the food may be eaten by the transgressor on Shabbos and by the family and guests too, right away. This can be relied upon even if the sin was an Issur D'Oraisa, if there is need, and certainly if the sin was D'Rabbanan
Finally, the Chafetz Chaim continues in Beur Halachah (318:1) that the Chayey Adam (R' Avraham Danzig; 1748-1820) (Shabbos klal 9:11) teaches the prohibition only extends to products of forbidden melachah that caused a physical change in the object, like cooking. Carrying food to someone's home for instance, would not be subject to forbidding the food. Here too, the egg didn't change. A barrier around it was removed, causing inadvertant benefit.
Although the Pri Megadim argues that a melachah of Borer should forbid the food at least until Shabbos is out, the above poskim argue for leniency (at least if the sin was inadvertant). In addition, The Maharsham (R' Sholom Schwadron; 1835-1911) (Da'at Torah 319) and R' Ovadiah Yosef (Yalkut Yosef 319:15), are lenient as well. Some of these poskim argue that the act of Borer in this case should be lenient, even if done on purpose. One other reason brought for leniency is because the borer act could have been easily done in a permitted manner. Therefore, there is no exclusive benefit from the breaking of Shabbos. R' Shlomo Zalman Auerbach also seems to permit benefit from a melachah act that merely removes a blockage from a permitted object on Shabbos. For instance, if someone opened a fridge knowing the light would go on, they can still take out the food and eat it on Shabbos. If someone asked a gentile to break the seal on a letter, the Jew can still read the letter. If someone carried a key in the street and opened their door, they can still enter the house and make use of the contents. (see Sefer Meor HaShabbos, Peninei HaMeor, 4:2)
In conclusion, even if the above seems to be generally lenient, and even against the mainstream halachah of our communities in some cases, it does not matter. The Halachah is relying on some minority opinions so we do not need to penalize people for a D'Rabbanan, and cause fighting on Shabbos. This is especially true, where it may be needed to keep the peace with parents.
The Gemara relates that R' Tarfon was honoring his mother all the time. He once had to help her walk by placing his hands on the street and letting her step on him because she needed his help. He even let her berate and humiliate him in front of the Roman Senate (and other cases) without protesting. When he became ill, his mother begged the sages to pray for him to recover, saying that he always honored her. They responded that whatever he did was nowhere near what he in fact had to do for her!
It seems like good advice for the child in the above case to find a good mentor who knows halachah and is sensitive to understanding the parents and the child; especially in a case where the child may be growing up as a more religious person than the parents choose to be. The child can gain a lot by working on the mitzvah of honoring parents and how that overrides certain halachos.
I hope this helps,
I have no time to look for the source of the statement, but as long as there's a single [classic] Halachic opinion that permits one's actions, the food does not become forbidden.
In your specific case, there are options that Borer is only an issue if done for the meal after the one about to be eaten. So you cannot peel eggs in the morning for Seudat Shlishit, nor before supper for the morning meal. But you could peel eggs after supper for lunch - see the Aruch haShulchan סימן שיט - דיני בורר, וזורה, ומרקד for some details.
Even if we don't pasken like that (I can't say for sure) but since there are opinions like that, the food is permitted.
So unless you're sure that there's real Chilul Shabbat involved - according to all opinions - be careful before arguing / insulting your parents.