Keilim18: 7
כֶּרַע שֶׁהָיְתָה טְמֵאָה מִדְרָס וְחִבְּרָהּ לַמִּטָּה — [כֻּלָּהּ] טְמֵאָה מִדְרָס. פֵּרְשָׁה — הִיא טְמֵאָה מִדְרָס, וְהַמִּטָּה מַגַּע מִדְרָס. הָיְתָה טְמֵאָה טֻמְאַת שִׁבְעָה וְחִבְּרָהּ לַמִּטָּה — כֻּלָּהּ טְמֵאָה טֻמְאַת שִׁבְעָה. פֵּרְשָׁה — הִיא טְמֵאָה טֻמְאַת שִׁבְעָה, וְהַמִּטָּה טְמֵאָה טֻמְאַת עָרֶב. הָיְתָה טְמֵאָה טֻמְאַת עֶרֶב וְחִבְּרָהּ לַמִּטָּה — כֻּלָּהּ טְמֵאָה טֻמְאַת עָרֶב. פֵּרְשָׁה — הִיא טְמֵאָה טֻמְאַת עֶרֶב, וְהַמִּטָּה טְהוֹרָה. וְכֵן הַשֵּׁן שֶׁל מַעְדֵּר.
[Regarding] a leg [of a bed] that was tamei midras and one connected it to a bed, (the entire) [bed] becomes tamei midras. [If the leg is] removed, it is tamei midras, and the bed is [tamei due to] contact with a midras [hazav]. [If the leg] was tamei with seven-day tumah and one connected it to a bed, the entire bed becomes tamei with seven-day tumah. [If the leg is] removed, it is tamei with seven-day tumah, and the bed is tamei with evening-tumah. [If the leg] was tamei with evening-tumah and one connected it to a bed, the entire bed becomes tamei with evening-tumah. [If the leg is] removed, it is tamei with evening-tumah, and the bed is tahor. The same [rulings apply to] the prong of a pitchfork.