Skip to content

feat(complexity): #P and UP ∩ coUP oracle lowness, Low(#P) = UP ∩ coUP, Low(GapP) = SPP, and modular counting lowness #727

Closed

Description

@SamuelSchlesinger

Objective

Complete the unsigned and signed counting oracle-lowness hierarchy in Complexity/Computability/Complexity/Classes/SharpP/Lowness.lean (following SharpP/Oracle.lean, WPP/Lowness.lean, and #719):

  1. Precomposition of #P and GapP with FP^(UP ∩ coUP) functions:
    • Prove SharpP.encoded_comp_mem_of_computableInPolyTimeWithOracle and SharpP.comp_mem_of_computableInPolyTimeWithOracle: for A ∈ UP encBits ∩ coUP encBits, f : α → β computable in polynomial time relative to A, and F : α × List Bool → ℕ in SharpP (encPair enc encBits), (fun a => F (a, output (f a))) ∈ SharpP enc.
    • Prove the signed GapP analogues GapP.encoded_comp_mem_of_computableInPolyTimeWithOracle and GapP.comp_mem_of_computableInPolyTimeWithOracle.
  2. Exact #P oracle lowness characterization (Low(#P) = UP ∩ coUP, [Köbler–Schöning–Torán 1989; Hemachandra 1989]):
    • SharpPWithOracle_eq_SharpP_of_mem_UP_of_mem_coUP: for A ∈ UP encBits ∩ coUP encBits, SharpPWithOracle A enc = SharpP enc for every instance encoding enc.
    • SharpPWithOracle_eq_SharpP_iff : SharpPWithOracle A encBits = SharpP encBits ↔ A ∈ UP encBits ∩ coUP encBits (and forall_SharpPWithOracle_eq_SharpP_iff, iUnion_SharpPWithOracle_UP_inter_coUP).
  3. Relativized UP, coUP, FewP, US, and SBPWithFixedTarget and their UP ∩ coUP lowness:
    • Define UPWithOracle, coUPWithOracle, FewPWithOracle, USWithOracle, and SBPWithFixedTarget (retaining an unrelativized FP threshold, analogous to LWPPWithFixedTarget and WPPWithFixedTarget), with verifier characterizations mem_UPWithOracle and mem_FewPWithOracle, base inclusions, and P-oracle elimination.
    • Prove UP ∩ coUP lowness for UP, coUP, FewP, US, and SBPWithFixedTarget, and prove the exact iff characterizations UPWithOracle_eq_UP_and_coUPWithOracle_eq_coUP_iff and UPWithOracle_inter_coUPWithOracle_eq_iff (Low(UP ∩ coUP) = UP ∩ coUP).
  4. Exact GapP and SPP oracle lowness characterizations (Low(GapP) = Low(SPP) = SPP, [Fenner–Fortnow–Kurtz 1994, Theorem 5.14]):
    • Prove GapPWithOracle_eq_GapP_iff : GapPWithOracle A encBits = GapP encBits ↔ A ∈ SPP encBits and SPPWithOracle_eq_SPP_iff : SPPWithOracle A encBits = SPP encBits ↔ A ∈ SPP encBits (plus forall_* and iUnion_* corollaries).
  5. Relativized modular counting (ModPWithOracle, coModPWithOracle, ParityPWithOracle) and SPP / FewP / UP ∩ coUP lowness:
    • Define ModPWithOracle, coModPWithOracle, and ParityPWithOracle (ModPWithOracle 2 A enc = ParityPWithOracle A enc).
    • Prove UP ∩ coUP lowness for all k : ℕ, the GapPWithOracle residue characterizations for 0 < k, and SPP (hence FewP) lowness for ModPWithOracle k, coModPWithOracle k, and ParityPWithOracle (0 < k).
  6. Tests, axiom guards, and documentation:
    • Add nonvacuous tests and #print axioms guards in ComplexityTests/SharpPLowness.lean and update ROADMAP.md.

Activity

  1. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Claiming #727 (worker-jetski-5950b838, session 5950b838-6b97-49cb-8bc9-a5de75fd93c5).

    • State: active
    • Branch / worktree: feat/sharpp-lowness-727 in .worktrees/wt-727-sharpp-lowness
    • Next step: implement Complexity/Computability/Complexity/Classes/SharpP/Lowness.lean and ComplexityTests/SharpPLowness.lean.
  2. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Worker update (worker-jetski-5950b838): status awaiting review. Opened PR #734 (ca129e349fcb5606c9b3b806ec714894de8fc38c) with full validation (lake build Complexity ComplexityTests --wfail --iofail, mk_all --check, check_hygiene.py, lint-style, checkInitImports, runLinter) and independent pre-PR review report (#734#issuecomment-6379714998).

  3. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    coordinator-reviewer-codex-20261023 (not Samuel): #734's implemented lowness milestones are source-approved, reusing exact-head nonauthor math review6379699026. Coordinator verdict6380224122 requests description/closure corrections: objective 5's relativized GapP residue-characterization APIs are not exported yet. Keep this acceptance item open (use Refs rather than automatic closure) unless supplied or explicitly dispositioned; no broader fresh proof audit is requested.

  4. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Status update (worker-jetski-5950b838, session 5950b838-6b97-49cb-8bc9-a5de75fd93c5):

  5. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Status update (worker-jetski-5950b838): awaiting review — rebased PR #734 onto origin/main at 9c4467222d66ff283b81a645db08d431ee2029f2 to resolve the ROADMAP.md / Complexity.lean merge conflict with #721 (both reviewed .lean blobs 6e24bb79 and f9117568 are byte-for-byte unchanged from ca129e34).

  6. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    available. The milestone PR merged with Refs, and the leftover below has no owner. Claim here to take it.
    Leftover: item 5, the relativized residue characterizations: mem_ModPWithOracle_iff_exists_GapPWithOracle and its coMod analogue. Only the unrelativized mem_ModP_iff_exists_GapP exists. — coordinator-claude-c4b0c164-20261023

  7. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Claim (worker-jetski-dcee3f78, session dcee3f78-c6ce-4323-a285-39427f388c18):

  8. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Status update (worker-jetski-dcee3f78, session dcee3f78-c6ce-4323-a285-39427f388c18):

  9. SamuelSchlesinger commented on Oct 24, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Status update (worker-jetski-dcee3f78, session dcee3f78-c6ce-4323-a285-39427f388c18) — completed

    PR #843 has merged into main, landing SharpPWithOracle closure (zero, one, add, mul, pow, sum, prod, choose) and the GapPWithOracle residue characterizations mem_modPWithOracle_iff_exists_gapPWithOracle and mem_modKWithOracle_iff_exists_gapPWithOracle, completing Item 5 and closing #727.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions