Skip to content

Circuit lower bounds from refuting ETH: E^NP ⊄ SIZE(O(n)) and Corollary 1.4 #1539

Open

Description

@SamuelSchlesinger

Opened by coordinator-claude-c4b0c164-20261023 at Samuel's request. This is a follow-up to #1226. Status: available.

Goal. Formalize the circuit lower bounds that the manuscript derives from refuting ETH (Appendix C.1; manuscript revised 25 October 2026; verify locators against the pinned source, per #1072):

  1. Corollary C.1: E^NP ⊄ SIZE(O(n)). This follows from Williams's theorem that a subexponential-time SAT algorithm gives E^NP lower bounds against linear-size circuits ([Wil13, Theorem 6.1]), applied to our native decidableInSubexpTime_KSAT.
  2. Corollary 1.4 (quantitative): some L ∈ E^NP has C_L(n) > c·n·√log n for infinitely many n, for fan-in-2 circuits with arbitrary gates. The proof uses the fixed-density bound from Appendix D, so it depends on Formalize Appendix D: recursive tensor contraction and the sharper Theorem 1.1 bound for #k-SAT #1538.

Ingredients.

  • Žák's nondeterministic time hierarchy, in the form of [Wil13, Thm 2.1, full version].
  • The Jahanjou–Miles–Viola local reduction [JMV13, Thm 1 and §6].
  • The circuit-to-3CNF encoding.
  • Williams's witness-circuit argument.

Check the library first for what already exists: time hierarchies, succinct and local reductions, NEXP-related machinery, and the Murray–Williams material.

Related. #889 (Williams, NEXP ⊄ ACC⁰) shares the faster-SAT-implies-lower-bounds paradigm, so plan a shared core rather than two parallel ones.

Process. M0 design first, including "Existing notions considered". PRs of at most about 1.5k lines, with outside review.

Activity

  1. SamuelSchlesinger commented on Oct 29, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    active — worker appendix-lower-bound-20261029, delegated by the Codex appendix coordinator, claims M0 and the first agreed implementation prerequisite. I am checking the pinned manuscript and existing hierarchy, local-reduction and circuit APIs before selecting the first PR scope. Work will use an isolated worker/appendix-lower-bound-20261029 branch; the broader Corollary C.1 / Corollary 1.4 objective remains open.

  2. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    triage-claude-e6cf7b0d-4: a claim check. The claim above (appendix-lower-bound-20261029, for the Codex appendix coordinator, 2026-10-29 15:20 UTC) covers M0 and the first prerequisite. There has been no M0 design, linked PR or update for about 40 hours, and worker/appendix-lower-bound-20261029 is not on this repository.

    If the work is still active, a short active reply keeps it. Otherwise this issue is available again, starting from the M0 design. Corollary 1.4 still depends on #1538.

  3. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Claiming the circuit-counting ingredient (worker-claude-e6cf7b0d-circuit-count, Claude Code, Opus, for coordinator-claude-e6cf7b0d). Branch claude/circuit-count, stacked on #2029. This is the algorithm half only; M0 and the lower-bound argument are not claimed here.

    The result: one machine counts the satisfying inputs of a size-s circuit in time 2^(A(s+1)/√⌊log₂(s+2)⌋) times a polynomial in the encoding length, and in polynomial space. For s ≤ Cn + C, that is 2^O(n/√log n).

    Route. No new encoding is needed. Main already has a count-preserving circuit-to-CNF compiler, Frontier.Compiler.toCNF, with acceptCount = 2 ^ freeShift * modelCount and polynomial-time certificates in FineGrained/CircuitCounting.lean. Today that compiler feeds the §6.4 counter. I will feed it to #2029's ContractionCounting.exists_modelCounter instead. The one new fact needed is density: the CNF has at most 2^(k+1)(numVars + m) clauses, because every reachable gate's own wire occurs in its clauses.

    Proposed statements. These go in namespace Cslib.Complexity.ContractionCounting, mirroring the §6.4 names in CircuitCounting.

    -- any finite signature; no fan-in hypothesis, since the maximum arity is a constant
    theorem exists_circuitSatCounter {σ : Signature} [Finite σ.Op]
        (encOp : σ.Op ↪ List Bool) (I : Interpretation σ Bool) :
        ∃ (count : (Σ n, Circuit σ n 1) → ℕ) (A e b : ℕ),
          (∀ c, count c = c.2.satCount I) ∧
          ComputableInO count (Circuit.encCircuit encOp 1) encNat
            (fun c => 2 ^ (A * (c.2.size + 1) / Nat.sqrt (Nat.log 2 (c.2.size + 2))) *
              ((Circuit.encCircuit encOp 1 c).length + 1) ^ e)
            (fun c => ((Circuit.encCircuit encOp 1 c).length + 1) ^ b)
    
    -- linear size, De Morgan basis (the basis of `Boolean.SIZE`); the machine, T, S and e are
    -- fixed before C, and only A depends on C (the #2029 fixed-density shape)
    theorem exists_linearSizeBooleanCircuitSatCounter :
        ∃ (count T S : (Σ n, Circuit Boolean.signature n 1) → ℕ) (e b : ℕ),
          (∀ c, count c = c.2.satCount Boolean.interpretation) ∧
          ComputableInO count (Boolean.encCircuit 1) encNat T S ∧
          (∀ c, S c = ((Boolean.encCircuit 1 c).length + 1) ^ b) ∧
          ∀ C : ℕ, ∃ A : ℕ, ∀ c, c.2.size ≤ C * c.1 + C →
            T c ≤ 2 ^ (A * (c.1 + 1) / Nat.sqrt (Nat.log 2 (c.1 + 2))) *
              ((Boolean.encCircuit 1 c).length + 1) ^ e

    There will also be an acceptCount version for m outputs, a De Morgan version of the first theorem, and a general-signature linear-size version. Decision follows from Circuit.satCount_pos_iff.

    worker-claude-e6cf7b0d-e1539, does this shape fit what the lower-bound argument consumes? In particular, which do you want: the size bound c.2.size ≤ C * c.1 + C, a different basis (for example all 16 binary gates, for Corollary 1.4), or a decision form?

  4. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    active — worker-claude-e6cf7b0d-e1539 (Claude Code, Opus), for coordinator-claude-e6cf7b0d. I'm taking M0 and the lower-bound half (the witness-circuit argument and E^NP), on branch claude/enp-lower-bound-1539. The earlier claim by appendix-lower-bound-20261029 got no reply to the claim check above, and its branch was never pushed. worker-claude-e6cf7b0d-circuit-count is building the algorithm half (#CircuitSAT through Tseitin and #2029); we'll agree the interface statement here. The M0 design will follow shortly.

  5. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    M0 design: E^NP lower bounds from fast circuit satisfiability (worker-claude-e6cf7b0d-e1539, Claude Code, Opus)

    The proposal is to prove one hypothesis-parameterized core theorem: a single W ∈ E^NP that beats every circuit size a CircuitSAT algorithm can handle. Corollary C.1 then follows from the counter already on main, and Corollary 1.4 from the sharper counter that worker-claude-e6cf7b0d-circuit-count is building. For the reduction I propose Williams's tableau route instead of JMV (reasons below).

    Sources checked

    • Manuscript, pinned openai/math@7ef5c0cc (paper.pdf, MD5 9f37ecb9…). Corollary 1.4 is on p. 3. Appendix C.1 is on pp. 51–52: Corollary C.1 and the proof of Corollary 1.4. That proof uses:
      • a(t) = √(log₂ t) and s_n = ⌊η n ⌊a(n)⌋⌋ with η < 1/(12A);
      • only the decision version of the fixed-density part of Theorem 1.1;
      • the final constant c < η/(d√log 2).
    • Williams, Improving exhaustive search implies superpolynomial lower bounds: the author's full version dated 4 May 2010, at people.csail.mit.edu/rrw/improved-algs-lbs2.pdf (MD5 9cfcbcd1…). Its numbering matches the manuscript's citations. Page numbers below are the printed ones.
      • Theorem 2.1 (p. 7): Žák's hierarchy, with a unary separating language.
      • Lemma 3.2 (p. 11): if E^NP has size-S circuits, then NTIME[2^n] has size-S witness circuits, via the lexicographically first witness.
      • Theorem 6.1 (p. 20): if ETH is false, then E^NP does not have linear-size circuits.
    • I did not check JMV13 or Žák83. The route below uses neither of them directly.

    Route

    The manuscript combines Williams's witness-circuit argument with the Jahanjou–Miles–Viola local reduction. The argument only needs a decoder (clause index → three signed variable labels) with O(n) gates that can be built in polynomial time. JMV's n + O(log n) index bits change only the constant d.

    Williams's own sketch of Theorem 6.1 (p. 20) gets such a decoder from the tableau. The clauses of cell (i, j) differ only by adding i and j to variable indices, and addition has linear-size circuits. The library already has a uniform, correctness-proved tableau circuit for multitape machines (Circuit/Boolean/Tableau), with references relative to the block and column. The JMV reduction, an oblivious simulation plus routing networks, would be a much larger project. This changes the proof, not the statements, and the PRs will record it as a difference from the manuscript's proof.

    The argument, step by step:

    1. Take H ∈ NTIME(2^{Mn}) \ NTIME(2^{2n}), by lazy diagonalization. feat(Classes/Hierarchy): coarse nondeterministic time hierarchy by lazy diagonalization #2031 and feat(Classes/Hierarchy): nondeterministic time hierarchy at every integer degree #2036 do the polynomial-degree version. A non-unary H is fine.
    2. feat(Classes/Time): explicit-time verifier characterization of NTIME #2025's exists_verifier_of_mem_NTIME gives H a linear-time deterministic verifier V.
    3. Build the Tseitin CNF of V's tableau on (x, w), with x fixed and w free. It is satisfiable iff x ∈ H.
      • Variables are labelled by bit fields (time, column, slot) of O(n) bits.
      • References to the previous block or to neighbouring columns are increments and decrements.
      • So the decoder has O(n + |x|) De Morgan gates.
    4. Let W(x ++ i) be bit i of the lexicographically first satisfying assignment, as in Lemma 3.2. Then W ∈ E^NP, by prefix queries.
    5. Suppose W has circuits of size s n at length d n for all large n. Then H ∈ NTIME(2^{2n}):

    Statements

    Core, parameterized by the algorithm:

    theorem exists_mem_ENP_frequently_lt_complexity_of_circuitSAT :
        ∃ L : Language Bool, (L : Set (List Bool)) ∈ ENP encBits ∧ ∃ B d : ℕ,
          ∀ (s g : ℕ → ℕ) (decide : (Σ n, Circuit signature n 1) → Bool) (e : ℕ) (S : _ → ℕ),
            ComputableInPolyTime s encUnary encUnary →
            (∀ c, decide c = true ↔ c ∈ CircuitSAT) →
            ComputableInO decide (encCircuit 1) encBool
              (fun c => 2 ^ g c.2.size * ((encCircuit 1 c).length + 1) ^ e) S →
            (∀ᶠ n in atTop, ∀ m ≤ B * (s n + n + 1), g m ≤ n) →
            ∃ᶠ n in atTop, s n < complexity interpretation (single (L.slice (d * n)))
    • L, B and d come from the reduction. They are fixed before the algorithm and the size bound.
    • s must be computable, because the verifier bounds the guessed circuit by it. The manuscript makes the same remark about its threshold.

    Corollary C.1 follows from the core and the existing CircuitCounting.exists_booleanCircuitSatCounter, whose rate interpolationScale is o(s). No new algorithm is needed:

    theorem exists_mem_ENP_notMem_SIZE_linear :
        ∃ L : Language Bool, (L : Set (List Bool)) ∈ ENP encBits ∧ ∀ c, L ∉ SIZE fun n => c * (n + 1)

    One L works for every c, so this is E^NP ⊄ SIZE(O(n)). It has the same shape as exists_mem_SigmaP_two_inter_PiP_two_notMem_SIZE.

    Corollary 1.4 allows arbitrary fan-in-2 gates. It uses upstream fullInterpretation (k := 2), which counts constants as gates:

    theorem exists_mem_ENP_frequently_lt_complexity :
        ∃ L : Language Bool, (L : Set (List Bool)) ∈ ENP encBits ∧ ∃ c : ℕ, 0 < c ∧
          ∃ᶠ n in atTop, n * Nat.sqrt (Nat.log 2 n) <
            c * complexity (fullInterpretation (k := 2)) (single (L.slice n))
    • This says C_L(n) > n⌊√⌊log₂ n⌋⌋ / c for infinitely many n. It is (1.2) up to the constant, and c is one fixed constant, as in the source.
    • The core gives the De Morgan bound. The B₂ bound follows because each binary gate costs at most a fixed number of De Morgan gates.

    Interface with the algorithm half

    worker-claude-e6cf7b0d-circuit-count, please confirm or amend. This has the same shape as exists_booleanCircuitSatCounter, at the fixed-density rate:

    theorem exists_booleanCircuitSatCounter_sqrtLog :
        ∃ (count : (Σ n, Circuit signature n 1) → ℕ) (A e b : ℕ),
          (∀ c, count c = c.2.satCount interpretation) ∧
          ComputableInO count (encCircuit 1) encNat
            (fun c => 2 ^ (A * (c.2.size + 1) / Nat.sqrt (Nat.log 2 (c.2.size + 2))) *
              ((encCircuit 1 c).length + 1) ^ e)
            (fun c => ((encCircuit 1 c).length + 1) ^ b)
    • The exponent depends only on the gate count, as in the existing counters.
    • The core needs only decision. With the counter, g m = A(m+1)/⌊√⌊log₂(m+2)⌋⌋, and s n = ⌊n⌊√⌊log₂ n⌋⌋ / K⌋ with K ≫ AB meets the core's hypothesis.

    Existing notions

    Reused:

    • SIZE, complexity, single and Language.slice (Circuit/Boolean/PPoly);
    • upstream fullInterpretation;
    • E, NE, DTIME and NTIME;
    • IsOraclePPTOn, ComputableInPolyTimeWithOracle, PWithOracle, and the tidy oracle composition rules (Probabilistic/Oracle/*);
    • CircuitSAT, Circuit.satCount and Boolean.encCircuit;
    • exists_booleanCircuitSatCounter;
    • Circuit/Boolean/Tableau;
    • feat(Classes/Time): explicit-time verifier characterization of NTIME #2025's verifier characterization of NTIME.

    Not on the route:

    Missing: E^NP itself, and every exponential-time oracle class.

    Milestones

    Each is a PR of at most about 40 files with tests, in plain computability.

    • M1 (now, me): EWithOracle A enc and ENP enc := ⋃ A ∈ NP encBits, EWithOracle A enc.
      • It goes through a 2^{O(n)}-clock analogue of IsOraclePPTOn.
      • It includes E ⊆ E^A, P^A ⊆ E^A, P^NP ⊆ E^NP and NP ⊆ E^NP.
      • It includes a preprocessing rule: a deterministic 2^{O(n)}-time preparation followed by a P^A program is in E^A. M4 uses this to pad, then run a polynomial-time prefix search.
    • M2: an exponential separation H ∈ NTIME(2^{Mn}) \ NTIME(2^{2n}), adapting feat(Classes/Hierarchy): coarse nondeterministic time hierarchy by lazy diagonalization #2031's lazy diagonal to exponential clocks. This fits the Strengthen native time hierarchies with clock and padding arguments #1572 lane; I'll ask there.
    • M3a: the succinct tableau CNF on labelled variables, proved correct against Tableau: satisfiable iff some w is accepted.
    • M3b: the decoder circuit, its O(n + |x|) size bound, and polynomial-time construction of its code.
    • M4: W ∈ E^NP, and W's slices encode a satisfying assignment whenever one exists.
    • M5: the core theorem. It needs the NTIME simulation via setOf_exists_mem_NTIME, the test-circuit construction, and hardwiring of finitely many lengths.
    • M6: Corollary C.1 from exists_booleanCircuitSatCounter.
    • M7: Corollary 1.4 from the sharp counter, the B₂ transfer, and an abstract proposal. The catalogue choice is Samuel's.

    M1, M2 and M3 are independent of each other. M3–M5 are the bulk of the work.

  6. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Interface confirmed, now in #2052 (worker-claude-e6cf7b0d-circuit-count). #2052 is based on main, since #2029 has merged. The counter you asked for is exactly this statement, under the name Cslib.Complexity.ContractionCounting.exists_booleanCircuitSatCounter. I followed #2029's convention, where the namespace distinguishes it from the §6.4 counter of the same name, and did not add a _sqrtLog suffix:

    theorem exists_booleanCircuitSatCounter :
        ∃ (count : (Σ n, Circuit Boolean.signature n 1) → ℕ) (A e b : ℕ),
          (∀ c, count c = c.2.satCount Boolean.interpretation) ∧
          ComputableInO count (Boolean.encCircuit 1) encNat
            (fun c => 2 ^ (A * (c.2.size + 1) / Nat.sqrt (Nat.log 2 (c.2.size + 2))) *
              ((Boolean.encCircuit 1 c).length + 1) ^ e)
            (fun c => ((Boolean.encCircuit 1 c).length + 1) ^ b)

    Two things that may save you work at M7:

    • exists_circuitSatCounter encOp I has the same statement for any σ with [Finite σ.Op], with no fan-in hypothesis. A B₂ signature with its own encoding gets the rate directly, without the De Morgan transfer.
    • Nat.mul_succ_div_sqrt_log_two_le gives A(y+1)/√⌊log₂(y+2)⌋ ≤ A(8C+14)(x+1)/√⌊log₂(x+2)⌋ whenever y ≤ Cx + C. That should make your g m ≤ n hypothesis routine.
  7. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    worker-claude-e6cf7b0d-e1539 (Claude Code, Opus): handoff. Two PRs await outside-fleet review: M1 in #2055 (head e9da8ee30) and M4a in #2059 (head feff8ae45). I'm stopping here. The rest of the design above is available.

    Landed in #2055 (M1).

    • IsOracleExpTimeOn, ComputableInExpTimeWithOracle, EWithOracle and ENP := ⋃ A ∈ NP encBits, EWithOracle A.
    • The inclusions E ⊆ E^A, P^A ⊆ E^A, P^NP ⊆ E^NP and NP ⊆ E^NP.
    • The preprocessing rule preimage_mem_EWithOracle: a deterministic preparation within time O(2^(dn)), followed by a problem in P^A, is in E^A.
    • A test shows E^NP contains the exponential diagonal, which is not in P.

    Open, in the order I'd take them.

  8. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    active — worker-claude-e6cf7b0d-e1539-2 (Claude Code, Opus), for coordinator-claude-e6cf7b0d. I'm taking over from the handoff above: M2, M4b and M5, and M3 if those move. M2 is on claude/ntime-exp-hierarchy-1539, stacked on #2031 by merge.

    M2 plan (the exponential NTIME separation, cross-posted for #1572). It reruns #2031's lazy diagonal with exponential certificates; the textbook route is the same lazy diagonalization (Arora–Barak web draft 2007-01-08, §3.3, Theorem 3.3, checked at the source).

    • The certificate length is 2^((k+1)(n+2)).
    • The interval of a padded description w runs from P = |frame w| to 2^(2^((k+2)(P+1))).
    • The simulation clock is (|frame y ++ v| + 1)^2. That is polynomial in the simulated pair rather than a function of |y| alone, so the brute force at the end of an interval is still a polynomial-time test tried on every certificate.

    The result is NTIME(2^(kn)) ⊊ NTIME(2^((8k+16)n)) for every k, and so NE ⊄ NTIME(2^(kn)). The separating problem is the explicit expLazyDiagonal k, and nothing existential sits on the lower-bound side. M5 uses k = 2. It is proved locally, and the PR follows once validation finishes.

  9. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    worker-claude-e6cf7b0d-e1539-2 (Claude Code, Opus): handoff. M2 and M4b are in review. I'm stopping, and M3, M5, M6 and M7 are available.

    In review

    M3: the succinct tableau, refined. Φ x can be the Tseitin CNF of the existing Tableau.circuit V (|frame x| + ℓ) T, with variables renamed from wire numbers to bit-field labels. Correctness then transfers through Tableau.eval_circuit and an injective renaming, and only the decoder is new. Steps:

    • M3a. A uniform Tseitin CNF of a De Morgan circuit code, with unit clauses fixing some inputs and the output. It is satisfiable iff some completion of the free inputs makes the circuit output true. Satisfiability is invariant under injective renaming. The frontier compiler (Frontier/Compiler/CNF) doesn't help here: its variable numbering is not uniform, so it has no small decoder.
    • M3b. Labels. A wire's label is (t, c, slot) in fixed-width binary fields. The block is t ≤ T, the column is c ≤ 2T, and the constant-range slot comes from Loc. Global gates, inputs and constants each get a reserved region. Each Ref in gateAt becomes t or t - 1, c or c ± 1 (or a fixed column), and a constant slot. Wire numbers are not usable as labels, because Ref.resolve multiplies by blockSize T, and a circuit for that costs Θ(n²) gates. Let V be H's linear-time verifier from exists_verifier_of_mem_NTIME (feat(Classes/Time): explicit-time verifier characterization of NTIME #2025). Then T = O(2^(32n)), labels have about 64n + O(1) bits, and W's input length is dn with d ≈ 65.
    • M3c. The decoder. It maps a clause index (t, c, slot, j) to three signed labels. It is built from constant tables (formulaCode), increment and decrement circuits on the t and c fields, a multiplexer for the bits of frame x (the input unit clauses), and a validity flag for unused indices. It has O(n) gates, and its code is computed in polynomial time (appendCodes, compCode). The O(n) size already suffices for Corollary 1.4, which needs only o(n √log n).
    • Φ itself must be computable within time O(2^(dn)), which M4b's prepare needs.
    • One difference from the source to record: Williams's sketch of Theorem 6.1 (p. 20, checked) first converts to a single-tape machine, whereas this route uses the multitape Tableau directly.

    M5, given M3. M5 needs one interface from M3. For each x, it needs a test-circuit constructor test x C, where C maps labels to bits:

    • test x C is satisfiable iff C's assignment falsifies Φ x;
    • it has size at most D(|x| + 1) + 3·C.size + D;
    • it is computable in polynomial time on codes.

    The NTIME simulation follows the M0:

    1. Guess a code for W.slice (d n) of size at most s(dn). The certificate length is computed from s in unary, which is why s must be computable.
    2. Hardwire x (prefixCode).
    3. Build test x C.
    4. Run the CircuitSAT decider, and accept iff it reports unsatisfiable.

    setOf_exists_mem_NTIME gives H ∈ NTIME(2^(2n)), which contradicts #2074 at k = 2. If x ∈ H, then eval_witnessBit makes the guessed W circuit a satisfying assignment. If x ∉ H, every assignment falsifies Φ x.

    The remaining infrastructure is on main: appendCodes, compCode, prefixCode and formulaCode all have polynomial-time constructors. M6 (C.1) and M7 (Corollary 1.4) follow the M0 with #2052's counters.

  10. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    active — worker-claude-e6cf7b0d-e1539-3 (Claude Code, Opus), for coordinator-claude-e6cf7b0d. I'm taking M3 (the succinct tableau) from the handoff above, on branch claude/succinct-tableau-1539. M5–M7 stay available.

    M3a: Tseitin CNF of a De Morgan gate list (new Circuit/Boolean/Tseitin.lean, namespace Cslib.Circuits.Boolean). Every clause has exactly three literals, so the decoder has a fixed output width. The frontier compiler doesn't fit: its numbering runs over reachable wires, so it isn't uniform.

    def Op.value : Op → Bool → Bool → Bool          -- a gate on its first two argument values
    def tseitinClause (op : Op) (w a b : V) : Fin 3 → Clause V   -- w = op(a, b); const mentions only w, not only w, a
    def tseitinCNF (n : ℕ) (gates : List (Op × List ℕ)) : CNF ℕ   -- clauses of gate g at wire n + g
    def tseitinSatCNF (x : List Bool) (n : ℕ) (gates : List (Op × List ℕ)) (o : ℕ) : CNF ℕ
      -- units: output wire o true, inputs i < x.length fixed to x[i]; then tseitinCNF n gates
    
    theorem forall_eval_tseitinClause_iff :
        (∀ j, (tseitinClause op w a b j).eval σ = true) ↔ σ w = op.value (σ a) (σ b)
    theorem eval_tseitinCNF_eq_true_iff (h : Program.IsCodeFrom signature n 0 gates) (σ : ℕ → Bool) :
        (tseitinCNF n gates).eval σ = true ↔ ∀ w < n + gates.length,
          σ w = (evalCode interpretation false (List.ofFn fun i : Fin n => σ i) gates).getD w false
    theorem satisfiable_tseitinSatCNF_iff (h : Program.IsCodeFrom signature n 0 gates)
        (hx : x.length ≤ n) (ho : o < n + gates.length) :
        (tseitinSatCNF x n gates o).Satisfiable ↔
          ∃ y : List Bool, y.length = n ∧ x <+: y ∧ evalOutput y gates o = true

    M3b: the tableau on bit-field labels (new Circuit/Boolean/Tableau/Succinct.lean).

    • A label is tag + 4 * payload. The tags are: constant (payload b), input (payload i), and position (payload slot + 2^sb * (c + 2^cb * t)).
    • slot is the position's number in Loc k State, so sb is a machine constant. The other widths are cb = Nat.size (2T) and tb = Nat.size T.
    • Ref.label is Ref.resolve with labels for wire numbers. The block becomes t or t - 1, and the column becomes c, c ± 1 or 2T, normalized to 0 for global positions. It never multiplies by blockSize.
    • A clause index is j + 4 * (tag' + 4 * payload). Its fields are decoded by clauseAt. Unused indices give the tautology (v, ¬v, v).
    noncomputable def clauseAt (x : List Bool) (n T idx : ℕ) : Clause ℕ
    noncomputable def succinctCNF (x : List Bool) (n T : ℕ) : CNF ℕ :=
      (List.range (2 ^ clauseBits k State T)).map (clauseAt tm x n T)
    
    theorem satisfiable_succinctCNF_iff (hn : n < 2 * T) (hx : x.length ≤ n) :
        (succinctCNF tm x n T).Satisfiable ↔ ∃ y : List Bool, y.length = n ∧ x <+: y ∧
          OutView.ofList (tm.runFrom (tm.initCfg y) T).output = .one true

    The proof sends succinctCNF to tseitinSatCNF x n (gates tm n T) (outWire …) through the label map, then uses M3a and Tableau.evalOutput_gates. Every variable is below 2 ^ (2 + sb + cb + tb). With T = O(2^(32n)) that is about 64n bits.

    M3c (next, if time allows): the decoder. It is a De Morgan circuit with clauseBits inputs and 3 (labelBits + 1) outputs that computes clauseAt bitwise. It has O(cb + tb + |x|) gates, built from:

    • a constant table on the slot field;
    • decrement on t, and increment and decrement on c;
    • comparators of c against 0, n, n + 1 and 2T, and of t against T;
    • a multiplexer over x.

    Its code must be computable in polynomial time. M5's test circuit is three copies of the guessed W circuit on the decoder's label outputs.

  11. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    worker-claude-e6cf7b0d-e1539-3 (Claude Code, Opus): handoff. M3a and M3b are in review. I'm stopping, and M3c (the decoder circuit) and M3d (the time bound for Φ) are available, along with M5–M7.

    In review

    • M3a, feat(Circuit/Boolean): Tseitin formula of De Morgan gate lists (#1539 M3a) #2082 (head 1dee1ecc2). tseitinClause, tseitinCNF and tseitinSatCNF in Circuit/Boolean/Tseitin.lean.
      • satisfiable_tseitinSatCNF_iff: for an IsCodeFrom gate list, it is satisfiable iff some y of length n with x <+: y has evalOutput y gates o = true.
      • Every clause has exactly three literals.
    • M3b, feat(Circuit/Boolean/Tableau): the tableau formula on bit-field labels (#1539 M3b) #2083 (head 783676892, stacked on feat(Circuit/Boolean): Tseitin formula of De Morgan gate lists (#1539 M3a) #2082). Tableau.succinctCNF tm x n T in Circuit/Boolean/Tableau/Succinct.lean, as the claim above describes.
      • satisfiable_succinctCNF_iff (for n < 2T, x.length ≤ n): satisfiable iff ∃ y, y.length = n ∧ x <+: y ∧ OutView.ofList (tm.runFrom (tm.initCfg y) T).output = .one true.
      • It has 2 ^ clauseBits k State T clauses (clauseBits = 4 + sb + cb + tb), with variables below 2 ^ labelBits k State T (labelBits = 2 + sb + cb + tb). Here sb = slotBits k State is a machine constant, cb = Nat.size (2T) and tb = Nat.size T.
      • Clause idx is clauseOf tm x n T (idx % 4) (idx / 4 % 4) (idx / 16).
      • The locator for Williams's Theorem 6.1 (p. 20, full version of 4 May 2010) was checked against the PDF.

    For M5. Take Φ x := succinctCNF V (frame x) N T, where:

    • V is H's verifier;
    • N = |frame x| + m, with m the certificate length;
    • T is V's linear time bound, with N < 2T.

    W(x ++ bits v) := witnessBit (Φ x, v) for v < 2 ^ labelBits. lt_two_pow_labelBits_of_mem_vars makes every variable representable. (Φ x).eval σ means exactly that every clause number below 2 ^ clauseBits is satisfied, which holds by List.range/map.

    M3c target. A decoder whose code is poly-time in (x, n, T), with n and T in binary:

    ∃ (dec : List Bool × ℕ × ℕ → List (Op × List ℕ) × List ℕ) (D : ℕ),
      ComputableInPolyTime dec (encPair encBits (encPair encNat encNat)) encCode ∧
      ∀ x n T, n < 2 * T → x.length ≤ n →
        ∃ c : Circuit signature (clauseBits k State T) (3 * (labelBits k State T + 1)),
          c.code = dec (x, n, T) ∧ c.size ≤ D * (colBits T + timeBits T + x.length + 1) ∧
          ∀ idx < 2 ^ clauseBits k State T,
            List.ofFn (c.eval interpretation (bits idx)) = (clauseAt tm x n T idx).flatMap litBits

    litBits gives the label in labelBits bits, least significant bit first, then the sign. The size must be O(n). The carry-lookahead adder (O(w log w)) and anything Θ(n log n) would lose Corollary 1.4's √log n and C.1's linear slack.

    Suggested M3c construction. The Synthesis/Word rules give only existence, so they can't supply the code. Use explicit codes instead:

    1. Bit-serial pass. Each bit position i < max cb tb gets a constant-size cell, chained through borrow and carry and comparison states. It computes the bits of t - 1, c - 1 and c + 1. It compares c against 0, 1, n, n + 1 and 2T, and t against 0 and T; the constants' bits come from n and T.
    2. Constant slot table. From the slot field, compute op, the references and guards of table l, ColOK, and the per-literal (w/a/b, sign) choice. There are numSlots constant cases (Loc.ofSlot).
    3. Output pass. Each output bit is a fixed function of the selectors and the position-i bits. The input clause's label is 1 + 4p, which is just p's bits; its sign x[p] needs a mux tree with O(|x|) gates.

    A gateCode-by-arithmetic layout with a poly-time certificate, like Tableau/Basic and Tableau/Space, may be easier than nested compCode. BalancedCode may give the mux tree.

    M3d. Φ within time O(2^(dn)), for M4b's prepare. This follows from M3c: Φ x maps evaluation of the decoder (computableInPolyTime_evalCircuit) over List.range (2 ^ clauseBits).

  12. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    active — worker-claude-e6cf7b0d-e1539-4 (Claude Code, Opus), for coordinator-claude-e6cf7b0d. I'm taking M3c (the decoder circuit) from the handoff above, on branch claude/succinct-decoder-1539-c, stacked by merge on #2083. M4 and later stay available.

    The decoder is an explicit gate list with no carry-lookahead adder: fourteen bit-serial comparison chains (which also give the borrows and carries of c - 1, c + 1 and t - 1), a decoder tree with an OR chain that looks up x, a constant-size stage that computes the symbolic shape of each literal, and one fixed 63-gate formula per output bit.

  13. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    worker-claude-e6cf7b0d-e1539-4 (Claude Code, Opus): handoff. The M3c decoder circuit is in review as #2088 (head 121e2f95a, merged on top of the current #2083 head 56b98c928). I'm stopping. The polynomial-time certificate for its code is still open, as are M3d and M5–M7.

    In #2088. Tableau.Decoder.exists_decoder (for n < 2T and x.length ≤ n) gives a circuit c : Circuit signature (clauseBits k State T) (3 * (labelBits k State T + 1)) with three properties:

    • c.code = decoderCode tm (x, n, T);
    • c.size ≤ sizeConst tm * (colBits T + timeBits T + x.length + 1), where sizeConst tm depends only on the machine;
    • for every idx < 2 ^ clauseBits, List.ofFn (c.eval interpretation fun i => idx.testBit i) = (clauseAt tm x n T idx).flatMap (litBits (labelBits k State T)).

    It uses no carry-lookahead adder. The field stage is fourteen one-gate-per-bit comparison chains, plus a decoder tree and an OR chain over x. The handoff's target statement is exists_decoder together with the certificate below.

    Remaining M3c: ComputableInPolyTime (decoderCode tm) (encPair encBits (encPair encNat encNat)) encCode. decoderCode is a compCode/appendCode/appendCodes/formulaCode expression, so the combinators' certificates apply. The pieces it needs:

    • cb = Nat.size (2T) and tb = Nat.size T, from binary_size and unary_to_binary.
    • fieldGates: maps over List.range of N, P and |x|, all unary and bounded by the input length. Chain gate i needs bit i of the constant K. There is no plain testBit rule, so use decide (K / 2 ^ i % 2 = 1) with binary_two_pow, or of_tidy binary_testBit.
    • treeGates: the inner List.range (2 ^ ℓ) isn't polynomially bounded as a function of ℓ alone. Rewrite it as List.range (min (2 ^ ℓ) (2 ^ m)) (equal for ℓ ≤ m) and use the saturating unary/binary min rule in PolyTime/Nat/Binary.lean. Get 2 ^ m from unary_pow_clog_const, since Nat.size X = Nat.clog 2 (X + 1).
    • aWidth, wireNat, keyWire and lookW are if-then-else arithmetic, so fun_prop should handle them.
    • (tableCircuit tm).code is a constant of the machine.

    M3d (computing Φ within time O(2^(dn))) is unchanged from the M3b handoff, but it can now evaluate the decoder.

    Still open for #1539 after M3c

  14. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    At Samuel's request, codex-enp-quantitative-budget-20261031 is preparing a focused quantitative proof PR on codex/enp-quantitative-budget-1539. It will preserve the checker bound 3s + D(n+1), formalize the integer exponent budget for s = n * sqrt(log₂(n+2)) / (12(A+1)), and document the complete theoretical transfer with coefficient 1/(24(A+1)d). The decoder constant affects the starting length, not this coefficient.

    This uses the merged #2052 counter. It will not duplicate the pending hierarchy, witness-bit or decoder PRs, and it will keep the unfinished uniform-construction and nondeterministic-simulation obligations explicit. The full #1539 endpoint remains open.

  15. SamuelSchlesinger commented on Oct 31, 2026

    @SamuelSchlesinger
    CollaboratorAuthor

    Ready for coordinator review: #2097 implements the quantitative budget, its application to the native circuit counter, the computable size cap, and the infinitely-often rescaling, with the complete theoretical transfer and source mapping in the module documentation. Validation and independent agent review are recorded in the PR.

    The full #1539 objective remains open: connect the hierarchy language, framed witness preparation, uniformly constructed decoder/checker, and nondeterministic simulation. The witness-bit bridge now on main is acknowledged; this PR does not duplicate the pending decoder work.

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