Repository navigation
feat(PolyTime): add native greedy balanced label schedules - #1331
Conversation
|
|
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
coordinator-codex-01a16ab8: CHANGES REQUESTED — prose only at 58a3472f. Two nonauthor readers found the outer schedule mathematics and uniform native resource contracts clean, adopting unchanged #1327 evidence. The pinned pp.30–32 correspondence checks out. The machine charges the full input/context, all prefixes including termination, and output; (r^Q + 1) occurs only in time. Concrete and nonvacuous occupancy controls are sound.
Qualify the numeric-parameter runtime corollary as described inline. The formal full-input-bit-length theorem needs no change. I corrected the title only: the pass has n+m slots, not Q steps.
Optional reuse: the private length_encNat_le_self repeats the public theorem in Complexity/LinearSpaceArith.lean; a proof-only import permits direct reuse without another supplier change.
After this bounded delta, retain actual #1327 squash/restack and exact new-head validation. No duplicate build.
| exact mkConstructCert_bounds _ _ hpPass hmPass hPass hFinal | ||
|
|
||
| /-- `constructBalancedSchedules` runs in `O((r ^ Q + 1) * poly(|input|))` native time (hence | ||
| `poly(n, m, |E|, D, Q, r, C)` bit operations where `D = r ^ (2 * Q)`) and polynomial workspace. -/ |
There was a problem hiding this comment.
The 'hence poly(n,m,|E|,D,Q,r,C)' interpretation needs valid hypergraph endpoint indices. For arbitrary malformed edge lists, endpoint bit lengths are unbounded while all these numeric parameters remain fixed. The formal poly(full encoded input length) bound is correct globally. Qualify this corollary in the docstring and PR body to valid incidences, or keep only the bit-length formulation; length_encEdges_le_of_lt already provides the intended valid-input bridge.
|
#1327 has now actually landed as |
|
|
There was a problem hiding this comment.
coordinator-codex-01a16ab8, revision 87ea717d5ef01f91b857409a1cd34d1ead30c25b: FINAL APPROVED. The runtime prose finding in 5664848542 is resolved in source and body. The preceding merge consumes actual #1327 squash f2b98c4c automatically; all original implementation and test expressions, main files and the sorted import union are preserved. The PR now targets main. This validated coordinator fix changes only comments beyond integration; unchanged outside mathematics/resource evidence carries. Exact CI40481751813 passes all six gates, ratchet and changed-file checks; title passes. Fresh main/non-draft/MERGEABLE/CLEAN preflight checked. No duplicate local build.
|
Ready for the next shared enqueue packet at exact |
|
|
Change
Part of #1226. Depends on #1327 (Part 1,
GreedySlotScore.lean).Adds$(n + m)$ -slot greedy schedule pass, empty-scope factor normalization, end-to-end Lemma 4.5 occupancy bounds, all-prefix outer-loop live-state bit-length bounds, and uniform
Complexity/Computability/PolyTime/GreedyLabelSchedule.lean(Cslib.BalancedSchedules) and concrete regression tests inComplexityTests/GreedyLabelSchedule.lean, completing the runtimeCslib.GenericRAM.NativeCertificate/Turing.MultiTapeTM.ComputableInO/Turing.MultiTapeTM.ComputableInPolySpacecertificates for §4.4, Lemma 4.5 (and its §4.5 group-schedule interface, printed pp. 30–32) of [OpenAI, The Exponential Time Hypothesis is False][OpenAI2026ETH] (pinned revision7ef5c0cc) on top ofComplexity.Computability.PolyTime.GreedySlotScore.Source statements ([OpenAI, The Exponential Time Hypothesis is False][OpenAI2026ETH], printed pp. 30–32)
(Mathematical-transcription note: Plain-text extraction from the source PDF flattens rendered superscripts, subscripts, set-builder braces, square roots, fractions, calligraphic and blackboard-bold symbols, and vector arrows such as $(I_f){f \in \mathcal{F}}$, $\mathcal{A}$, $\mathcal{B}$, $|\mathcal{F}|$, $D = r^{2Q}$, $2(b + w)D^2 \leqslant M$, $2Qr^2 \leqslant n$, $a_v, d_f \in [r]^Q$, $u{f,v}$, $c_u \leqslant \frac{M}{D} + \sqrt{2M(b + w)}$, $n_{t,g} \leqslant \frac{n}{r} + \sqrt{2Qn}$, $K^4 = D^2$, $\vec{P}{f,v}(T)$, $\mathbb{Q}^n$, and $S{t,g}$ into "(If )f ∈F", "A", "B", "|F|", "D = r2Q", "2(b + w)D2 ⩽ M", "2Qr2 ⩽ n", "av , df ∈ [r]Q", "uf,v", "cu ⩽ M/D + p 2M (b + w)", "nt,g ⩽ n/r + p 2Qn", "K 4 = D2", "P⃗f,v (T )", "Qn", and "St,g"; in the contiguous source passages below, all mathematical superscripts, subscripts, radicals, fractions, calligraphic/blackboard-bold fonts, vector arrows, and slanted inequalities $\leqslant, \geqslant$ are restored to match rendered printed pages 30–32.)
§4.4, Lemma 4.5 statement (printed p. 30, eq. (4.13)):
§4.4, Proof of Lemma 4.5, empty-scope convention (printed p. 31):
§4.4, Proof of Lemma 4.5, deterministic one-slot-at-a-time pass and occupancy extraction (printed p. 31):
§4.4, Proof of Lemma 4.5,$(n + |\mathcal{F}|)$ -slot runtime over $K = r^Q$ candidates (printed p. 31):
§4.5, variable-group and factor-schedule consumption of Lemma 4.5 (printed p. 32, eq. (4.14)):
Notation-to-Lean mapping
Cslib.BalancedSchedules.ScheduleParamsCslib.BalancedSchedules.encScheduleParamswith unaryCslib.BalancedSchedules.streamBestSlotLabeland multiplicative factorCslib.BalancedSchedules.constructBalancedSchedules_balanced.Cslib.BalancedSchedules.slotOfIndex,Cslib.BalancedSchedules.pendingSlotOfState,Cslib.BalancedSchedules.greedySlotStepBody,Cslib.BalancedSchedules.greedySchedulePass,Cslib.BalancedSchedules.normalizeEmptyFactorSchedules(resetting empty-scope factors to theList.replicateCslib.BalancedSchedules.constructBalancedSchedules.Cslib.BalancedSchedules.constructedVarSchedule(FinFinFinCslib.BalancedSchedules.constructedFactorSchedule(FinFinFinCslib.BalancedSchedules.occupancyCslib.BalancedSchedules.occupancyCslib.BalancedSchedules.constructBalancedSchedules_balanced.Public claims and assumptions
Cslib.BalancedSchedules.slotOfIndex,Cslib.BalancedSchedules.pendingSlotOfState,Cslib.BalancedSchedules.greedySlotStepBody, andCslib.BalancedSchedules.greedySchedulePassiterateCslib.GenericRAM.IndexFold.runacross allCslib.BalancedSchedules.streamBestSlotLabel.Cslib.BalancedSchedules.normalizeEmptyFactorSchedulesandCslib.BalancedSchedules.constructBalancedSchedulesfinalize partial schedules and reset every empty-scope factor (List.replicateCslib.BalancedSchedules.length_fst_constructBalancedSchedules,Cslib.BalancedSchedules.length_snd_constructBalancedSchedules), word well-formedness across every prefix and final output (Cslib.BalancedSchedules.run_greedySlotStepBody_wf,Cslib.BalancedSchedules.wf_constructBalancedSchedules), and concrete empty-factor reset (Cslib.BalancedSchedules.getD_constructBalancedSchedules_empty_factor).Cslib.BalancedSchedules.greedySchedulePass_eq_greedyLabelPass,Cslib.BalancedSchedules.constructedSchedules_eq_pass, andCslib.BalancedSchedules.constructedFactorSchedule_empty_factorprove exact agreement betweenCslib.BalancedSchedules.greedySchedulePass/Cslib.BalancedSchedules.constructBalancedSchedules(projected viaCslib.BalancedSchedules.constructedVarScheduleandCslib.BalancedSchedules.constructedFactorSchedule) andCslib.BalancedSchedules.greedyLabelPass,Cslib.BalancedSchedules.completeLabels, andCslib.BalancedSchedules.normalizeEmptyFactors.Cslib.BalancedSchedules.constructBalancedSchedules_score_leandCslib.BalancedSchedules.constructBalancedSchedules_score_le_twoestablish that the runtime construction achieves normalized jointCslib.BalancedSchedules.potentialat most the uniform average and at mostCslib.BalancedSchedules.constructBalancedSchedules_balancedproves Lemma 4.5 end-to-end for allCslib.BalancedSchedules.encScheduleParamsandCslib.BalancedSchedules.encOuterAcc,Cslib.BalancedSchedules.length_encEdges_le_of_lt,Cslib.BalancedSchedules.length_encPartialSchedules_le,Cslib.BalancedSchedules.length_encSlotSelectState_run_valid_le,Cslib.BalancedSchedules.length_encOuterState_run_valid_le, andCslib.BalancedSchedules.length_encOuterState_run_lebound inner-loop and outer-loop live-state bit lengths across all visited prefixes without multiplying workspace byCslib.BalancedSchedules.computableInPolyTime_slotOfIndex,Cslib.BalancedSchedules.greedySchedulePassCertificate,Cslib.BalancedSchedules.greedySchedulePassCertificate_bounds,Cslib.BalancedSchedules.computableInO_greedySchedulePass,Cslib.BalancedSchedules.computableInPolySpace_greedySchedulePass,Cslib.BalancedSchedules.constructBalancedSchedulesCertificate,Cslib.BalancedSchedules.constructBalancedSchedulesCertificate_bounds,Cslib.BalancedSchedules.computableInO_constructBalancedSchedules, andCslib.BalancedSchedules.computableInPolySpace_constructBalancedSchedulesestablish uniformCslib.GenericRAM.NativeCertificates running inDeviations / Non-claims
Semantic-versus-certified boundary: Public encoded$1 \le r$ (slightly relaxing the manuscript's $r \geqslant 2$ ).
Turing.MultiTapeTM.ComputableInPolyTime,Cslib.GenericRAM.NativeCertificate,Turing.MultiTapeTM.ComputableInO, andTuring.MultiTapeTM.ComputableInPolySpacetheorems governCslib.BalancedSchedules.slotOfIndex,Cslib.BalancedSchedules.greedySchedulePass,Cslib.BalancedSchedules.constructBalancedSchedules, and their certificates (built on the concrete list and integer step and postprocessing subroutinesCslib.BalancedSchedules.pendingSlotOfState,Cslib.BalancedSchedules.greedySlotStepBody, andCslib.BalancedSchedules.normalizeEmptyFactorSchedules) underCslib.BalancedSchedules.encScheduleParamsandCslib.BalancedSchedules.encOuterAcc, whereasCslib.BalancedSchedules.constructedVarScheduleandCslib.BalancedSchedules.constructedFactorScheduleserve as unencoded typed specification bridges toCslib.BalancedSchedules.greedyLabelPass,Cslib.BalancedSchedules.potential, andCslib.BalancedSchedules.occupancy. Note also thatCslib.BalancedSchedules.constructBalancedSchedules_balancedholds for all0-based alphabet and total degenerate/out-of-domain fallbacks: Group labels sit in${0, \dots, r - 1}$ , so $d_f(t) = 1$ in the manuscript corresponds to $Q$ $0$ (and typed constant $\langle 0, hr \rangle$ ). For total execution on all inputs: $s$ at $n + m$ via $s \ge n + m$ ; $r = 0$ ($Q > 0$ , so $r^Q = 0$ ) or a slot remains $Q$ $0$ (and $Q = 0$ ); $Q$ $0$ ; and $0$ via
List.replicateCslib.BalancedSchedules.slotOfIndexcapsminbefore unary subtraction and returnsnoneforCslib.BalancedSchedules.pendingSlotOfStateandCslib.BalancedSchedules.greedySlotStepBodyleave already-assigned or out-of-range indices unchanged; whennone, fallback words areList.replicate[]whenCslib.BalancedSchedules.normalizeEmptyFactorSchedulesresets every factor absent from the edge list toList.replicateCslib.BalancedSchedules.constructedVarSchedule/Cslib.BalancedSchedules.constructedFactorScheduleclamp out-of-range digits or missing positions toCslib.BalancedSchedules.wordToSchedule.Downstream §4.5 auxiliary-array placement: Assembling the explicit copy indices$c(f, v)$ , replacement-design rows $\vec{P}{f,v}(T)$, and restricted measurement matrices $C{t,g}$ of §4.5 (eqs. (4.14)–(4.15)) is handled in feat(PolyTime/LinearAlgebra): add Section 4.5-4.7 replacement design builder #1330 under Port OpenAI's ETH refutation (subexponential #k-SAT) natively into complexitylib #1226.
Existing notions considered:
Cslib.BalancedSchedules.greedyLabelStep,Cslib.BalancedSchedules.greedyLabelPass,Cslib.BalancedSchedules.greedyLabelPass_spec,Cslib.BalancedSchedules.completeLabels,Cslib.BalancedSchedules.normalizeEmptyFactors,Cslib.BalancedSchedules.potential,Cslib.BalancedSchedules.occupancy,Cslib.BalancedSchedules.expect_incidence_potential_le,Cslib.BalancedSchedules.expect_group_potential_le, andCslib.BalancedSchedules.incidence_and_group_bounds(Complexity/Foundations/Combinatorics/GreedySchedules.lean,Complexity/Foundations/Combinatorics/PartialLabelScores.lean): reused directly for the combinatorial potential and occupancy analysis;Cslib.BalancedSchedules.greedySchedulePass_eq_greedyLabelPassandCslib.BalancedSchedules.constructedSchedules_eq_passbridge the concreteCslib.GenericRAM.IndexFold.runpass directly toCslib.BalancedSchedules.greedyLabelPassrather than re-proving conditional-expectation bounds.Cslib.BalancedSchedules.streamBestSlotLabel,Cslib.BalancedSchedules.streamBestSlotCertificate,Cslib.BalancedSchedules.streamBestSlotCertificate_bounds,Cslib.BalancedSchedules.candidateScheduleList,Cslib.BalancedSchedules.wordToSchedule,Cslib.BalancedSchedules.scheduleToWord,Cslib.BalancedSchedules.edgesOfFin,Cslib.BalancedSchedules.partialScheduleListOfFin,Cslib.BalancedSchedules.updateSlotSchedules,Cslib.BalancedSchedules.readSlotSchedule,Cslib.BalancedSchedules.encPartialSchedules, andCslib.BalancedSchedules.encStreamSlotIn(Complexity/Computability/PolyTime/GreedySlotScore.lean): reused directly as the single-slot streaming minimizer and bit-length/certificate foundation.Cslib.GenericRAM.IndexFold.run,Cslib.GenericRAM.IndexFold.length_run,Cslib.GenericRAM.IndexFold.roundCertificate,Cslib.GenericRAM.IndexFold.certificate,Cslib.GenericRAM.NativeCertificate.option, andCslib.GenericRAM.NativeCertificate.ofPolyTime(Complexity/Computability/GenericRAM/Native/IndexFold.lean,Complexity/Computability/GenericRAM/Native/Combinators.lean): reused directly to nest the outerCslib.BalancedSchedules.streamBestSlotCertificatein polynomial workspace.List.getD_eq_getElem,List.getD_ofFn,List.getD_map_range,List.ofFn_const,List.ofFn_succ', andList.sum_le_length_nsmul(Complexity/Foundations/Data/List/Lookup.lean,Mathlib/Data/List/GetD.lean,Mathlib/Data/List/OfFn.lean): reused directly for list lookups, snoc induction overList.ofFn, and entrywise encoded-length sum bounds without private duplicate list helpers.Validation and review
58a3472febd10ea9dad31bd7b51b20782cb4930donc20adaa8aeffcefa3f9f8949b4d24548a5e2c148(feat/rt-greedy-schedule-1226-antonkov):LEAN_NUM_THREADS=4 lake exe mk_all --check— passed.LEAN_NUM_THREADS=4 lake build --wfail --iofail Complexity ComplexityTests ComplexityAbstracts— passed (0 warnings).LEAN_NUM_THREADS=4 lake exe runLinter Complexity.Computability.PolyTime.GreedyLabelSchedule ComplexityTests.GreedyLabelSchedule— passed.LEAN_NUM_THREADS=4 lake exe lint-style— passed.LEAN_NUM_THREADS=4 lake exe checkInitImports— passed.python3 scripts/check_hygiene.py --check-simp— passed.python3 scripts/check_tidy_surface.py— passed (0 new publicTidydeclarations).python3 scripts/check_changed_files.py --base feat/rt-greedy-schedule-1226-antonkov— passed.python3 scripts/parallel_defs.py --base feat/rt-greedy-schedule-1226-antonkov— passed (0 candidate parallel definitions).python3 scripts/audit_queries.py duplicates Complexity/Computability/PolyTime/GreedyLabelSchedule.lean— passed (0 duplicates).python3 -B scripts/build_abstracts.py --check— passed.python3 scripts/check_pr_names.py --strict --base feat/rt-greedy-schedule-1226-antonkov— passed.ComplexityTests/GreedyLabelSchedule.lean: kernel-checkeddecide +kerneland definitional tests covering outer slot decoding and capping (Cslib.BalancedSchedules.slotOfIndex), no-op behavior on already-assigned and out-of-range indices (Cslib.BalancedSchedules.pendingSlotOfState,Cslib.BalancedSchedules.greedySlotStepBody), degenerate regimes (Cslib.BalancedSchedules.normalizeEmptyFactorSchedules,Cslib.BalancedSchedules.greedySchedulePass,Cslib.BalancedSchedules.constructBalancedSchedules, andCslib.BalancedSchedules.greedyLabelPasson aCslib.BalancedSchedules.constructBalancedSchedules_balanced(Cslib.BalancedSchedules.length_encOuterState_run_valid_le, compositionalfun_propsynthesis forCslib.BalancedSchedules.slotOfIndex, and concrete instantiation ofCslib.BalancedSchedules.greedySchedulePassCertificate_boundsandCslib.BalancedSchedules.constructBalancedSchedulesCertificate_bounds.58a3472febd10ea9dad31bd7b51b20782cb4930d(verifying direct reuse ofCslib.BalancedSchedules.greedyLabelPass,Cslib.BalancedSchedules.streamBestSlotCertificate,Cslib.GenericRAM.IndexFold.run,List.getD_eq_getElem,List.getD_ofFn, andList.sum_le_length_nsmul, Lemma 4.5 potential and occupancy bounds viaCslib.BalancedSchedules.constructBalancedSchedules_balanced, all-prefix live-state bit-length bounds,Turing.MultiTapeTM.ComputableInPolySpace/Turing.MultiTapeTM.ComputableInOcontracts, and verbatim quotation fidelity against OpenAI (2026) §4.4, Lemma 4.5, printed pp. 30–32), followed by full 6-gatescripts/check.shverification at58a3472febd10ea9dad31bd7b51b20782cb4930d.Headline abstracts
abstracts/catalogue.jsonreferenceGreedyLabelSchedule, and this PR adds an intermediate §4.4 Lemma 4.5 runtime building block toward Port OpenAI's ETH refutation (subexponential #k-SAT) natively into complexitylib #1226 without modifying any abstract orabstracts/catalogue.jsonentry. Verified viapython3 -B scripts/build_abstracts.py --check.abstracts/catalogue.jsonentry changed)..leanor.texsources changed).AI assistance
AI-assisted (Gemini) under human direction (
@antonkov); all Lean proofs and concrete test instances were mechanically checked by Lean 4.