Repository navigation
Description
Background
How can adaptive CC proofs over a bidirectional ideal permutation StrongURP X (such as sponge indifferentiability, ideal-cipher constructions, and bidirectional RP/RF hybrids) switch cleanly from StrongURP X to a lazy with-replacement bidirectional random function within C(q, 2) / |X| via equivalence as games (≡g), while also exposing exact transcript probability formulas 1 / (|X|)_k and 1 / |X|^k for direct H-coefficient proofs?
Commons.Definitions.LazyPermutation presents the forward-only URP lazily, and Commons.Definitions.CollisionBound bounds one-way URF collisions, but no bidirectional counterpart exists for StrongURP X on Bidirectional X q. Providing Commons.Definitions.BidirectionalSwitching supplies both the reusable 2-hop switching lemma (StrongURP ≈ LazyBidirectionalRF within C(q, 2) / |X|) and the exact partial-bijection transcript mass formulas.
Proposed change
Add Commons.Definitions.BidirectionalSwitching (src/Commons/Definitions/BidirectionalSwitching.lean, exported from src/Commons.lean):
- Lazy
StrongURPpresentation and exact partial-bijection counting:- Define partial-bijection table helpers (
lookupForward,lookupInverse,IsPartialBijection,Agrees,completions,unusedOutputs,unusedInputs) andlazyStrongURP X q, provinglazyStrongURP_eq_strongURP : lazyStrongURP X q = StrongURP X (q := q). - Prove
strongURP_mass_of_bijective_table: any admitted transcript whose consistent permutations are characterized by a partial bijection of lengthkhas exactStrongURPmass1 / (|X|)_k.
- Define partial-bijection table helpers (
- Lazy with-replacement bidirectional random function and rejection-coin game:
- Define
LazyBidirectionalRF X q : TypedSystem (Bidirectional X q)and its collision-monitoring gamelazyBidirectionalRFGame X qwithlazyBidirectionalRFGame_visible : (lazyBidirectionalRFGame X q).visible = LazyBidirectionalRF X q. - Define
strongURPRejectionGame X q : TypedGame (Bidirectional X q)(draws uniformly fromXon fresh queries, resamples from the unused set on collision and sets the MBO) withstrongURPRejectionGame_visible : (strongURPRejectionGame X q).visible = StrongURP X (q := q). - Prove exact equivalence as games (
strongURPRejectionGame_gameEquivalent_lazyBidirectionalRFGame) and exact unset transcript mass1 / |X|^k(lazyBidirectionalRF_unset_mass).
- Define
- Adaptive winning and CC switching bounds:
- Prove
lazyBidirectionalRFGame_win_leandstrongURPRejectionGame_win_le(≤ C(q, 2) / |X|). - Prove
strongURP_dist_lazyBidirectionalRF_le : Δ (StrongURP X (q := q)) (LazyBidirectionalRF X q) ≤ ENNReal.ofReal ((q.choose 2 : ℝ) / Fintype.card X),strongURP_attach_dist_lazyBidirectionalRF_le(Δ,•), andstrongURP_substitutesWithin_lazyBidirectionalRF(≃[...]).
- Prove
Acceptance criteria
Tests.BidirectionalSwitchingverifies:- Visible-system equalities, exact 2-edge mixed forward/inverse transcript masses (
1 / 56vs1 / 64), andΔ ≤ 6 / 8onFin 8(q = 4). - Keccak 1600-bit (
ByteState 200) switching distance, converter attachment, and≃[...]corollaries. cc_normalizeandcc_calc statisticalcompatibility under CC custom notation (Δ,•,≫,≃[...]).#print axiomson all 11 exported theorems confirming dependence only onpropext,Classical.choice, andQuot.sound.
- Visible-system equalities, exact 2-edge mixed forward/inverse transcript masses (
lake build --wfail,scripts/check-sources.sh,scripts/check-axioms.sh, andlake env lean -Dweak.linter.mathlibStandardSet=truepass with zero warnings.
Activity