Overview¶
An FXTensor is a morphism between finite sets. The
array axes are split into a domain (inputs) and a codomain (outputs).
That pair of dimension lists is the profile. Each factor may carry a list
of string labels; unlabeled factors store only their lengths. An axis
may also carry a name, separate from those labels. Names are optional.
In a Markov category the objects are the finite sets and the morphisms are Markov kernels. On finite sets a kernel is a nonnegative array whose codomain slice sums to 1 for every domain point. A state is a kernel out of the one-point set, written here as an empty domain: a distribution, or a joint distribution when the codomain has several factors.
Piece |
In FXTensor |
|---|---|
Object |
One profile factor, for example |
Morphism |
An |
State |
Empty domain, |
Sequential composition |
|
Monoidal product |
|
Copy and discard |
String diagrams in this documentation are read top to bottom (inputs at
the top, outputs at the bottom). The conditional-independence figure is read
bottom to top. A box is a morphism, a triangle is a state,
a dot that branches downward is copy, and a wire that ends in a dot is
discard. The figures follow the drawing conventions of Fritz,
arXiv:1908.07021, and are drawn separately. TikZ sources live in
docs/diagrams/. The SVGs used by these pages are the local copies in
docs/_static/figures/. Contributing figures is the note for adding a
figure when an issue is resolved.
The test module tests/test_axioms.py checks the finite-tensor forms of
the monoidal and comonoid equations (associativity, interchange, copy laws,
and naturality of discard) on concrete arrays.