Lawful permanent resident
For purposes of this subsection, an individual is a lawful permanent resident of the United States at any time if—
(A) such individual has the status of having been lawfully accorded the privilege of residing permanently in the United States as an immigrant in accordance with the immigration laws, and
(B) such status has not been revoked (and has not been administratively or judicially determined to have been abandoned).
An individual shall cease to be treated as a lawful permanent resident of the United States if such individual commences to be treated as a resident of a foreign country under the provisions of a tax treaty between the United States and the foreign country, does not waive the benefits of such treaty applicable to residents of the foreign country, and notifies the Secretary of the commencement of such treatment.