Skip to content

Commit 3be455c

Browse files
committed
Added sorries
1 parent 551703e commit 3be455c

2 files changed

Lines changed: 68 additions & 2 deletions

File tree

ArkLib/Data/CodingTheory/JohnsonBound.lean

Lines changed: 65 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,21 @@ import ArkLib.Data.CodingTheory.JohnsonBound.Lemmas
1717

1818
namespace JohnsonBound
1919

20+
/-!
21+
This module is based on the Johnson Bound section from [listdecoding].
22+
In what follows we reference theorems from [listdecoding] by default.
23+
24+
## References
25+
26+
* [Venkatesan Guruswami, *Algorithmic Results in List Decoding*][listdecoding]
27+
-/
28+
2029
variable {n : ℕ}
2130
variable {F : Type} [Fintype F] [DecidableEq F]
2231

32+
/--
33+
The denominator of the bound from theorem 3.1.
34+
-/
2335
def JohnsonDenominator (B : Finset (Fin n → F)) (v : Fin n → F) : ℚ :=
2436
let e := e B v
2537
let d := d B
@@ -33,13 +45,41 @@ lemma johnson_denominator_def {B : Finset (Fin n → F)} {v : Fin n → F} :
3345
simp [JohnsonDenominator]
3446
field_simp
3547

48+
/--
49+
The bound from theorem 3.1 makes sense only if the denominator is positive.
50+
This condition ensures that holds.
51+
-/
3652
def JohnsonConditionStrong (B : Finset (Fin n → F)) (v : Fin n → F) : Prop :=
3753
let e := e B v
3854
let d := d B
3955
let q : ℚ := Fintype.card F
4056
let frac := q / (q - 1)
4157
(1 - frac * d/n) < (1- frac * e/n) ^ 2
4258

59+
/--
60+
The function used for q-ary Johnson Bound.
61+
-/
62+
noncomputable def J (q δ : ℚ) : ℝ :=
63+
let frac := q / (q - 1)
64+
(1 / frac) * (1 - Real.sqrt (1 - frac * δ))
65+
66+
lemma sqrt_le_J {q x : ℚ} :
67+
1 - ((1-x) : ℝ).sqrt ≤ J q x := by sorry
68+
69+
/--
70+
The q-ary Johnson bound.
71+
-/
72+
def JohnsonConditionWeak (B : Finset (Fin n → F)) (e : ℕ) : Prop :=
73+
let d := sInf { d | ∃ u ∈ B, ∃ v ∈ B, u ≠ v ∧ hammingDist u v = d }
74+
let q : ℚ := Fintype.card F
75+
(e : ℚ) / n < J q (d / n)
76+
77+
lemma johnson_condition_weak_implies_strong {B : Finset (Fin n → F)} {v : Fin n → F} {e : ℕ}
78+
(h : JohnsonConditionWeak B e)
79+
:
80+
JohnsonConditionStrong (B ∩ ({ x | Δ₀(x, v) ≤ e } : Finset _)) v := by
81+
sorry
82+
4383
private lemma johnson_condition_strong_implies_n_pos {B : Finset (Fin n → F)} {v : Fin n → F}
4484
(h_johnson : JohnsonConditionStrong B v)
4585
:
@@ -61,7 +101,6 @@ private lemma johnson_condition_strong_implies_2_le_F_card {B : Finset (Fin n
61101
simp at h_johnson
62102
· omega
63103

64-
65104
private lemma johnson_condition_strong_implies_2_le_B_card {B : Finset (Fin n → F)} {v : Fin n → F}
66105
(h_johnson : JohnsonConditionStrong B v)
67106
:
@@ -110,10 +149,16 @@ private lemma johnson_condition_strong_implies_2_le_B_card {B : Finset (Fin n
110149
simp at h
111150
· omega
112151

152+
/--
153+
`JohnsonConditionStrong` is equvalent to `JohnsonDenominator` being positive.
154+
-/
113155
lemma johnson_condition_strong_iff_johnson_denom_pos {B : Finset (Fin n → F)} {v : Fin n → F} :
114156
JohnsonConditionStrong B v ↔ 0 < JohnsonDenominator B v := by
115157
simp [JohnsonDenominator, JohnsonConditionStrong]
116158

159+
/--
160+
Theorem 3.1.
161+
--/
117162
theorem johnson_bound [Field F] {B : Finset (Fin n → F)} {v : Fin n → F}
118163
(h_condition : JohnsonConditionStrong B v)
119164
:
@@ -134,6 +179,24 @@ theorem johnson_bound [Field F] {B : Finset (Fin n → F)} {v : Fin n → F}
134179
(johnson_condition_strong_implies_n_pos h_condition')
135180
(johnson_condition_strong_implies_2_le_B_card h_condition')
136181
(johnson_condition_strong_implies_2_le_F_card h_condition')
137-
182+
183+
/--
184+
Alphabet-free Johnson bound from [codingtheory].
185+
## References
186+
187+
* [Venkatesan Guruswami, Atri Rudra, Madhu Sudan, *Essential Coding Theory*][codingtheory]
188+
-/
189+
theorem johnson_bound_alphabet_free [Field F] [DecidableEq F]
190+
{B : Finset (Fin n → F)}
191+
{v : Fin n → F}
192+
{e : ℕ}
193+
:
194+
let d := sInf { d | ∃ u ∈ B, ∃ v ∈ B, u ≠ v ∧ hammingDist u v = d }
195+
let q : ℚ := Fintype.card F
196+
let frac := q / (q - 1)
197+
e ≤ n - ((n * (n - d)) : ℝ).sqrt
198+
199+
(B ∩ ({ x | Δ₀(x, v) ≤ e } : Finset _)).card ≤ q * d * n := by
200+
sorry
138201

139202
end JohnsonBound

ArkLib/Data/CodingTheory/JohnsonBound/Expectations.lean

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ lemma e_ball_le_radius [Field F] {B : Finset (Fin n → F)} (v : Fin n → F) (r
8484

8585
lemma min_dist_le_d [Field F] {B : Finset (Fin n → F)} (v : Fin n → F)
8686
:
87+
sInf { d | ∃ u ∈ B, ∃ v ∈ B, u ≠ v ∧ hammingDist u v = d } ≤ d B := by
88+
sorry
89+
8790

8891

8992
end JohnsonBound

0 commit comments

Comments
 (0)