A few days ago I realized that if I allowed durations to be negative, then retrograde (horizontal inversion) would be a special case of multiplication—motive multiplied by a note of negative duration—and therefore multiplication would be able to describe canon in contrary motion, without having to alter the definition of multiplication. Pretty sweet. But I was sort of frustrated that I couldn't define vertical inversion similarly.
Then just the other day I hit on it. It's based on another operation I'd played around with when I was first coming up with the idea of motivic math: multiplication of the intervals in a motive by an interval. The solution is to give notes an extra quality, called span (I'd call it height but I think most would assume that to be synonymous with tone). The product of two notes A and B would be defined as a note C where:
Ctiming = Atiming+BtimingAduration
Cduration = AdurationBduration
Ctone = Atone+BtoneAspan
Cspan = AspanBspan
Vertical inversion would therefore be multiplication of a motive by a note with a duration of negative one.