Keilim 18:7-8
Keilim 18:7
If a bed leg that had contracted midras impurity was attached to a bed, the whole bed contracts midras impurity. If the leg was later detached, the leg retains its midras impurity and the bed is ritually unclean from touching something midras. If a bed leg that had seven-day (corpse) impurity was attached to a bed, the whole bed contracts seven-day impurity. If the leg was later detached, the leg retains the seven-day impurity while the bed only retains evening impurity. If a bed leg that had contracted evening impurity was attached to a bed, the whole bed contracts evening impurity. If the leg was later detached, the leg retains its evening impurity and the bed is rendered ritually clean. The same rules apply to the tooth of a spade.
Keilim 18:8
The tefillin of the head (which is made of four compartments) comprises four utensils. If the first compartment is detached and replaced, the tefillin retains corpse impurity; the same is true with the second and third compartments. If he detached the fourth compartment, the tefillin is purified from corpse impurity but it is still ritually unclean from touching something that was impure from corpse uncleanliness. If he went back to the first compartment, detached the replacement and replaced it again, it remains impure from contact; the same is true with the second compartment. If he then detached the third compartment, the tefillin are rendered ritually clean. This is because the fourth compartment was only ever impure from contact, and something that is impure from contact can’t transmit impurity through contact.