Smol changes - #672
Conversation
🤖 PR Summary
The PR titled 'Smol changes' primarily refactors coding-theory code to use a vector-space-style Mathematical Formalization
Proof Completion (no
|
| Metric | Count |
|---|---|
| 📝 Files Changed | 4 |
| ✅ Lines Added | 61 |
| ❌ Lines Removed | 79 |
Lean Declarations
✏️ Added: 7 declaration(s)
ArkLib/Data/CodingTheory/Basic/LinearCode.lean (6)
lemma mem_projectedCode {C : Set (ι → F)} {T : Finset ι} {w : ↥T → F} :lemma mem_projectedCode_submod [Field F] {LC : LinearCode ι F} {T : Finset ι} {w : ↥T → F} :lemma projectedWord_apply {c : ι → F} {T : Finset ι} {i : T} :lemma projectedWord_eq_funLeft [Field F] {T : Finset ι} {c : ι → F} :lemma restrict_mem_projectedCode_iff {C : Set (ι → F)} {T : Finset ι} {w : ι → F} :lemma restrict_mem_projectedCode_of_codeword_eq {C : Set (ι → F)} {T : Finset ι} {w : ι → F}
ArkLib/Data/CodingTheory/ProximityGap/MCAGenerator.lean (1)
lemma matrixMulCodewords_apply {A : Matrix ℓ ℓ' F} {U : ℓ' → ι → F} {i : ℓ} {k : ι} :
✏️ Affected: 3 declaration(s) (line number changed)
def projectedCode (C : Set (ι → F)) (T : Finset ι) : Set (T → F)inArkLib/Data/CodingTheory/Basic/LinearCode.leanmoved from L265 to L269def projectedCode_submod [Field F] (LC : LinearCode ι F) (T : Finset ι) : Submodule F (T → F)inArkLib/Data/CodingTheory/Basic/LinearCode.leanmoved from L270 to L287def matrixMulCodewords (A : Matrix ℓ ℓ' F) (U : ℓ' → ι → F) : ℓ → ι → FinArkLib/Data/CodingTheory/ProximityGap/MCAGenerator.leanmoved from L51 to L51
sorry Tracking
- No
sorrys were added, removed, or affected.
📋 **Additional Analysis**
Style and documentation violations in the diff, primarily around theorem naming and missing docstrings.
📄 **Per-File Summaries**
- ArkLib/Data/CodingTheory/Basic/LinearCode.lean: Summary unavailable — AI generation failed.
- ArkLib/Data/CodingTheory/Prelims.lean: The definition of
linCombwas refactored: the body replaced a pointwise lambda expressionfun k => ∑ i, l i * U i.succ kwith the direct sum-of-scalar-multiplication form∑ i, l i • U i.succ. This eliminates an explicit function abstraction by using•(scalar multiplication on function vectors) instead of*(field multiplication applied pointwise), making the linear combination more idiomatic in the vector-space style. No new theorems, declarations, orsorry/admitare introduced. - ArkLib/Data/CodingTheory/ProximityGap/AffineGenerator.lean: The lemma
line_vecMulproof is replaced with a singleaesopcall. Inexists_succ_not_mem, the proof usesprojectedCode_submod LC Tandmem_projectedCode_submod, and expresses the linear combination via scalar multiplication (∑ i, x i • U i.succ) instead of pointwise multiplication.proj_lincomb_ker_card_lechanges its filter condition fromprojectedWord (fun k => ∑ i, l i * w i k) TtoprojectedWord (∑ i, l i • w i) Tand restructures the cardinality argument withaesop.exists_line_boundreplaces anlinarithstep withaesop (add safe (by nlinarith)). Nosorryoradmitare introduced. - ArkLib/Data/CodingTheory/ProximityGap/MCAGenerator.lean: The definition of
matrixMulCodewordsis refactored from an explicit sum toMatrix.row (A * Matrix.of U), and the lemmamatrixMulCodewords_apply(withsimpattribute) is added to recover the original pointwise expansion. The proof of the helperisMCA_generatorByRightMul_of_isMCAis rewritten: thehT_projequality is now closed byaesop(replacing manualconvert–ext–simp), and thehjcontradiction block is restructured to usemem_projectedCode_submod,convert, a shorthavethat invokessimp_all, and a finalaesopblock overmulVec. Nosorryoradmitare introduced.
Last updated: 2026-07-29 14:28 UTC.
I took the liberty to address @alexanderlhicks's comment regarding the definition of
projectedCode_submodand added a few useful lemmas for membership toprojectedCode.