pushout#
- discopy.hypergraph.pushout(left, right, left_boundary, right_boundary)[source]#
Computes the pushout of two finite mappings using connected components.
- Parameters:
left (int) – The size of the left set.
right (int) – The size of the right set.
left_boundary (Collection[int]) – The mapping from boundary to left.
right_boundary (Collection[int]) – The mapping from boundary to right.
- Return type:
tuple[dict[int, int], dict[int, int]]
Examples
>>> assert pushout(2, 3, [1], [0]) == ({0: 0, 1: 1}, {0: 1, 1: 2, 2: 3})