Expand description
The general linear group GL(n,2) and the invertibility constant — where the reciprocal SAT-threshold sum comes home.
A uniformly random n×n matrix over GF(2) is invertible with probability Π_{j=1}^n (1 − 2⁻ʲ), which
→ φ(½) = 0.2887880951. The reciprocal first-moment SAT-threshold sum is −log₂ φ(½) exactly, so the
two meet at this one constant. And it is not a coincidence — it is a symmetry break:
- The invertible matrices are exactly the group
GL(n,2). GL(n,2)acts simply transitively on ordered bases ofGF(2)ⁿ(a matrix is invertible iff its rows are a basis). So by orbit–stabilizer with a trivial stabilizer,|GL(n,2)|= the number of ordered bases =Π_{i=0}^{n-1} (2ⁿ − 2ⁱ)— each factor counting the vectors that avoid the span built so far. That step-by-step quotient is the symmetry-broken enumeration; dividing by2^{n²}gives the Euler partial product.
Structs§
- Solution
Space - The complete solution space of a GF(2) linear system
A x = b, in symmetry-broken form: one particular solutionx₀plus a basis of the kernel. Every solution isx₀ ⊕ (a GF(2) combination of the kernel basis), so the entire affine coset — all2^{n−rank}solutions — is generated from this compressed witness. The kernel is the symmetry group of the solution set (the translations that preserveAx),x₀is one witness, and the basis are its generators: this is the exact, polynomial, linear analog ofhypercube::model_orbit. The harder the break (the bigger the kernel), the more solutions; an invertible system has a trivial kernel — no symmetry, a unique witness.
Functions§
- count_
invertible_ gf2_ bruteforce - Brute-force count of invertible n×n GF(2) matrices, over all
2^{n²}of them. Feasible forn ≤ 4. - gl_
order |GL(n,2)|via the orbit–stabilizer (ordered-basis) factorizationΠ_{i=0}^{n-1}(2ⁿ − 2ⁱ). Each factor2ⁿ − 2ⁱis the count of vectors outside the i-dimensional span of the basis chosen so far — the symmetry-broken enumeration of the bases on whichGL(n,2)acts simply transitively. Valid up ton = 10before theu128product overflows.- invertibility_
density - The Euler partial product
Π_{j=1}^n (1 − 2⁻ʲ)— the exact invertibility density|GL(n,2)| / 2^{n²}. - is_
invertible_ gf2 - Is an n×n GF(2) matrix (each row packed as the low
nbits of au64) invertible? Gaussian elimination over GF(2): invertible iff it reduces to full rankn. - solve_
gf2 - Solve a GF(2) system
A x = b(each row a coefficient bit-vector in the lownbits,rhsthe right-hand sides) for its entire solution space via Gaussian elimination to reduced row echelon form. Returns the symmetry-brokenSolutionSpace(particular solution + kernel basis), orNoneiff the system is inconsistent. Generalizescrate::xorsat::solve, which returns just one witness.