Lemma 3.11 (extension of scalars) — distances to a code over are preserved over larger fields
ProvedLatticePrepro.CodeFamily.codeDist_extendLet be a prime and a field with an -algebra structure (so has characteristic and contains ), with decidable equality. Let be a code family over with coordinate set , and let be its extension to , with the targets read in via (CodeFamily.extend F). Then for every instance ,
where is the Hamming distance from a word to a code (Definition 3.1).
This is the last step of the proof of Lemma 3.11 (Appendix B.1): the gap for the code over transfers to the code it spans over any field of characteristic . This is how Theorem 5.1 for codes covers every finite field.
Formalization Note. Both distances are codeDist, a natural number. The Lean statement does not require to be finite (the paper fixes a finite field); it only assumes [Algebra (ZMod p) F] and [DecidableEq F].
import Mathlib
import Definitions.Def_LatticePrepro_Basic_Blocks
import Definitions.Def_LatticePrepro_Reduction_LinearSystem
import Definitions.Def_LatticePrepro_Conversions_Codes
open LatticePrepro
variable {p : ℕ} [Fact p.Prime] {X : Type} (F : Type) [Field F] [Algebra (ZMod p) F]theorem LatticePrepro.CodeFamily.codeDist_extend [DecidableEq F] (C : CodeFamily (ZMod p) X) (x : X) :
CodeFamily.codeDist ((C.extend F).target x) (C.extend F).code =
CodeFamily.codeDist (C.target x) C.code := by sorry