Pack

Contents

Pack#

class discopy.closed.Pack(cod)[source]#

Bases: Box

The canonical isomorphism from the tensor of the factors of a Product type to the product itself.

Parameters:

cod (C0) – The product type to pack into.

Example

>>> X, Y = Ty("X"), Ty("Y")
>>> assert Pack(X * Y).dom == X @ Y and Pack(X * Y).cod == X * Y
>>> assert Pack(X * Y).dagger() == Unpack(X * Y)