proofs for lemma distInterleavedCodeToCodeLB, e_leq_dist_over_3 and probOfBadPts#297
proofs for lemma distInterleavedCodeToCodeLB, e_leq_dist_over_3 and probOfBadPts#297FawadHa1der wants to merge 2 commits intoVerified-zkEVM:mainfrom
Conversation
🤖 Gemini PR SummaryThis Pull Request advances the formalization of coding theory results from the AHIV22 paper, specifically focusing on row-span distance lower bounds and Reed-Solomon proximity gap lemmas. Features
Refactoring
Documentation
Analysis of Changes
✅ **Removed:** 3 `sorry`(s)
🎨 **Style Guide Adherence**The following code changes violate the ArkLib style guide:
📄 **Per-File Summaries**
Last updated: 2026-02-18 11:22 UTC. |
|
I was trying to implement probOfBadPts but the AI suggested we prove the other distInterleavedCodeToCodeLB and e_leq_dist_over_3 first. Didn't mean to duplicate or interfere already in progress work. My apologies if that inadvertently happen. @erdkocak @DimitriosMitsios I know this is a collaborative effort and I should sensitive to someone elses efforts @alexanderlhicks tagging you so that you can check the assumptions and the solution. |
|
No problem, thanks for the great work. It seems that AI used a different approach than following the paper via using the already proven results from DG25, which I believe shows as library gets bigger proving new stuff will be much easier. |
fddfb04 to
90a6247
Compare
|
@FawadHa1der Thanks for the good work. At a quick glance, the code looks good and clean, the |
|
I have a little unusual setup. I had Claude (4.5 opus) and Codex 5.2 running at the same time. Though Codex has been performing much better I have to admit, I have to look into how to make make Claude better at lean. It did stop multiple times so may be but not completely sure I think it spent about 3-5 hours. These things are running in the background as I get up to speed with my Lean learnings |
That’s impressive tbh and it's a nice showcase of AI capabilities in FV, especially given that this was done alongside you ramping up on Lean in a short duration. Thanks for the insights and the PR. |
|
@FawadHa1der Did you get the usual monthly subscriptions on those models or the api charge? Have you tried any of the DeepSeek's models as well? They have lower api cost by more than 10x but I don't have any experience with their performance on FV. I could give them a try myself and report back! |
|
@DimitriosMitsios what is FV? yes just the monthly subscription. They do get rate limited sometimes which is annoying. I ave not tried DeepSeek yet. Never heard of its math/Lean4 capabilities though @chung-thai-nguyen thank you, I have been mindful of trying not to add assumptions to the statements because I suspect they have been designed to keep re-usability in mind. After an initial implementation by AI I go back try to reduce or take out the assumptions that were added, which is not always successful as you might notice if my next PR :) |
|
@FawadHa1der FV := Formal Verification, it was used in a previous message and I took it for granted, sorry! |
|
Hello! Thanks for the PR and sorry for the delay in getting to this. I'll be merging the 4.26 PR soon, which might break a few things, and get back to all the other PRs including this one. |
| `(𝔽ᵐ)ⁿ`. Let `e` be a positive integer such that `e < d/3` and `|𝔽| ≥ e`. | ||
| Suppose `d(U⋆, L^⋈m) > e`. Then, there exists `v⋆ ∈ L⋆` such that `d(v⋆, L) > e`, where `L⋆` is the | ||
| row-span of `U⋆`. -/ | ||
| private def vecSupport (u : ι → F) : Finset ι := |
There was a problem hiding this comment.
Is there a reason for these to be marked as private? Some of these also look like they might or should already exist in a standard library.
|
|
||
| end ProximityToRS | ||
|
|
||
| section Tests |
There was a problem hiding this comment.
I'm not sure whether merging these tests would add much? E.g.
example (u v : ι → F) :
vecSupport (F := F) (u - v) = Finset.filter (fun j => u j ≠ v j) Finset.univ :=
vecSupport_sub (F := F) u v
is basically redundant
| private def vecSupport (u : ι → F) : Finset ι := | ||
| Finset.filter (fun j => u j ≠ 0) Finset.univ | ||
|
|
||
| private lemma mem_vecSupport {u : ι → F} {j : ι} : j ∈ vecSupport (F := F) u ↔ u j ≠ 0 := by |
There was a problem hiding this comment.
Aside from them being private a few of these could do with some cleaning up regading assumptions as e.g. F does not need to be finite here.
There was a problem hiding this comment.
General comment (also applies to other PRs): please take a look at the linter and style guide adherence section of the PR summary (it's easy enough to feed this to an LLM to clean up). Also, if you are adding significant proofs (i.e. proofs of main results in a file, ...) I think it's fair to add yourself (and any AI used) to the file author list.
probOfBadPts added some extra assumptions and e_leq_dist_over_3 has been proved with a weaker and stronger assumption. I can delete the weaker one if required. Created with help of Codex and Claude.