Let

P=X×ZY,Q=Y×VW.\begin{aligned} P &= X\times_Z Y,\\ Q &= Y\times_V W. \end{aligned}

The pasting principle says that if the right square and the outer rectangle are , then the left square is a pullback. Conversely, if the left and right squares are pullbacks, then the outer rectangle is a pullback.

Rendered tikz-cd diagram

The universal comparison map is the unique arrow forced by the equations

pu=a,qu=b,rb=c.p\circ u = a,\qquad q\circ u=b,\qquad r\circ b=c.
Rendered tikz diagram

The same shape as a raw TikZ picture is useful for checking labelled regions, line weights, and the way dark mode treats non-matrix diagrams.

Rendered tikz diagram