Repository navigation
Kadin 1989: a sparse Turing-complete set for NP collapses PH to P^{NP[O(log n)]} #2062
Description
Goal. Kadin's theorem: if NP has a sparse Turing-complete set, the polynomial hierarchy collapses to P^{NP[O(log n)]}.
Proposed by coordinator-claude-e6cf7b0d and selected by Samuel. Claimed by worker-claude-e6cf7b0d-kadin89 (Claude Code, Opus) on branch claude/kadin-1989.
Sources and statement
- Kadin, P^{NP[O(log n)]} and sparse Turing-complete sets for NP, JCSS 39(3):282–298, 1989. I could not access the full text, so I cite it without a locator. Its abstract states the stronger form, with hypothesis "sparse
S ∈ NPwithcoNP ⊆ NP^S", and the Turing-complete case as a consequence. This is the 1989 JCSS paper. The erratum recorded in doc(BooleanHierarchy): record Kadin's erratum and the provenance of the deeper BH collapse #2015 concerns the 1988 SICOMP Boolean-hierarchy paper, not this one. - The proof followed here is Hemaspaandra and Ogihara, The Complexity Theory Companion, Theorem 1.14 (p. 19, proof pp. 19–20), which attributes the theorem to Kadin [Kad89]. I checked this locator against the chapter PDF on the authors' companion site. The definition of
P^{NP[O(log n)]}that I use, "allowed at most O(log n) queries to some NP oracle", is on p. 1 of the same chapter.
Target Lean statement (names provisional; M1 is #2065):
theorem PH_subset_PNPLog_of_sparse {S : Set (List Bool)} (hsparse : S ∈ SPARSE encBits)
(hS : S ∈ NP encBits) (hSAT : SAT ∈ PWithOracle S encCNF) (enc : α ↪ List Bool) :
PH enc ⊆ PNPLog encThe hypotheses say that S is a sparse set in NP and that SAT ≤ᵀ S, which is Turing-completeness. NP ⊆ P^S then follows from Cook–Levin and PolyTimeReducible.mem_PWithOracle. The theorem also gives PH enc = SigmaP 2 enc along the way. The Companion concludes PH = Θ₂ᵖ. The reverse inclusion P^{NP[O(log n)]} ⊆ PH is not needed for Kadin's direction, so it is left as a follow-up.
Definitions (no bounded-query class exists on main)
In a new module Classes/Oracle/BoundedQuery.lean:
ComputableInPolyTimeWithOracleQueries A r f input output: the same certificate asComputableInPolyTimeWithOracle, plus a bound on the requests. Run againstlanguageOracle A, the program makes at mostr (input a).lengthrequests, counted byOracleComp.queriesWith.PWithOracleQueries A r enc: the deciders of this kind.PNPLog enc := ⋃ A ∈ NP encBits, ⋃ c, PWithOracleQueries A (fun n => c * Nat.log 2 n + c) enc. This follows the shape ofENPin feat(Classes/Oracle): E relative to an oracle and E^NP (#1539 M1) #2055.
The requests are counted against the oracle A itself, which is the textbook convention. A clocked machine can always add a counter, so a bound uniform over all oracles would give the same class.
Proof plan
- Finite-list oracle simulation (new, reusable). If
fis polynomial time relative toS, there are a polynomialqand a polynomial-timeF : α × List (List Bool) → βsuch thatF (a, ℓ) = f awheneverℓagrees withSon all words of length at mostq |enc a|. The proof builds the canonical oracle transcript one bit at a time with the existing replay API (replayConfig_pt,oracleReplies,replayOutput_oracleReplies), using plainComputableInPolyTime.iterate*. Locality (interpret_languageOracle_congr) together with the clock bound on request lengths finishes the proof. P^S ⊆ P/polyfor sparseS(the Meyer direction of the ROADMAP itemP/poly = P^SPARSE). The advice at lengthnisencList encBitsapplied to a listing ofS^{≤ q n}. It has polynomial length becauseSis sparse. It is decoded withDecoder.bits.listand hardwired byPPoly.of_advice. Together with Karp–Lipton (NP_subset_PPolyOn_iff_SAT,PH_eq_SigmaP_two_of_SAT), this givesPH = Σ₂. That replaces the Companion's step "Θ₂ ⊆ Σ₂, andΘ₂is closed under complement", which would needP^{NP} ⊆ Σ₂. The deviation is recorded in the docstring.- Census and recognition of
S^{≤m}. LetL ∈ Σ₂. Writea ∈ L ↔ ∃ w, (a, w) ∉ B, whereB ∈ NP ⊆ P^S, usingexists_mem_PiP_of_mem_SigmaP_succ. Step 1 givesFand a polynomialmthat bounds the oracle words relevant on inputs(a, w). Then define oneNPlanguageDon(a, k, b): some duplicate-free listℓof exactlykwords has every word of length at mostm |enc a|and inS, and ifb = true, also∃ w, F ((a, w), ℓ) = false. Membership inNPgoes throughmem_NP_of_witnesswith a decoder for the list of words, theirS-certificates, andw. Duplicate-freeness is checked as(eraseDupsBy (· == ·) ℓ).length = ℓ.length.D (a, k, false)says that the census‖S^{≤m}‖is at leastk.- When
kis the exact census, the guessed list is exactlyS^{≤m}, soD (a, k, true) ↔ a ∈ L. This is whereS ∈ NPand the exact census are used.
- Binary search with
O(log n)queries. The census lies in[0, N], whereN = p_S(m |enc a|)is polynomial. The oracle program keeps an interval[lo, hi]that contains the census. Whilelo < hi, it asksD (a, ⌈(lo+hi)/2⌉, false)and halves the interval. It runsNat.size Nrounds, then asksD (a, lo, true). In total it makes at mostNat.size N + 1 ≤ c log n + crequests. The loop is certified withIsOraclePPTOn.iterateWith_spec', as in the SAT self-reduction of feat(Classes/Oracle): the SAT self-reduction relative to an oracle (#1539 M4a) #2059, with an extra lemma countingqueriesWiththroughOracleComp.iterate. The oracle isencoded '' D ∈ NP encBits. - Collapse.
Σ₂ ⊆ P^{NP[O(log n)]}by steps 3–4, andPH = Σ₂by step 2. SoPH ⊆ P^{NP[O(log n)]}.
Milestones
- M1: the bounded-query classes and their basic API:
P ⊆,NP ∪ coNP ⊆ PNPLog, closure under complement, inclusion inP^A. Tests instantiate them non-vacuously. - M2: the finite-list oracle simulation (step 1),
P^S ⊆ P/polyfor sparseS, andPH = Σ₂under the hypotheses (step 2). - M3: census, binary search, and Kadin's theorem (steps 3–5).
Activity
SamuelSchlesinger commentedon Oct 31, 2026
worker-claude-e6cf7b0d-kadin89: the theorem is proved. All three milestones are in stacked PRs awaiting review from outside the Claude fleet.453f4c5): bounded-query classesComputableInPolyTimeWithOracleQueries,PWithOracleQueries,PNPLog, andqueryBit.8e6be09): finite-list oracles (exists_listOracle),P^S ⊆ P/polyfor sparseS, andPH = Σ₂whenSAT ∈ P^S.99e296a):PH_subset_PNPLog_of_sparse, Kadin's theorem in its Turing-complete form, by the census argument of Companion Theorem 1.14.Not done; recorded in ROADMAP:
P^{NP[O(log n)]} ⊆ Σ₂ ∩ Π₂, which would give the Companion'sPH = Θ₂;S ∈ NPwithcoNP ⊆ NP^S;P^{NP[O(log n)]} = P^NP_tt.Merge order is #2065, then #2070, then #2077. Each later PR only needs
mainmerged in once the PR before it lands.feat(Classes/Oracle): bounded-query oracle classes and P^{NP[O(log n)…
Merge origin/main into claude/razborov-perfect-matching
feat(Classes/Sparse): finite-list oracles, P^SPARSE ⊆ P/poly, and PH …
feat(Classes/Hierarchy): nondeterministic time hierarchy at every int…
feat(Classes/Sparse): Kadin's theorem, PH ⊆ P^{NP[O(log n)]} under a …