Dist eq min Wt Codewords
LinearCode.dist_eq_minWtCodewords
Plain-language statement
The min distance of a linear code equals the minimum of the weights of non-zero codewords.
Exact Lean statement
lemma dist_eq_minWtCodewords [Ring F] {A : Type*} [DecidableEq A] [AddCommGroup A] [Module F A]
{MC : ModuleCode ι F A} :
Code.minDist (MC : Set (ι → A)) = minWtCodewords MCFormal artifact
Lean source
lemma dist_eq_minWtCodewords [Ring F] {A : Type*} [DecidableEq A] [AddCommGroup A] [Module F A] {MC : ModuleCode ι F A} : Code.minDist (MC : Set (ι → A)) = minWtCodewords MC := by unfold Code.minDist minWtCodewords refine congrArg _ (Set.ext fun _ ↦ ⟨fun ⟨u, _, v, _⟩ ↦ ⟨u - v, ?p₁⟩, fun _ ↦ ⟨0, ?p₂⟩⟩) <;> rename_i u hu v u_sub_v_weight hvv h_u_mem hv_u_v_rel -- aesop (add simp [hammingDist_eq_wt_sub, sub_eq_zero]) constructor · rcases hv_u_v_rel with ⟨h_v_mem, h_u_ne_v, h_dist⟩ apply Submodule.sub_mem · exact h_u_mem · exact h_v_mem · -- case p₂ rcases hv_u_v_rel with ⟨h_v_mem, h_u_ne_v, h_dist⟩ constructor · rw [sub_ne_zero]; exact h_u_ne_v · -- ⊢ Code.wt (u - v) = hv -- We know `Code.wt c = h_u_mem`, so we show `Δ₀(0, c) = Code.wt c` rw [← h_dist] simp [Code.wt, hammingDist, sub_eq_zero] · simp only [SetLike.mem_coe, ne_eq, hammingDist_zero_left] rcases hv_u_v_rel with ⟨c, h_c_mem, h_c_ne, h_c_wt⟩ -- We need to prove the conjunction constructor · -- 1. Prove `0 ∈ MC` let res := Submodule.zero_mem (p := MC) exact res · -- 2. Prove `∃ v_1 ...` refine ⟨c, h_c_mem, ?_, ?_⟩ · -- Prove `¬0 = c` (which is `0 ≠ c`) exact h_c_ne.symm · -- Prove `‖c‖₀ = h_u_mem` rw [←h_c_wt] simp only [hammingNorm, ne_eq, Code.wt]- Project
- ArkLib
- License
- Apache-2.0
- Commit
- fad5cbf80877
- Source
- ArkLib/Data/CodingTheory/Basic/LinearCode.lean:424-457
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
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...
Source project: ArkLib
Person-level attribution pending.
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.
Source project: ArkLib
Person-level attribution pending.
Gadget Decompose lawful
ArkLib.Lattices.Ajtai.gadgetDecompose_lawful
Plain-language statement
The base-b gadget decomposition is a lawful gadget decomposition.
Source project: ArkLib
Person-level attribution pending.