The funtion outputs the two subtrees of $T$ obtained by deleting edge $e$ from $T$ and then re-adding the edge to each of the two resulting subtrees. Both subtrees share a copy of the edge $e$ and the newly labeled leaf adjacent to $e$. Other than this overlap, they are disjoint.
Each subtree in $P$ may have at most one leaf that was not a leaf of $T$, and therefore previously unlabeled. This leaf label is determined by the user and input as newl.
i1 : T = leafTree(4,{{0,1}})
o1 = {{0, 1, 2, 3}, {set {0, 1}, set {0}, set {1}, set {2}, set {3}}}
o1 : LeafTree
|
i2 : P = edgeCut(T, set {0,1}, 4);
|
i3 : P#0
o3 = {{0, 1, 4}, {set {0}, set {1}, set {4}}}
o3 : LeafTree
|
i4 : P#1
o4 = {{2, 3, 4}, {set {2}, set {3}, set {4}}}
o4 : LeafTree
|
The object edgeCut is a method function.