Theory Small
section ‹Smaller End of Deque›
theory Small
imports Common
begin
text ‹
⇤ The smaller end of the deque during ‹Rebalancing› can be in one three phases:
➧ ‹Small1›: Using the ‹step› function the originally contained elements are reversed.
➧ ‹Small2›: Using the ‹step› function the newly obtained elements from the bigger end are reversed on top of the ones reversed in the previous phase.
➧ ‹Small3›: See theory ‹Common›. Is used to reverse the elements from the two previous phases again to get them again in the original order.
⇤ Each phase contains a ‹current› state, which holds the original elements of the deque end.
›