In mathematics, a fence, also called a zigzag poset, is a partially ordered set in which the order relations form a path with alternating orientations: a < b > c < d > e < f > h < i ⋯ {\displaystyle aceh b < c > d < e > f < h > i ⋯ {\displaystyle a>bdfi\cdots } A fence may be finite, or it may be formed by an infinite alternating sequence extending in both directions.