Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Dyadic Depth and Zero Positions

Abstract

A position has zero Sprague–Grundy value precisely when an even number of heaps attain its least dyadic valuation.

Definition 1.1 (Dyadic valuation).

Formalization. D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.valuation (✓ std3).

Source. Repository-derived.

Commentary.

The dyadic valuation of a positive integer is the exponent of two in its prime factorization.

Definition 1.2 (Position depth).

Formalization. D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.HasDepth (✓ std3).

Source. Repository-derived.

Commentary.

Every heap has valuation at least k, and at least one heap has valuation exactly k.

Definition 1.3 (Heaps at a depth).

Formalization. D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.countAt (✓ std3).

Source. Repository-derived.

Commentary.

Count heap occurrences of valuation k, retaining their multiplicities.

Theorem 1.4 (Subtracting at a lower valuation).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.valuation_sub_of_lt (✓ std3). ∎

Source. Repository-derived.

Commentary.

When the removed amount has smaller valuation than the heap, the positive remainder has the valuation of that amount.

Theorem 1.5 (Lower-depth moves create one minimum heap).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.lower_move (✓ std3). ∎

Source. Repository-derived.

Commentary.

A removal of valuation j below the position depth creates exactly one heap at depth j. Every unchanged heap remains at greater depth.

Theorem 1.6 (Equal-valuation subtraction).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.valuation_sub_same (✓ std3). ∎

Source. Repository-derived.

Commentary.

Subtracting two positive integers of the same dyadic valuation either gives zero or raises the valuation.

Theorem 1.7 (Moves retaining a minimum heap change parity).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.high_move_count (✓ std3). ∎

Source. Repository-derived.

Commentary.

If an unchanged heap retains the minimum depth, any removal at least that deep has valuation exactly equal to the depth. It either adds or removes one minimum-depth heap, so the count changes parity.

Theorem 1.8 (Every move from an even count has an odd count).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.even_count_moves_odd (✓ std3). ∎

Source. Repository-derived.

Commentary.

An even positive minimum-depth count is at least two. A lower removal creates a single minimum; every other legal removal leaves a minimum heap and changes the parity of its count.

Theorem 1.9 (An odd count has a zero-count follower).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.odd_count_has_even_move (✓ std3). ∎

Source. Repository-derived.

Commentary.

With at least three minimum-depth heaps, subtract the depth power from one of them. With a unique minimum and another heap, subtract that power from the other heap. A singleton is removed entirely.

Theorem 1.10 (Zero value is equivalent to an even count).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.zero_iff_even_count (✓ std3). ∎

Source. Repository-derived.

Commentary.

Induction on the total number of stones applies the mex rule to the two parity properties: an even count has no zero-valued follower, while an odd count has a zero-valued follower.

Theorem 1.11 (Nonzero high-removal followers require a unique minimum).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.high_nonzero_unique (✓ std3). ∎

Source. Repository-derived.

Commentary.

For a nonzero parent, a high removal retaining a minimum-depth heap would change an odd count to an even count and produce value zero. Thus a nonzero follower can arise only by changing the unique minimum.

Theorem 1.12 (Power of two times an odd factor).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.valuation_decomposition (✓ std3). ∎

Source. Repository-derived.

Commentary.

Every positive heap size is a power of two times a positive odd integer.

Theorem 1.13 (At least two odd heaps give value at most one).

Proof. Machine-checked in Lean as D5/S3/Combinatorics/Games/DivisorNimBoundOutcome.depth_zero_multiple (✓ std3). ∎

Source. Repository-derived.

Commentary.

There are no lower-valuation removals at depth zero. With more than one odd heap, every follower of a nonzero parent has value zero.

References