A state in the product automaton. The product automaton contains 3-tuples of states.
We lazily only construct those states that we are actually
going to need.
Either a start state
(pivot, pivot, succ), or a state
where there exists a transition from an already existing state.
The exponential variant of this query (
js/redos) uses an optimization
q1 <= q2. This trick cannot be used here as the order
of the elements matter.