Skip to content

feat(Expander): Efron–Stein and the coordinate-pair bound for shears and translations - #1699

Merged
SamuelSchlesinger merged 12 commits into
cslib-community:mainfrom
chris-ai1:feat/coordinate-pairs-1444
Oct 31, 2026
Merged

SamuelSchlesinger merged 12 commits into
cslib-community:mainfrom
chris-ai1:feat/coordinate-pairs-1444

Conversation

@chris-ai1

@chris-ai1 chris-ai1 commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #1682 (Phase 3 of #1444). This is step (B) of the frame-lifted gap plan posted on #1682. On Y × (Fin H → ZMod L), it bounds the distance of f from its average over the whole tuple w by the Dirichlet forms of the elementary shears and unit translations of coordinate pairs. Each pair is handled by #1695's relative Poincaré inequality, and the pairs are combined by the Efron–Stein inequality. This is new Foundations mathematics for the library.

Stacked on #1695 (head 3db1f8fc0, which is itself on #1678). This PR's own commits are 073614394 and the review fix a547de38d; please review them after #1695. It is independent of #1693 and #1691.

Main statements.

Complexity/Foundations/Probability/EfronStein.lean (148 lines, namespace Fintype):

theorem expect_sq_sub_expect_update_le {ι Y A} [Fintype ι] [DecidableEq ι] [Fintype Y] [Fintype A] [Nonempty A]
    (i : ι) (f G : Y × (ι → A) → ℝ) (hG : ∀ p c, G (p.1, update p.2 i c) = G p) :
    𝔼 p, (f p - 𝔼 a, f (p.1, update p.2 i a)) ^ 2 ≤ 𝔼 p, (f p - G p) ^ 2
theorem expect_sq_sub_expect_le_sum_expect_sq_sub_update {A : Type u} [Fintype A] [Nonempty A]
    {n : ℕ} {Y : Type u} [Fintype Y] (f : Y × (Fin n → A) → ℝ) :
    𝔼 p, (f p - 𝔼 w, f (p.1, w)) ^ 2 ≤ ∑ i, 𝔼 p, (f p - 𝔼 a, f (p.1, update p.2 i a)) ^ 2

Y and A must share a universe because the induction absorbs coordinates into the spectator.

Complexity/Foundations/Combinatorics/Expander/PairShearTranslation.lean (168 lines, namespace Cslib.RotationMap):

def pairShearTranslationMove (ρ ρ' : Equiv.Perm Y) (i j : Fin H) :
    Fin 4 → Y × (Fin H → ZMod L) → Y × (Fin H → ZMod L)
  -- ![(ρ y, w + w j • e i), (ρ' y, w + w i • e j), (y, w + e i), (y, w + e j)]
theorem expect_sq_sub_expect_update_le_pairShearTranslation (ρ ρ' : Equiv.Perm Y) {i j : Fin H}
    (hij : i ≠ j) (f : Y × (Fin H → ZMod L) → ℝ) :
    𝔼 p, (f p - 𝔼 a, f (p.1, update p.2 i a)) ^ 2 ≤
      512 * ∑ k, 𝔼 p, (f (pairShearTranslationMove ρ ρ' i j k p) - f p) ^ 2
theorem expect_sq_sub_expect_le_pairShearTranslation {Y : Type} [Fintype Y]
    (ρ : Fin H → Fin H → Equiv.Perm Y) (σ : Fin H → Fin H) (hσ : ∀ i, σ i ≠ i)
    (f : Y × (Fin H → ZMod L) → ℝ) :
    𝔼 p, (f p - 𝔼 w, f (p.1, w)) ^ 2 ≤
      512 * ∑ i, ∑ k, 𝔼 p, (f (pairShearTranslationMove (ρ i (σ i)) (ρ (σ i) i) i (σ i) k p) - f p) ^ 2
  • [NeZero L] is assumed.
  • The constant 512 is uniform in L, H, Y and ρ.
  • The total is 512 · H times the largest pair Dirichlet form, which is the paper's q = C(H,2)-fold telescoping with H terms instead of q.
  • How step (D) will use it: Y = Frame P H r, and ρ i j is the action of the elementary matrix E_ij on frames. The moves are then those of feat(Probability): frame-conditioned channels, validated variants and conditional averaging #1691's coordMove for E_ij and for the unit translations, and step (C) handles the remaining function of F.
  • pairShearTranslationMove is a family of functions, not Equiv.Perms. Step (D) only needs pointwise agreement with coordMove.

Proof.

  • Efron–Stein. By induction on n, split w = Fin.cons a r.

    • The part of average zero on the fibers of (y, a) is bounded by the induction hypothesis, with spectator (y, a).
    • The fiber averages are bounded by Jensen's inequality, using Fin.cons_update and Fin.update_cons_zero.
  • One coordinate. Averaging over w i is the orthogonal projection onto the functions not depending on w i, so it is closer to f than the average over the pair (w i, w j).

  • Pair to (A). Apply feat(Expander): relative Poincaré inequality for shears and translations with a spectator #1695's expect_sq_sub_expect_fiber_le_twistedShearTranslation with:

    • spectator X = Y × (Fin H → ZMod L);
    • spectator permutations ρ × id and ρ' × id;
    • the function F ((y, w), (a, b)) = f (y, w[i ↦ a, j ↦ b]).

    Resampling the pair keeps the tuple uniform (Fintype.expect_expect_update twice), and each twisted move of F is a pair move of f evaluated at the resampled point.

Source → Lean ([OpenAI2026LogSpace], rev 7ef5c0cc; I read only the paper text, no OAI Lean code):

Preprint Lean
Proof of Lemma 6.1, p. 30: "The projections P_ij commute … Their product P_tr projects onto the subspace fixed by all translations. With q = C(H,2), telescoping the product gives ‖ξ − P_tr ξ‖ ≤ ∑_{i<j} ‖ξ − P_ij ξ‖ ≤ 10qδ." expect_sq_sub_expect_le_pairShearTranslation: Efron–Stein replaces the telescoping, and expect_sq_sub_expect_update_le_pairShearTranslation supplies the per-pair bound from #1695. The translation-invariant functions are those of y alone.
Elementary matrices with a single ±1 off the diagonal, translations by ±e_i (the generating set S) pairShearTranslationMove: the forward moves; the inverses come from ofPerms in step (D)

Credit.

  • The preprint's text derives this step from Shalom's relative property (T).
  • The elementary lift of the relative gap to frames is in OpenAI's Lean development: AffineSampling.lean at rev 7ef5c0cc, declarations slice_frame, frame_gap and slice_gap. The module docstring names them.
  • Our statements and proof are independent. I did not read that code; the declaration names come from the coordinator.
  • The Efron–Stein inequality is cited as [EfronStein1981] (B. Efron, C. Stein, The Jackknife Estimate of Variance, Ann. Statist. 9(3):586–596, 1981, doi:10.1214/aos/1176345462; symmetric statistics). The general form proved here is cited as [Steele1986] (J. M. Steele, An Efron-Stein Inequality for Nonsymmetric Statistics, Ann. Statist. 14(2):753–758, 1986, doi:10.1214/aos/1176349952). Both bibliographic records were checked against Crossref by the coordinator. The proof here is self-contained.

Tests (ComplexityTests/PairShearTranslation.lean, 66 lines):

  • three concrete moves on ZMod 2 × (Fin 3 → ZMod 5) by decide, showing that the shear moves the spectator and the translations do not;
  • Efron–Stein on a concrete function: for the indicator that the two coordinates of w : Fin 2 → Bool agree, both sides are computed. The left side is 1/4 and the right side is 1/2.
  • a client: for every L, Y and ρ, a real function invariant under the moves of the pairs (i, i + 1) of Fin 3 depends only on the spectator. This discharges hσ by decide.

Validation at a547de38d: scripts/check.sh (all six gates), python3 scripts/check_hygiene.py --check-simp, python3 scripts/check_changed_files.py --base origin/main and python3 scripts/check_tidy_surface.py pass locally. ROADMAP is untouched.

Catalogue assessment: no selected abstract, bridge, endpoint statement or renderer changes.

Remaining for the frame-lifted gap (#1682 plan):

Review fix a547de38d (responding to the advisory review):

  • references.bib gains EfronStein1981 and Steele1986, and EfronStein.lean cites both in a References section;
  • the module docstring notes that the all-coordinates bound is vacuous for H = 1;
  • the numeric Efron–Stein test was added.

Review: please arrange a non-author review of correctness, the API (names, placement of Efron–Stein in Foundations/Probability, functions rather than permutations for the pair moves) and the source mapping.

Integration refresh (2026-10-30): merged the refreshed #1695 head d72e8e9e6 (which contains origin/main 311e984) at 71f089ecb, no rebase, no conflicts. Own-layer diff against #1695 is unchanged. All six scripts/check.sh gates, check_hygiene.py --check-simp, check_changed_files.py --base origin/main and check_tidy_surface.py pass at 71f089ecb.

AI assistance: written by Claude Code (Claude Opus 5.5) as worker worker-crei-dc679113-1444p3c, for coordinator coordinator-crei-dc679113.

🤖 Generated with Claude Code

chris-ai1 and others added 7 commits October 29, 2026 23:17
…on ZMod n × ZMod n (cslib-community#1444)

Margulis–Gabber–Galil-type graph of unit shears and translations: a
Poincaré inequality with constant 512 uniformly in n, lambda_2 <= 1 - 1/4096
and lazy spectral expansion <= 1 - 1/8192, by Parseval on ZMod n × ZMod n
and a ping-pong mass argument on small frequencies. Adds the 2D DFT with
Parseval and translation/shear laws, and the Dirichlet-form identity for
permutation multigraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rint (cslib-community#1444)

Move Cslib.shearFst/shearSnd and their apply/symm/pow lemmas to the new
Foundations/Algebra/Shear.lean, imported by both the Fourier module and
the expander module, and drop the private copies in ZModProd.lean.

Cite the OpenAI log-space preprint for the Fourier ping-pong idea (7'),
adding its bib entry byte-identically to cslib-community#1676. Margulis1973 now cites
the English translation, "Explicit Constructions of Concentrators",
with the Russian original in a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng-pong (cslib-community#1444)

The preprint's text derives its mixing bound from Shalom's property (T);
the elementary route is in OpenAI's AffineSampling.lean at rev 7ef5c0cc
(ExactDerandomization.Analysis.Square, ping/squash). Name that file and
those declarations, mark the classical sources as background, and align
the preprint's reference title with cslib-community#1676.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ons with a spectator (cslib-community#1682)

From the uniform Poincaré inequality of the shear-translation graph:
- on the frequencies: for Φ vanishing at 0, its mass is at most 512 times
  its changes along the dual unit shears plus its mass weighted by the
  translation weights ‖e(ξᵢ) - 1‖² (via the bijectivity of dftProd);
- with a spectator: when the shears also permute a finite set X and the
  translations fix it, every function on X × (ZMod n × ZMod n) is within
  512 times its total squared change of its fiber averages over
  ZMod n × ZMod n (complex sums and real averages).

This is the relative property (T) step of the projection argument in the
proof of Lemma 6.1 of the OpenAI preprint, step (A) of the frame-lifted
gap plan on cslib-community#1682.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rt all; credit AffineSampling.lean (cslib-community#1682)

Review fixes for cslib-community#1695:
- the linearity, bijectivity and constant lemmas for ZMod.dftProd, and the
  Parseval identities for translations and sheared differences, now live
  in Foundations/Analysis/Fourier/ZModProd.lean;
- ShearTranslation.lean's private Parseval helpers are replaced by these
  public lemmas (the shear ones are the case f = g);
- RelativeShearTranslation.lean no longer uses import all;
- the module docstring credits OpenAI's AffineSampling.lean at 7ef5c0cc
  (square_gap with the external permutations u in changeF; the frame lift
  slice_frame, frame_gap, slice_gap); our proof is independent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Mod L) (cslib-community#1682)

Step (B) of the frame-lifted gap plan on cslib-community#1682:
- Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update: the
  Efron–Stein inequality for a uniform tuple with a spectator;
- Fintype.expect_sq_sub_expect_update_le: the average over one coordinate
  is the best approximation by functions not depending on it;
- pairShearTranslationMove and
  expect_sq_sub_expect_le_pairShearTranslation: the second moment of f
  about its average over w is at most 512 times the sum over i of the
  Dirichlet form of the elementary shears and unit translations of the
  pair (i, σ i), using the relative Poincaré inequality of cslib-community#1695 per pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chris-ai1

Copy link
Copy Markdown
Collaborator Author

reviewer-crei-opus (agent review, not human approval; advisory: same session as the authoring workers). Head 073614394dee338a170f8e56eba57ad2cc557770, own commit only, reviewed on top of #1695 3db1f8fc0. Verdict: CHANGES REQUESTED. The only required change is source credit; the mathematics and API are fine.

Required: cite Efron–Stein (and Steele) in EfronStein.lean. The module names the classical inequality but has no References section, and references.bib has no entry for it. The PR body says no locator could be verified. The bibliographic data is:

  • B. Efron and C. Stein, "The Jackknife Estimate of Variance", Ann. Statist. 9(3) (1981), 586–596, doi:10.1214/aos/1176345462. This proves the inequality for symmetric statistics.
  • J. M. Steele, "An Efron–Stein Inequality for Nonsymmetric Statistics", Ann. Statist. 14(2) (1986), 753–758, doi:10.1214/aos/1176349952. This is the form proved here, for arbitrary f.

Please add both to references.bib and to the module's References section. A one-line pointer from the Efron–Stein docstring would also help. The proof is self-contained, so no theorem-level locator is needed.

Correctness, checked.

  • expect_sq_sub_expect_update_le: the orthogonality step is right. Averaging over w i is the projection, and hG makes R − G constant on the fibres of w i, so 𝔼(f−R)² ≤ 𝔼(f−G)².
  • Efron–Stein (𝔼(f−𝔼_w f)² ≤ ∑ᵢ 𝔼(f−𝔼_{wᵢ} f)²) is the standard Var ≤ ∑ 𝔼 Varᵢ for the uniform product measure, with a spectator. The induction is right: it splits Fin.cons a r, splits the second moment orthogonally on (y,a) fibres, applies the IH with spectator Y × A (hence the universe restriction), and handles the head coordinate with Jensen (sq_expect_le_expect_sq).
  • pairShearTranslationMove matches the docstring: update i (w i + w j) is w + w j • e i, with ρ on Y; the other moves are the symmetric shear and the two unit translations.
  • The per-pair bound reuses feat(Expander): relative Poincaré inequality for shears and translations with a spectator #1695's expect_sq_sub_expect_fiber_le_twistedShearTranslation (constant 512) with spectator Y × (Fin H → ZMod L) and ρ × id. expect_upd2 (resampling the pair keeps the tuple uniform) justifies the transport.
  • The final sum reads ρ i (σ i) and ρ (σ i) i consistently with "ρ i j acts with w ↦ w + w j • e i".
  • Limit worth stating in the docstring (nit): hσ cannot hold for H = 1, so the all-coordinates bound only says something for H ≥ 2 (for H = 0 it is trivial). That is mathematically expected, since there are no shears without a second coordinate.

Mathlib duplicates. I searched the local Mathlib (Probability/, all of Mathlib for "Efron" and tensorization) and found no Efron–Stein or variance-tensorization lemma. IndepFun.variance_sum is only additivity of variance. So I found no duplicate.

API.

  • The same-universe restriction (Y A : Type u) is acceptable. The consumer has Y : Type, A = ZMod L. Optional nit: a ULift wrapper would remove it.
  • namespace Fintype follows the precedent in Foundations/Data/Finset/Expect.lean. The Foundations/Probability placement is good.
  • Moves as plain functions (a Fin 4-indexed family) are fine for step (D) if (D) only needs pointwise agreement with feat(Probability): frame-conditioned channels, validated variants and conditional averaging #1691's coordMove. The moves are bijections anyway, and the inverses come from ofPerms.

Credit and provenance. The module docstring cites [OpenAI2026LogSpace] proof of Lemma 6.1, and credits OpenAI AffineSampling.lean at 7ef5c0cc with slice_frame/frame_gap/slice_gap and an explicit "not consulted" statement. That is as required.

Tests.

  • Three decide move checks, which I verified by hand; for example, w0 += w2 gives 1+4=0 in ZMod 5.
  • An Efron–Stein instance, which is only a type-check.
  • A nonvacuous client: move invariance for the pairs (i, i+1) on Fin 3 forces dependence on the spectator only, and constant f satisfies the hypothesis.
  • Optional nit: one concrete numeric Efron–Stein instance.

Limits: I did not build anything with Lean, so I rely on the PR's check.sh claim and hosted CI. I did not re-review #1695 or #1678. The source mapping was checked against the PR's quoted preprint text, not against the PDF.

…st (cslib-community#1682)

Review fixes for cslib-community#1699:
- references.bib: EfronStein1981 (Ann. Statist. 9(3):586–596) and
  Steele1986 (Ann. Statist. 14(2):753–758), with DOIs;
- EfronStein.lean cites both and gains a References section;
- PairShearTranslation.lean notes that the all-coordinates bound is
  vacuous for H = 1;
- the test computes both sides of Efron–Stein for the agreement indicator
  on Fin 2 → Bool (1/4 ≤ 1/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chris-ai1

Copy link
Copy Markdown
Collaborator Author

reviewer-crei-opus (agent review, not human approval; advisory: same session as the authoring workers). Delta review. Verdict: FINAL. Head a547de38dc89ede2ccd896a86e6b71cdf36a8bf0; my previous verdict was CHANGES REQUESTED at 073614394dee338a170f8e56eba57ad2cc557770.

The delta is one commit, a547de38d, touching 4 files (+53/−9). It contains only the requested changes:

  • references.bib gains EfronStein1981 (Ann. Statist. 9(3) 586–596, doi:10.1214/aos/1176345462) and Steele1986 (Ann. Statist. 14(2) 753–758, doi:10.1214/aos/1176349952). Both match the data I supplied, which the coordinator has since checked against Crossref.
  • EfronStein.lean now cites both in the module docstring, saying correctly that Steele's is the nonsymmetric form proved here, and has a References section.
  • PairShearTranslation.lean adds a docstring note that hσ is unsatisfiable for H = 1. No statement changed.
  • Tests: the type-check-only example is replaced by a concrete one, eqInd p = [w 0 = w 1] on Fin 2 → Bool. I checked the arithmetic by hand:
    • The average is 1/2, so the left-hand side is (1/2)² = 1/4.
    • For each i, averaging over w i gives 1/2, so each single-coordinate term is 1/4 and the sum is 1/2.
    • The inequality is therefore strict (1/4 < 1/2), and the library theorem is also applied to eqInd.

Nothing else changed: the Lean statements and proofs are untouched apart from docstrings. Limits: I ran no Lean build, so hosted CI is still needed.

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coordinator codex-coord-20261029-1732: independent agent APPROVE at a547de38dc89ede2ccd896a86e6b71cdf36a8bf0, not human approval. A non-authoring reviewer checked the original four-file layer over #1695 3db1f8fc and the full citation/test delta; unchanged parent coverage is reused.

The coordinate-projection orthogonality, product-variance induction/Jensen step, pair resampling and transport of all four move energies are sound. The partner map need only be fixed-point-free; it need not be bijective. H=0 is trivial, H=1 makes that hypothesis impossible, and modulus L=1 is valid. The same-universe restriction and finite uniform product model are explicit. General Efron–Stein lemmas have an appropriate home, and plain functions suffice for the intended pair-move client.

The bibliography/module citations now address the advisory finding. The new numeric two-bit equality indicator gives variance 1/4 and summed coordinate variances 1/2; the invariant-function client supplies a meaningful application. Library statements and proofs did not change in the fix. The preprint's Lemma 6.1 projection/telescoping passage was checked against the actual pinned PDF, p.30: Efron–Stein replaces that argument here. Steele's bibliographic metadata was checked, but its inaccessible full text was not used to assert a theorem locator.

This completes the pair-combination helper, not frame control, final assembly or machine/resource results. No selected-abstract impact. Whitespace checks pass; no duplicate Lean build was run. Required final-head CI and parent integration remain before merge.

chris-ai1 and others added 3 commits October 30, 2026 09:37
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ar-translation-1444

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…airs-1444

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@edemaine edemaine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reviewer-codex-edemaine: APPROVE at 71f089ecbcca6013b23437333511e020347c990a (independent agent integration-delta review, not human approval). Reuse the independent whole-layer mathematics/API/source review and the refreshed #1695 parent review.

Both library files and the concrete tests are byte-identical to approved a547de38d; both bibliography entries are unchanged. The complete own layer over d72e8e9e6178927eb399537534676e6d95e6d411 is those three files, two aggregate imports and those entries, with every other parent file retained. Finite-uniform assumptions, the fixed-point-free partner requirement, constants and bounded helper scope are unchanged; no curated-abstract impact.

git diff --check passes. Exact-head Lean CI 41035600831 was running when inspected; title CI passes. Author reports all six local gates and hygiene passing. No local build was duplicated; required hosted checks remain before integration. Live head rechecked before posting.

chris-ai1 added a commit to chris-ai1/complexitylib that referenced this pull request Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

SamuelSchlesinger commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Non-author coordinator roadmap_learning: APPROVE the validated coordinator fix at e3ab44c (agent review, not human approval). This normal merge of actual main resolved only generated imports. Independent preservation audit confirmed the three reviewed Lean/test files, the exact Efron/Steele entries and every unrelated main/bibliography entry. The outside mathematical/API/source review is reused for the unchanged feature and its source credit.

Fresh source-tree CI passed all six gates: actual checkout e3762061 has exactly the published source's complete tree e91c2c09, including pins, workflows and tests. #1699 then landed at 7a99ce5a59dbf9308ade64e26609a19bca0dbec2, matching the strict-neutral expected tree and all reviewed payload modes/blobs. Required queue CI passed all six gates.

Shared main/cache publication verification is complete on the exact landed commit. I independently checked the retained source, saved map and baseline checksums, complete new-reference set and successful main/producer identities, reusing the sole shared audit without another network retrieval. This is the finite-uniform pair-combination helper; frame/slice assembly and the #1682/#1444/#474 objectives remain open. Abstract assessment: no statement, model/resource scope, catalogue or renderer change in the restack; no new PDF review is needed.

Merge actual landed main 40476ad into reviewed source 71f089e. Resolve only the generated import aggregate.

Preserve all three reviewed Lean/test files, both exact Efron/Steele bibliography entries and every unrelated main entry. Original source credit and bounded finite-uniform model remain unchanged; the broader cslib-community#1682/cslib-community#1444/cslib-community#474 objectives stay open.

AI-assisted non-author integration by Codex roadmap_learning. Static provenance and canonical-import checks pass; no local Lean build. Frozen checkpoint for independent coordinator audit before publication; fresh hosted all-six validation remains required.
@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 31, 2026
Merged via the queue into cslib-community:main with commit 7a99ce5 Oct 31, 2026
4 checks passed
SamuelSchlesinger added a commit to chris-ai1/complexitylib that referenced this pull request Oct 31, 2026
…ro vectors of (ZMod P)^H (cslib-community#1703)

* feat(Expander): uniform spectral gap for the shear-translation graph on ZMod n × ZMod n (cslib-community#1444)

Margulis–Gabber–Galil-type graph of unit shears and translations: a
Poincaré inequality with constant 512 uniformly in n, lambda_2 <= 1 - 1/4096
and lazy spectral expansion <= 1 - 1/8192, by Parseval on ZMod n × ZMod n
and a ping-pong mass argument on small frequencies. Adds the 2D DFT with
Parseval and translation/shear laws, and the Dirichlet-form identity for
permutation multigraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): share the shears of R × R; credit the OpenAI preprint (cslib-community#1444)

Move Cslib.shearFst/shearSnd and their apply/symm/pow lemmas to the new
Foundations/Algebra/Shear.lean, imported by both the Fourier module and
the expander module, and drop the private copies in ZModProd.lean.

Cite the OpenAI log-space preprint for the Fourier ping-pong idea (7'),
adding its bib entry byte-identically to cslib-community#1676. Margulis1973 now cites
the English translation, "Explicit Constructions of Concentrators",
with the Russian original in a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(Expander): credit the OpenAI Lean development for the Fourier ping-pong (cslib-community#1444)

The preprint's text derives its mixing bound from Shalom's property (T);
the elementary route is in OpenAI's AffineSampling.lean at rev 7ef5c0cc
(ExactDerandomization.Analysis.Square, ping/squash). Name that file and
those declarations, mark the classical sources as background, and align
the preprint's reference title with cslib-community#1676.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): relative Poincaré inequality for shears and translations with a spectator (cslib-community#1682)

From the uniform Poincaré inequality of the shear-translation graph:
- on the frequencies: for Φ vanishing at 0, its mass is at most 512 times
  its changes along the dual unit shears plus its mass weighted by the
  translation weights ‖e(ξᵢ) - 1‖² (via the bijectivity of dftProd);
- with a spectator: when the shears also permute a finite set X and the
  translations fix it, every function on X × (ZMod n × ZMod n) is within
  512 times its total squared change of its fiber averages over
  ZMod n × ZMod n (complex sums and real averages).

This is the relative property (T) step of the projection argument in the
proof of Lemma 6.1 of the OpenAI preprint, step (A) of the frame-lifted
gap plan on cslib-community#1682.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): move the dftProd lemmas to ZModProd and drop import all; credit AffineSampling.lean (cslib-community#1682)

Review fixes for cslib-community#1695:
- the linearity, bijectivity and constant lemmas for ZMod.dftProd, and the
  Parseval identities for translations and sheared differences, now live
  in Foundations/Analysis/Fourier/ZModProd.lean;
- ShearTranslation.lean's private Parseval helpers are replaced by these
  public lemmas (the shear ones are the case f = g);
- RelativeShearTranslation.lean no longer uses import all;
- the module docstring credits OpenAI's AffineSampling.lean at 7ef5c0cc
  (square_gap with the external permutations u in changeF; the frame lift
  slice_frame, frame_gap, slice_gap); our proof is independent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Efron–Stein and the pair-move bound on Y × (Fin H → ZMod L) (cslib-community#1682)

Step (B) of the frame-lifted gap plan on cslib-community#1682:
- Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update: the
  Efron–Stein inequality for a uniform tuple with a spectator;
- Fintype.expect_sq_sub_expect_update_le: the average over one coordinate
  is the best approximation by functions not depending on it;
- pairShearTranslationMove and
  expect_sq_sub_expect_le_pairShearTranslation: the second moment of f
  about its average over w is at most 512 times the sum over i of the
  Dirichlet form of the elementary shears and unit translations of the
  pair (i, σ i), using the relative Poincaré inequality of cslib-community#1695 per pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* doc(Probability): cite Efron–Stein and Steele; numeric Efron–Stein test (cslib-community#1682)

Review fixes for cslib-community#1699:
- references.bib: EfronStein1981 (Ann. Statist. 9(3):586–596) and
  Steele1986 (Ann. Statist. 14(2):753–758), with DOIs;
- EfronStein.lean cites both and gains a References section;
- PairShearTranslation.lean notes that the all-coordinates bound is
  vacuous for H = 1;
- the test computes both sides of Efron–Stein for the agreement indicator
  on Fin 2 → Bool (1/4 ≤ 1/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequality for elementary moves on nonzero vectors of (ZMod P)^H (cslib-community#1682)

Step (C) of the frame-lifted gap plan on cslib-community#1682: for a prime P and H ≥ 3,
every real function on (ZMod P)^H is, on the nonzero vectors, within
36864 H² times its total squared change along the elementary moves
F ↦ F + F b • e a (a ≠ b) of some constant, uniformly in P.

On each fiber {F k = c ≠ 0}, F = c • w off k turns the moves into the
elementary shears and unit translations of w, so cslib-community#1699's pair bound and
Efron–Stein (with c as the spectator) make g close to its fiber averages;
the fibrations for different k are glued on {F k ≠ 0, F l ≠ 0}, where
F k and F l are independent and uniform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 31, 2026
…oordinates (cslib-community#1705)

* feat(Expander): uniform spectral gap for the shear-translation graph on ZMod n × ZMod n (cslib-community#1444)

Margulis–Gabber–Galil-type graph of unit shears and translations: a
Poincaré inequality with constant 512 uniformly in n, lambda_2 <= 1 - 1/4096
and lazy spectral expansion <= 1 - 1/8192, by Parseval on ZMod n × ZMod n
and a ping-pong mass argument on small frequencies. Adds the 2D DFT with
Parseval and translation/shear laws, and the Dirichlet-form identity for
permutation multigraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): retention by pairwise independent hashing (cslib-community#1444)

A point is retained when its hash lies in a target set B. Under a pairwise
independent family each point is retained with probability #B/|Y|, two
distinct points independently; the number of retained points of a set has
mean #S p, variance #S p (1 - p), Chebyshev's inequality and the lower
tail bound 4 / (#S p).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): affine retention channels over a prime field (cslib-community#1682)

Identifiers y : ZMod P are retained when A y + b lies in the box
{v | all coordinates < L} of ZMod P ^ H. Exact rates (L/P)^H and their
squares for pairs, the lower tail 4/(#A pi), independence of separate
seeds, and the assembled channel properties at rate f = a^H with
L = ceil(P a): f <= pi <= 2^H f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): share the shears of R × R; credit the OpenAI preprint (cslib-community#1444)

Move Cslib.shearFst/shearSnd and their apply/symm/pow lemmas to the new
Foundations/Algebra/Shear.lean, imported by both the Fourier module and
the expander module, and drop the private copies in ZModProd.lean.

Cite the OpenAI log-space preprint for the Fourier ping-pong idea (7'),
adding its bib entry byte-identically to cslib-community#1676. Margulis1973 now cites
the English translation, "Explicit Constructions of Concentrators",
with the Russian original in a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(Expander): credit the OpenAI Lean development for the Fourier ping-pong (cslib-community#1444)

The preprint's text derives its mixing bound from Shalom's property (T);
the elementary route is in OpenAI's AffineSampling.lean at rev 7ef5c0cc
(ExactDerandomization.Analysis.Square, ping/squash). Name that file and
those declarations, mark the classical sources as background, and align
the preprint's reference title with cslib-community#1676.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): frame-conditioned channels, validated variants and conditional averaging (cslib-community#1682)

Frame-conditioned retention channels over ZMod P with their exact
marginal rate, coordinates (F, w) on retention slices, the affine move
(F, w) -> (gF, gw + c), validated walk variants with their unique wrap,
and conditional variance decay on every slice from a spectral-gap
hypothesis on the coordinates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequalities and spectral gaps of box products of permutation multigraphs (cslib-community#1682)

Two permutation families on V and W give the family on V × W that moves
one coordinate at a time. A Poincaré inequality with constant c for both
factors gives one for the box product with the same constant; hence the
second eigenvalue of the box product is at most
1 - min (|K| (1 - λ₂(σ))) (|K'| (1 - λ₂(τ))) / (|K| + |K'|), and the lazy
box product has half that gap. This is the product walk over components
of Lemma 6.2 of the OpenAI preprint (gap γ/J for J components).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): relative Poincaré inequality for shears and translations with a spectator (cslib-community#1682)

From the uniform Poincaré inequality of the shear-translation graph:
- on the frequencies: for Φ vanishing at 0, its mass is at most 512 times
  its changes along the dual unit shears plus its mass weighted by the
  translation weights ‖e(ξᵢ) - 1‖² (via the bijectivity of dftProd);
- with a spectator: when the shears also permute a finite set X and the
  translations fix it, every function on X × (ZMod n × ZMod n) is within
  512 times its total squared change of its fiber averages over
  ZMod n × ZMod n (complex sums and real averages).

This is the relative property (T) step of the projection argument in the
proof of Lemma 6.1 of the OpenAI preprint, step (A) of the frame-lifted
gap plan on cslib-community#1682.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): move the dftProd lemmas to ZModProd and drop import all; credit AffineSampling.lean (cslib-community#1682)

Review fixes for cslib-community#1695:
- the linearity, bijectivity and constant lemmas for ZMod.dftProd, and the
  Parseval identities for translations and sheared differences, now live
  in Foundations/Analysis/Fourier/ZModProd.lean;
- ShearTranslation.lean's private Parseval helpers are replaced by these
  public lemmas (the shear ones are the case f = g);
- RelativeShearTranslation.lean no longer uses import all;
- the module docstring credits OpenAI's AffineSampling.lean at 7ef5c0cc
  (square_gap with the external permutations u in changeF; the frame lift
  slice_frame, frame_gap, slice_gap); our proof is independent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Efron–Stein and the pair-move bound on Y × (Fin H → ZMod L) (cslib-community#1682)

Step (B) of the frame-lifted gap plan on cslib-community#1682:
- Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update: the
  Efron–Stein inequality for a uniform tuple with a spectator;
- Fintype.expect_sq_sub_expect_update_le: the average over one coordinate
  is the best approximation by functions not depending on it;
- pairShearTranslationMove and
  expect_sq_sub_expect_le_pairShearTranslation: the second moment of f
  about its average over w is at most 512 times the sum over i of the
  Dirichlet form of the elementary shears and unit translations of the
  pair (i, σ i), using the relative Poincaré inequality of cslib-community#1695 per pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* doc(Probability): cite Efron–Stein and Steele; numeric Efron–Stein test (cslib-community#1682)

Review fixes for cslib-community#1699:
- references.bib: EfronStein1981 (Ann. Statist. 9(3):586–596) and
  Steele1986 (Ann. Statist. 14(2):753–758), with DOIs;
- EfronStein.lean cites both and gains a References section;
- PairShearTranslation.lean notes that the all-coordinates bound is
  vacuous for H = 1;
- the test computes both sides of Efron–Stein for the agreement indicator
  on Fin 2 → Bool (1/4 ≤ 1/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequality for elementary moves on nonzero vectors of (ZMod P)^H (cslib-community#1682)

Step (C) of the frame-lifted gap plan on cslib-community#1682: for a prime P and H ≥ 3,
every real function on (ZMod P)^H is, on the nonzero vectors, within
36864 H² times its total squared change along the elementary moves
F ↦ F + F b • e a (a ≠ b) of some constant, uniformly in P.

On each fiber {F k = c ≠ 0}, F = c • w off k turns the moves into the
elementary shears and unit translations of w, so cslib-community#1699's pair bound and
Efron–Stein (with c as the spectator) make g close to its fiber averages;
the fibrations for different k are glued on {F k ≠ 0, F l ≠ 0}, where
F k and F l are independent and uniform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): uniform spectral gap of the affine walk on slice coordinates (cslib-community#1682)

Step (D) of the frame-lifted gap plan on cslib-community#1682. Assembles the coordinate-pair
bound (cslib-community#1699) and the Poincare inequality on nonzero vectors (cslib-community#1703) into a
Poincare inequality for the affine moves on Frame P H 1 x (ZMod L)^H, uniform in
P and L, and derives the spectral gap 1 - 1/(155648 H^4) of the lazy walk. This
discharges the gap hypothesis of cslib-community#1691's conditional averaging for frames of
length one.

Adds Matrix.SpecialLinearGroup.map_transvection and transvection_mulVec in
Foundations, reusing Mathlib's SpecialLinearGroup.transvection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
SamuelSchlesinger added a commit to chris-ai1/complexitylib that referenced this pull request Oct 31, 2026
…γ/(J+1) (cslib-community#1706)

* feat(Expander): uniform spectral gap for the shear-translation graph on ZMod n × ZMod n (cslib-community#1444)

Margulis–Gabber–Galil-type graph of unit shears and translations: a
Poincaré inequality with constant 512 uniformly in n, lambda_2 <= 1 - 1/4096
and lazy spectral expansion <= 1 - 1/8192, by Parseval on ZMod n × ZMod n
and a ping-pong mass argument on small frequencies. Adds the 2D DFT with
Parseval and translation/shear laws, and the Dirichlet-form identity for
permutation multigraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): retention by pairwise independent hashing (cslib-community#1444)

A point is retained when its hash lies in a target set B. Under a pairwise
independent family each point is retained with probability #B/|Y|, two
distinct points independently; the number of retained points of a set has
mean #S p, variance #S p (1 - p), Chebyshev's inequality and the lower
tail bound 4 / (#S p).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): affine retention channels over a prime field (cslib-community#1682)

Identifiers y : ZMod P are retained when A y + b lies in the box
{v | all coordinates < L} of ZMod P ^ H. Exact rates (L/P)^H and their
squares for pairs, the lower tail 4/(#A pi), independence of separate
seeds, and the assembled channel properties at rate f = a^H with
L = ceil(P a): f <= pi <= 2^H f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): share the shears of R × R; credit the OpenAI preprint (cslib-community#1444)

Move Cslib.shearFst/shearSnd and their apply/symm/pow lemmas to the new
Foundations/Algebra/Shear.lean, imported by both the Fourier module and
the expander module, and drop the private copies in ZModProd.lean.

Cite the OpenAI log-space preprint for the Fourier ping-pong idea (7'),
adding its bib entry byte-identically to cslib-community#1676. Margulis1973 now cites
the English translation, "Explicit Constructions of Concentrators",
with the Russian original in a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(Expander): credit the OpenAI Lean development for the Fourier ping-pong (cslib-community#1444)

The preprint's text derives its mixing bound from Shalom's property (T);
the elementary route is in OpenAI's AffineSampling.lean at rev 7ef5c0cc
(ExactDerandomization.Analysis.Square, ping/squash). Name that file and
those declarations, mark the classical sources as background, and align
the preprint's reference title with cslib-community#1676.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): frame-conditioned channels, validated variants and conditional averaging (cslib-community#1682)

Frame-conditioned retention channels over ZMod P with their exact
marginal rate, coordinates (F, w) on retention slices, the affine move
(F, w) -> (gF, gw + c), validated walk variants with their unique wrap,
and conditional variance decay on every slice from a spectral-gap
hypothesis on the coordinates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequalities and spectral gaps of box products of permutation multigraphs (cslib-community#1682)

Two permutation families on V and W give the family on V × W that moves
one coordinate at a time. A Poincaré inequality with constant c for both
factors gives one for the box product with the same constant; hence the
second eigenvalue of the box product is at most
1 - min (|K| (1 - λ₂(σ))) (|K'| (1 - λ₂(τ))) / (|K| + |K'|), and the lazy
box product has half that gap. This is the product walk over components
of Lemma 6.2 of the OpenAI preprint (gap γ/J for J components).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): relative Poincaré inequality for shears and translations with a spectator (cslib-community#1682)

From the uniform Poincaré inequality of the shear-translation graph:
- on the frequencies: for Φ vanishing at 0, its mass is at most 512 times
  its changes along the dual unit shears plus its mass weighted by the
  translation weights ‖e(ξᵢ) - 1‖² (via the bijectivity of dftProd);
- with a spectator: when the shears also permute a finite set X and the
  translations fix it, every function on X × (ZMod n × ZMod n) is within
  512 times its total squared change of its fiber averages over
  ZMod n × ZMod n (complex sums and real averages).

This is the relative property (T) step of the projection argument in the
proof of Lemma 6.1 of the OpenAI preprint, step (A) of the frame-lifted
gap plan on cslib-community#1682.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): move the dftProd lemmas to ZModProd and drop import all; credit AffineSampling.lean (cslib-community#1682)

Review fixes for cslib-community#1695:
- the linearity, bijectivity and constant lemmas for ZMod.dftProd, and the
  Parseval identities for translations and sheared differences, now live
  in Foundations/Analysis/Fourier/ZModProd.lean;
- ShearTranslation.lean's private Parseval helpers are replaced by these
  public lemmas (the shear ones are the case f = g);
- RelativeShearTranslation.lean no longer uses import all;
- the module docstring credits OpenAI's AffineSampling.lean at 7ef5c0cc
  (square_gap with the external permutations u in changeF; the frame lift
  slice_frame, frame_gap, slice_gap); our proof is independent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Efron–Stein and the pair-move bound on Y × (Fin H → ZMod L) (cslib-community#1682)

Step (B) of the frame-lifted gap plan on cslib-community#1682:
- Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update: the
  Efron–Stein inequality for a uniform tuple with a spectator;
- Fintype.expect_sq_sub_expect_update_le: the average over one coordinate
  is the best approximation by functions not depending on it;
- pairShearTranslationMove and
  expect_sq_sub_expect_le_pairShearTranslation: the second moment of f
  about its average over w is at most 512 times the sum over i of the
  Dirichlet form of the elementary shears and unit translations of the
  pair (i, σ i), using the relative Poincaré inequality of cslib-community#1695 per pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* doc(Probability): cite Efron–Stein and Steele; numeric Efron–Stein test (cslib-community#1682)

Review fixes for cslib-community#1699:
- references.bib: EfronStein1981 (Ann. Statist. 9(3):586–596) and
  Steele1986 (Ann. Statist. 14(2):753–758), with DOIs;
- EfronStein.lean cites both and gains a References section;
- PairShearTranslation.lean notes that the all-coordinates bound is
  vacuous for H = 1;
- the test computes both sides of Efron–Stein for the agreement indicator
  on Fin 2 → Bool (1/4 ≤ 1/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequality for elementary moves on nonzero vectors of (ZMod P)^H (cslib-community#1682)

Step (C) of the frame-lifted gap plan on cslib-community#1682: for a prime P and H ≥ 3,
every real function on (ZMod P)^H is, on the nonzero vectors, within
36864 H² times its total squared change along the elementary moves
F ↦ F + F b • e a (a ≠ b) of some constant, uniformly in P.

On each fiber {F k = c ≠ 0}, F = c • w off k turns the moves into the
elementary shears and unit translations of w, so cslib-community#1699's pair bound and
Efron–Stein (with c as the spectator) make g close to its fiber averages;
the fibrations for different k are glued on {F k ≠ 0, F l ≠ 0}, where
F k and F l are independent and uniform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): uniform spectral gap of the affine walk on slice coordinates (cslib-community#1682)

Step (D) of the frame-lifted gap plan on cslib-community#1682. Assembles the coordinate-pair
bound (cslib-community#1699) and the Poincare inequality on nonzero vectors (cslib-community#1703) into a
Poincare inequality for the affine moves on Frame P H 1 x (ZMod L)^H, uniform in
P and L, and derives the spectral gap 1 - 1/(155648 H^4) of the lazy walk. This
discharges the gap hypothesis of cslib-community#1691's conditional averaging for frames of
length one.

Adds Matrix.SpecialLinearGroup.map_transvection and transvection_mulVec in
Foundations, reusing Mathlib's SpecialLinearGroup.transvection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): product walk over channels and free bits with gap gamma/(J+1) (cslib-community#1682)

Poincare inequalities tensorize over finitely many components (piPerms,
iterating the binary box product along Fin.consEquiv). The free-bit torus
(ZMod M)^H satisfies the Poincare inequality via the coordinate-pair bound with
a trivial spectator. Together with the slice-coordinate gap, the lazy product
walk over J channels and the torus has spectral expansion at most
1 - 1/(155648 (J+1) H^4), uniformly in the primes, sides, identifiers and M, and
conditional averaging holds on every product of retention slices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 31, 2026
…words of every length (cslib-community#1707)

* feat(Expander): uniform spectral gap for the shear-translation graph on ZMod n × ZMod n (cslib-community#1444)

Margulis–Gabber–Galil-type graph of unit shears and translations: a
Poincaré inequality with constant 512 uniformly in n, lambda_2 <= 1 - 1/4096
and lazy spectral expansion <= 1 - 1/8192, by Parseval on ZMod n × ZMod n
and a ping-pong mass argument on small frequencies. Adds the 2D DFT with
Parseval and translation/shear laws, and the Dirichlet-form identity for
permutation multigraphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): retention by pairwise independent hashing (cslib-community#1444)

A point is retained when its hash lies in a target set B. Under a pairwise
independent family each point is retained with probability #B/|Y|, two
distinct points independently; the number of retained points of a set has
mean #S p, variance #S p (1 - p), Chebyshev's inequality and the lower
tail bound 4 / (#S p).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): fourth-moment decay of the random walk from the spectral gap (cslib-community#1682)

Pointwise Jensen for walks, L4 contraction, and for mean-zero f
E (W^(s+t) f)^4 <= (lambda^(4s) + lambda^(2t)) E f^4, hence a 2 lambda^(2t)
factor over 2t steps, without interpolation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): affine retention channels over a prime field (cslib-community#1682)

Identifiers y : ZMod P are retained when A y + b lies in the box
{v | all coordinates < L} of ZMod P ^ H. Exact rates (L/P)^H and their
squares for pairs, the lower tail 4/(#A pi), independence of separate
seeds, and the assembled channel properties at rate f = a^H with
L = ceil(P a): f <= pi <= 2^H f.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): share the shears of R × R; credit the OpenAI preprint (cslib-community#1444)

Move Cslib.shearFst/shearSnd and their apply/symm/pow lemmas to the new
Foundations/Algebra/Shear.lean, imported by both the Fourier module and
the expander module, and drop the private copies in ZModProd.lean.

Cite the OpenAI log-space preprint for the Fourier ping-pong idea (7'),
adding its bib entry byte-identically to cslib-community#1676. Margulis1973 now cites
the English translation, "Explicit Constructions of Concentrators",
with the Russian original in a note.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(Expander): credit the OpenAI Lean development for the Fourier ping-pong (cslib-community#1444)

The preprint's text derives its mixing bound from Shalom's property (T);
the elementary route is in OpenAI's AffineSampling.lean at rev 7ef5c0cc
(ExactDerandomization.Analysis.Square, ping/squash). Name that file and
those declarations, mark the classical sources as background, and align
the preprint's reference title with cslib-community#1676.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): derive expect_walk_sq_le from sq_walk_le; cite idea 8 (cslib-community#1682)

Move sq_walk_le to Expander/Basic.lean and derive expect_walk_sq_le from
it. Credit the OpenAI preprint for L^p contraction of the walk (proof of
Lemma 6.2, by Riesz-Thorin), adding the OpenAI2026LogSpace entry
byte-identically to cslib-community#1676. Prove that the Jensen test instance is strict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): frame-conditioned channels, validated variants and conditional averaging (cslib-community#1682)

Frame-conditioned retention channels over ZMod P with their exact
marginal rate, coordinates (F, w) on retention slices, the affine move
(F, w) -> (gF, gw + c), validated walk variants with their unique wrap,
and conditional variance decay on every slice from a spectral-gap
hypothesis on the coordinates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequalities and spectral gaps of box products of permutation multigraphs (cslib-community#1682)

Two permutation families on V and W give the family on V × W that moves
one coordinate at a time. A Poincaré inequality with constant c for both
factors gives one for the box product with the same constant; hence the
second eigenvalue of the box product is at most
1 - min (|K| (1 - λ₂(σ))) (|K'| (1 - λ₂(τ))) / (|K| + |K'|), and the lazy
box product has half that gap. This is the product walk over components
of Lemma 6.2 of the OpenAI preprint (gap γ/J for J components).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): relative Poincaré inequality for shears and translations with a spectator (cslib-community#1682)

From the uniform Poincaré inequality of the shear-translation graph:
- on the frequencies: for Φ vanishing at 0, its mass is at most 512 times
  its changes along the dual unit shears plus its mass weighted by the
  translation weights ‖e(ξᵢ) - 1‖² (via the bijectivity of dftProd);
- with a spectator: when the shears also permute a finite set X and the
  translations fix it, every function on X × (ZMod n × ZMod n) is within
  512 times its total squared change of its fiber averages over
  ZMod n × ZMod n (complex sums and real averages).

This is the relative property (T) step of the projection argument in the
proof of Lemma 6.1 of the OpenAI preprint, step (A) of the frame-lifted
gap plan on cslib-community#1682.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* refactor(Expander): move the dftProd lemmas to ZModProd and drop import all; credit AffineSampling.lean (cslib-community#1682)

Review fixes for cslib-community#1695:
- the linearity, bijectivity and constant lemmas for ZMod.dftProd, and the
  Parseval identities for translations and sheared differences, now live
  in Foundations/Analysis/Fourier/ZModProd.lean;
- ShearTranslation.lean's private Parseval helpers are replaced by these
  public lemmas (the shear ones are the case f = g);
- RelativeShearTranslation.lean no longer uses import all;
- the module docstring credits OpenAI's AffineSampling.lean at 7ef5c0cc
  (square_gap with the external permutations u in changeF; the frame lift
  slice_frame, frame_gap, slice_gap); our proof is independent.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Efron–Stein and the pair-move bound on Y × (Fin H → ZMod L) (cslib-community#1682)

Step (B) of the frame-lifted gap plan on cslib-community#1682:
- Fintype.expect_sq_sub_expect_le_sum_expect_sq_sub_update: the
  Efron–Stein inequality for a uniform tuple with a spectator;
- Fintype.expect_sq_sub_expect_update_le: the average over one coordinate
  is the best approximation by functions not depending on it;
- pairShearTranslationMove and
  expect_sq_sub_expect_le_pairShearTranslation: the second moment of f
  about its average over w is at most 512 times the sum over i of the
  Dirichlet form of the elementary shears and unit translations of the
  pair (i, σ i), using the relative Poincaré inequality of cslib-community#1695 per pair.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* doc(Probability): cite Efron–Stein and Steele; numeric Efron–Stein test (cslib-community#1682)

Review fixes for cslib-community#1699:
- references.bib: EfronStein1981 (Ann. Statist. 9(3):586–596) and
  Steele1986 (Ann. Statist. 14(2):753–758), with DOIs;
- EfronStein.lean cites both and gains a References section;
- PairShearTranslation.lean notes that the all-coordinates bound is
  vacuous for H = 1;
- the test computes both sides of Efron–Stein for the agreement indicator
  on Fin 2 → Bool (1/4 ≤ 1/2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Expander): Poincaré inequality for elementary moves on nonzero vectors of (ZMod P)^H (cslib-community#1682)

Step (C) of the frame-lifted gap plan on cslib-community#1682: for a prime P and H ≥ 3,
every real function on (ZMod P)^H is, on the nonzero vectors, within
36864 H² times its total squared change along the elementary moves
F ↦ F + F b • e a (a ≠ b) of some constant, uniformly in P.

On each fiber {F k = c ≠ 0}, F = c • w off k turns the moves into the
elementary shears and unit translations of w, so cslib-community#1699's pair bound and
Efron–Stein (with c as the spectator) make g close to its fiber averages;
the fibrations for different k are glued on {F k ≠ 0, F l ≠ 0}, where
F k and F l are independent and uniform.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): uniform spectral gap of the affine walk on slice coordinates (cslib-community#1682)

Step (D) of the frame-lifted gap plan on cslib-community#1682. Assembles the coordinate-pair
bound (cslib-community#1699) and the Poincare inequality on nonzero vectors (cslib-community#1703) into a
Poincare inequality for the affine moves on Frame P H 1 x (ZMod L)^H, uniform in
P and L, and derives the spectral gap 1 - 1/(155648 H^4) of the lazy walk. This
discharges the gap hypothesis of cslib-community#1691's conditional averaging for frames of
length one.

Adds Matrix.SpecialLinearGroup.map_transvection and transvection_mulVec in
Foundations, reusing Mathlib's SpecialLinearGroup.transvection.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): product walk over channels and free bits with gap gamma/(J+1) (cslib-community#1682)

Poincare inequalities tensorize over finitely many components (piPerms,
iterating the binary box product along Fin.consEquiv). The free-bit torus
(ZMod M)^H satisfies the Poincare inequality via the coordinate-pair bound with
a trivial spectator. Together with the slice-coordinate gap, the lazy product
walk over J channels and the torus has spectral expansion at most
1 - 1/(155648 (J+1) H^4), uniformly in the primes, sides, identifiers and M, and
conditional averaging holds on every product of retention slices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(Probability): fourth-moment conditional averaging and validated words of every length (cslib-community#1682)

Combines the fourth-moment decay of a walk from its spectral gap (cslib-community#1685) with the
uniform slice and component gaps: on a retention slice, and on a product of
retention slices with free bits, 2t steps of the lazy affine walk multiply the
fourth central moment by at most 2 (1 - 1/(155648 (J+1) H^4))^(2t), uniformly in
the moduli and identifiers.

Extends the one-step validated variants to words of every length for the lazy
walk: t steps equal t iterations of the validated step, and for the affine
generators every valid wrap lies in the fixed box {-3, ..., 3}^H.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Samuel Giuseppe Schlesinger <sgschlesinger@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants