All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Johnson worst case bound

JohnsonBound.johnson_worst_case_bound

Plain-language statement

Monotonicity of the worst-case Johnson quotient.

Exact Lean statement

lemma johnson_worst_case_bound {n : ℕ} {F : Type*} [DecidableEq F]
    {B : Finset (Fin n → F)} {v : Fin n → F} {d e : ℕ} {frac : ℚ}
    (hn_pos : (0 : ℚ) < n) (hd_pos : 0 < d) (d_le_n : d ≤ n)
    (h : (e : ℝ) ≤ n - ((n * (n - d)) : ℝ).sqrt)
    (h_d_close_n : frac * (d / n : ℚ) ≤ 1)
    (hfrac_gt1 : (1 : ℚ) < frac)
    (e_ineq : JohnsonBound.e B v ≤ e)
    (d_ineq : (d : ℚ) ≤ JohnsonBound.d B)
    (quad_nonneg : (0 : ℚ) ≤ (d / n : ℚ) - 2 * (e / n : ℚ) + (e / n : ℚ) ^ 2)
    (hden1_pos :
      (0 : ℚ) < JohnsonBound.d B / n - 2 * JohnsonBound.e B v / n +
        frac * (JohnsonBound.e B v / n) ^ 2) :
    (JohnsonBound.d B / n) /
      (JohnsonBound.d B / n - 2 * JohnsonBound.e B v / n +
      frac * (JohnsonBound.e B v / n) ^ 2) ≤
    (d / n) / (d / n - 2 * e / n + frac * (e / n) ^ 2)

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma johnson_worst_case_bound {n : } {F : Type*} [DecidableEq F]    {B : Finset (Fin n  F)} {v : Fin n  F} {d e : } {frac : }    (hn_pos : (0 : ) < n) (hd_pos : 0 < d) (d_le_n : d  n)    (h : (e : )  n - ((n * (n - d)) : ).sqrt)    (h_d_close_n : frac * (d / n : )  1)    (hfrac_gt1 : (1 : ) < frac)    (e_ineq : JohnsonBound.e B v  e)    (d_ineq : (d : )  JohnsonBound.d B)    (quad_nonneg : (0 : )  (d / n : ) - 2 * (e / n : ) + (e / n : ) ^ 2)    (hden1_pos :      (0 : ) < JohnsonBound.d B / n - 2 * JohnsonBound.e B v / n +        frac * (JohnsonBound.e B v / n) ^ 2) :    (JohnsonBound.d B / n) /      (JohnsonBound.d B / n - 2 * JohnsonBound.e B v / n +      frac * (JohnsonBound.e B v / n) ^ 2)     (d / n) / (d / n - 2 * e / n + frac * (e / n) ^ 2) := by  have h_frac_ineq : (JohnsonBound.d B / n : ) * (d / n - 2 * (e / n) +      frac * (e / n) ^ 2)  (d / n) * (JohnsonBound.d B / n - 2 *        (JohnsonBound.e B v / n) + frac * (JohnsonBound.e B v / n) ^ 2) := by    have h_frac_ineq :        (JohnsonBound.d B / n - d / n) * (2 * (e / n) - frac * (e / n) ^ 2)  0         (e / n - JohnsonBound.e B v / n) *          (2 - frac * (e / n + JohnsonBound.e B v / n))  0 := by      refine mul_nonneg ?_ ?_, mul_nonneg ?_ ?_      · exact sub_nonneg_of_le (by gcongr)      · have h_frac_le_one : frac * (e / n : )  1 := by          have h_e_le_d : (e / n : )  (d / n : ) := by            have h_e_le_d : (e : )  n - √(n * (n - d)) := by grind            have h_e_le_d : (e : )  d := by              exact_mod_cast (by nlinarith [                show (d : )  n by norm_cast, sqrt_nonneg (n * (n - d)), mul_self_sqrt (                  show 0  (n : ) * (n - d) by                  nlinarith [show (d : )  n by norm_cast])] : (e : )  d)            gcongr          exact le_trans (mul_le_mul_of_nonneg_left h_e_le_d (by positivity)) h_d_close_n        nlinarith [show 0  (e : ) / n by positivity]      · exact sub_nonneg_of_le (by gcongr)      · have h_frac_e_n_le_1 : frac * (e / n : )  1 := by          refine le_trans (mul_le_mul_of_nonneg_left (show (e : ) / n  d / n from ?_)            (by positivity)) h_d_close_n          have h_e_le_d : (e : )  d := by            exact_mod_cast (by nlinarith [              show (d : )  n by norm_cast, sqrt_nonneg (n * (n - d)), mul_self_sqrt (                show 0  (n : ) * (n - d) by                nlinarith [show (d : )  n by norm_cast])] : (e : )  d)          gcongr        have h_frac_e_B_v_n_le_1 : frac * (JohnsonBound.e B v / n : )  1 :=          le_trans (mul_le_mul_of_nonneg_left            (div_le_div_of_nonneg_right (show (JohnsonBound.e B v : )  e by              exact_mod_cast e_ineq) (Nat.cast_nonneg _)) (by positivity)) h_frac_e_n_le_1        linarith    nlinarith [show (0 : ) < n from hn_pos,      mul_div_cancel₀ (e : ) (by positivity : (n : )  0),      mul_div_cancel₀ (JohnsonBound.e B v : ) (by positivity : (n : )  0),      mul_div_cancel₀ (d : ) (by positivity : (n : )  0)]  rw [div_le_div_iff₀] <;> ring_nf at * <;> try linarith  by_cases h_e_zero : e = 0  · aesop  · have h_frac_pos : (n : )⁻¹ ^ 2 * e ^ 2 * frac > (n : )⁻¹ ^ 2 * e ^ 2 :=      lt_mul_of_one_lt_right (by positivity) hfrac_gt1    nlinarith [show (e : )  1 from by exact_mod_cast Nat.one_le_iff_ne_zero.mpr h_e_zero]
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Data/CodingTheory/JohnsonBound/Lemmas.lean:498-558

Reuse this declaration

Bring the exact result into your workflow

The import identifies the source module. Your project still needs the pinned package dependency shown on this page.

What this badge means

This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.

Continue in this project

Related declarations

Project-declaredLean 4.31.0

Affine gaps lifted to interleaved codes

affine_gaps_lifted_to_interleaved_codes

Project documentation

This lemma proves the final algebraic step in the DG25 Theorem 3.1 proof. It shows that if R > e + 1, then e * (R / (R - 1)) < e + 1. The intuition is that the fraction R / (R - 1) is always greater than 1, but as R gets larger, it gets closer to 1. The hypothesis R > e + 1 provides a strong enough bound to ensure the product e * (fraction) do...

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose coeff

ArkLib.Lattices.Ajtai.gadgetDecompose_coeff

Plain-language statement

The k-th coefficient (k < deg φ) of a gadget-decomposition block is exactly the corresponding digit of the corresponding input coefficient.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record
Project-declaredLean 4.31.0

Gadget Decompose lawful

ArkLib.Lattices.Ajtai.gadgetDecompose_lawful

Plain-language statement

The base-b gadget decomposition is a lawful gadget decomposition.

cryptographyproof systemscoding theory

Source project: ArkLib

Person-level attribution pending.

View proof record