This is not one transaction, Eric. Installing a roof is separate from the insurance reimbursement. Insurance reimbursement is factored into the calculation of casualty loss but does not affect the depreciable basis of the roof.
So if you say there is a reimbursement because of a casualty loss, how is there no involuntary conversion?
Property Converted Through Receipt of Insurance Proceeds, Condemnation Award or
Qualifying Sales.
i. Under §1033(a)(2), when property is converted into money or property not
similar or related in service or use through receipt of insurance proceeds, a
condemnation award, or upon qualifying sales, non-recognition of gain is
accomplished if the taxpayer
INVOLUNTARY CONVERSION
a. Destruction.
i. Destruction of property for purposes o f §1033 is analogous to casualty under
§165 as an involuntary conversion of property arising from fire, storm,
shipwreck, or other casualty. E
(a)General rule If property (as a result of its destruction in whole or in part, theft, seizure, or requisition or condemnation or threat or imminence thereof) is compulsorily or involuntarily converted—(1)Conversion into similar property
Into property similar or related in service or use to the property so converted, no gain shall be recognized.
(2)Conversion into money Into money or into property not similar or related in service or use to the converted property, the gain (if any) shall be recognized except to the extent hereinafter provided in this paragraph:(A)Nonrecognition of gain If the taxpayer during the period specified in subparagraph (B), for the purpose of replacing the property so converted, purchases other property similar or related in service or use to the property so converted, or purchases stock in the acquisition of control of a corporation owning such other property, at the election of the taxpayer the gain shall be recognized only to the extent that the amount realized upon such conversion (regardless of whether such amount is received in one or more taxable years) exceeds the cost of such other property or such stock.
The insurance proceeds reduce the casualty loss under 165.
The roof was converted to money (involuntary conversion via insurance proceeds). There is no gain since it's less than the replacement property.
Involuntary Conversions I.R.C. Section 1033 (wm.edu)
26 U.S. Code § 1033 - Involuntary conversions | U.S. Code | US Law | LII / Legal Information Institute (cornell.edu)
(2)Trade or business and investment property
If a taxpayer’s property held for productive use in a trade or business or for investment is located in a disaster area and is compulsorily or involuntarily converted as a result of a federally declared disaster, tangible property of a type held for productive use in a trade or business shall be treated for purposes of subsection (a) as property similar or related in service or use to the property so converted.
The casualty loss is for property under 165.
The replacement of the casualty loss property is under 1033.
The insurance proceeds simultaneously reduce the loss under 165 while acting to create basis in the replacement property that will be recovered over future periods under 1033.