Every category $\mathbb{A}$ forms a logic, called the weave double category $\langle\mathbb{A}\rangle$.

It is the union, i.e. coproduct, of the arrow double category and its opposite: $\mathbb{\langle A\rangle \equiv \overrightarrow{A}+\overleftarrow{A}}$.

$\langle\mathbb{A}\rangle$ can be understood simply as the equational logic of $\mathbb{A}$.

A relation is a zig-zag in $\mathbb{A}$, and an inference is a weave: a composite of squares in $\overrightarrow{\mathbb{A}}$, opsquares in $\overleftarrow{\mathbb{A}}$, and unit isomorphisms — the units of $\overrightarrow{\mathbb{A}}$ and $\overleftarrow{\mathbb{A}}$ are “united” by adjoining isomorphisms between each identity arrow and oparrow.

We show that $\langle\mathbb{A}\rangle$-modules are bifibrations.

Then, we extend the “weave construction” to functors, profunctors, and transformations.

Weaves

Bifibrations

The weave construction

The complexity of weaves and composition