Pensieve header: Compositions in generic DoPeGDO.

(Subscript[R𝕄, A_->B_]):=Module[{vs},
vs=Table[(Subscript[ζ, i]),{i,A}]⋃Table[(Subscript[z, i]),{i,B}];
(Subscript[𝕄, A->B])[1,Sum[RandomInteger[{-3,3}]vi vj,{vi,vs},{vj,vs}], 0]
];
(Subscript[𝕄, A_->B_])[ω1_,Q1_,P1_]≡(Subscript[𝕄, A_->B_])[ω2_,Q2_,P2_]:=Simplify[ω1==ω2∧Q1==Q2∧P1==P2];
(Subscript[𝕄, A_->B_])[ω1_,Q1_,P1_]//(Subscript[𝕄, B_->C_])[ω2_,Q2_,P2_]:=Module[{E1,F1,G1,E2,F2,G2,ζA,zC,I},
E1=Table[(∂_((Subscript[ζ, i]),(Subscript[z, j])))Q1,{i,A},{j,B}];
F1=Table[(∂_((Subscript[ζ, i]),(Subscript[ζ, j])))Q1,{i,A},{j,A}];
G1=Table[(∂_((Subscript[z, i]),(Subscript[z, j])))Q1,{i,B},{j,B}];
E2=Table[(∂_((Subscript[ζ, i]),(Subscript[z, j])))Q2,{i,B},{j,C}];
F2=Table[(∂_((Subscript[ζ, i]),(Subscript[ζ, j])))Q2,{i,B},{j,B}];
G2=Table[(∂_((Subscript[z, i]),(Subscript[z, j])))Q2,{i,C},{j,C}];
ζA=Table[(Subscript[ζ, i]),{i,A}]; zC=Table[(Subscript[z, i]),{i,C}];
I=IdentityMatrix@Length@B;
Expand/@(Subscript[𝕄, A->C])[ω1 ω2 ((Det[I-F2.G1])^(-1)),ζA.E1.Inverse[I-F2.G1].E2.zC+(1/2)ζA.(F1+E1.F2.Inverse[I-G1.F2].(E1^\[Transpose])).ζA+(1/2)zC.(G2+(E2^\[Transpose]).G1.Inverse[I-F2.G1].E2).zC,0]
]

M1=(Subscript[R𝕄, {1,2}->{1,2,3}])
M2=(Subscript[R𝕄, {1,2,3}->{1,2,3}])
M3=(Subscript[R𝕄, {1,2,3}->{1,2}])

(M1//M2)//M3

M1//(M2//M3)

((M1//M2)//M3)≡(M1//(M2//M3))