Skip to content

Commit b0ff51e

Browse files
ArkLib Agentclaude
andcommitted
@
feat(Verified-zkEVM#141,Verified-zkEVM#171): closed form epsMCA = (sup bad-scalar count)/|F| + positive characterization - epsMCA_eq_iSup_badCount_div: exact closed form — epsMCA equals the supremum over word stacks of the bad-scalar count, divided by |F| (via ENNReal.iSup_div pulling the constant denominator out). - epsMCA_pos_iff: 0 < epsMCA iff some stack admits a bad scalar (complements epsMCA_eq_zero_iff). Both sorry-free, axiom-clean [propext, Classical.choice, Quot.sound]. Verified after the toolchain rebuild settled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> @
1 parent ef98995 commit b0ff51e

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

ArkLib/Data/CodingTheory/ProximityGap/MCALowerBound.lean

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,35 @@ theorem epsMCA_eq_zero_iff (C : Set (ι → A)) (δ : ℝ≥0) :
132132
rw [prob_uniform_eq_card_filter_div_card, Finset.filter_false_of_mem (fun γ _ => h u γ)]
133133
simp
134134

135+
open Classical in
136+
/-- **Closed form for the MCA error.** `epsMCA` equals the supremum over word stacks of the
137+
bad-scalar count, divided by `|F|`. -/
138+
theorem epsMCA_eq_iSup_badCount_div (C : Set (ι → A)) (δ : ℝ≥0) :
139+
epsMCA (F := F) (A := A) C δ =
140+
(⨆ u : WordStack A (Fin 2) ι,
141+
((Finset.filter (fun γ : F => mcaEvent C δ (u 0) (u 1) γ) Finset.univ).card : ℝ≥0∞))
142+
/ (Fintype.card F : ℝ≥0∞) := by
143+
unfold epsMCA
144+
have h : ∀ u : WordStack A (Fin 2) ι,
145+
Pr_{let γ ← $ᵖ F}[mcaEvent C δ (u 0) (u 1) γ]
146+
= ((Finset.filter (fun γ : F => mcaEvent C δ (u 0) (u 1) γ) Finset.univ).card : ℝ≥0∞)
147+
/ (Fintype.card F : ℝ≥0∞) := by
148+
intro u
149+
rw [prob_uniform_eq_card_filter_div_card]
150+
simp only [ENNReal.coe_natCast]
151+
simp_rw [h]
152+
rw [← ENNReal.iSup_div]
153+
154+
open Classical in
155+
/-- **Positive MCA error characterization.** `0 < epsMCA C δ` iff some word stack admits a bad
156+
scalar. Complements `epsMCA_eq_zero_iff`. -/
157+
theorem epsMCA_pos_iff (C : Set (ι → A)) (δ : ℝ≥0) :
158+
0 < epsMCA (F := F) (A := A) C δ ↔
159+
∃ (u : WordStack A (Fin 2) ι) (γ : F), mcaEvent C δ (u 0) (u 1) γ := by
160+
rw [pos_iff_ne_zero, Ne, epsMCA_eq_zero_iff]
161+
push_neg
162+
tauto
163+
135164
end ProximityGap
136165

137166
namespace ProximityGap.MCALowerExample

0 commit comments

Comments
 (0)