Documentation

CslibFrontier.Probability.PairwiseIndependentHash.ComponentGap

The spectral gap of the product walk over channels and free bits #

The averaging walk of the sampler moves several independent components: J conditioned channels, with slice coordinates Frame (P j) H 1 × ZMod (L j) ^ H, and one block of free bits, identified with the torus ZMod M ^ H (for M = 2 ^ q, the bit strings of length H q). On the torus, the generators affineGenerator act by the affine action alone (torusMove). The product walk (componentMove) picks one component and makes one affine move there.

This is the product walk of the proof of Lemma 6.2 of the OpenAI preprint on derandomizing logarithmic space [OAI26e]: the free bits as (ℤ / 2^q ℤ) ^ H with the affine action on that coordinate alone, and "the lazy walk from Lemma 6.1 [applied] to a uniformly selected component", with gap γ_H / J_comp. The preprint's single-component gap comes from Shalom's property (T); the elementary route through coordinate pairs and frames follows OpenAI's Lean development, the file AffineSampling.lean at revision 7ef5c0cc (ExactDerandomization.Analysis.Square.square_gap, slice_frame, frame_gap, slice_gap). The statements and the proofs here are independent of that code, which was not consulted.

Main definitions #

Main results #

References #

The free-bit torus #

def Cslib.Probability.torusMove (H M : ℕ) (k : { p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H) :
Equiv.Perm (Fin H → ZMod M)

The affine moves of the free-bit torus ZMod M ^ H: the generators affineGenerator acting on the torus alone, w ↦ (1 + E_ab) w and w ↦ w + e_i.

@[simp]
theorem Cslib.Probability.torusMove_inl {H M : ℕ} (p : { p : Fin H × Fin H // p.1 ≠ p.2 }) (w : Fin H → ZMod M) :
(torusMove H M (Sum.inl p)) w = Function.update w (↑p).1 (w (↑p).1 + w (↑p).2)
@[simp]
theorem Cslib.Probability.torusMove_inr {H M : ℕ} (i : Fin H) (w : Fin H → ZMod M) :
(torusMove H M (Sum.inr i)) w = Function.update w i (w i + 1)
theorem Cslib.Probability.expect_sq_le_torusMove {H M : ℕ} [NeZero M] (hH : 2 ≤ H) (f : (Fin H → ZMod M) → ℝ) (hf : (Finset.univ.expect fun (w : Fin H → ZMod M) => f w) = 0) :
(Finset.univ.expect fun (w : Fin H → ZMod M) => f w ^ 2) ≤ 2048 * ↑H * ∑ k : { p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H, Finset.univ.expect fun (w : Fin H → ZMod M) => (f ((torusMove H M k) w) - f w) ^ 2

The Poincaré inequality for the free-bit torus ZMod M ^ H, for H ≥ 2, uniformly in M: every real function f of mean zero has second moment at most 2048 H times its total squared change along the affine moves.

Channels and free bits #

def Cslib.Probability.componentMove (H M : ℕ) {J : ℕ} (P L : Fin J → ℕ) :
(_ : Fin J) × ({ p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H) ⊕ { p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H → Equiv.Perm (((j : Fin J) → Frame (P j) H 1 × (Fin H → ZMod (L j))) × (Fin H → ZMod M))

The moves of the product walk on the coordinates of J channels and the free-bit torus: (∀ j, Frame (P j) H 1 × ZMod (L j) ^ H) × ZMod M ^ H. A move applies an affine move to one channel (affineMove) or to the torus (torusMove).

theorem Cslib.Probability.card_componentMove_index {H J : ℕ} :
Fintype.card ((_ : Fin J) × ({ p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H) ⊕ { p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H) = (J + 1) * H ^ 2

The product walk has (J + 1) H ^ 2 moves.

theorem Cslib.Probability.expect_sq_le_componentMove {H M J : ℕ} {P L : Fin J → ℕ} [∀ (j : Fin J), Fact (Nat.Prime (P j))] [∀ (j : Fin J), NeZero (L j)] [NeZero M] (hH : 3 ≤ H) (f : ((j : Fin J) → Frame (P j) H 1 × (Fin H → ZMod (L j))) × (Fin H → ZMod M) → ℝ) (hf : (Finset.univ.expect fun (p : ((j : Fin J) → Frame (P j) H 1 × (Fin H → ZMod (L j))) × (Fin H → ZMod M)) => f p) = 0) :
(Finset.univ.expect fun (p : ((j : Fin J) → Frame (P j) H 1 × (Fin H → ZMod (L j))) × (Fin H → ZMod M)) => f p ^ 2) ≤ 38912 * ↑H ^ 2 * ∑ k : (_ : Fin J) × ({ p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H) ⊕ { p : Fin H × Fin H // p.1 ≠ p.2 } ⊕ Fin H, Finset.univ.expect fun (p : ((j : Fin J) → Frame (P j) H 1 × (Fin H → ZMod (L j))) × (Fin H → ZMod M)) => (f ((componentMove H M P L k) p) - f p) ^ 2

The Poincaré inequality for the product walk over J channels and the free-bit torus, for H ≥ 3, uniformly in the primes P j, the sides L j, the torus modulus M and J: every real function of mean zero has second moment at most 38912 H² times its total squared change along the moves.

theorem Cslib.Probability.secondEigenvalue_ofPerms_componentMove_le {H M J : ℕ} {P L : Fin J → ℕ} [∀ (j : Fin J), Fact (Nat.Prime (P j))] [∀ (j : Fin J), NeZero (L j)] [NeZero M] (hH : 3 ≤ H) :
(RotationMap.ofPerms (componentMove H M P L)).secondEigenvalue ≤ 1 - 1 / (77824 * (↑J + 1) * ↑H ^ 4)

The second eigenvalue of the product walk over J channels and the free-bit torus is at most 1 - 1 / (77824 (J + 1) H ^ 4), for H ≥ 3, uniformly in the moduli: the single-component gap 1 / (77824 H ^ 4) divided by the number J + 1 of components.

theorem Cslib.Probability.spectralExpansion_lazy_ofPerms_componentMove_le {H M J : ℕ} {P L : Fin J → ℕ} [∀ (j : Fin J), Fact (Nat.Prime (P j))] [∀ (j : Fin J), NeZero (L j)] [NeZero M] (hH : 3 ≤ H) :
(RotationMap.ofPerms (componentMove H M P L)).lazy.spectralExpansion ≤ 1 - 1 / (155648 * (↑J + 1) * ↑H ^ 4)

The spectral gap of the lazy product walk over J channels and the free-bit torus: its spectral expansion is at most 1 - 1 / (155648 (J + 1) H ^ 4), for H ≥ 3, uniformly in the primes, the sides and the torus modulus.

def Cslib.Probability.componentEquiv {H : ℕ} (M : ℕ) {J : ℕ} {P L : Fin J → ℕ} [∀ (j : Fin J), Fact (Nat.Prime (P j))] [∀ (j : Fin J), NeZero (L j)] (hL : ∀ (j : Fin J), L j ≤ P j) (y : (j : Fin J) → ZMod (P j)) :
((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M) ≃ ((j : Fin J) → Frame (P j) H 1 × (Fin H → ZMod (L j))) × (Fin H → ZMod M)

Coordinates on a product of retention slices: a family of channels retaining the identifiers y j, together with free bits, is a family of slice coordinates together with the free bits.

theorem Cslib.Probability.expect_walk_pow_componentMove_sub_expect_sq_le {H M J : ℕ} {P L : Fin J → ℕ} [∀ (j : Fin J), Fact (Nat.Prime (P j))] [∀ (j : Fin J), NeZero (L j)] [NeZero M] (hH : 3 ≤ H) (hL : ∀ (j : Fin J), L j ≤ P j) (y : (j : Fin J) → ZMod (P j)) (f : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M) → ℝ) (t : ℕ) :
(Finset.univ.expect fun (A : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => ((((RotationMap.ofPerms (componentMove H M P L)).lazy.reindex (componentEquiv M hL y).symm).walk ^ t) f A - Finset.univ.expect fun (B : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => f B) ^ 2) ≤ (1 - 1 / (155648 * (↑J + 1) * ↑H ^ 4)) ^ (2 * t) * Finset.univ.expect fun (A : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => (f A - Finset.univ.expect fun (B : ((j : Fin J) → RetentionSlice (P j) H 1 (L j) (y j)) × (Fin H → ZMod M)) => f B) ^ 2

Conditional averaging over channels and free bits (the L² case of Lemma 6.2): on the product of the retention slices of identifiers y j of J channels with free bits in ZMod M ^ H, t steps of the lazy product walk contract the variance by (1 - 1 / (155648 (J + 1) H ^ 4)) ^ (2 t), for H ≥ 3, uniformly in the primes, the sides, the identifiers and the torus modulus.