Skip to content

Commit 373e81e

Browse files
committed
feat(Verified-zkEVM#140): expose zero-code MCA guardrail
1 parent 8d561f4 commit 373e81e

2 files changed

Lines changed: 78 additions & 0 deletions

File tree

ArkLib.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,7 @@ import ArkLib.Data.CodingTheory.ProximityGap.MCAMiddleBand
331331
import ArkLib.Data.CodingTheory.ProximityGap.MCAPlateauWindow
332332
import ArkLib.Data.CodingTheory.ProximityGap.MCASecondMoment
333333
import ArkLib.Data.CodingTheory.ProximityGap.MCAZeroCodeExact
334+
import ArkLib.Data.CodingTheory.ProximityGap.MCAZeroCodeGuardrail
334335
import ArkLib.Data.CodingTheory.ProximityGap.MuTwoPowDerandRIMRank
335336
import ArkLib.Data.CodingTheory.ProximityGap.MuTwoPowDerandRefutation
336337
import ArkLib.Data.CodingTheory.ProximityGap.MultiplicativeRigidityFiber
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
/-
2+
Copyright (c) 2026 ArkLib Contributors. All rights reserved.
3+
Released under Apache 2.0 license as described in the file LICENSE.
4+
Authors: ArkLib Contributors
5+
-/
6+
import ArkLib.Data.CodingTheory.ProximityGap.MCAZeroCodeExact
7+
import ArkLib.Data.CodingTheory.ProximityGap.GrandChallenges
8+
9+
/-!
10+
# Grand Challenge guardrails from the exact zero-code MCA value
11+
12+
`MCAZeroCodeExact.lean` proves that the zero code over a finite field has
13+
`ε_mca(⊥, 0) = 1 / |F|`. This file exposes the consumer-facing consequence for the Grand
14+
Challenge witness API: whenever the target threshold is below `1 / |F|`, the zero code gives an
15+
upper witness at radius `0`.
16+
17+
This is a guardrail for the refuted black-box line-decoding statement: it packages the exact
18+
zero-code value as a one-sided obstruction, without asserting any Guruswami--Sudan extraction or
19+
repairing ABF26 Theorem 4.21.
20+
-/
21+
22+
namespace ProximityGap.MCAZeroCode
23+
24+
open scoped NNReal ENNReal
25+
26+
set_option linter.unusedDecidableInType false
27+
set_option linter.unusedFintypeInType false
28+
29+
section General
30+
31+
variable {ι : Type} [Fintype ι] [Nonempty ι] [DecidableEq ι]
32+
variable {F : Type} [Field F] [Fintype F] [DecidableEq F]
33+
34+
/-- **Zero-code upper witness from the exact value.** If the target `ε_star` is below `1 / |F|`,
35+
then the zero code has already exceeded the target at radius `0`. -/
36+
def MCAUpperWitness_bot_of_lt_inv_card (ε_star : ℝ≥0)
37+
(hε : (ε_star : ENNReal) < (1 : ENNReal) / (Fintype.card F : ENNReal)) :
38+
GrandChallenges.MCAUpperWitness (F := F)
39+
(Cbot (ι := ι) (F := F) : Set (ι → F)) ε_star :=
40+
GrandChallenges.MCAUpperWitness.ofGt
41+
(C := (Cbot (ι := ι) (F := F) : Set (ι → F))) (δ := (0 : ℝ≥0)) <| by
42+
rw [epsMCA_bot_eq_inv_card]
43+
exact hε
44+
45+
/-- Existential form of `MCAUpperWitness_bot_of_lt_inv_card`, preserving the certified radius. -/
46+
theorem exists_MCAUpperWitness_bot_of_lt_inv_card (ε_star : ℝ≥0)
47+
(hε : (ε_star : ENNReal) < (1 : ENNReal) / (Fintype.card F : ENNReal)) :
48+
∃ w : GrandChallenges.MCAUpperWitness (F := F)
49+
(Cbot (ι := ι) (F := F) : Set (ι → F)) ε_star,
50+
w.δ = 0 :=
51+
⟨MCAUpperWitness_bot_of_lt_inv_card (ι := ι) (F := F) ε_star hε, rfl⟩
52+
53+
/-- `epsStar` specialization of the zero-code upper witness. -/
54+
noncomputable def MCAUpperWitness_bot_epsStar_of_lt_inv_card
55+
(hε : (epsStar : ENNReal) < (1 : ENNReal) / (Fintype.card F : ENNReal)) :
56+
GrandChallenges.MCAUpperWitness (F := F)
57+
(Cbot (ι := ι) (F := F) : Set (ι → F)) epsStar :=
58+
MCAUpperWitness_bot_of_lt_inv_card (ι := ι) (F := F) epsStar hε
59+
60+
/-- Existential `epsStar` specialization, preserving the certified radius `0`. -/
61+
theorem exists_MCAUpperWitness_bot_epsStar_of_lt_inv_card
62+
(hε : (epsStar : ENNReal) < (1 : ENNReal) / (Fintype.card F : ENNReal)) :
63+
∃ w : GrandChallenges.MCAUpperWitness (F := F)
64+
(Cbot (ι := ι) (F := F) : Set (ι → F)) epsStar,
65+
w.δ = 0 :=
66+
⟨MCAUpperWitness_bot_epsStar_of_lt_inv_card (ι := ι) (F := F) hε, rfl⟩
67+
68+
end General
69+
70+
/-! ## Source audit -/
71+
72+
#print axioms MCAUpperWitness_bot_of_lt_inv_card
73+
#print axioms exists_MCAUpperWitness_bot_of_lt_inv_card
74+
#print axioms MCAUpperWitness_bot_epsStar_of_lt_inv_card
75+
#print axioms exists_MCAUpperWitness_bot_epsStar_of_lt_inv_card
76+
77+
end ProximityGap.MCAZeroCode

0 commit comments

Comments
 (0)