feat(Data/Fin): prove fflatten_embedSum and fflatten₂_embedSum - #607
Conversation
Discharge two `sorry`s in `Data/Fin/Sigma.lean`: the functorial-flatten analogues of the already-proven `dflatten_embedSum`. They state that flattening a nested tuple and indexing at `embedSum i j` recovers the `(i, j)` entry, up to the canonical `cast` along `vflatten_embedSum`. Both proofs mirror `dflatten_embedSum`: induct on `m`, case on `i` via `Fin.cases`, reduce with `fflatten_succ`/`fflatten₂_succ` + `fappend_left`/`fappend_right` (resp. `fappend₂_*`), and reconcile the nested casts with `cast_cast`.
🤖 PR Summary
This pull request reduces the
These theorems assert that flattening a nested heterogeneous tuple and then indexing via Mathematical Formalization
Proof Completion (sorries removed)
Infrastructure / CI
Scope / Conflict Avoidance
Remaining UnresolvedThe file still contains 7 Statistics
Lean Declarations
✅ Removed: 2 `sorry`(s)
📋 **Additional Analysis**The diff completes two previously missing proofs. Overall the code is well-structured but has two minor style violations per the ArkLib guidelines, one pre-existing and one newly introduced. No drift from roadmap or documented conventions beyond these points. 📄 **Per-File Summaries**
Last updated: 2026-07-05 11:00 UTC. |
|
Thanks! |
Discharges two
sorrys inArkLib/Data/Fin/Sigma.lean— the functorial-flatten analogues of thealready-proven
dflatten_embedSum:fflatten_embedSum:fflatten v (embedSum i j) = cast _ (v i j)fflatten₂_embedSum:fflatten₂ v (embedSum i j) = cast _ (v i j)i.e. flattening a nested tuple and indexing at
embedSum i jrecovers the(i, j)entry, up to thecanonical
castalongvflatten_embedSum.Both proofs mirror the existing
dflatten_embedSum: induct onm, case oniwithFin.cases,reduce with
fflatten_succ/fflatten₂_succ+fappend_left/fappend_right(resp.fappend₂_*),and merge the nested casts with
cast_cast— the same dependent-castfamily and technique as #586 /#587.
these two lemmas, so nothing downstream is affected.
validate.shgreen (build + Data warning budget + imports/docs/kb).fflatten_embedSum/fflatten₂_embedSum(≈ lines 322 / 389),outside the region feat: completeness and rbrKnowledgeSoundness of FRI-Binius protocols #383 edits (
embedSum_splitSum/dflatten_splitSum, ≈ 131–223), so it shouldnot conflict.