Solid-state polymerization in a polyrotaxane coordination polymer via a [2+2] cycloaddition reaction.