Definition Signed label comparisons and finite later counts
✓ definition formalized

Signed label comparisons and finite later counts

For signed label parameters \(a,b\in\mathbb Z\), define \(a\prec b\) by \[ (a>0\land b>0\land a<b) \quad\text{or}\quad (a<0\land b<0\land a<b) \quad\text{or}\quad (a>0\land b<0). \] This is the source's Before relation. On nonzero integers it places positive parameters first, then negative parameters, with the usual increasing order within each sign. For example, \[ 1\prec3\prec-5\prec-1. \] When either parameter is zero, none of the defining clauses holds.

The numerical arrow indicator

For \(i,q,z\in\mathbb Z\), define \[ \operatorname{aft}(i,q,z)= \begin{cases} 1,&|i|<|z|,\ i+z\text{ odd},\ q\prec i+z,\\ 0,&\text{otherwise}. \end{cases} \] This is arrowAfter. The first two conditions are the signed dihedral edge conditions; the third compares the edge's signed label with the threshold \(q\).

The construction is defined for every integer \(q\). In the edge comparison, \(q=i+j\) is the odd parameter of the current edge.

Strictness gives \[ \operatorname{aft}(i,i+j,j)=0, \] because no parameter is Before itself. Also \(\operatorname{aft}(i,q,0)=0\), since \(|i|\ge0\).

The finite signed count

For a signed top \(c\), put \(C=|c|\), regarded as a natural number, and define \[ \operatorname{cnt}(i,q,c) =\sum_{0\le r<C} \bigl(\operatorname{aft}(i,q,r)+\operatorname{aft}(i,q,-r)\bigr) +\operatorname{aft}(i,q,c). \] This is countAfter.

The formula has two signed positions at each internal rank and one prescribed top. The two zero-index terms are both zero. The lower-interval signed-sum theorem supplies this pattern when actual group elements are translated to suitable signed representatives.

A numerical example

Take \(i=0,q=3,c=3\). At internal rank one, the comparison \(3\prec1\) is false at the positive endpoint, while \(3\prec-1\) holds at the negative endpoint. Thus their contributions are \(0,1\). Rank two has even endpoint parity, so both contributions are zero. The top contributes zero by the strict self-comparison.

Hence \[ \operatorname{cnt}(0,3,3)=1. \] Starting instead at \(i=3\) gives no endpoint of greater absolute length, so \(\operatorname{cnt}(3,3,3)=0\).

The signed-comparison theorem evaluates these indicators in general. The finite-residue comparison theorem relates the raw signed comparisons to the residue convention used for finite dihedral reflection labels.

Relation to the OpenAI notes

Explicit integer comparisons behind the midpoint table.

OpenAI notes: The midpoint table compares the labels of edges at the two current endpoints. Infinite type uses the two signed blocks; finite type uses residues modulo 2m and the represented endpoint bounds to check the mixed-sign comparisons. dih:midpoint-order, dih:count.

Lean (primary): Before is an explicit relation on integers. The same-source and next-source formulas are proved under absolute-length inequalities. Separate finite_before lemmas identify residue comparison with Before only in those constrained configurations. arrowAfter then includes the length and parity tests. DihedralIntervals:917, DihedralIntervals:920, DihedralIntervals:932, DihedralIntervals:944, DihedralIntervals:975, DihedralIntervals:1001, DihedralIntervals:1046.

Role in the proof: The Blueprint proves the sign and residue inequalities and keeps their hypotheses explicit. The actual root-slope identification uses the separate angular comparison lemmas.

References

The local source declarations below give the construction and proof.

Lean formalization

OAI.KLInvariance.SignedDihedral.Before: DihedralIntervals.lean:917.

OAI.KLInvariance.SignedDihedral.arrowAfter: DihedralIntervals.lean:1046.

OAI.KLInvariance.SignedDihedral.countAfter: DihedralIntervals.lean:1051.

OAI.KLInvariance.SignedDihedral.arrowAfter_of_not_lt: DihedralIntervals.lean:1055.

OAI.KLInvariance.SignedDihedral.arrowAfter_self: DihedralIntervals.lean:1058.

Used by