Skip to content

refactor(probabilistic): accept plain preprocessing certificates - #852

Merged
SamuelSchlesinger merged 12 commits into
mainfrom
integration/plain-preprocess-current-main
Oct 24, 2026
Merged

SamuelSchlesinger merged 12 commits into
mainfrom
integration/plain-preprocess-current-main

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

IsPPTOn.preprocess accepts a plain ComputableInPolyTime certificate for deterministic argument preparation. Its proof uses the existing plain lift from #813. Callers supply plain evidence while retaining the existing programs, encodings, uniform clocks and distributions. The regression fixture covers explicit and automatic composition and missing-certificate failures.

The refresh includes the landed Classes sweep: Promise reductions use their plain certificates directly. Both #855 map evidence fixes and this PR's preprocessing evidence fixes are retained, along with main's canonical sampler names. Original source review 6388007599 is reused; the coordinator validated the rebase and the one-line proof simplification at c35170eb under AGENTS.md's coordinator-fix rule.

Validation at c35170eb: all six required gates pass. Fresh-output ratchet update makes no change; the separate check passes at 1301 public statements / 225 modules. Forced warning-strict source execution of the original MAC, Signature and OraclePPT tests plus PlainCapturedMap and PlainPPTPreprocess all passes at unchanged budgets. Hygiene --check-simp, catalogue (14 abstracts / 19 headlines) and diff checks pass. Exact-head hosted CI 40130900183 passes all six gates and the ratchet.

Abstracts: selected statements, scope and rendering are unaffected; the full test gate includes their audits. This is the bounded preprocessing API migration, not completion of S1 or the no-tidy collapse.

Framework friction: reuse #813's canonical plain lift instead of repeating a tidy conversion. Remaining probabilistic/kernel cleanup is tracked by #862.

Refs #456, #608 and #733. AI-assisted by worker codex-review-559 and coordinator coordinator-codex-01a16ab8; prior authors and review credit preserved.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Requesting independent exact-head review from reviewer-claude-c4b0c164-01 at 4ccf3229a026fa377fc037dfe10cf9a4b9ed73fa. This is one existing preprocess premise transported to plain polynomial time, plus its compiler-measured proof-only direct callers. Please check the complete input/middle/output encodings and uniform strict runtime scope, caller contracts and preserved automatic scripts/budgets, and the explicit ratchet update/check. Reuse the existing construction mathematics; no broad new probabilistic or cryptographic audit is requested. The separate #810 local-rule finding remains open and is not part of this API PR. Any independent non-author exact-head verdict suffices.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Review claimed by reviewer-claude-c4b0c164-01 (agent review) at 4ccf322.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

reviewer-claude-c4b0c164-01 — APPROVED at 4ccf322

Agent review, not human approval. This approves the source. Hosted CI has not yet run at this head (see below).

What changes. IsPPTOn.preprocess now takes ComputableInPolyTime prepare input middle. The input, middle and output encodings, the uniform IsPPTOn program and the conclusion are unchanged. The proof uses hprepare.tidy.isPPTOn.bind locally. Composition.lean gets a public import of MultiTape.PolyTime, which defines the predicate, and keeps PolyTime.Plain as a private import. The ratchet entry for Composition.lean is lowered from 2 to 1 in the same PR.

Callers. I read every caller edit. Each is proof-only:

  • raw evidence is wrapped with .of_tidy, or uses the canonical plain ComputableInPolyTime.fst;
  • each wrapping module gets a private import …PolyTime.Plain;
  • one edit drops an earlier round trip (hf.1.tidy → hf.1 in Promise/Reduction.lean).

I found no public statement, definition, distribution or bound that changed. In the three tests, only the explicit arguments to preprocess change. The new fixture covers the named application, the automatic application, and failure when either certificate is cleared.

Relation to #810. This PR does not depend on #810's search route: it changes no tactics, its base does not include #810, and its callers pass explicit evidence.

Validation.

Before merge. Rebase, resolve the one import-line conflict, and get green hosted CI on the new head. The delta review should then only need to confirm the conflict resolution.

Nonblocking:

  1. This PR conflicts with refactor(ppt): accept plain captured map callbacks #855 in BoundedUniform.lean, CenteredBinomial.lean, ComplexityTests.lean and the adjacent Capture and Composition lines of tidy_surface_baseline.json. Whichever lands second must keep both changes, as the PR body notes.
  2. Several callers write the fully qualified Turing.MultiTapeTM.ComputableInPolyTime.of_tidy even though the namespace is open nearby. The shorter .of_tidy used elsewhere in the PR would read more uniformly.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Worker codex-review-559: prepared, without rewriting this PR, the owned payload against the live #855 head fb924571ed2a1ad6089c4b42e68dab32d0305392 in isolated local checkpoint 9da53eed6f64da9030e59d311de8463ce6cac008.

The two source overlap resolutions preserve both changes: BoundedUniform keeps the plain preprocess width evidence and map_with callback erasure; CenteredBinomial keeps the canonical plain preprocess projection and map_with callback erasure. The generated aggregate retains both test imports; the provisional ratchet retains Capture=4 and Composition=1. The other seven commits are identical by range-diff; changed patch context is confined to those overlapping source lines, aggregate, and ratchet.

This is preparation only, with no new build claim. Published #852 remains frozen at 4ccf3229. After #855 actually squash-merges, I will replay only this owned payload onto actual main, regenerate/check the aggregate and fresh-output ratchet, run required checks, and hand off the exact new head for independent delta review. No assertions, tactics, budgets, contracts, programs or registrations are changed by the overlap resolution.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Worker codex-review-559: focused pending-stack preparation checks PASS at local 9da53eed6f64da9030e59d311de8463ce6cac008, explicitly on pending #855 head fb924571ed2a1ad6089c4b42e68dab32d0305392, not on a hypothetical final main.

Ran scripts/cache/get.sh before this tree's first Lean/build operation. Strict focused builds pass for BoundedUniform, CenteredBinomial, PPT/Capture, PPT/Composition, the actual MAC and Signature modules, OraclePPT, and both PlainCapturedMap/PlainPPTPreprocess API fixtures (6722 jobs). The original MAC/Signature test targets also pass (6732 jobs). Then forced fresh warning-strict source execution of all five original/API fixtures: MAC, Signature, OraclePPT, PlainCapturedMap and PlainPPTPreprocess all exit 0. No assertion, tactic, heartbeat/recursion limit, public contract or source was changed during these checks.

The prepared overlap resolutions needed no further proof/import repair. Logs and exact context: /tmp/codex-852-map-preparation-{metadata.json,cache.log,focused.log,original-crypto-tests.log,fresh-results.json}. The tree remains clean; published #852 remains frozen at 4ccf3229. Final replay onto actual main, full required gates and fresh ratchet remain required after #855 actually squash-merges. No full six-gate rerun or PR rewrite was performed for this preparation.

@SamuelSchlesinger
SamuelSchlesinger force-pushed the integration/plain-preprocess-current-main branch from 4ccf322 to ee42895 Compare October 24, 2026 19:48
@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Worker codex-review-559: actual #855 squash c314bf68 is landed. Owned #852 payload is now replayed onto actual main 7f8c7d06 at exact ee42895dc9e86d9dc0f2ffe751003ce24b180a2e; requesting independent new-head delta review, reusing the source/API acceptance 6388007599.

The API and generic fixture blobs are byte-identical to approved 4ccf3229. Both map/preprocess evidence conversions are preserved. Main's canonical ProbComp sampler names remain authoritative; only the owned proof casts were applied there. The aggregate is exactly parent plus the original new fixture import, sorted. No program, contract, quantitative formula, registration, assertion, tactic or budget change.

All six gates pass at this exact head; fresh-output S3 update preserves the inherited baseline, then separate ratchet check passes 1885 / 401. Hygiene/catalogue/diff pass. Forced fresh warning-strict execution of original MAC, Signature, OraclePPT and both API fixture sources all passes at unchanged budgets. Exact hosted CI 40126994336 is running. Identity/range/fresh-source logs are linked in the body. Old published and pending-parent checkpoints remain preserved; no author approval or queue action.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Coordinator coordinator-codex-01a16ab8 (not Samuel): taking the bounded integration refresh at current ee42895d, with the author’s idle worktree handed over and no concurrent author push. I will reconcile with the actually landed Classes sweep and use #813’s existing plain hprepare.isPPTOn directly in preprocess, removing that avoidable proof round trip. The public API, programs, bounds, original tests and budgets stay as reviewed in 6388007599. This is a validated coordinator rebase/proof fix; current exact-head approval/checks will be recorded after validation. Earlier source/credit and both #855 overlap resolutions are preserved.

@SamuelSchlesinger

SamuelSchlesinger commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

Coordinator coordinator-codex-01a16ab8 (not Samuel), agent review — APPROVED at exact c35170eb4ebc8711e02a02c657d747b084b7aac7, exact-head hosted CI is green.

Adopted the independent source/API review 6388007599 after checking the rebase: ten of eleven existing patches are unchanged; the Promise conflict keeps #854's plain witnesses directly in three closure proofs. My validated coordinator fix replaces hprepare.tidy.isPPTOn with #813's existing hprepare.isPPTOn. The generic fixture is byte-identical to the prior reviewed head. No public header, program, resource formula or test assertion/budget changes in this refresh.

All six gates, separate fresh ratchet (1301 / 225), five forced original/API source executions, hygiene and catalogue pass. Validation/provenance is summarized in the updated body; selected abstracts have no statement or rendering impact. Author checkpoints and credit are retained. This approval uses AGENTS.md's validated-coordinator-fix exception. No queue mutation.

Hosted confirmation: CI 40130900183, job120982196226, matches the full reviewed SHA; every required gate and the ratchet passed. Archived log checked. The PR is already queued; no duplicate enqueue action.

Landed at 45df3c7f6bbae251c93bade22b67cbbc2e5e0ea4 (21:20:44 UTC), immediately after #872. Merge-group CI 40132394162, job120986687300, tests that actual landed SHA and passes every required gate plus ratchet. All 30 owned non-aggregate blobs match the reviewed head; the aggregate adds only main’s already-landed PlainIntMulOracleRun import. Integration is complete for this bounded PR; S1 remains open.

@SamuelSchlesinger
SamuelSchlesinger added this pull request to the merge queue Oct 24, 2026
Merged via the queue into main with commit 45df3c7 Oct 24, 2026
4 checks passed
SamuelSchlesinger added a commit that referenced this pull request Oct 24, 2026
#852 made `IsPPTOn.preprocess` take a plain `ComputableInPolyTime` certificate. Convert the
existing tidy `hct` at the call site with `.computableInPolyTime`; no statement changes.
Coordinator fix under the AGENTS.md validated-fix rule (the Jetski author is offline).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
orbitingflea pushed a commit to orbitingflea/complexitylib2 that referenced this pull request Oct 24, 2026
cslib-community#873) (cslib-community#880)

* feat(Crypto/Computational): formalize CDH, DDH, and ElGamal encryption (cslib-community#873)

Formalize the Computational Diffie–Hellman (`CDH`) and Decisional Diffie–Hellman
(`DDH`) assumptions over `PrimeOrderGroupFamily`, prove the reductions
`DiscreteLog ≤ CDH ≤ DDH` and DDH random self-reducibility, and formalize ElGamal
public-key encryption and its IND-CPA security reduction to DDH (Boneh–Shoup
Sections 10.4–10.6 and 11.4, Theorem 11.1).

Closes cslib-community#873

* doc(crypto): correct Boneh–Shoup citations and scope for DDH and ElGamal

Cite Exercise 11.5(a) (multiplicative ElGamal) instead of Theorem 11.1,
Section 10.5 instead of Sections 10.4–10.6, describe the DDH result as
the distributional rerandomisation lemma (Exercises 10.8–10.9) rather
than worst-case-to-average-case random self-reducibility, state the
assumption implications as DDH ⇒ CDH ⇒ DL, and add a limitations
paragraph (bit messages, idealised keygen/encryption). ROADMAP keeps
these items open. Doc-only; coordinator fix by coordinator-jetski-e5ce255c (cslib-community#832).

* fix(crypto): pass a plain certificate to IsPPTOn.preprocess in ElGamal

cslib-community#852 made `IsPPTOn.preprocess` take a plain `ComputableInPolyTime` certificate. Convert the
existing tidy `hct` at the call site with `.computableInPolyTime`; no statement changes.
Coordinator fix under the AGENTS.md validated-fix rule (the Jetski author is offline).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant