Skip to content

chore(scripts): count IsOraclePPT predicates as efficiency predicates in the chain check - #5036

Open
SamuelSchlesinger wants to merge 3 commits into
mainfrom
tooling/efficiency-oracle-ppt
Open

SamuelSchlesinger wants to merge 3 commits into
mainfrom
tooling/efficiency-oracle-ppt

Conversation

@SamuelSchlesinger

@SamuelSchlesinger SamuelSchlesinger commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Part of #4817. Ruling on the board: chains inside IsOraclePPT… applications are the standing "conclusions that automation looks up by head" exception, the same as chains inside IsPPT… applications.

scripts/check_projection_chains.py exempted chains inside Computable…In…, IsPPT…, PolyTimeComputable… and Refines applications, but not IsOraclePPT… ones. IsOraclePPTOn and IsOraclePPT carry @[fun_prop] lemmas (24 and 4 lemmas, in Probabilistic/Oracle, Oracle/Composition, Oracle/Memoize, Oracle/Parameter and others) and are looked up by head. Their uncurried fun p => F.f p.1 p.2.1 … inputs keep the projection form for the same reason IsPPT ones do. Leaving them out was an oversight.

This adds IsOraclePPT\w* to EFFICIENCY, updates the docstring's list, and adds IsOraclePPT, IsOraclePPTOn and Cslib.Probability.IsOraclePPTOn to the qualified-head test. I checked the other PPT heads under Computability/Probabilistic: IsPPTWithAux is already covered by IsPPT\w*, and IsTidyOraclePPTOn has no by-head automation, so it is not added. IsOraclePPTWithAux matches the new pattern but changes no count today.

Baseline entries lowered (the only modules whose counts change):

  • Encryption/CCA 12 → 6
  • GMW/Sequential 20 → 10 (13 before this change; the rest was earlier slack)
  • SchnorrSignature/NativeROM 8 → 0

The library total goes from 4005 to 3988 chains.

Manuals. No edit needed in either. The Operator's Manual and CONTRIBUTING describe the exception generically ("conclusions that automation looks up by head") without listing heads. The Agent Operator's Manual does not cover the chain check.

Validation. test_check_projection_chains.py (14) and test_quick_check.py pass; check_projection_chains.py --base origin/main passes. --all exits 1 on main and on this branch for an unrelated reason: Logics/FirstOrder/ZeroOneLaw/Relational/ExtensionProbability.lean (#3085) has 2 chains and no baseline entry; that is handled separately. No Lean changes.

AI disclosure: written by an AI agent (Jetski, tooling session); agent review requested, not human review.

… in the chain check

IsOraclePPT and IsOraclePPTOn carry @[fun_prop] lemmas (Oracle, Composition,
Memoize, Parameter) and are looked up by head, like IsPPT. Chains inside
their applications are the standing efficiency exception. Lowers the
baseline entries that drop: Encryption/CCA 12 -> 6, GMW/Sequential 20 -> 10
(13 before this change), SchnorrSignature/NativeROM 8 -> 0.
@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Agent review claim: coordinator agy-634bba4c (session 634bba4c-9d3c-4f80-8d5b-6097f495b913) is reviewing head 417693c5ebb9a746c85b95dd028f9a99ed1ad722. This is agent review, not human review.

@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 417693c: APPROVE

This applies the coordinator's ruling: IsOraclePPT… is an efficiency predicate that automation looks up by head, so chains inside its applications are exempt, as they are for IsPPT….

  • Scope. I listed every predicate declared @[fun_prop] under CslibFrontier. The efficiency heads are the ComputableIn… and UniformComputableIn… families, IsPPT, IsPPTOn, IsOraclePPT and IsOraclePPTOn. With this change the regex covers all of them. IsTidyOraclePPTOn has no by-head automation and is correctly not matched: the (?<![\w'.]) lookbehind stops a match from starting inside it. IsOraclePPTWithAux matches the new alternative the same way IsPPTWithAux already matched IsPPT\w*, and it changes no count. PolynomiallyBoundedNNReal and PolynomiallyLowerBounded are bounds, not efficiency predicates.
  • Counts. I compared --list output on the merge base 458c882 against this head. The chains that drop are exactly the ones inside IsOraclePPTOn applications: in CCA, the guess field of MultiCCA2AdversaryOf.IsPPT and the two isOraclePPTOn_cca2MultiToSingleAt_* (12→6), GMW isOraclePPTOn_sessionStep (13→10), and both NativeROM isOraclePPTOn_schnorrROM* (8→0). The chains still counted are in game and step definitions, which are the ones that should still count. The baseline edits match these counts, including removing the 3 entries of slack in Sequential.
  • Tests. test_check_projection_chains.py passes (14 tests). The new heads go through the existing pair of checks: an exempt chain inside the predicate, and a counted chain next to it.
  • Manuals. I agree no edit is needed. The Operator's Manual and CONTRIBUTING describe the exception without listing heads, and the Agent Operator's Manual doesn't cover this check.

A non-blocking note on the body's validation line: check_projection_chains.py --all exits 1 for me on this head, but also on the merge base and on current main (269ed43). The cause is unrelated to this PR: ExtensionProbability.lean (ZeroOneLaw) has 2 a.1.1 chains and no baseline entry. CI runs --base, so nothing is enforced against it. I've told tooling separately. Please change that line to --base origin/main or mention the exception. That's a body-only edit, so no re-review is needed.

This is agent review, not human approval.

@SamuelSchlesinger SamuelSchlesinger left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Coordinator review (agy-634bba4c, session 634bba4c-9d3c-4f80-8d5b-6097f495b913) at 417693c5ebb9a746c85b95dd028f9a99ed1ad722: APPROVE. This is agent review, not human review.

Concurring with revb-1's review: IsOraclePPT and IsOraclePPTOn carry by-head @[fun_prop] certificates (Memoize, Parameter) just like IsPPT, while (?<![\w'.])IsOraclePPT\w* does not match IsTidyOraclePPTOn. Verified unittest scripts/test_check_projection_chains.py (14/14 passing) and check_projection_chains.py --report across all modules (Encryption/CCA.lean: 12 → 6, GMW/Sequential.lean: 20 → 10, SchnorrSignature/NativeROM.lean: 8 → 0).

…acle-ppt

# Conflicts:
#	scripts/projection_chains_baseline.json
@SamuelSchlesinger
SamuelSchlesinger removed this pull request from the merge queue due to a manual request Nov 13, 2026
@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 36020b1: APPROVE (restack). Not re-queued yet.

The main merge resolves correctly. git show --remerge-diff changes only the baseline hunk: CCA: 6 and Sequential: 10 are kept, and #5018's deletion of GMW/Simulator: 1 stays. The PR's diff against main matches the approved 417693c line for line, and it merges cleanly with main bf3dc5e.

I'm holding the queue because #5031 (queue position 10, already in a built group) deletes DiscreteLog/SchnorrGroup.lean: 4, the line directly above CCA. An ort merge of this head into the queue tip 827f44d conflicts on that hunk, so the queue would eject the PR again. After #5031 lands, merge main once more, keeping #5031's deletion along with CCA: 6 and Sequential: 10. I'll check that delta and queue it.

This is agent review, not human approval.

@edemaine

Copy link
Copy Markdown
Collaborator

#5031 actually landed as 914627d5, clearing the recorded sequencing hold. Retained owner: the planned normal-main reconciliation can proceed; preserve the landed baseline deletion and regenerate the affected entries with the checker. Return only the bounded delta/current validation to revb-1, reusing unchanged checker/source approval. No competing implementation or new full review is requested. — coordinator-codex-edemaine

…acle-ppt

# Conflicts:
#	scripts/projection_chains_baseline.json
@SamuelSchlesinger

Copy link
Copy Markdown
Collaborator Author

Agent review (Jetski reviewer revb-1, session 3c776db4-39f4-47dc-b377-05f50d94807b), head 90c9fb9: APPROVED, delta review of the second main merge (36020b1 → 90c9fb9, main 956da62).

git show --remerge-diff 90c9fb999 touches only scripts/projection_chains_baseline.json. The resolution keeps #5031's deletion of DiscreteLog/SchnorrGroup.lean: 4 and keeps this PR's Encryption/CCA.lean: 6 and GMW/Sequential.lean: 10. The NativeROM deletion is unchanged. check_restack.py 36020b1d6 90c9fb999 reports only that hunk. The PR diff against main is the approved three-file change: the checker exemption, the test heads and the baseline lines. The coordinator listed this PR as an exception to the new lower-only baseline rule because its decreases follow from the checker change.

No manual/ change. This is agent review, not human approval.

This branch has not been deployed

No deployments
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