Had a little trouble following this as plain text, so I wrote it up in LaTeX (it'll be a bit small if you try to read it inline--you'll probably want to tap to enlarge on mobile or open the image in a new tab/click this direct link to the image):

I tried to hew as closely to your notation as I could, but let me know if you spot any errors!