Thinking about the mathematical structure of chemical transformations, between all possible components (educts, products) it occurs to me, that this structure is a commutative-idempotent groupoid(=magma) (CI-groupoid). Call it $(\mathcal{X},\cdot)$.

Take reactants $a,b\in\mathcal{X}$ (one can imagine any kind of substance mixture) and react them. The set is closed under $\cdot$ by definition: $$ a\cdot b \in\mathcal{X},$$ its commutative $$ a\cdot b = b\cdot a ,$$ to say you react $a$ with $b$ is the same than to say you react $b$ with $a$ (though, "pouring one into the other" isn't, but this should be ignored here*) and idempotent

$$ a \cdot a = a.$$

I cannot pinpoint much more at the moment, associativity does not hold and inversion does not exist in general. So that should be a CI-groupoid, or CI-magma. Dropping the dots from now on, second dilution of $a$ in $b$ is $$ (ab)b \ne a(bb) = ab.$$

$(\mathcal{X},\cdot)$ is now a kind of messy children chemistry where you end up mixing everything with everything and never separating anything.

Separation of components (carbon and oxygen gives CO$_2$ and CO) apparently is the identification of more structure:

$$ab=cd$$

Ultimately $\mathcal{X}$ is finitely generated, since ultimately there is only a finite number of molecules in the universe. Explicit generation from the finite number of elementary components (materials composed of only one element="elements"), however will afford inclusion of reaction conditions into the description.

Same reactants can yield different products under different reaction conditions. Reaction conditions can** be described like applying an indexed map $\chi_i$ where in $i\in I$ the reaction conditions are encoded. The maps are apparently (non surjective) homomorphisms on $\mathcal{X}$ $$ \forall a,b\in \mathcal{X}:\; \chi_i(ab)=\chi_i(a)\chi_i(b) \in \mathcal{X}.$$

Now my question, is there any developed theory/body of literature about such an algebraic structure? I have searched the internet for quite a while but only found sparse mentions of the term "CI-groupoid". Is there another maybe more common term which escaped me? Is it expected that any interesting comes out of such a categorisation (since there is so to say not really much structure)?

(I am not aware of this description in chemical research, but there is quite a lot going on in "chemical information theory" a field which is usually "below the radar" for mosts Chemists, and I do not expect that anyone here might be aware of developments in this specific field.)

Anyway the main question is:
**What is the state of research on CI-magmas (possibly equipped with "homomorphisms")?**

*Edits*

*) "pouring" $a$ into $b$ often yields different products than pouring $b$ into $a$, this is a result of some kind of (however incremental) step-wise reaction wich can be formulated like, this, starting with a little drop of $b$ in some of $a$, which is then further reacted with $b$ to give a 1:1 reaction mixture:

$$ a(a(a(ab))) \to a(a(a(ab)))b \to \dots \to (((a(a(a(ab))))b)b)b = b(b(b((((ba)a)a)a)a))) $$

This is in general not equivalent to the result of process were $a$ and $b$ are interchanged

$$ b(b(b((((ba)a)a)a)a))) \ne (((b(b(b(ba))))a)a)a .$$

**) this is research in progress,... maybe it is more natural (but finally one needs to map between conditions) to describe the reaction conditions by a total product of the family $\mathcal{X}_i\in\mathcal{X}$ with the conditions $i\in I$. Then a certain reaction will get a projection onto a certain condition-component of an element of the total product. As far as I can see, those two mentioned possibilities (maps $\chi_i$ or the total product "$\mathcal{X}^I$") are equivalent. Any comments also on this are also welcome.