pub trait Tensor: Arrow {
// Required method
fn tensor<A, B, C, D>(
left: Self::P<A, B>,
right: Self::P<C, D>,
) -> Self::P<(A, C), (B, D)>
where A: Clone + 'static,
B: Clone + 'static,
C: Clone + 'static,
D: Clone + 'static;
// Provided methods
fn associate<A, B, C>() -> Self::P<((A, B), C), (A, (B, C))>
where A: Clone + 'static,
B: Clone + 'static,
C: Clone + 'static { ... }
fn associate_inv<A, B, C>() -> Self::P<(A, (B, C)), ((A, B), C)>
where A: Clone + 'static,
B: Clone + 'static,
C: Clone + 'static { ... }
fn left_unitor<A>() -> Self::P<((), A), A>
where A: Clone + 'static { ... }
fn left_unitor_inv<A>() -> Self::P<A, ((), A)>
where A: Clone + 'static { ... }
fn right_unitor<A>() -> Self::P<(A, ()), A>
where A: Clone + 'static { ... }
fn right_unitor_inv<A>() -> Self::P<A, (A, ())>
where A: Clone + 'static { ... }
}Expand description
Monoidal structure for categories whose objects can be tensored in parallel.
In this initial encoding, the tensor product is modeled with Rust tuples.
Required Methods§
Provided Methods§
Sourcefn associate<A, B, C>() -> Self::P<((A, B), C), (A, (B, C))>
fn associate<A, B, C>() -> Self::P<((A, B), C), (A, (B, C))>
The left-associated product ((a, b), c) -> (a, (b, c)).
Sourcefn associate_inv<A, B, C>() -> Self::P<(A, (B, C)), ((A, B), C)>
fn associate_inv<A, B, C>() -> Self::P<(A, (B, C)), ((A, B), C)>
The inverse associator (a, (b, c)) -> ((a, b), c).
Sourcefn left_unitor<A>() -> Self::P<((), A), A>where
A: Clone + 'static,
fn left_unitor<A>() -> Self::P<((), A), A>where
A: Clone + 'static,
Left unitor ((), a) -> a.
Sourcefn left_unitor_inv<A>() -> Self::P<A, ((), A)>where
A: Clone + 'static,
fn left_unitor_inv<A>() -> Self::P<A, ((), A)>where
A: Clone + 'static,
Inverse left unitor a -> ((), a).
Sourcefn right_unitor<A>() -> Self::P<(A, ()), A>where
A: Clone + 'static,
fn right_unitor<A>() -> Self::P<(A, ()), A>where
A: Clone + 'static,
Right unitor (a, ()) -> a.
Sourcefn right_unitor_inv<A>() -> Self::P<A, (A, ())>where
A: Clone + 'static,
fn right_unitor_inv<A>() -> Self::P<A, (A, ())>where
A: Clone + 'static,
Inverse right unitor a -> (a, ()).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".