type filter takes one argument, a set filter. It returns a number that represents the type of the piece
on that square:
x=type a1 y=type h1 x==y
If its argument set filter does not represent a set that has exactly one element, the
type filter does not match the position.
Otherwise, suppose s is the square represented by the argument set filter. The numeric values of the piece types are given by the following table: