Skip to content

Commit 5927ffb

Browse files
committed
feat(Verified-zkEVM#140): lift faithful GS cover to MCA bound
1 parent 7978ed9 commit 5927ffb

1 file changed

Lines changed: 58 additions & 1 deletion

File tree

ArkLib/Data/CodingTheory/ProximityGap/LineDecodingT421Faithful.lean

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ as the explicit, non-circular hypothesis `hcover`/`hfail`, with the extraction i
5151
- [GG25] Goyal-Guruswami; [BCIKS20] Ben-Sasson et al. (the curve list-agreement bound).
5252
-/
5353

54+
set_option linter.unusedDecidableInType false
5455
set_option linter.unusedSectionVars false
5556

5657
open Finset
@@ -96,7 +97,7 @@ theorem mcaBadCount_lt_of_gs_curve_cover
9697
mcaBadCount (F := F) C δ u₀ u₁ < M * Fintype.card ι + 1 := by
9798
classical
9899
by_contra hge
99-
push_neg at hge
100+
push Not at hge
100101
-- `S'` is exactly the bad-scalar set; `mcaBadCount = S'.card`.
101102
set S' : Finset F := univ.filter (fun γ : F => mcaEvent C δ u₀ u₁ γ) with hS'
102103
have hcard : mcaBadCount (F := F) C δ u₀ u₁ = S'.card := rfl
@@ -123,8 +124,64 @@ theorem mcaBadCount_lt_of_gs_curve_cover
123124
h1 h2 hagree
124125
exact absurd hcorr (not_le.mpr hfail)
125126

127+
/-- Uniform `ε_mca` wrapper for the faithful T4.21 repair.
128+
129+
If every received affine-line stack admits genuine GS curve-cover data, the per-stack bound from
130+
`mcaBadCount_lt_of_gs_curve_cover` lifts through the exact bad-count formula to
131+
`ε_mca C δ ≤ (M * |ι| + 1) / |F|`. This is only a packaging step: the open interpolation content
132+
remains precisely the supplied `hcover`. -/
133+
theorem epsMCA_le_of_forall_gs_curve_cover
134+
(C : Set (ι → F)) (δ : ℝ≥0)
135+
(μ : ι → Set.Icc (0 : ℚ) 1) (M : ℕ) (hM : 0 < M)
136+
(hμ : ∀ i, ∃ n : ℤ, (μ i).1 = (n : ℚ) / (M : ℚ))
137+
(α : ℝ≥0)
138+
(hcover : ∀ u : Code.WordStack F (Fin 2) ι, ∃ v : Fin 2 → ι → F,
139+
(∀ γ : F, mcaEvent C δ (u 0) (u 1) γ →
140+
(α : ℝ) ≤ agree μ
141+
(fun x => Curve.polynomialCurveEval (F := F) (A := F) ![u 0, u 1] γ x)
142+
(fun x => Curve.polynomialCurveEval (F := F) (A := F) v γ x)) ∧
143+
mu_set μ { x : ι | ∀ i, (![u 0, u 1] : Fin 2 → ι → F) i x = v i x } <
144+
(α : ℝ)) :
145+
epsMCA (F := F) (A := F) C δ ≤
146+
((M * Fintype.card ι + 1 : ℕ) : ENNReal) / (Fintype.card F : ENNReal) := by
147+
classical
148+
rw [epsMCA_eq_iSup_mcaBadCount]
149+
refine ENNReal.div_le_div_right ?_ _
150+
refine iSup_le fun u => ?_
151+
rcases hcover u with ⟨v, hcov, hfail⟩
152+
have hlt :
153+
mcaBadCount (F := F) C δ (u 0) (u 1) < M * Fintype.card ι + 1 :=
154+
mcaBadCount_lt_of_gs_curve_cover C δ (u 0) (u 1) μ M hM hμ α v hcov hfail
155+
exact_mod_cast Nat.le_of_lt hlt
156+
157+
/-- Package the faithful uniform GS cover as an `MCALowerWitness` once the usual budget comparison
158+
against the target threshold is available. -/
159+
noncomputable def GrandChallenges.MCALowerWitness.of_forall_gs_curve_cover
160+
(C : Set (ι → F)) {δ ε_star : ℝ≥0}
161+
(μ : ι → Set.Icc (0 : ℚ) 1) (M : ℕ) (hM : 0 < M)
162+
(hμ : ∀ i, ∃ n : ℤ, (μ i).1 = (n : ℚ) / (M : ℚ))
163+
(α : ℝ≥0)
164+
(hδ : δ ≤ 1)
165+
(hcover : ∀ u : Code.WordStack F (Fin 2) ι, ∃ v : Fin 2 → ι → F,
166+
(∀ γ : F, mcaEvent C δ (u 0) (u 1) γ →
167+
(α : ℝ) ≤ agree μ
168+
(fun x => Curve.polynomialCurveEval (F := F) (A := F) ![u 0, u 1] γ x)
169+
(fun x => Curve.polynomialCurveEval (F := F) (A := F) v γ x)) ∧
170+
mu_set μ { x : ι | ∀ i, (![u 0, u 1] : Fin 2 → ι → F) i x = v i x } <
171+
(α : ℝ))
172+
(hbudget :
173+
((M * Fintype.card ι + 1 : ℕ) : ENNReal) / (Fintype.card F : ENNReal) ≤
174+
(ε_star : ENNReal)) :
175+
GrandChallenges.MCALowerWitness (F := F) C ε_star :=
176+
GrandChallenges.MCALowerWitness.ofLe hδ
177+
(le_trans
178+
(epsMCA_le_of_forall_gs_curve_cover C δ μ M hM hμ α hcover)
179+
hbudget)
180+
126181
end ProximityGap
127182

128183
/-! ### `#print axioms` verification anchor -/
129184

130185
#print axioms ProximityGap.mcaBadCount_lt_of_gs_curve_cover
186+
#print axioms ProximityGap.epsMCA_le_of_forall_gs_curve_cover
187+
#print axioms ProximityGap.GrandChallenges.MCALowerWitness.of_forall_gs_curve_cover

0 commit comments

Comments
 (0)