IndisputableMonolith.Patterns.GrayCodeAxioms
The GrayCodeAxioms module defines the inverse Gray code mapping via cumulative XOR together with supporting facts on invertibility and bounds. Pattern-generation code in the Recognition framework cites these axioms when building hypercube cycles. The module is purely definitional and exports grayInverse plus lemmas that downstream Gray code constructions require.
claimThe inverse mapping satisfies $g^{-1}(g(n)) = n$ where $g^{-1}(x) = x_0 + x_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7$ with each $x_i$ the successive right-shift XOR of the Gray-code word.
background
This module sits inside the Patterns domain and imports the core Patterns definitions plus Mathlib. It supplies the concrete inverse operation for binary-reflected Gray codes that the sibling GrayCode and GrayCycleGeneral modules later consume. The upstream Patterns module provides the general pattern interface; the present module adds the specific cumulative-XOR decoder and the GrayCodeFacts bundle that records bound preservation and one-bit properties.
proof idea
This is a definition module, no proofs.
why it matters in Recognition Science
The definitions here are imported directly by GrayCode (binary-reflected Gray code for the hypercube Hamiltonian cycle) and by GrayCycleGeneral (the Workstream A generalization to arbitrary dimension d using the BRGC formula gray(n) = n XOR (n >>> 1)). They close the axiom layer required before those modules can expose GrayCover d (2^d) and GrayCycle d.
scope and limits
- Does not contain the forward BRGC encoding definition.
- Does not prove the hypercube Hamiltonian-cycle property.
- Does not treat dimensions beyond the supplied axioms.
- Does not address non-power-of-two lengths.