Electron–proton and electron–methyl exchanges in pyrolysis of polyacetylene and polymethylacetylene