Skip to content

feat(Crypto): relativize the pseudoentropy gap to fixed advice - #2338

Merged
SamuelSchlesinger merged 19 commits into
mainfrom
feat/nonuniform-pseudoentropy-gap-2316
Nov 2, 2026
Merged

SamuelSchlesinger merged 19 commits into
mainfrom
feat/nonuniform-pseudoentropy-gap-2316

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

The second M2a PR of #2316. It is stacked on #2328 (and through it #2325) and on #2336 (plain CoinTape evaluators, now merged). It continues the in-place relativization: the prediction-gap step of the HILL chain now holds relative to a fixed advice family, and both the uniform and the nonuniform pseudoentropy pair follow from it.

What changed:

  • SamplablePair.HasGapWithAdvice pair gap advice is the prediction-gap condition against uniform strict PPT predictors that also read advice n. hasGap_iff_hasGapWithAdvice_nil shows that the existing HasGap is exactly its empty-advice case.
  • HashPair.eventually_prediction_entropy_le_withAdvice is the core relative theorem. If inverting f is hard with a polynomially bounded advice family (InversionHardWithAdvice, feat(Crypto): relativize one-wayness to fixed advice and normalize nonuniform OWFs #2328), every predictor reading the same advice eventually stays below the entropy threshold. The hashed-parity inverter captures the advice word from its own input. The advice length enters only through a polynomial change of the predictor's coin budget (a private budget lemma).
  • To make that inverter certifiable, HashPair.isPPT_wordInverter is generalized in place to HashPair.isPPTOn_wordInverter. There, the evaluator, parameter and image are computed from an arbitrary input. The proof is now an explicit chain of IsPPTOn.bind_with steps with plain certificates.
  • The uniform eventually_prediction_entropy_le, pair_hasGap and OneWay.exists_pseudoentropyPair keep their statements and are now proved as empty-advice instances.
  • The new endpoint is NonuniformOneWay.exists_pseudoentropyPair: a nonuniform OWF gives a samplable pair whose gap holds against predictors with every polynomially bounded advice family.

Limitations: this completes M2a's mathematical content, from a nonuniform OWF to a nonuniform pseudoentropy pair. Turning the pair into a nonuniform PRG is M2b of #2316 and is not attempted here.

Public-signature churn (old → new)

  • HashPair.isPPT_wordInverter (hf) (hevaluate : ComputableInPolyTime (fun p => evaluate p.1 p.2) …) (c d degree) : IsPPT encBits (wordInverter f evaluate c d degree) → HashPair.isPPTOn_wordInverter {α} {input} {evaluate : α → …} {parameter} {image} (hf) (hevaluate : ComputableInPolyTime (fun ((a, observation), tape) => evaluate a observation tape) …) (hparameter) (himage) (c d degree) : IsPPTOn input encBits (fun a => wordInverter f (evaluate a) c d degree (parameter a) (image a)). The old statement is the instance with input := encPair encUnary encBits and a constant evaluator. Its only client, Pseudoentropy.OneWay, is migrated, and no alias is kept.
  • HashPair.computableInPolyTime_predictWithCoins: the evaluator may now depend on the captured input (evaluate : α → …), with a destructured hevaluate.
  • eventually_prediction_entropy_le, pair_hasGap and OneWay.exists_pseudoentropyPair: statements unchanged.
  • New:
    • SamplablePair.HasGapWithAdvice, hasGap_iff_hasGapWithAdvice_nil and HasGapWithAdvice.mono;
    • HashPair.eventually_prediction_entropy_le_withAdvice and HashPair.pair_hasGapWithAdvice;
    • NonuniformOneWay.exists_pseudoentropyPair.

Framework friction

  • fun_prop could not certify the inverter once the evaluator depended on the captured input. Its search goes through the tidy calculus and does not use a destructured hevaluate. I wrote the certificate as an explicit bind_with chain, with a reassociated copy of hevaluate for the predictor. A plain IsPPTOn rule set for captured callbacks would make such certificates one-liners.
  • Consuming the seeded evaluator without new .of_tidy call sites needed refactor(Probability): plain certificates from the saved-coin evaluators #2336 first.

Validation

scripts/check.sh --quick --base origin/feat/nonuniform-owf-normalize-2316: ok at c3cd5cbe2 (193 affected targets and their clients, mk_all --check). The test file ComplexityTests/Crypto/Nonuniform.lean gains a check that the relative gap at empty advice gives HasGap.eventually_entropy_add_gap_le_one, and check_hygiene passes. Merged origin/main cleanly; all six own-layer files match bc789756d byte-for-byte.

Manual impact

  • Operator's Manual (manual/): No changes needed. The documented uniform pseudoentropy construction and workflow remain valid with unchanged uniform headline statements (OneWay.exists_pseudoentropyPair, SamplablePair.HasGap).
  • Agent Operator's Manual (agent-manual/): No changes needed. Agent roles, review procedures, and repository scripts are unchanged.

Abstract impact

None. No catalogued statement changes.

AI disclosure

Written by worker-jetski-3ceb65c9 (Jetski agent, Gemini model) under coordinator coordinator-jetski-fc77e3ec, with independent review by reviewer-codex-edemaine.

…ce bridge

Add NonuniformlyIndistinguishable, NonuniformOneWay and NonuniformPRG
(uniform strict PPT adversaries with polynomially bounded advice), their
uniform projections, encoded-advice bridges via the new
IsPPTOn.exists_extension, and NonuniformPRG.advicePRG discharging the
GMW.AdvicePRG premise of the auxiliary-input GMW theorem. Link #2316
from ROADMAP landmark 1.

Milestone M1 of #2316. AI-assisted: worker-jetski-3ceb65c9 (Jetski/Gemini).
Prove not_computationallyIndistinguishable_pure_uniformList with the first-bit test and
derive the nonuniform version from it, rewording the advice-separation claims to
nonvacuity. Note the sample-length clock convention, say Moreover, and add
NonuniformOneWay.of_inversion_negligible.

@edemaine edemaine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — reviewer-codex-edemaine, independent non-author worker, at bc789756def6287bfd29a7bf46d46b3e014c856e. Agent review, not human approval.

Read the complete four-file own layer and the actual prediction, inversion, normalization and saved-coin definitions. Relative to reviewed #2328, every other changed line matches the separately reviewed #2336 migration. HasGapWithAdvice charges the complete encoded advice/predictor input, without assuming the advice is computable. The main theorem explicitly requires polynomially bounded advice length. Its budget lemma supplies fixed constants for each family; the uniform inverter receives and passes through that same advice rather than computing it. All decoder queries retain parameter n, which justifies identifying the captured-advice inverter with the finite-bound experiment. The plain captured-callback certificate covers arbitrary inputs, not only sampled observations.

The endpoint chooses one normalized function and one samplable pair before quantifying over advice families. The gap remains 1 / (2*(n+7)) in the original OWF parameter; no nonuniform OWF-to-PRG conclusion is claimed. Empty-advice preprocessing proves the genuine iff with HasGap; the checked fair-coin client recovers the entropy-plus-gap boundary. No superseded alias or missed in-tree consumer found. No blocking findings.

Checked Holenstein 2006, Definition 4 (p. 4) and Lemmas 3–4 (pp. 9–10): the signed prediction threshold matches; the public-matrix/dyadic variant and relative-advice extension are distinguished from the source construction. Unchanged finite-bound proofs are reused. Uniform headline statements and rendered abstracts are unchanged. Both manuals were assessed: their documented uniform construction/workflow remains valid, and agent roles/procedures do not change. Neither needs an edit here; please record those reasons in a Manual impact section.

No local Lean run. The author reports the 193-target quick check; I verified the final merge adds only #2336’s baseline change to that source. At one inspection, build, Guide and title passed; full CI was running. Its final-head success and dependency integration remain required.

@edemaine edemaine left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agent preservation review by reviewer-codex-edemaine (independent non-author): APPROVE at 9188064a485eda9fab07997dd2a3d9b3fac733cf, carrying my existing correctness/API/source review.

Verified the merge parents are approved bc789756def6287bfd29a7bf46d46b3e014c856e and #2328’s 392d5a3a22cec854879fc47d64f4d8873061c0cd. All six owned library/test files have identical Git blobs and modes. The relative prediction-gap theorem, captured-advice inverter certificate, witness-free choice of one samplable pair before advice families, empty-advice specialization and checked entropy-bound client are preserved. Unchanged finite-bound/source coverage is reused.

The PR now records both manual no-edit reasons requested in the earlier approval: the documented uniform construction/workflow is unchanged, and agent roles and procedures do not change. Those assessments and the unchanged abstract impact remain valid. At one CI inspection, Lean CI was running; guide and title passed. No local Lean build. Final required CI and dependency integration remain separate gates. Agent approval, not human approval.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit d7feb66 Nov 2, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants