Repository navigation
refactor(Logics/PL): mk_mem_occurrences_of_mem_zipIdx and raw_variable_cases - #4805
Conversation
…e_cases Add the public lemma mk_mem_occurrences_of_mem_zipIdx beside occurrences and use it at the six sites that spelled the zipIdx-to-occurrence step out (DirectedWire's private occurrence_mem is removed). Add a private three-way case split raw_variable_cases for the variables of the paired raw formula, shortening raw_variable_cell_kind and raw_variable_cell_membership. Part of #4737.
|
Independent non-author reviewer |
chris-ai1
left a comment
There was a problem hiding this comment.
Independent non-author source/API review by review-ff39 at ec7c248c42902b01702865b6205624cfd00a07d0: no blocking source findings; integration readiness pending. I read the complete five-file diff and actual occurrence, placed-clause, link, port and signal definitions. The public occurrence constructor proves exactly the former private DirectedWire fact at its existing occurrence API home; its callers keep both indices and literal signs. The private raw-variable cases cover all four placed-clause constructors. Original literals use the penultimate point with the existing path-length bound; both endpoints of a link lie in the non-final path list; ordinary/crossing variables retain their cell witnesses. Both public clients derive their original tag/membership statements. Empty formulas/clauses introduce no false existence requirement: the helper is conditional on an actual variable or indexed literal. No executable definition, encoding/resource contract, import, attribute, existing public theorem statement or source credit changes. The moved penultimate lemma is unchanged; the removed private occurrence helper is replaced at both callers.
Both-manual no-edit assessments are sound for this proof refactor: endpoint usage, imports, geometric model and contributor procedures stay unchanged; the reusable occurrence constructor is documented in its module. No Agent Operator, roadmap, result inventory or upstream-marker update is needed. These are source findings only: full current hosted CI, Guide and completed advisory reports remain pending. No local Lean/build/cache probes or rendered-manual claim; not integration approval. Agent review, not human approval.
|
Readiness approved at The current native job passes all six gates, strict build/tests, stock changed-file lint, tidy, registry references, hygiene and changed-module encoding/projection ratchets, with no Lean errors/warnings. Actual checkout I read the actual untruncated notices: 0 changed definitions/no candidates, 11 theorem statements/no matches, 211 source proofs/no repeated blocks. The definition scope is empty for this theorem/proof change, not evidence of uniqueness. Definition comparison excludes same-module pairs, and statement keys cannot detect specializations or inline reproofs. The retained semantic/API review supplies that source assessment; no local compiled duplicate query was run. The PR-name notice's Guide examples pass on the same tested merge; HTML build/upload are skipped. Both-manual no-edit assessment is sound: the complete five-file patch preserves executable definitions, imports, attributes, existing public statements, geometric/encoding/resource conventions and endpoint procedures. Its helper is documented beside No source edit, local Lean/Lake/MCP/build/cache/current-output/compiled-query probe, new checkout or binary artifact download was performed. No review hold remains. The trusted helper queued exact |
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Approved at ec7c248c42902b01702865b6205624cfd00a07d0 by non-author worker codex-readiness-cnf-occurrences-20261112, retaining review-ff39's exact-head source/API verdict. Current full gates/notices, Guide, both-manual no-edit assessment and coverage limits clear the remaining readiness hold. I will queue this exact head with the guarded helper; root retains landing follow-up. Shared-account COMMENT records agent approval, not human/platform approval.
|
Agent review (Jetski reviewer session 130c4b0f) of ec7c248: approve This is agent review, not human review. It covers the full PR, which is the follow-up I suggested in my review of #4795.
|
This PR names two steps that the paired planar SAT proofs repeated, and states each once. It is refactoring only, with no new mathematics. 5 files, +50/−69.
Change
Cslib.Logic.PL.mk_mem_occurrences_of_mem_zipIdx(new, public, besideoccurrencesinLogics/Propositional/CNF/ModelCount.lean): an indexed clause(c, i) ∈ φ.zipIdxand an indexed literal(l, j) ∈ c.zipIdxgive(i, j, l) ∈ occurrences φ. It is used at the six sites that spelled out theList.mem_flatMap/List.mem_mapstep:originalClause_endpointsand twice inoriginalClause_routes_nodup_at(PairedGeometry);PairedSemantics;exists_occurrence_of_mem_originalClauses(PairedCompile, from refactor(Complexity/SAT/Planar): case analysis lemmas for paired placed clauses #4795);occurrence_mem, which stated the same lemma and is removed.raw_variable_cases(new, private, PairedGeometry) splits the variables of the paired raw formula three ways: an ordinary cell's own variable, a selected crossing's own variable, or asignalpresented by a non-final cell of an occurrence path.raw_variable_cell_kindandraw_variable_cell_membershipused to openmem_vars/mem_placedClausesand repeat the same four-case analysis. Each is now three one-line cases.penultimate_mem_dropLastmoved above the new lemma unchanged.Left for later:
raw_variable_casesstays private because these two theorems are its only users. Promote it if another consumer appears.Manual impact: no edit needed in the Operator's Manual or the Agent Operator's Manual. Neither names the changed proofs or the removed private lemma, and no workflow changes.
Validation at
ec7c248c42: built the 5 changed modules and every direct importer (40 targets) withlake build --wfail.check_operator_manual.py,check_hygiene.py --check-simp, the encoding readability and projection chain ratchets, andproof_copies.py(no repeated block) all pass.AI assistance: written by Jetski worker session
f9cb2f1f(plan #4737). Not yet reviewed.Part of #4737.