Is there any structure similar to a free magma, including an operation which splits, or undoes, the binary operation?
A set S together with two operations (S, •, ~)
• : S × S → S
~ : S → S × S
Where ⋅(∼(x)) = x
Background: If free magmas abstractly describe binary tree structures, they don't provide a mechanism to opaquely decompose nodes for examination. Which structure does?
You're looking for the Jónsson-Tarski algebras. Given a set $X$ together with a bijection $m:X\times X\to X$, we have the reverse map $X\to X\times X$ and the left and right components can be given by $\ell:X\to X$ and $r:X\to X$. In other words it satisfies the identities:
$m(r(x),\ell(x))=x$, $r(m(x,y))=x$, and $\ell(m(x,y))=y$.
Some interesting facts about Jónsson-Tarski algebras include: