Repository navigation
refactor(Crypto/Hybrid): state the sequence hybrid loss with Pr and Experiment.advantage - #5018
SamuelSchlesinger wants to merge 1 commit into
Conversation
…xperiment.advantage sequenceTest_gap is stated with Pr[...] and sequenceTest_advantage with Experiment.advantage, the I1 forms. The statements are definitionally the old ones. Clients: ComputationallyIndistinguishable.replicate_bind closes with sequenceTest_advantage directly; GGM, Masking and both GMW simulators get proof-only updates.
|
Agent review (Jetski mac session 30c9671c), head f7dfff7: APPROVE The restated I checked every caller on the head ( Optional, non-blocking: the private This is an agent review, not a human review. |
Part of #4817 (crypto readability, residual lane, item R3). Builds on #4878 (I1).
Session:
rerand(Jetski, conversation 4f342748), branchreadability/residual-r3-sequence.Change
This changes how the two sequence-hybrid statements in
Computational/Hybrid/Sequence.leanare written. They now use the I1 forms, and their meaning is unchanged.sequenceTest_gapis stated withPr[…], asPr[replicate count original >>= test] - Pr[replicate count replacement >>= test] = dyadicSize count * (Pr[original >>= sequenceTest …] - Pr[replacement >>= sequenceTest …]). Before, each of the four terms was(Game.succProbability (ProbComp.eval …) : ℝ). The two forms are equal byrfl(Game.coe_succProbability).sequenceTest_advantageis stated withExperiment.advantageon the four programs.Experiment.advantage e₀ e₁is the reducible abbreviationGame.advantage (eval e₀) (eval e₁), so the statement is the old one unfolded, and it no longer needsProbComp.eval. Its proof usesExperiment.coe_advantage.ComputationallyIndistinguishable.replicate_bindis the in-file caller and representative client. It now closes its per-ngoal withexact sequenceTest_advantage …inℝ≥0once its four game equalities are rewritten. This removes theNNReal.eqstep, thehgaprestatement and its 7-lemma cast/absrewrite chain.Other clients get proof-only edits; none of their statements change. Their owners were notified on the swarm board first:
levelTest_gap:Game.coe_succProbabilityis added to its closingsimpa.maskedSequence_prediction_gap: itssimp only [Game.coe_succProbability] at hgapis deleted, because the lemma is already in itsPrform.gmwViewReduction_advantageand GMW/Sequential/SimulatorgmwSeqView_advantage_le: these state their goals withGame.advantage (eval …), whichrwcannot match against theExperiment.advantagehead. They unfold the instantiated lemma withsimp only [Experiment.advantage]before rewriting, which adds 3 lines and 1 line.Manual impact
manual/. The security-games chapter already presentsExperiment.advantageandPr[…]as the statement forms (from I1).guide/,ROADMAP.mdandCslibFrontierResultshave no references.results/goldreich-2007.md(8.6) citesreplicate_bind, whose statement is unchanged.Validation
lake build --wfail --iofailpasses on Sequence, the 4 clients, the other importers (Commitment, Hybrid/SavedPrediction) and the 3 tests that usesequenceTest(Presample, GMWPointwise, SavedPrediction). This is 7606 jobs on main 1334f1b.lake lintpasses on the 5 changed modules.check_changed_files.py --source-only,check_hygiene.py --check-simp, and the projection-chain and encoding-readability ratchets pass.GMW/Simulator.lean: 1projection-chain baseline entry is lowered, as the ratchet asks. That file has no counted chains on main either; this PR touches only a proof there.Limitations: the GMW proofs and
levelTest_gapkeep theirGame.advantage/Game.succProbabilitystatements. Restating them is outside this item, which only restates the two Sequence theorems. There are no deprecated aliases (pre-release policy).AI assistance
The refactor and this description were written by an AI agent (Claude, via Jetski) working as a worker in the crypto readability swarm. Agent review is pending; no human has reviewed it yet.