Repository navigation
Conversation
…as zip transducers (cslib-community#608) Binary addition (carry state), bitwise disjunction (one state), equality (agreement state) and non-strict order (the comparison transducer started in "equal") are zip transducers, each with one primary linear certificate computableInTimeAndSpace_nat{Add,Or,Eq,Le}. ComputableInO.natAdd, ComputableInPolyTime.binary_le/binary_or, ComputableTidilyInPolyTime.binary_le and ComputableInSpace.natEq keep their statements and are derived from them. Removes the consuming addStep/succFinish fold certificates and their now unused helpers (NatAdd.addStep, foldl_addStep, length_foldl_addStep, ComputableInO.succStep, ComputableInO.succFinish) and the fold tests. Fixes the Nat/Binary module docstring that still listed Nat.lt_iff_exists_testBit as a main result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
reviewer-crei-opus (agent review, not human approval). Verdict: FINAL, advisory (same session as the authoring workers). Head Are the certificates correct?
Are the public statements unchanged?
Do other independent proofs remain? I grepped
Removed declarations: Line counts: numstat matches the table: library +218/−215 (net +3), tests +57/−47.
Tests (
Conflicts with other open PRs
Limits: I did not build locally (disk) and am relying on CI and the body's validation report. I checked the transducer proofs by reading them, not by running them. |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine — independent agent review, not human approval. Approve 844c998059d963d2e12445c1ca4d3ffe77fa58e4 (complete ten-file layer over 94f88591b5db811e778a10916d06a4fd79945111).
The carry adder matches the existing canonical-word addition law; OR preserves canonical output; equality compares zero-padded values; initializing the comparison state to true correctly changes < to ≤. The uniform certificates reuse the previously reviewed zip kernel with separate time 3L + 1 and workspace |encNat a| + 2; the derived output-charged and polynomial/space contracts keep their statements. Concrete machine tests cover addition/carry, OR, equal/unequal and reflexive/reversed order cases. Removed helpers have no remaining references, and the independent resource clients remain. No curated-abstract impact or blocker found.
Validation: git diff --check passes; author reports all six local gates passing. At inspection, Lean CI 40950911883 was running and PR-title checks passed. I did not build locally. This verdict covers this head only: integration with #1655/#1659 must retain multiplication and its required imports, remove newly unused carry helpers, and receive delta review.
|
Coordinator integration preflight against #1653's final-main candidate Combining #1655 and this PR conflicts in |
Binary addition, bitwise OR, equality and
≤onencPair encNat encNatnow each have a primary zip-transducer certificate: time3*|input|+1and workspace|encNat a|+2. These explicit linear resource bounds are new endpoints alongside the proof consolidation; retained facade statements keep their signatures. The existing #1649 zip kernel supplies the machine/resource proof.The adder carries one bit and reuses
NatAdd.addBits_bits; OR proves canonical output directly; equality compares zero-padded digits; initializing the existing comparison state totruegives≤while<still starts infalse. Plain/tidy polynomial and space facades derive from these certificates. Generic equality and bitwise certificates remain for their other clients.Superseded carry-fold certificates and the now-unused
NatAdd.addSteplaws,ComputableInO.succStepandsuccFinishare removed, with repository clients and tests updated. Concrete certificate tests on(5,6)check runs within 31 steps and five cells, with additional carry, zero/equality and reflexive/reversed-order cases. The author reports all six local gates, hygiene, changed-file checks and the unchanged tidy baseline passing at844c998059d963d2e12445c1ca4d3ffe77fa58e4. Independent source/API approval covers the full ten-file layer; final hosted CI remains required. This is agent review, not human approval.Integration follows #1653 and needs supported-pin validation and delta review. When combining #1655, retain its multiplication certificate and required
Linarithimport. When combining #1659, removesuccStep,succFinishanddigitSteponce their last clients disappear, and update the carry-round documentation. The remaining test-onlyNatSuccfold helpers are tracked in #1663, after both slices land.Part of #608; the broader automation inventory remains open. No curated abstract or rendering impact. AI assistance: Claude Code implemented the transducers, proofs, tests and initial description; Codex edited the scope and integration notes.