All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Singleton bound

singleton_bound

Plain-language statement

Singleton bound for arbitrary codes

Exact Lean statement

theorem singleton_bound (C : Set (n → R)) :
    (ofFinite C).card ≤ (ofFinite R).card ^ (card n - (‖C‖₀ - 1))

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
theorem singleton_bound (C : Set (n  R)) :    (ofFinite C).card  (ofFinite R).card ^ (card n - (‖C‖₀ - 1)) := by  by_cases non_triv : ‖C‖₀  1  · -- there exists some projection S of the desired size    have ax_proj:  (S : Finset n), card S = card n - (‖C‖₀ - 1) := by      let instexists := Finset.le_card_iff_exists_subset_card:= n)         (s := @Fintype.elems n _)         (n := card n - (‖C‖₀ - 1))      have some: card n - (‖C‖₀ - 1)  card n := by        omega      obtain t, ht := instexists.1 some      exists t      simp only [card_coe]      exact And.right ht    obtain S, hS := ax_proj    -- project C by only looking at indices in S    let Cproj := Set.image (projection S) C    -- The size of C is upper bounded by the size of its projection,    -- because the projection is injective    have C_le_Cproj: @card C (ofFinite C)  @card Cproj (ofFinite Cproj) := by      apply @Fintype.card_le_of_injective C Cproj        (ofFinite C)        (ofFinite Cproj)        (Set.imageFactorization (projection S) C)      refine Set.imageFactorization_injective_iff.mpr ?_      intro u hu v hv heq      apply projection_injective (nontriv := non_triv) (S := S) (u := u) (v := v) <;>        assumption    -- The size of Cproj itself is sufficiently bounded by its type    have Cproj_le_type_card :    @card Cproj (ofFinite Cproj)  @card R (ofFinite R) ^ (card n - (‖C‖₀ - 1)) := by      let card_fun := @card_fun S R (Classical.typeDecidableEq S) _ (ofFinite R)      rw[hS] at card_fun      rw[ card_fun]      let huniv := @set_fintype_card_le_univ (S  R) ?_ Cproj (ofFinite Cproj)      exact huniv    apply le_trans (b := @card Cproj (ofFinite Cproj)) <;>      assumption  · simp only [ge_iff_le, not_le, Nat.lt_one_iff] at non_triv    rw[non_triv]    simp only [zero_tsub, tsub_zero]    let card_fun := @card_fun n R (Classical.typeDecidableEq n) _ (ofFinite R)    rw[ card_fun]    let huniv := @set_fintype_card_le_univ (n  R) ?_ C (ofFinite C)    exact huniv
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Data/CodingTheory/Basic/LinearCode.lean:121-166

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