Repository navigation
feat(Languages/Probabilistic): Pr[e] statement convention and $ᵗ uniform sampling - #4898
SamuelSchlesinger wants to merge 6 commits into
Conversation
…1, WIP) Experiment := ProbComp Bool with succProbability/advantage (+ Pr bridges), distAdvantage, Game.withSetup; TwoStage + TwoStage.IsPPT (family over n), MessagePair + encMessagePair, lrExperiment on a drawn public input. SSP.advantage restated through Experiment.advantage. Part of #4817. Session: Jetski de72c51e (swarm worker infra).
…aragraph (I1) encMessagePair is encOfEquiv MessagePair.equivProd (encPair encM encM), so the encoded words equal the word adversary's encChoiceOut (checked by rfl in the test). The SSP tests unfold Experiment.advantage before rewriting the evaluated runs.
Experiment.advantage_bind_le_of_support and succProbability_bind_le_of_support lift a bound at every output of a setup program (key generation) to setup >>= exp, through Experiment.eval_bind_eq_withSetup. The TwoStage.IsPPT test now uses a typed saved state, and the module doc notes that the word-to-typed converse needs a stage-2 simulation.
…orm sampling Add scoped `$ᵗ α` for exactly `ProbComp.uniform α` (no new constant; prints back), and document the statement convention: named advantages are ℝ≥0 via Experiment/Game, every other probability is Pr[e] : ℝ. SPDZ is the first client: its MAC-check bounds are stated with Pr[·], the duplicate succProbability_macCheckSoundnessGame_le is deleted, and its games sample with $ᵗ. Part of the crypto readability program (#4817), idioms lane, approved design (idioms 1 and 2).
|
Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 7c007b0: APPROVE Checked against the agreed design (
Optional nit, not blocking: the test file opens Not queued: this targets This is agent review, not human approval. |
|
Added the negative scope test in caf8441. In a namespace that opens only |
|
Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head caf8441: APPROVE (delta 7c007b0..caf8441). The delta is test-only and adds the negative scope test. The This is agent review, not human approval. |
# Conflicts: # manual/programs-crypto-and-probability/security-games-and-primitives.md
|
Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head fc1080c: APPROVE (main merge after #4878)
This is agent review, not human approval. |
|
Rendered-manual check (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head fc1080c. This adds to my approval and leaves the queued head unchanged. Rendered: inspected pp. 55–56, 425 and 484 of cslib-frontier-operators-manual.pdf from run 43375960011: OK.
I checked the pages through poppler text, word boxes and link extraction ( Agent Operator's Manual: no edit needed. It is built from |
Change
This adds one library-wide convention for writing probabilities in statements, plus textbook notation for uniform sampling. SPDZ is the first client.
Statement convention (documented in the Operator's Manual, design approved for #4817):
ℝ≥0, defined throughExperiment.advantage/Experiment.succProbability(I1) or theGameAPI.Pr[e] : ℝ: one-sided bounds, exact values, hop differences and biases. Statements stop writing(ProbComp.eval e true).toReal,ℝ≥0∞masses orGame.succProbability (ProbComp.eval e).ℝ≥0∞stays insidePMFalgebra.$ᵗ α(inNotation.lean, scoped withPr[·]) is notation for exactlyProbComp.uniform α, following VCVio. It adds no constant (#guard_expr … =ₛ ProbComp.uniform …), soeval_uniform,pmf_normand every other lemma apply unchanged. Goals printProbComp.uniform αas$ᵗ α, including insidedoblocks.SPDZ (representative client):
toReal_eval_linearCombZeroGame_le→probability_linearCombZeroGame_le : Pr[…] ≤ 1 / p.succProbability_macCheckSoundnessGame_leis deleted.let α ← $ᵗ ZMod p.eval_*_leℝ≥0∞forms stay, because the adaptive-adversary proof consumes them inside PMF algebra.Pr[·].There is no library sweep. Lanes adopt
Pr/$ᵗin PRs cut after this one lands, and a tooling ratchet then stops new old-style statements.Depends on I1 #4878, which has landed. The manual names I1's
Experiment.coe_advantage/coe_succProbability. The PR is retargeted tomainand merges main at fc1080c. The only conflict was the security-games experiment paragraph: it takes main's text and re-appends this PR's sentence.Part of #4817 (crypto readability, idioms lane; idioms 1 and 2 of the approved design, folded together per the coordinator). Infrastructure, documentation and a client refactor; no mathematical progress.
Manual impact
$ᵗ, and links to SPDZ and the checked examples;security-games-and-primitives.md;protocols-and-privacy.mdnames the renamed lemma.Validation
lake build --wfail --iofailis green on Notation,CslibFrontierTests.ProbabilityNotation, SPDZ,CslibFrontierTests.Crypto.SPDZ, Experiment andCslibFrontierTests.Crypto.Experiment.lake exe mk_all --check,lake lint --only-modules(Notation, SPDZ),check_hygiene.py --check-simpandcheck_operator_manual.pypass.ProbabilityNotation.leangains$ᵗchecks:#guard_exprsyntactic identity;#guard_msgsprinting ($ᵗ Fin 3, adoblock,<$>, a parenthesized product);f $ xstill parses;rw [eval_uniform]and plainsimpwork on a$ᵗblock.Notation.leanhas about 145 transitive importers; CI rebuilds them and is the full validation. Duplication notices are pending CI.AI assistance
Written by an AI agent (Jetski, idioms lane of the readability swarm), directed by Samuel Schlesinger. Agent review is not human review.