The Original I Ching
esenfr
← all experiments
⊕ · (Z/2)⁶

The group (Z/2)⁶ and the Sierpinski

XOR, eight cosets and a fractal that comes out of Pascal

Tap a hexagram to see its coset (upper XOR lower) and the seven that keep it company.

Mutating lines is XOR, and with it the 64 hexagrams form the group (Z/2)⁶: Kun (all yin) is the identity and every hexagram is its own inverse (mutating it twice by the same thing brings it back). Inside live the 8 pure hexagrams (a doubled trigram), which form a subgroup; its 8 cosets split the 64 into a new partition.

64
order of the group (2⁶)
8
subgroup of pure hexagrams (2³)
8 × 8
cosets that partition
729
ones in the Sierpinski (3⁶)
The 8 cosets of the subgroup of pure hexagrams

The coset of a hexagram is all those that share the same upper ⊕ lower (the binary difference between its two trigrams). Coset 0 is the subgroup itself: the 8 pure hexagrams.

⊕ = 0pure
⊕ = 1
⊕ = 2
⊕ = 3
⊕ = 4
⊕ = 5
⊕ = 6
⊕ = 7
The Sierpinski hidden in Pascal mod 2

The matrix S[i][j] = 1 when j is a submask of i (all its yang lines are also in i) is, by Lucas's theorem, exactly C(i,j) mod 2: Pascal modulo 2. Drawn, it is the Sierpinski triangle, self-similar by blocks (S = [[S, 0], [S, S]]). And it is the same dominance relation of the Boolean lattice B6: the fractal is the shadow of the partial order.

64 × 64 · row i, column j · cell on when j ⊆ i · 729 ones