Repository navigation
Conversation
README.md, SPEC.md and the docstring of Spec.fromUnixSeconds_vectors now name the new year-start case, so the claims match the theorem. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QwrvNdsMA6RtgKxXn1Pmhf
cb69c6f to
6824199
Compare
zero-aska
left a comment
There was a problem hiding this comment.
Requesting changes: SPEC.md and the Spec.lean docstring both say the year-start grid tested 0096-12-31 at midnight. The grid never sends that second. The Lean change itself is sound.
This PR is the base of a stack. #10 is rebased on top of it. Merge this PR first, then rebase #10.
What I checked (head 6824199, base main 7ca89c9):
- Nothing has been pushed since my earlier full check of this head, and main has not moved. So there is no new diff.
lake buildpasses on base and head (49 jobs). The only warnings are thesorrylines in Spec.lean.check.py --offline --run-testsgives the same rows on base and head: 1 OPEN (no spec approval yet), 2 to 6 PASS, 7 SKIP (offline).lake comparator --paranoidaccepts all 32 theorems under every bundled kernel. No kernel fails. The spec hash moves from 873aacf0... to c7b55d65.... A second run on 6824199 gave the same rows.- The tests ran 300,000 inputs with seed 20261025 and 0 failures on both sides.
- Of the 32 theorem statements in Spec.lean, only
Spec.fromUnixSeconds_vectorschanges. It gains one conjunct,fromUnixSeconds (-59106153600) = some 0096-12-31T00:00:00Z, which only makes it stronger. The value is right: it is day 35429, where the year estimate gives 97 and the code moves down to 96. The existingand_intros <;> decide +kernelproves it. - The names in the new section exist and say what the text says.
leapKey_tableis used bySpec.isValidKnown_iff.vx_validB_soundexists.Spec.erroneous_ifftakes anyProcessor. - CI
bar / barpassed on 6824199.
Blocking:
- Two pinned files say the proved second came from the year-start grid.
- SPEC.md, lines 178 to 180: "The 0096-12-31 UTC midnight case is now also a kernel-computed
Spec.fromUnixSeconds_vectorscase, rather than only a differential calendar-grid case." - Spec.lean, line 165: "0096-12-31 at midnight, from the year-start grid".
The grid never sends 0096-12-31T00:00:00Z.unix_grid()sends the first second of each year and the second on either side. On that day it sends only 23:59:59Z (-59106067201). The reply on #3, from its author, says the same: "That covers 0096-12-31T23:59:59 and 0097-01-01T00:00:00."
Reproduce: load tests/run_tests.py with importlib.-59106153600 in set(unix_grid())is False.-59106067201 in set(unix_grid())is True. I also walked all 300,000 cases ofcases(20261025, 300000). None isfromunix -59106153600, and no string contains0096-12-31T00:00:00.
Both seconds fall on the same day and take the same branch, so the proof is fine. Only the coverage claim is wrong. There are two ways to fix it: - Keep the vector and change the words. For example: "The differential grid sends the last second of 0096-12-31 (23:59:59Z).
Spec.fromUnixSeconds_vectorsnow proves its first second (00:00:00Z). Both take the same move-down branch." Drop "from the year-start grid" from the docstring. - Or prove -59106067201 (0096-12-31T23:59:59Z) instead, as offered in the reply on #3. Then "from the year-start grid" is true. README.md line 53 and SPEC.md line 128 then need the new time too.
- SPEC.md, lines 178 to 180: "The 0096-12-31 UTC midnight case is now also a kernel-computed
Non-blocking:
- IXDTF paragraph: it is right for the RFC examples, which go through
vx_parseExt. But the 7 refused strings (Proofs/Ixdtf/Main.lean lines 239 to 245) are proved by plaindecide +kernel, so every kernel runs the whole parser on them.2022-07-08T00:14:07Z[u-ca=x][Europe/Paris]has 42 characters, more than several vectors that go throughvx_parseExt. Issue #6 asked about exactly this, so please say so. - Refresh steps: "If an entry changes" should also cover an added entry. A new leap second would also break
tb_months, which bounds years at 2016 (Proofs/Leap/Table.lean line 37), and the 27-entry lemmas in Proofs/Leap/FromSi.lean. The expiry date also appears in README.md lines 75 and 77, SPEC.md line 55 and Rfc3339/Leap.lean line 13. Any edit to Spec/Leap.lean changes the spec hash, so it needs a new spec approval. - The cross-check sentence names Go, Temporal and ERFA. tests/CROSS-CHECK.md also covers rfc3339-validator.
Stack and merge order: #10 is built on this branch and carries the same sentence (SPEC.md lines 180 to 183) and the same docstring (Rfc3339/Spec.lean line 165). Fix it here, then rebase #10 so it picks up the fix under the new names. If you switch the vector to -59106067201, #10's Rfc3339/Spec.lean and Rfc3339/Proofs/FromUnix/Main.lean need the same change. Merge this PR with a merge commit. A squash or rebase merge makes #10 conflict in four files.
Generated by Claude Code
Prove the 0096-12-31 UTC midnight conversion as a fixed kernel-computed vector in
Spec.fromUnixSeconds_vectors. Record the leap-table refresh procedure, the existing table-equality theorem, the limits of IXDTF kernel execution, and the standing of external comparisons and alternate processor examples (SPEC.md, "Follow-up verification record").Closes #6. How each item of #6 is answered:
tests/CROSS-CHECK.md), outside the verified bar.Spec.leandocstring).Rfc3339.Proofs.Leap.leapKey_tableinProofs/Leap/Table.lean, used bySpec.isValidKnown_iff; the refresh steps before the 28 June 2027 expiry are written out.vx_validB_soundand the parser equivalence proof, not on executing the whole parser in the kernel; no worked alternative tag-set application is planned in this slice, andSpec.erroneous_iffalready quantifies over everyProcessor.Merge order: land this before #10 (module move). #10 is rebased on top of this branch.
Validation, on the head rebased onto current main (7ca89c9):
lake buildpasses, including the new vector.python3 tests/run_tests.py: 300000/300000 inputs agree, 0 failures (record unchanged).🤖 Generated with Claude Code
https://claude.ai/code/session_01QwrvNdsMA6RtgKxXn1Pmhf