record AddCont : TypeAdditive container: a container whose every set of positions is a
commutative monoid.
Not to be confused with `TensorMonoid` where the set of shapes is a monoid,
and every set of positions is a comonoid
We need additivity only because we want to copy/delete information: on the
backwards pass this sums up or creates a zero value
TODO this in some sense dual to `TensorMonoid`, since by default we have a
unique comonoid structure on shapes? I.e. every set is uniquely a comonoid
MkAddCont : (UC : Cont) -> InterfaceOnPositions UC ComMonoid => AddCont.UC : AddCont -> Cont.mon : ({rec:0} : AddCont) -> InterfaceOnPositions (UC {rec:0}) ComMonoid.UC : AddCont -> ContUC : AddCont -> Cont.mon : ({rec:0} : AddCont) -> InterfaceOnPositions (UC {rec:0}) ComMonoidmon : ({rec:0} : AddCont) -> InterfaceOnPositions (UC {rec:0}) ComMonoid.Shp : AddCont -> Type.Pos : (c : AddCont) -> c .Shp -> TypeUMon : (c : AddCont) -> (s : c .Shp) -> ComMonoid (c .Pos s)Underlying monoid structure of positions
.Plus : (c : AddCont) -> (s : c .Shp) -> c .Pos s -> c .Pos s -> c .Pos s.Zero : (c : AddCont) -> (s : c .Shp) -> c .Pos sdata InterfaceOnPositions : AddCont -> (Type -> Type) -> TypeConvenience datatype storing the property that
an additive container `c` has an interface `i` on its positions
MkI : ((s : c .Shp) -> i (c .Pos s)) => InterfaceOnPositions c iFor every shape s the set of positions c.Pos s has that interface
data IsFlat : AddCont -> Type