MerLean-example

33 Thm 8: Expander Violated Checks

Definition 387 Edge-to-Vertex Expansion Parameter \(\beta '\)
#

The edge-to-vertex expansion parameter \(\beta '\) is defined as

\[ \beta '(s, \lambda _2, \alpha ) \; =\; \frac{\sqrt{\lambda _2^2 + 4s(s - \lambda _2)\alpha } - \lambda _2}{s(s - \lambda _2)\alpha }, \]

which is equal to \(\operatorname {betaParam}(s, \lambda _2, \alpha )\).

Definition 388 Vertex-to-Edge-Boundary Expansion Parameter \(\beta ''\)
#

The vertex-to-edge-boundary expansion parameter \(\beta ''\) is defined as

\[ \beta ''(s, \lambda _2, \alpha , d_L) \; =\; \frac{(d_L - 1 - \lambda _2) - \alpha s(s - \lambda _2)}{d_L - 1}. \]

This arises from applying the relative vertex-to-edge expansion lemma with \(b = d_L - 1\) and \(\alpha ' = \alpha s\), ensuring that all high-expansion vertices have violated local checks.

Definition 389 Differential Weight

Let \(G\) be a simple graph, \(\Lambda \) a labeling of \(G\) of degree \(s\), and \(\operatorname {parityCheck} : \mathbb {F}_2^s \to \mathbb {F}_2^m\) a linear map. The differential weight of a vector \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\) is

\[ \operatorname {differentialWeight}(G, \Lambda , \operatorname {parityCheck}, c) \; =\; \bigl|\{ v \in V \mid \operatorname {parityCheck}(\operatorname {localView}_\Lambda (v, c)) \neq 0\} \bigr|, \]

counting the number of vertices at which the local parity check is violated.

Lemma 390 Violated Check from Small Support Weight

Let \(\operatorname {parityCheck} : \mathbb {F}_2^s \to \mathbb {F}_2^m\) be a linear map, \(d_L\) the minimum distance of \(\operatorname {ClassicalCode.ofParityCheck}(\operatorname {parityCheck})\), with \(d_L {\gt} 0\). If \(x \in \mathbb {F}_2^s\) satisfies \(x \neq 0\) and \(\operatorname {wt}(x) \leq d_L - 1\), then \(\operatorname {parityCheck}(x) \neq 0\).

Proof

Suppose for contradiction that \(\operatorname {parityCheck}(x) = 0\). Then \(x \in \ker (\operatorname {parityCheck})\), which by ClassicalCode.code_eq_ker means \(x\) belongs to the classical code. Since \(x \neq 0\), the definition of minimum distance gives \(d_L \leq \operatorname {wt}(x)\). But \(\operatorname {wt}(x) \leq d_L - 1 {\lt} d_L\), a contradiction. Hence \(\operatorname {parityCheck}(x) \neq 0\).

Definition 391 Support Edges at Vertex

For a graph \(G\), a vector \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\), and a vertex \(v \in V\), the support edges at \(v\) is

\[ \operatorname {supportEdgesAtVertex}(G, c, v) \; =\; \bigl|\{ e \in \operatorname {supportEdges}(G, c) \mid v \in e\} \bigr|. \]
Lemma 392 Support Edges Have Both Endpoints in \(S\)

If \(e \in \operatorname {supportEdges}(G, c)\) and \(w \in e\), then \(w \in \operatorname {incidentToSupport}(G, c)\).

Proof

Let \(e \in \operatorname {supportEdges}(G, c)\) and \(w \in e\). Unfolding definitions, \(e\) is the image of some edge \(e'\) in the support of \(c\) (i.e. \(c(e') \neq 0\)) with \(e = e'.val\). Since \(w \in e = e'.val\), we have \(w \in \operatorname {incidentToSupport}(G, c)\) by definition, as witnessed by the edge \(e'\) with \(c(e') \neq 0\) and \(w \in e'\).

Lemma 393 Support Edges Are Disjoint from the Edge Boundary

If \(e \in \operatorname {supportEdges}(G, c)\), then \(e \notin \partial _E(\operatorname {incidentToSupport}(G, c))\).

Proof

Suppose \(e \in \partial _E(S)\) where \(S = \operatorname {incidentToSupport}(G, c)\). By membership in the edge boundary, there exist \(a, b\) with \(e = \{ a, b\} \), \(a \in S\), and \(b \notin S\). But since \(e \in \operatorname {supportEdges}(G, c)\) and \(b \in e\), by Lemma 392 we have \(b \in S\), a contradiction.

Lemma 394 Within-\(S\) Edges Plus Boundary Edges Bounded by Degree

Let \(G\) be an \(s\)-regular graph, \(S \subseteq V\), and \(v \in S\). Then

\[ |(\partial _E S)_v| + |\{ e \in G.\operatorname {edgeFinset} \mid v \in e,\; \forall w \in e,\, w \in S\} | \; \leq \; s, \]

where \((\partial _E S)_v\) denotes the edges in the boundary of \(S\) incident to \(v\).

Proof

Both the set of boundary edges at \(v\) and the set of within-\(S\) edges at \(v\) are subsets of the incidence finset \(\operatorname {incidenceFinset}(v)\), which has cardinality \(\deg (v) = s\). Moreover, these two sets are disjoint: if \(e\) is in the edge boundary, then \(e\) has one endpoint outside \(S\), so it cannot have all endpoints in \(S\). By disjointness and the union bound:

\[ |\partial _E(S)_v| + |\text{within-}S\text{ edges at }v| = |\partial _E(S)_v \cup \text{within-}S| \leq |\operatorname {incidenceFinset}(v)| = s. \qedhere \]
Lemma 395 Local View Weight Bounded by Within-\(S\) Edges

Let \(G\) be a graph with labeling \(\Lambda \) of degree \(s\), \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\), and \(S \subseteq V\) such that every edge \(e\) with \(c(e) \neq 0\) has both endpoints in \(S\). Then for every \(v \in V\),

\[ \operatorname {wt}(\operatorname {localView}_\Lambda (v, c)) \; \leq \; |\{ e \in G.\operatorname {edgeFinset} \mid v \in e,\; \forall w \in e,\, w \in S\} |. \]
Proof

Let \(v \in V\). The Hamming weight \(\operatorname {wt}(\operatorname {localView}_\Lambda (v, c))\) equals \(|\{ i \in \operatorname {Fin}(s) \mid \operatorname {localView}_\Lambda (v, c)(i) \neq 0\} |\). Define a map \(\operatorname {mapEdge} : \operatorname {Fin}(s) \to \operatorname {Sym2}(V)\) by \(i \mapsto \{ v, (\Lambda (v))^{-1}(i)\} \).

We show this map sends the support indices into the within-\(S\) edges: if \(\operatorname {localView}_\Lambda (v, c)(i) \neq 0\), then \(c(\{ v, (\Lambda (v))^{-1}(i)\} ) \neq 0\), so both endpoints lie in \(S\) by hypothesis.

We then show \(\operatorname {mapEdge}\) is injective on the support indices: if \(\{ v, w_1\} = \{ v, w_2\} \) as elements of \(\operatorname {Sym2}(V)\) with \(v \neq w_1\), then \(w_1 = w_2\), hence the preimages under \(\Lambda (v)\) coincide.

By injectivity and inclusion, \(|\text{support indices}| = |\operatorname {image}| \leq |\text{within-}S\text{ edges at }v|\).

Lemma 396 Local View Weight Plus Boundary Bounded by Degree

Under the same hypotheses, for \(v \in S\),

\[ \operatorname {wt}(\operatorname {localView}_\Lambda (v, c)) + |(\partial _E S)_v| \; \leq \; s. \]
Proof

Combine Lemma 395 (bounding the local view weight by within-\(S\) edge count) and Lemma 394 (bounding the sum of within-\(S\) and boundary counts by \(s\)). The result follows by integer arithmetic.

Lemma 397 Support Edges Cardinality Equals Edge Hamming Weight

For any \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\),

\[ |\operatorname {supportEdges}(G, c)| \; =\; \operatorname {edgeHammingWeight}(G, c). \]
Proof

Unfolding definitions, \(\operatorname {supportEdges}(G, c)\) is the image of the support of \(c\) under the injective map \(\operatorname {Subtype.val}\). The cardinality of the image under an injective map equals the cardinality of the domain, which is \(\operatorname {edgeHammingWeight}(G, c)\).

Lemma 398 Incident-to-Support Equals Incident Vertices of Support Edges

For any \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\),

\[ \operatorname {incidentToSupport}(G, c) \; =\; \operatorname {incidentVertices}(\operatorname {supportEdges}(G, c)). \]
Proof

By extensionality: a vertex \(v\) belongs to \(\operatorname {incidentToSupport}(G, c)\) if and only if there exists an edge \(e\) in the support of \(c\) with \(v \in e\), which holds if and only if there exists \(e \in \operatorname {supportEdges}(G, c)\) with \(v \in e\), i.e. \(v \in \operatorname {incidentVertices}(\operatorname {supportEdges}(G, c))\). Both directions follow by unfolding definitions and matching witnesses.

Lemma 399 Handshaking Lemma for Regular Graphs

If \(G\) is \(s\)-regular, then \(2|G.\operatorname {edgeFinset}| = s \cdot |V|\).

Proof

Apply the standard handshaking identity \(\sum _{v \in V} \deg (v) = 2|E|\). Since \(G\) is \(s\)-regular, \(\deg (v) = s\) for all \(v\), so \(\sum _{v \in V} s = s \cdot |V| = 2|E|\).

Lemma 400 Incident-to-Support Cardinality at Most Twice Edge Weight

For any \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\),

\[ |\operatorname {incidentToSupport}(G, c)| \; \leq \; 2 \cdot \operatorname {edgeHammingWeight}(G, c). \]
Proof

Let \(E = \operatorname {supportEdges}(G, c)\). By Lemma 398, \(|\operatorname {incidentToSupport}| = |\operatorname {incidentVertices}(E)|\). Since each edge \(e \in E\) contributes at most 2 vertices (as \(|\{ v \mid v \in e\} | \leq 2\) for any \(e \in \operatorname {Sym2}(V)\)), we have:

\[ |\operatorname {incidentVertices}(E)| \leq \sum _{e \in E} |\{ v \mid v \in e\} | \leq \sum _{e \in E} 2 = 2|E| = 2\, \operatorname {edgeHammingWeight}(G, c), \]

where the last equality uses Lemma 397.

Let \(G\) be \(s\)-regular, \(\alpha {\gt} 0\), and suppose \(\operatorname {edgeHammingWeight}(G, x) \leq \alpha |G.\operatorname {edgeFinset}|\). Then

\[ |\operatorname {incidentToSupport}(G, x)| \; \leq \; \alpha s |V|. \]
Proof

By Lemma 400, \(|S| \leq 2\, \operatorname {edgeHammingWeight}(G, x) \leq 2\alpha |G.\operatorname {edgeFinset}|\). By the handshaking lemma (Lemma 399), \(2|G.\operatorname {edgeFinset}| = s|V|\). Therefore:

\[ |S| \leq 2\alpha |G.\operatorname {edgeFinset}| = \alpha \cdot 2|G.\operatorname {edgeFinset}| = \alpha \cdot s|V| = \alpha s |V|. \qedhere \]
Lemma 402 Local View Nonzero for Vertices Incident to Support

If \(v \in \operatorname {incidentToSupport}(G, c)\), then \(\operatorname {localView}_\Lambda (v, c) \neq 0\).

Proof

Since \(v \in \operatorname {incidentToSupport}(G, c)\), there exists an edge \(e\) in the support of \(c\) (i.e. \(c(e) \neq 0\)) with \(v \in e\). Write \(e = \{ v, w\} \) for some neighbor \(w\) of \(v\). Let \(i = \Lambda (v)(w, \cdot )\) be the label assigned to \(w\). Then by definition of \(\operatorname {localView}\), \(\operatorname {localView}_\Lambda (v, c)(i) = c(e) \neq 0\). Hence \(\operatorname {localView}_\Lambda (v, c) \neq 0\).

Let \(G\) be \(s\)-regular, \(\Lambda \) a labeling, \(\operatorname {parityCheck}\) a linear map with local code distance \(d_L {\gt} 0\), and \(c : G.\operatorname {edgeSet} \to \mathbb {F}_2\). Setting \(S = \operatorname {incidentToSupport}(G, c)\) and \(A = \operatorname {highExpansionVertices}(G, S, s, d_L - 1)\), we have

\[ |A| \; \leq \; \operatorname {differentialWeight}(G, \Lambda , \operatorname {parityCheck}, c). \]
Proof

It suffices to show \(A \subseteq \{ v \in V \mid \operatorname {parityCheck}(\operatorname {localView}_\Lambda (v, c)) \neq 0\} \). Let \(v \in A\).

By Lemma 358, \(v \in S\). By the definition of high-expansion vertices, \(|(\partial _E S)_v| \geq s - (d_L - 1)\).

Since every edge \(e\) with \(c(e) \neq 0\) has both endpoints in \(S\) (by definition of \(S = \operatorname {incidentToSupport}\)), Lemma 396 gives \(\operatorname {wt}(\operatorname {localView}_\Lambda (v, c)) + |(\partial _E S)_v| \leq s\).

Therefore \(\operatorname {wt}(\operatorname {localView}_\Lambda (v, c)) \leq s - |(\partial _E S)_v| \leq d_L - 1\).

Since \(v \in S = \operatorname {incidentToSupport}(G, c)\), Lemma 402 gives \(\operatorname {localView}_\Lambda (v, c) \neq 0\).

Applying Lemma 390 with \(x = \operatorname {localView}_\Lambda (v, c)\), \(\operatorname {wt}(x) \leq d_L - 1\), and \(x \neq 0\), we conclude \(\operatorname {parityCheck}(x) \neq 0\).

Lemma 404 \(\beta '\) Is Positive

If \(s \geq 1\), \(\lambda _2 {\lt} s\), and \(\alpha {\gt} 0\), then \(\beta '(s, \lambda _2, \alpha ) {\gt} 0\).

Proof

Unfolding \(\beta ' = \operatorname {betaParam}\), we have

\[ \beta '(s, \lambda _2, \alpha ) = \frac{\sqrt{\lambda _2^2 + 4s(s-\lambda _2)\alpha } - \lambda _2}{s(s-\lambda _2)\alpha }. \]

The denominator satisfies \(s(s - \lambda _2)\alpha {\gt} 0\) since \(s \geq 1\), \(s - \lambda _2 {\gt} 0\), and \(\alpha {\gt} 0\).

For the numerator \(\sqrt{\lambda _2^2 + 4s(s-\lambda _2)\alpha } - \lambda _2 {\gt} 0\), we consider two cases:

  • If \(\lambda _2 \geq 0\): since \(4s(s-\lambda _2)\alpha {\gt} 0\), we have \(\lambda _2^2 + 4s(s-\lambda _2)\alpha {\gt} \lambda _2^2\), so \(\sqrt{\lambda _2^2 + 4s(s-\lambda _2)\alpha } {\gt} \sqrt{\lambda _2^2} = \lambda _2\) (using \(\lambda _2 \geq 0\)). Thus the numerator is positive.

  • If \(\lambda _2 {\lt} 0\): then \(\sqrt{\lambda _2^2 + 4s(s-\lambda _2)\alpha } \geq 0 {\gt} \lambda _2\), so the numerator is positive.

In both cases \(\beta ' {\gt} 0\).

Let \(G\) be a connected \(s\)-regular graph on \(|V| \geq 2\) vertices with second-largest eigenvalue \(\lambda _2 {\lt} s\). Let \(\operatorname {parityCheck} : \mathbb {F}_2^s \to \mathbb {F}_2^m\) be a linear map, \(\Lambda \) a labeling of \(G\), and \(d_L\) the minimum distance of the local code, with \(0 {\lt} d_L \leq s\). For \(\alpha \in (0, 1]\) and \(x : G.\operatorname {edgeSet} \to \mathbb {F}_2\) satisfying

\[ \operatorname {edgeHammingWeight}(G, x) \; \leq \; \alpha \cdot |G.\operatorname {edgeFinset}|, \]

we have

\[ \operatorname {differentialWeight}(G, \Lambda , \operatorname {parityCheck}, x) \; \geq \; \beta '(s, \lambda _2, \alpha ) \cdot \beta ''(s, \lambda _2, \alpha , d_L) \cdot \operatorname {edgeHammingWeight}(G, x), \]

where

\[ \beta '(s, \lambda _2, \alpha ) = \frac{\sqrt{\lambda _2^2 + 4s(s-\lambda _2)\alpha } - \lambda _2}{s(s-\lambda _2)\alpha }, \quad \beta ''(s, \lambda _2, \alpha , d_L) = \frac{(d_L - 1 - \lambda _2) - \alpha s(s - \lambda _2)}{d_L - 1}. \]
Proof

Trivial case. If \(\beta '(s, \lambda _2, \alpha ) \cdot \beta ''(s, \lambda _2, \alpha , d_L) \leq 0\), then the right-hand side is at most \(0 \leq \operatorname {differentialWeight}(\ldots )\), and the bound holds.

Main case: \(\beta ' \cdot \beta '' {\gt} 0\).

By Lemma 404, \(\beta ' {\gt} 0\) holds whenever \(s \geq 1\), \(\lambda _2 {\lt} s\), \(\alpha {\gt} 0\). Since \(\beta ' \cdot \beta '' {\gt} 0\) and \(\beta ' {\gt} 0\), we also have \(\beta '' {\gt} 0\).

From \(\beta '' {\gt} 0\), we deduce \(d_L \geq 2\) as follows: if \(d_L = 1\), then \(\beta '' = ({-\lambda _2 - \alpha s(s-\lambda _2)})/0 = 0\) in Lean’s division, contradicting \(\beta '' {\gt} 0\).

From \(\beta '' {\gt} 0\), we also deduce \(\alpha s {\lt} 1\): since \(d_L \geq 2\), the denominator \(d_L - 1 {\gt} 0\), so the numerator \((d_L - 1 - \lambda _2) - \alpha s(s - \lambda _2) {\gt} 0\). If \(\alpha s \geq 1\), then \(\alpha s(s - \lambda _2) \geq s - \lambda _2 \geq d_L - \lambda _2 {\gt} d_L - 1 - \lambda _2\) (using \(d_L \leq s\)), contradicting positivity of the numerator. Hence \(\alpha s {\lt} 1\).

Edge case: \(x = 0\). If \(\operatorname {edgeHammingWeight}(G, x) = 0\), the right-hand side is \(0\) and the bound holds trivially.

Main inequality chain. Assume \(\operatorname {edgeHammingWeight}(G, x) {\gt} 0\). Set \(S = \operatorname {incidentToSupport}(G, x)\), \(E = \operatorname {supportEdges}(G, x)\), \(A = \operatorname {highExpansionVertices}(G, S, s, d_L - 1)\).

Step 1: \(|A| \leq \operatorname {differentialWeight}(\ldots )\). By Lemma 403.

Step 2: \(\beta ' \cdot \operatorname {edgeHammingWeight}(G, x) \leq |S|\). Since \(E \subseteq G.\operatorname {edgeFinset}\) (by Lemma 378) and \(|E| = \operatorname {edgeHammingWeight}(G, x)\) (by Lemma 397) with \(|E| \leq \alpha |G.\operatorname {edgeFinset}|\), we may apply the edge-to-vertex expansion theorem (Theorem 355):

\[ |\operatorname {incidentVertices}(E)| \; \geq \; \operatorname {betaParam}(s, \lambda _2, \alpha ) \cdot |E|. \]

Since \(S = \operatorname {incidentVertices}(E)\) (Lemma 398) and \(\beta ' = \operatorname {betaParam}\), this yields \(|S| \geq \beta ' \cdot \operatorname {edgeHammingWeight}(G, x)\).

Step 3: \(\beta '' \cdot |S| \leq |A|\). Since \(|S| \leq \alpha s |V|\) (Lemma 401) and \(\alpha s {\lt} 1\), \(d_L - 1 \in (0, s]\), we apply the relative vertex-to-edge expansion theorem (Theorem 364) with parameters \(\alpha ' = \alpha s\) and \(b = d_L - 1\):

\[ \frac{(d_L - 1 - \lambda _2) - \alpha s(s - \lambda _2)}{d_L - 1} \cdot |S| \; \leq \; |A|, \]

which is exactly \(\beta '' \cdot |S| \leq |A|\).

Combining. The chain

\[ \beta ' \cdot \beta '' \cdot \operatorname {edgeHammingWeight}(G, x) \; \leq \; \beta '' \cdot |S| \; \leq \; |A| \; \leq \; \operatorname {differentialWeight}(G, \Lambda , \operatorname {parityCheck}, x) \]

follows from Steps 2, 3, and 1 respectively (using \(\beta '' {\gt} 0\) in Step 2, and applying linear arithmetic to combine the bounds).

[Paper Corrections] redErrata. The following errors were identified in the original paper and corrected in this formalization:

  • Paper states \(|S| \leq 2\alpha |X_1| = (4\alpha /s)|X_0|\), but the correct derivation using the handshaking lemma \(2|X_1| = s|X_0|\) gives \(2\alpha |X_1| = \alpha s|X_0|\), so \(\alpha '\) should be \(\alpha s\), not \(4\alpha /s\).

  • Paper uses \(b = d_L\) in Lemma 3 (defining \(A = \{ v \in S \mid |(\delta S)_v| \geq s - d_L\} \)), but the violated-check argument requires the local view weight to be strictly less than \(d_L\) (i.e., \(\leq d_L - 1\)). This needs \(b = d_L - 1\) (giving \(A = \{ v \mid |(\delta S)_v| \geq s - d_L + 1\} \)), so that within-\(S\) edges \(\leq d_L - 1 {\lt} d_L\) guarantees the nonzero local view is not a codeword.

  • Consequently, \(\beta ''\) should be \(((d_L - 1 - \lambda _2) - \alpha s(s - \lambda _2))/(d_L - 1)\), not \(((d_L - \lambda _2) - (4\alpha /s)(s - \lambda _2))/d_L\) as stated in the paper. The formalization’s formula is correct.