Module Tensor.Morphism
type 'a obj
:= 'a t
val tensor : ('a, 'b) t -> ('c, 'd) t -> ('a * 'c, 'b * 'd) t
tensor m1 m2
is the parallel composition ofm1
andm2
val pullback_at_path : (pos, pos) t -> 'a Path.t -> 'a obj -> ('a, 'a) t k
pullback_at_path m p s
extendsm
tos
by constructing a morphism equal tom
atp
and acting as the identity ons
elsewhere.- raises Dimensions_mismatch
if
range m
is different fromproj s p
.
val pullback_pointwise : (pos, pos) t -> 'a obj -> ('a, 'a) t k
pullback_pointwise m s
extendsm
tos
by applying it pointwise to every position in- raises Dimensions_mismatch
if any rank one sub-tensor of
s
is different fromrange m
.
val sub : ofs:pos m -> pos obj -> pos obj -> (pos, pos) t k
sub ofs dom range
constructs a morphism corresponding to the inclusion ofdom
, a rank-one tensor of dimension saym
, intorange
, a rank-one tensor of dimension sayn
, such that the underlying positions ofdom
are mapped starting at indexofs
inrange
.Concretely,
sub ofs dom range
constructs a morphism mapping positionsn
indom
to positionsn + ofs
inrange
.- raises Dimensions_mismatch
if
ofs <= 0 || dim dom <= 0 || ofs + dim dom > dim range
.