feat(SendClaim): prove perfect completeness#445
feat(SendClaim): prove perfect completeness#445XC0R wants to merge 2 commits intoVerified-zkEVM:mainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
🤖 Gemini PR SummaryProves Mathematical Formalization
Proof Technique
Status
Statistics
Lean Declarations
✅ **Removed:** 1 `sorry`(s)
🎨 **Style Guide Adherence**
📄 **Per-File Summaries**
Last updated: 2026-04-05 00:18 UTC. |
| dsimp only [] at hx | ||
| -- Case split on val | ||
| rcases val with _ | ⟨a⟩ | ||
| · -- val = none: contradicts hval (same as Part 1) |
There was a problem hiding this comment.
this blocks seems like a repetition of the one above (line 173 and down), perhaps it's worth putting this into a have?
| obtain ⟨rfl, -⟩ := hx | ||
| -- xval (= x) is now concrete but still contains a | ||
| -- Peel hval to determine a (same layers as none case) | ||
| simp only [bind_pure_comp] at hval |
There was a problem hiding this comment.
This also seems to repeat the same block of steps as from line 216 and 173.
| This is the key missing piece for SendClaim completeness: every layer of `liftM`/`simulateQ` | ||
| preserves the `some <$> _` structure, so `none` can never appear in the output support. | ||
| TODO: upstream to VCVio as a general `support_simulateQ` or `none_not_mem_support_map_some`. -/ | ||
| private lemma none_not_mem_support_map_some {m : Type _ → Type _} |
There was a problem hiding this comment.
this doesn't seem like it's used anywhere?
| rw [support_map]; rintro ⟨_, _, ⟨⟩⟩ | ||
|
|
||
|
|
||
| set_option synthInstance.maxHeartbeats 800000 in |
There was a problem hiding this comment.
why are these maxheartbeat/maxrecdepth values so high here?
I locally replaced the remaining simp at hval steps (lines 185, 225, 242) with simp only calls and this seems to remove the need for these (amongst other benefits).
|
Commentary heeded — Repeated blocks (216, 235): Compressed to 3 lines each. Attempted Unused lemma (114): Removed. Leftover from earlier approach — High limits (121): Both |
- Remove unused none_not_mem_support_map_some lemma - Remove maxHeartbeats 1600000 and maxRecDepth 2000 (builds within defaults) - Clean unused simp arguments flagged by linter - Compress repeated simulateQ/OptionT peel blocks
ed6df0d to
5df19b8
Compare
Proves
SendClaim.completeness— perfect completeness for the SendClaim component of the sumcheck oracle reduction chain. This was the last remainingsorryin the four-component completeness pipeline (CheckClaim → ReduceClaim → RandomQuery → SendClaim).What's proved
SendClaim.oracleReductionhas perfect completeness: for any valid witness, the verifier accepts with probability 1 in the ideal oracle model.Technique
The proof peels through the layered monad stack (OptionT / StateT / OracleComp) using:
simulateQ_map/simulateQ_bind/simulateQ_pureto pushsimulateQthrough each prover and verifier bindOption.elimM_mapto bridgeOptionT.runacrosssimulateQboundariesStateT.run_mapto convertFunctor.mapinsideStateTto the underlyingProbComplevelThe completeness event splits into two obligations: (1) the computation never returns
none(failure), and (2) every output satisfies the relation. Both reduce to showing thatsimulateQpreserves thesome <$> _structure at each layer, then closing the oracle equality viaSubsingleton.elimandUnique.uniqon the unit-indexed oracle types.Context
Builds on the completeness chain from #444 (CheckClaim + ReduceClaim + RandomQuery) and the upstream
monadLift_liftM_OptionTcoherence lemma contributed in Verified-zkEVM/VCV-io#259.