If a building collapsed on someone [on Yom Kippur or Shabbat], and there is a doubt about whether he is [trapped] there or whether he is alive . . . we [nonetheless work] to uncover him.
This passage comes from Yoma, the tractate dealing with the laws of Yom Kippur. The prohibitions against work on Yom Kippur are very similar to the prohibitions against work on Shabbat. The forbidden labors for both of these days are divided into the thirty-nine Torah-prohibited categories we saw in Mishnah Shabbat 7:3 called אבות מלאכות (avot melakhot). Excavating a ruin would ordinarily be forbidden on Shabbat and Yom Kippur. The specific category under which it would be forbidden might vary, depending on the intent of the excavator (as we have seen in our discussions of intent). If one is actually doing the demolishing, it would fall under the category of soter (סותר or demolishing). If one were cleaning or leveling an already demolished building, it would fall under the category of boneh (בונה or building).
These restrictions are superseded when a life is at stake and there are victims who must be pulled from the rubble. A question arises in the case of a collapsed building when it is not clear whether there was anyone inside, and if there was, whether or not they might still be alive. In trying to answer this question, we encounter the important rabbinic concept of ספק (safek or uncertainty or doubt). In our case, there may be danger to human life, but it is not certain. When a life is certainly in danger, this concern דוחה את השבת (pushes off Shabbat) because of the principle of פיקוח נפש (piquach nefesh or protection of life). Here we see that even if the danger is only a possibility, we act as if it were a certainty, at least insofar as saving a life is concerned.