Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
da700d5
feat(Expander): uniform spectral gap for the shear-translation graph …
chris-ai1 Oct 29, 2026
14714b9
feat(Probability): retention by pairwise independent hashing (#1444)
chris-ai1 Oct 29, 2026
4943d9b
feat(Probability): affine retention channels over a prime field (#1682)
chris-ai1 Oct 29, 2026
6553d6d
refactor(Expander): share the shears of R × R; credit the OpenAI prep…
chris-ai1 Oct 30, 2026
c1e205d
docs(Expander): credit the OpenAI Lean development for the Fourier pi…
chris-ai1 Oct 30, 2026
53de6a3
feat(Probability): frame-conditioned channels, validated variants and…
chris-ai1 Oct 30, 2026
4ab043b
Merge remote-tracking branch 'origin/main' into feat/box-product-poin…
chris-ai1 Oct 30, 2026
a9e19a5
feat(Expander): Poincaré inequalities and spectral gaps of box produc…
chris-ai1 Oct 30, 2026
40d6f14
feat(Expander): relative Poincaré inequality for shears and translati…
chris-ai1 Oct 30, 2026
3db1f8f
refactor(Expander): move the dftProd lemmas to ZModProd and drop impo…
chris-ai1 Oct 30, 2026
0736143
feat(Expander): Efron–Stein and the pair-move bound on Y × (Fin H → Z…
chris-ai1 Oct 30, 2026
a547de3
doc(Probability): cite Efron–Stein and Steele; numeric Efron–Stein te…
chris-ai1 Oct 30, 2026
0e29346
feat(Expander): Poincaré inequality for elementary moves on nonzero v…
chris-ai1 Oct 30, 2026
764c28f
Merge remote-tracking branch 'fork/feat/conditional-averaging-1444' i…
chris-ai1 Oct 30, 2026
c531714
Merge remote-tracking branch 'fork/feat/box-product-poincare-1444' in…
chris-ai1 Oct 30, 2026
bc81c6a
feat(Probability): uniform spectral gap of the affine walk on slice c…
chris-ai1 Oct 30, 2026
0697cc4
feat(Probability): product walk over channels and free bits with gap …
chris-ai1 Oct 30, 2026
ae99b48
Merge origin/main into feat/conditional-averaging-1444
chris-ai1 Oct 30, 2026
30c83e2
Merge origin/main into feat/shear-translation-gap-1444
chris-ai1 Oct 30, 2026
3860f88
Merge refreshed #1678 (30c83e230) into feat/box-product-poincare-1444
chris-ai1 Oct 30, 2026
d72e8e9
Merge refreshed #1678 (30c83e230) into feat/relative-shear-translatio…
chris-ai1 Oct 30, 2026
71f089e
Merge refreshed #1695 (d72e8e9e6) into feat/coordinate-pairs-1444
chris-ai1 Oct 30, 2026
efd5aa2
Merge refreshed #1699 (71f089ecb) into feat/frame-gap-1444
chris-ai1 Oct 30, 2026
8b040eb
Merge refreshed #1691 (ae99b483b) into feat/slice-gap-1444
chris-ai1 Oct 30, 2026
34cf8df
Merge refreshed #1703 (efd5aa27b) into feat/slice-gap-1444
chris-ai1 Oct 30, 2026
8804d42
Merge refreshed #1693 (3860f88e0) into feat/slice-gap-1444
chris-ai1 Oct 30, 2026
60f2b4e
Merge refreshed #1705 (8804d42c4) into feat/component-gap-1444
chris-ai1 Oct 30, 2026
a17abbb
Merge origin/main into feat/component-gap-1444
SamuelSchlesinger Oct 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Complexity.lean
Original file line number Diff line number Diff line change
Expand Up @@ -2534,6 +2534,7 @@ public import Complexity.Foundations.Combinatorics.Expander.Mixing
public import Complexity.Foundations.Combinatorics.Expander.Multigraph
public import Complexity.Foundations.Combinatorics.Expander.PairShearTranslation
public import Complexity.Foundations.Combinatorics.Expander.Perm
public import Complexity.Foundations.Combinatorics.Expander.PiProduct
public import Complexity.Foundations.Combinatorics.Expander.Power
public import Complexity.Foundations.Combinatorics.Expander.Random
public import Complexity.Foundations.Combinatorics.Expander.Reindex
Expand Down Expand Up @@ -3142,6 +3143,7 @@ public import Complexity.Probability.PairwiseIndependent
public import Complexity.Probability.PairwiseIndependentHash
public import Complexity.Probability.PairwiseIndependentHash.Affine
public import Complexity.Probability.PairwiseIndependentHash.AtomChannels
public import Complexity.Probability.PairwiseIndependentHash.ComponentGap
public import Complexity.Probability.PairwiseIndependentHash.ConditionalAveraging
public import Complexity.Probability.PairwiseIndependentHash.DetectorChannels
public import Complexity.Probability.PairwiseIndependentHash.FrameChannel
Expand Down
123 changes: 123 additions & 0 deletions Complexity/Foundations/Combinatorics/Expander/PiProduct.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
/-
Copyright (c) 2026 Christian Reitwiessner. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Christian Reitwiessner
-/

module
-- upstream: candidate

public import Complexity.Foundations.Combinatorics.Expander.BoxProduct

/-!
# Products of finitely many permutation multigraphs

Given permutation families `σ i : K i → Equiv.Perm (V i)` for the components `i : Fin n`, the
family `piPerms σ` on the product `∀ i, V i` moves one component at a time: the move `⟨i, k⟩`
applies `σ i k` to the component `i` and leaves the others alone. Its multigraph is the product
walk that picks a component with probability proportional to its number of moves and makes one
move there.

Poincaré inequalities tensorize (`mul_expect_sq_le_piPerms`): if every component satisfies
`c 𝔼 f² ≤ ∑ k, 𝔼 (f ∘ σ i k - f)²` for functions of mean zero, then so does the product, with the
same constant. The proof iterates the binary box product (`mul_expect_sq_le_boxProdPerms`) along
`Fin.consEquiv`. In terms of the second eigenvalue (`secondEigenvalue_ofPerms_piPerms_le`), the
gap `c / (2 |K|)` of a component with `|K|` moves becomes `c / (2 ∑ i, |K i|)`: for `J` components
with the same number of moves, the gap is divided by `J`.

This is the product walk over components of the proof of Lemma 6.2 of the OpenAI preprint on
derandomizing logarithmic space [OpenAI2026LogSpace], with gap `γ / J` for `J` components.

## Main definitions

* `Cslib.RotationMap.piPerms`: the permutations of `∀ i, V i` moving one component.

## Main results

* `Cslib.RotationMap.mul_expect_sq_le_piPerms`: Poincaré inequalities tensorize over `Fin n`.
* `Cslib.RotationMap.secondEigenvalue_ofPerms_piPerms_le`: the second eigenvalue of the product.

## References

* [OpenAI, *Exact Derandomization of Logarithmic Space: L = RL = BPL*][OpenAI2026LogSpace]
-/

public section

open Finset Function
open scoped BigOperators

namespace Cslib.RotationMap

variable {ι : Type*} [DecidableEq ι] {V K : ι → Type*}

/-- The permutations of `∀ i, V i` that move one component: `⟨i, k⟩` applies `σ i k` to the
component `i`. -/
@[expose]
def piPerms (σ : ∀ i, K i → Equiv.Perm (V i)) (k : Σ i, K i) : Equiv.Perm (∀ i, V i) :=
Equiv.piCongrRight (update (fun _ ↦ Equiv.refl _) k.1 (σ k.1 k.2))

@[simp]
theorem piPerms_apply (σ : ∀ i, K i → Equiv.Perm (V i)) (i : ι) (k : K i) (x : ∀ i, V i) :
piPerms σ ⟨i, k⟩ x = update x i (σ i k (x i)) := by
funext j
by_cases h : j = i
· subst h
simp [piPerms]
· simp [piPerms, h]

/-- **Poincaré inequalities tensorize over finitely many components**: if every component family
satisfies `c 𝔼 f² ≤ ∑ k, 𝔼 v, (f (σ i k v) - f v) ^ 2` for every function `f` of expectation zero,
then so does `piPerms σ` on the product, with the same constant. -/
theorem mul_expect_sq_le_piPerms {n : ℕ} {V K : Fin n → Type*} [∀ i, Fintype (V i)]
[∀ i, Fintype (K i)] (σ : ∀ i, K i → Equiv.Perm (V i)) {c : ℝ}
(hσ : ∀ i (f : V i → ℝ), 𝔼 v, f v = 0 →
c * 𝔼 v, f v ^ 2 ≤ ∑ k, 𝔼 v, (f (σ i k v) - f v) ^ 2)
(f : (∀ i, V i) → ℝ) (hf : 𝔼 x, f x = 0) :
c * 𝔼 x, f x ^ 2 ≤ ∑ k, 𝔼 x, (f (piPerms σ k x) - f x) ^ 2 := by
induction n with
| zero =>
have h0 (x : ∀ i, V i) : f x = 0 := by
have : ∀ y : ∀ i, V i, f y = f x := fun y ↦ congrArg f (Subsingleton.elim y x)
rw [← hf]
simp only [this, Fintype.expect_const]
simp only [h0, sub_self]
simp
| succ n ih =>
-- Split off the component `0` and apply the binary box product.
let e := Fin.consEquiv V
set g : V 0 × (∀ i : Fin n, V i.succ) → ℝ := fun p ↦ f (e p) with hg
have hexp (φ : (∀ i, V i) → ℝ) : 𝔼 p, φ (e p) = 𝔼 x, φ x :=
Fintype.expect_equiv e _ _ fun _ ↦ rfl
have hbox := mul_expect_sq_le_boxProdPerms (σ := σ 0)
(τ := piPerms fun i : Fin n ↦ σ i.succ) (hσ 0)
(fun g hg ↦ ih (fun i ↦ σ i.succ) (fun i ↦ hσ i.succ) g hg) g
(by rw [hexp f]; exact hf)
have hL : 𝔼 p, g p ^ 2 = 𝔼 x, f x ^ 2 := hexp fun x ↦ f x ^ 2
rw [hL] at hbox
refine hbox.trans_eq ?_
rw [Fintype.sum_sum_type, Fintype.sum_sigma, Fintype.sum_sigma, Fin.sum_univ_succ]
congr 1
· refine sum_congr rfl fun k _ ↦ ?_
rw [← hexp]
refine expect_congr rfl fun p _ ↦ ?_
simp only [hg, boxProdPerms_inl, piPerms_apply, e, Fin.consEquiv_apply, Fin.cons_zero,
Fin.update_cons_zero]
· refine sum_congr rfl fun i _ ↦ sum_congr rfl fun k _ ↦ ?_
rw [← hexp]
refine expect_congr rfl fun p _ ↦ ?_
simp only [hg, boxProdPerms_inr, piPerms_apply, e, Fin.consEquiv_apply, Fin.cons_succ,
Fin.cons_update]

/-- **The second eigenvalue of a product of permutation multigraphs**: if every component satisfies
the Poincaré inequality with constant `c`, then `λ₂ ≤ 1 - c / (2 ∑ i, |K i|)` for the product. For
`J` components with `m` moves each, the component gap `c / (2 m)` is divided by `J`. -/
theorem secondEigenvalue_ofPerms_piPerms_le {n : ℕ} {V K : Fin n → Type*} [∀ i, Fintype (V i)]
[∀ i, Fintype (K i)] [Nonempty (Σ i, K i)]
[Nontrivial (∀ i, V i)] (σ : ∀ i, K i → Equiv.Perm (V i)) {c : ℝ}
(hσ : ∀ i (f : V i → ℝ), 𝔼 v, f v = 0 →
c * 𝔼 v, f v ^ 2 ≤ ∑ k, 𝔼 v, (f (σ i k v) - f v) ^ 2) :
(ofPerms (piPerms σ)).secondEigenvalue ≤ 1 - c / (2 * Fintype.card (Σ i, K i)) :=
secondEigenvalue_ofPerms_le _ fun f hf ↦ mul_expect_sq_le_piPerms σ hσ f hf

end Cslib.RotationMap
Loading
Loading