and (iii) of section 47(c)(2)(B) shall apply. (3) Mixed use or multifamily building If only a portion of a building is used as the principal residence of the taxpayer, only qualified rehabilitation expenditures which are properly allocable to such portion shall be taken into account under this section. (c) Certified rehabilitation For purposes of this section— (1) In general The term certified rehabilitation has the meaning given such term by section 47(c)(2)(C). (2) Approved State program The term certified rehabilitation includes a certification made by— (A) a State Historic Preservation Officer who administers a State Historic Preservation Program approved by the Secretary of the Interior pursuant to section 101(b)(1) of the National Historic Preservation Act, or (B) a local government, certified pursuant to section 101(c)(1) of the National Historic Preservation Act and authorized by a State Historic Preservation Officer, or the Secretary of the Interior where there is no approved State program, subject to such terms and conditions as may be specified by the Secretary of the Interior for the rehabilitation of buildings within the jurisdiction of such officer (or local government) for purposes of this section. (d) Definitions and special rules For purposes of this section— (1) Qualified historic home The term qualified historic home means a certified historic structure— (A) which has been substantially rehabilitated, and (B) which (or any portion of which)— (i) is owned by the taxpayer, and (ii) is used (or will, within a reasonable period, be used) by such taxpayer as his principal residence. (2) Substantially rehabilitated The term substantially rehabilitated has the meaning given such term by section 47(c)(1)(C). (3) Principal residence The term principal residence has the same meaning as when used in section 121. (4) Certified historic structure (A) In general The term certified historic structure means any building (and its structural components) which— (i) is listed in the National Register, or (ii) is