Pure-sign exceptional string endpoints #
The exhaustive endpoint classification leaves a pure-positive alternative on the right and a pure-negative alternative on the left. This file makes those alternatives literal at the level of signed-path signs, proves that they overlap only for a vertex word, and packages the endpoint alternatives so that a pure case is reached only at a peak.
Reversing a signed path reverses the sign list and complements every
sign. Recall that signedPathSigns lists letters from the end backwards.
A positive arm prepends one false sign for every appended letter.
A pure-positive word has only positive signed letters.
A pure-negative word has only negative signed letters.
Every length-zero word is the trivial word at its source and hence is purely positive.
A word is simultaneously pure-positive and pure-negative exactly when it is a vertex word.
A nontrivial pure-positive word cannot also be pure-negative.
Endpoint classification with the alternatives prioritized: the pure right-end exception is returned only together with maximality at that end.
The reversed prioritized endpoint classification: the pure left-end exception is returned only together with maximality at that end.