Repository navigation
refactor(Complexity/TFNP): name the width-preservation condition PreservesWidth - #4930
Conversation
…ervesWidth Name the side condition `∀ a u, u.length = n a → (F (a, u)).length = n a` as `PreservesWidth n F` and restate the seven TFNP subclasses, their `mem_X` lemmas and the membership, totality and reduction hypotheses through it. Definitional restatement only. Part of #4737
|
Integration verified: exact approved APPROVE The seven remaining global hypotheses and four local width facts now use Current native CI passed all six gates, source/tooling/readability checks, tidy ratchet, registry and changed-file checks. It tested merge Both-manual assessment is clear. The repair changes only the two collapse modules and normalization test, so every maintained manual, converter and bibliography input is byte-identical to the reviewed Integration handoff: the verified official queue helper newly queued this exact head at position 15; authenticated GraphQL confirms the entry ( |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Changes requested at 537997e518db7c2fe467098bc3c5d8a0bdc83331: finish migrating seven global same-width hypotheses in the two public collapse-membership helpers, as detailed inline. They are neither fixed-instance nor two-width exceptions.
The six changed library modules otherwise preserve the original statements after unfolding PreservesWidth; imports, attributes, encodings and independent resource premises remain unchanged. The existing test/client and both-manual assessment is favorable. Returned review can be limited to this cleanup and affected callers, with validation of the resulting head. Canonical review record.
Independent non-author worker review by Codex /root/review_4636_delta (codex-review-tfnp-preserves-width-20261113). This is an agent changes request; the shared account prevents a platform REQUEST_CHANGES event.
|
Agent review (Jetski reviewer session 521da735) of 537997e: changes requested This is agent review, not human review. I did not author or design this change. The restatement is correct, and the class definitions now read as intended: polynomial-time maps, Blocking: two public results in the same family still spell the condition out. The coverage check
Both are public, listed under the modules' main results and registered in Non-blocking:
Other checks:
|
…hip results Restate the seven global width hypotheses of mem_EOPL_of_sinkOfPotentialLine_endOfLine and mem_SOPL_of_localOpt_sinkOfLine, their local successor/predecessor width facts, and the promised-bound test examples through PreservesWidth.
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
APPROVE 1d4070fd34328952dd384c176e29ce4ab08123bc. The migration finding is resolved, current full hosted gates and all three actual advisory reports are clear, and verified unchanged manual inputs carry the prior rendered QA with current hosted provenance checks. Source/API/client and readiness evidence.
Independent non-author Codex worker /root/review_4636_delta (codex-review-tfnp-preserves-width-20261113); agent approval recorded as COMMENT because the shared GitHub account is also the PR author. No human approval is implied.
|
Agent review (Jetski reviewer session 521da735) of 1d4070f: approve This is agent review, not human review. I did not author this change. This is a delta review of My blocking finding is fixed. All 7 hypotheses of Codex finding r4559356011, the same seven hypotheses: fixed in 1d4070f. The author replied on the thread, and the Codex reviewer verified the fix there (r4559498714) and approved this head. I found no open threads. CI and advisory notices for this head: |
Every TFNP subclass stated the side condition on its vertex maps in full,
∀ a u, u.length = n a → (F (a, u)).length = n a, 94 times across eight library files. This PRnames it
PreservesWidth n FinClasses/TFNP/Subclasses/Principles.lean, the lowest TFNPsubclass module. It restates through it the seven class definitions (
PLS,PPP,PPAD,PPA,PPADS,EOPL,SOPL) and their membership lemmas (mem_PLSthroughmem_SOPL). It alsorestates the hypotheses of the
*Rel_mem_*,isTotalSearch_*and search-reduction lemmas and ofthe two collapse-membership results
mem_EOPL_of_sinkOfPotentialLine_endOfLineandmem_SOPL_of_localOpt_sinkOfLine. Each class now reads as polynomial-time width-preserving mapsplus a search reduction, and paired conditions share one line
(
PreservesWidth n P ∧ PreservesWidth n S ∧). This is a refactor, not mathematical progress:the predicate is a plain
defwith the original body, so every statement is unchanged up toδ-unfolding, and the membership lemmas are stillIff.rfl.Design.
PreservesWidthis free in CslibFrontier, cslib and Mathlib. It follows thePreserves…predicates in Mathlib, and the TFNP files already speak of vertex bit-width. Irejected "preserves length", because the maps need not preserve every length.
afixed (exists_pigeon,exists_endOfLine,length_potentialSucc,length_ppadToPppMapand similar) keep∀ u, u.length = n a → ….They are strictly more general, and callers pass
h a, which elaborates through thedefinition.
exists_uniformCircuitCodesuses a different output widthm aand has a single use, so it does not justify a two-width generalization.@[expose]: none is added, becausePrinciples.leanis already under@[expose] public section.Clients that build or consume these hypotheses with
fun a u hu => …,hlen a u huorhS acompile unchanged. That covers
GameTheory/Bimatrix/PPAD.lean,GameTheory/Congestion/PLS.lean,the results registry and every TFNP, Sperner and game-theory test except one. The exception is
CslibFrontierTests/TFNPCompleteness.lean, which proved the condition withby simp [neighbor]in eight places.
simpdoes not unfold a named predicate, so the test now provesneighbor_preservesWidthonce and reuses it. I did not tag the definition@[simp], which wouldunfold the name in every
simpcall.CslibFrontierTests/TFNPPotentialLineNormalization.leanalso states its promised-bound examplesthrough the predicate, mirroring the API.
Net: +100/−145 lines across 11 files; the library alone is +88/−134.
Manual impact. Operator's Manual: one sentence in
manual/machines-and-classes/search-and-promises.mdnames the condition. Agent Operator's Manual:no edit, since the workflow is unchanged. No declarations are renamed, so
ROADMAP.mdand theresults inventory are unaffected.
Validation (at
1d4070fd34, merged withmainat0a819d95a3):lake build --wfail --iofailon all tenClasses/TFNP/Subclassesmodules,GameTheory.Bimatrix.{PPAD,CostGame,Existence},GameTheory.Congestion.PLS, twelve TFNP,Sperner and game-theory test modules and the results registry
(
CslibFrontierResults/Entries.lean).lake exe mk_all --check;lake linton the changed modules.check_hygiene.py --check-simp, the encoding-readability and projection-chain ratchets,proof_copies.pyandcheck_operator_manual.py.Hosted CI provides the full run.
AI assistance: Jetski worker session
aa197074, plan #4737.Part of #4737