Full rule composition. (a) Commutative diagram of the composition (L, K, R) = (L2, K2, R2) ∘ (L1, K1, R1), with arrows denoting subgraph isomorphisms. The morphisms u1, v1 and e1 are isomorphisms. (b) Illustration of the subgraph relations of a full composition: L2 is a subgraph of R1, R2 is a subgraph of the resulting right side R, and L1 is isomorphic to the resulting left side L. (c) Concrete example of full composition of two rules from the Formose reaction; backward aldol addition (p3) and backward keto-enol tautomerism (p1). The atom mapping and matching morphism are implicitly given in these drawings by corresponding positions of atoms. The bonds in the matching morphism is further coloured blue, and the bonds in the subgraph relation R1 → R is coloured purple. The contexts, K3, K1 and K, thus consists of all the atoms as well as the chemical bonds (edges) shown in black in both the left and the right graph of each rule. Besides p1 and p3, the Formose reaction uses two additional rules; p0 keto-enol tautomerism and p2 aldol addition. These rules are the inverse rules of their “backwards” version visualized above.