shiftvertical

Let j be an integer between -7 and 7. The basic vertical shift transform Vj shifts a square on the chessboard j squares up. (Directions are reversed if the argument is negative). If the square goes off the board, we say that Vj is empty or undefined.

A vertical basic shift transform acts on square designators. For example,

V3 a1  a4
because if a1 is shifted up 3 squares it becomes a4.

As a special rule, suppose a square designator contains an entire file, like [a1-8,c4] contains the entire a file in addition to the c4 square. Then any vertical shifts of squares on that file are ignored. Thus,

  V3 [a1-8,c4]
      
   [a1-8,c7]

A vertical shift transform can be extended to a vertical shift transform of an arbitrary filter: each square designator appearing in the filter is shifted by the specified amount.

Sometimes a vertical shift transform will result in an empty square designator. For example,

  V7 [a-h2,c4]

will be empty. Any empty square designator makes the whole filter containing that empty square designator empty as well.

shiftvertical is a transform filter that represents each of the 15 basic vertical shift transforms including the identity.

The effect of shiftvertical F is first to create the 15 distinct filters that result from applying each of the basic vertical shift transforms to F. Empty filters and repetitions are deleted, and the resulting set is called the orbit of shiftvertical F.

For example, the orbit of shiftvertical a1 is 8 distinct filters, a1, a2, and so on.

On the other hand, the orbit of shiftvertical {a1 a7} only contains 2 filters, namely {a1 a7}, {a2 a8}. Any other vertical shift results in one of the kings going off the board, and which makes the corresponding filter empty.

If F is a numeric filter then so is shiftvertical F in which case its value is the maximum of the values of the matching transformed versions of F.

shiftvertical count F

is a numeric filter whose value is the number of distinct matching transformed versions of F. For example, if the current position is the initial position, then

shiftvertical count find a1

is the number of different squares on the a file on which there is a white queen in the game.