shall be considered as an amount realized from the sale or exchange of property other than a capital asset.
in exchange for all or a part of his interest in other partnership property (including money), or
such transactions shall, under regulations prescribed by the Secretary, be considered as a sale or exchange of such property between the distributee and the partnership (as constituted after the distribution).
such partnership shall be treated as owning its proportionate share of the property of any other partnership in which it is a partner. Under regulations, rules similar to the rules of the preceding sentence shall also apply in the case of interests in trusts.
shall be allocated to partnership property of a like character except that the basis of any such partnership property shall not be reduced below zero. If, in the case of a distribution, the adjustment to basis of property described in paragraph (1) or (2) is prevented by the absence of such property or by insufficient adjusted basis for such property, such adjustment shall be applied to subsequently acquired property of a like character in accordance with regulations prescribed by the Secretary.
Gain shall be recognized to the partnership to the extent that the amount required to be allocated under paragraph (2) to other partnership property exceeds the aggregate adjusted basis of such other property immediately before the allocation required by paragraph (2).