580. Unneeded Labors
Shabbos 1:6
If one performs an action that will definitely result in a prohibited form of labor being performed, one would be liable even though he did not intend to perform the labor in question. For example, if one wanted a chicken’s head to entertain a child [Editor’s note: it was a different time] and he cut off the chicken’s head on Shabbos, he is liable even though his intention was not to slaughter the chicken. This is because it is a foregone conclusion that he can’t cut the head off and have the chicken survive. The same is true in similar circumstances.
Shabbos 1:7
If one performs an act of labor, he is liable even if he has no use for the labor he performed. For example, if one extinguished a lamp in order to save the oil, the wick or the earthenware vessel, since he intended to extinguish the lamp, he is liable even though he did not extinguish it for the usual reasons. Similarly, if one moves a thorn four cubits (about six feet) in the public domain, or if one extinguishes a coal so that the public should not be injured by it, he is liable. Even though the usual reasons for which one would extinguish or carry don’t matter to him, and his intention was simply to prevent injuries, he is liable. This is true in all similar cases.