diffMaskA
plain-language theorem explainer
For each oriented triangle slot in a Kuhn 4-simplex, the first difference mask is the bitwise XOR of the middle and initial vertex masks in the ordered triple. Orbit classifiers and Bloch-fold area tables cite it as the seed edge of the monotone chain m0 ⊂ m1 ⊂ m2. The body is a one-line extraction from the ordered vertex-mask triple.
Claim. Given a Kuhn simplex index $s\in\{0,\ldots,23\}$ and a triangle slot $t\in\{0,\ldots,9\}$, if $(m_0,m_1,m_2)$ are the ordered vertex bitmasks of that triangle, the first difference mask is $a:=m_1\oplus m_0\in\mathbb{N}$.
background
The module classifies triangle hinges inside one unit 4-cube Kuhn triangulation, up to lattice translation and triangulation-preserving symmetry. It is a combinatorial prerequisite for assembling the flat Hessian of the 4D Regge action from per-orbit star kernels; it does not evaluate those kernels or close the Einstein-Hilbert recovery gap.
Each of the 24 Kuhn simplices carries vertex bitmasks (imported from the flat-kernel API). A triangle slot $t$ among the $\binom{5}{3}=10$ index triples yields an ordered triple of masks via triangleVertexMasks: three natural numbers encoding the three vertices as subsets of the four coordinate bits. The module's deliverable is that every such triple is a monotone chain $m_0\subset m_1\subset m_2$ with disjoint nonzero difference masks $(a,b)=(m_1\oplus m_0,,m_2\oplus m_1)$, typed by the popcount pair $(|a|,|b|)$.
Difference masks are the translation-invariant labels of the two successive edges of the hinge; they feed orbit enumeration under $S_4$ on bit positions and under the larger group including bitwise complement.
proof idea
Definitional one-liner. Bind the ordered triple $(m_0,m_1,m_2)$ from the sibling triangleVertexMasks s t, then return Nat.xor of the middle component with the first. No lemmas, no tactics.
why it matters
This is the first half of the difference-mask pair that types every triangle hinge. Downstream Bloch-fold code builds the slot area covariance table by placing mass $1/4$ on the two edge classes whose masks equal $a$ and $b$; support lemmas and the integer $\times 4$ table read the same pair. Transport permutations are looked up from (diffMaskA, diffMaskB), and phased class-dot vanishing theorems for types $(1,2)$ and $(2,1)$ take equality hypotheses on these masks as hypotheses. Orbit-transport coverage likewise seeds on the pair. In the module's own campaign this feeds the six-type (then four-orbit under complement) classification that organizes star-kernel assembly; it does not itself evaluate kernels or prove $S_{\mathrm{RS}}\to S_{\mathrm{EH}}$.
Switch to Lean above to see the machine-checked source, dependencies, and usage graph.