Batch completeness
InductiveMerkleTree.batch_completeness
Project documentation
Batch completeness theorem for Merkle trees: building the tree honestly, generating the batch proof for any selector opening at least one leaf, and verifying it against the tree's root succeeds with probability 1 under the random oracle. The proof reduces to functional_batch_completeness through simulateQ, exactly as the single-index completeness...
Exact Lean statement
@[simp]
theorem batch_completeness [DecidableEq α] [Inhabited α] [SampleableType α] {s : Skeleton}
(leaf_data_tree : LeafData α s) (sel : LeafData Bool s) (h : sel.anySelected = true)
(preexisting_cache : (spec α).QueryCache) :
Pr[fun v => v.1 = true | (simulateQ (spec α).randomOracle (do
let cache ← buildMerkleTree leaf_data_tree
let proof := generateBatchProof cache sel h
let verified ← (verifyBatchProof (m := OracleComp (spec α))
(selectedValues leaf_data_tree sel) (cache.getRootValue) proof)
return verified)).run preexisting_cache] = 1Formal artifact
Lean source
@[simp]theorem batch_completeness [DecidableEq α] [Inhabited α] [SampleableType α] {s : Skeleton} (leaf_data_tree : LeafData α s) (sel : LeafData Bool s) (h : sel.anySelected = true) (preexisting_cache : (spec α).QueryCache) : Pr[fun v => v.1 = true | (simulateQ (spec α).randomOracle (do let cache ← buildMerkleTree leaf_data_tree let proof := generateBatchProof cache sel h let verified ← (verifyBatchProof (m := OracleComp (spec α)) (selectedValues leaf_data_tree sel) (cache.getRootValue) proof) return verified)).run preexisting_cache] = 1 := by refine (probEvent_eq_one_simulateQ_randomOracle_run_iff (spec := spec α) (p := fun b : Bool => b = true) _ _).mpr ?_ intro f _hf simp only [evalWithAnswerFn, verifyBatchProof, simulateQ_bind, simulateQ_pure, simulateQ_buildMerkleTree, simulateQ_getPutativeBatchRoot] change ((_ : α) == _) = true rw [beq_iff_eq] exact functional_batch_completeness leaf_data_tree sel h fun left right => f (left, right)- Project
- VCVio
- License
- Apache-2.0
- Commit
- 2ceb2d825ee3
- Source
- VCVio/CryptoFoundations/MerkleTree/Inductive/Batch/Completeness.lean:71-88
Reuse this declaration
Bring the exact result into your workflow
The import identifies the source module. Your project still needs the pinned package dependency shown on this page.
What this badge means
This completion status comes from the project or community source. It has not yet been represented here as an independent rebuild and axiom audit.
Continue in this project
Related declarations
Expected Cost Nat eq sum tail probs of pathwise Cost At Most
AddWriterT.expectedCostNat_eq_sum_tail_probs_of_pathwiseCostAtMost
Plain-language statement
Finite tail-sum formula for natural-valued writer cost under a pathwise upper bound. If every execution path of oa incurs cost at most n, then the tail probabilities vanish above n, so the infinite tail sum truncates to Finset.range n.
Source project: VCVio
Person-level attribution pending.
IND CPA advantage to Real le sum step signed Advantage Real abs
AsymmEncAlg.IND_CPA_advantage_toReal_le_sum_step_signedAdvantageReal_abs
Plain-language statement
Planned generic one-time-to-many-time lift: bounded multi-query IND-CPA advantage is at most the sum of the extracted one-time signed advantages over the first q fresh LR queries.
Source project: VCVio
Person-level attribution pending.
IND CPA LR hybrid Game q eval Dist eq left of Makes At Most Queries
AsymmEncAlg.IND_CPA_LR_hybridGame_q_evalDist_eq_left_of_MakesAtMostQueries
Plain-language statement
If an adversary makes at most q fresh LR queries, then the leftUntil = q LR-hybrid is the all-left endpoint game.
Source project: VCVio
Person-level attribution pending.