All proofs
Project-declaredLean 4.31.0 · mathlib@fabf563a7c95

Is MDS of matrix Is MDS

CoreResults.IsMDS_of_matrix_IsMDS

Plain-language statement

If a generator matrix is MDS with at least one row, then the code it generates is MDS.

Exact Lean statement

lemma IsMDS_of_matrix_IsMDS [Field F] [DecidableEq F] {G : Matrix (Fin k) (Fin n) F}
    (hMDS : Matrix.IsMDS G) (hkn : k ≤ n) (hk : 0 < k) : (fromRowGenMat G).IsMDS

Formal artifact

Lean source

Canonical source
Full Lean sourceLean 4
lemma IsMDS_of_matrix_IsMDS [Field F] [DecidableEq F] {G : Matrix (Fin k) (Fin n) F}    (hMDS : Matrix.IsMDS G) (hkn : k  n) (hk : 0 < k) : (fromRowGenMat G).IsMDS := by  have h_singleton_bound : (Module.finrank F (fromRowGenMat G))                            (Fintype.card (Fin n)) - (Code.dist (fromRowGenMat G).carrier) + 1 :=      LinearCode.singleton_bound_linear (fromRowGenMat G)  have h_rank_eq_k : (Module.finrank F (fromRowGenMat G)) = k := by    rw [ LinearCode.dim, dim_fromRowGenMat]    have h_rank : Matrix.rank (subLeftFull G (Fin.castLE hkn)) = k := by        apply Matrix.rank_eq_if_det_ne_zero        exact hMDS (Fin.castLE hkn, Fin.castLE_injective hkn)    convert Matrix.full_row_rank_via_rank_subLeftFull hkn h_rank using 1  have h_dist_ge : Code.dist (fromRowGenMat G).carrier  n - k + 1 := by    have h_dist_ge :  (c : Fin n  F), c  fromRowGenMat G  c  0  hammingNorm c  n - k + 1 :=    by      apply_rules [minWt_ge_of_MDS]    refine le_csInf ?_ ?_;    · obtain u, hu :  u : Fin n  F, u  fromRowGenMat G  u  0 := by        contrapose! h_rank_eq_k;        rw [show fromRowGenMat G =from eq_bot_iff.mpr h_rank_eq_k]        simp only [Module.finrank_eq_zero_of_subsingleton, ne_eq]        linarith      exact _, u, hu.1, 0, by simp only [Submodule.carrier_eq_coe, SetLike.mem_coe, zero_mem],      hu.2, le_rfl⟩⟩    · rintro d u, hu, v, hv, huv, hd      refine le_trans (h_dist_ge (u - v) ?_ ?_) ?_      · exact Submodule.sub_mem _ hu hv      · exact sub_ne_zero_of_ne huv      · simpa only [hammingNorm, hammingDist, Pi.sub_apply, sub_ne_zero] using hd  have h_dist_le : Code.dist (fromRowGenMat G).carrier  n - k + 1 := by    contrapose! h_singleton_bound    rw [tsub_add_eq_add_tsub ]    · rw [tsub_lt_iff_left ] <;> norm_num      · linarith! [Nat.sub_add_cancel hkn]      · refine le_trans (Code.dist_le_card _) ?_        simp only [Fintype.card_fin, le_add_iff_nonneg_right, zero_le]    · convert Code.dist_le_card _  convert le_antisymm h_dist_le h_dist_ge using 1  unfold LinearCode.IsMDS  simp only [Submodule.carrier_eq_coe]  unfold length dim  simp [h_rank_eq_k]
Project
ArkLib
License
Apache-2.0
Commit
fad5cbf80877
Source
ArkLib/Data/CodingTheory/Basic/MDSCode.lean:82-122

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