A module for cartesian structure
This is an experiment in organizing wiring diagrams
We're not implementing this paper exactly, but finding some inspiration:
The Cost of Compositionality: A High-Performance Implementation of String Diagram Composition
https://arxiv.org/abs/2105.09257
The Interface type describes the Arity of the cartesian system structure
Put one structure before another
The structures will be dependent and must match in the interface
Note the order of arguments are flipped to support this syntax:
a |> before bThis will put a 'first'
Put two structures aside each other
The structures will be independent
Note the order of arguments are flipped to support this syntax:
a |> aside bThis will put a 'first'
Initialize a simple 1->1 arity morphism with label 'a'
Initialize a morphism with a given interface and label
The unit value
This is possibly not needed, but we'll start off using it.
This may disappear later.
Group a structure
This may be used to group substructures
Extract the outermost interface of the structure
Wrap a part of the structure with a label a
The type of a cartesian structure
This is not your typical category theory monoidal thing, as we store a recursive structure