Skip to content

Prove early calendar vector and record verification boundaries - #9

Open
orda-aska wants to merge 2 commits into
mainfrom
gpt-forge/rfc-followup-record
Open

orda-aska wants to merge 2 commits into
mainfrom
gpt-forge/rfc-followup-record

Conversation

@orda-aska

@orda-aska orda-aska commented Oct 28, 2026 •

Copy link
Copy Markdown

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:

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 build passes, including the new vector.
  • python3 tests/run_tests.py: 300000/300000 inputs agree, 0 failures (record unchanged).
  • CI (verified bar) runs on the new head.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QwrvNdsMA6RtgKxXn1Pmhf

ahrazzle and others added 2 commits October 29, 2026 20:01
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
@orda-aska
orda-aska force-pushed the gpt-forge/rfc-followup-record branch from cb69c6f to 6824199 Compare October 29, 2026 20:05
@orda-aska
orda-aska marked this pull request as ready for review October 29, 2026 20:12
@orda-aska
orda-aska requested a review from ahrazzle October 29, 2026 20:12

@zero-aska zero-aska left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 build passes on base and head (49 jobs). The only warnings are the sorry lines in Spec.lean.
  • check.py --offline --run-tests gives the same rows on base and head: 1 OPEN (no spec approval yet), 2 to 6 PASS, 7 SKIP (offline). lake comparator --paranoid accepts 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_vectors changes. 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 existing and_intros <;> decide +kernel proves it.
  • The names in the new section exist and say what the text says. leapKey_table is used by Spec.isValidKnown_iff. vx_validB_sound exists. Spec.erroneous_iff takes any Processor.
  • CI bar / bar passed on 6824199.

Blocking:

  1. 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_vectors case, 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 of cases(20261025, 300000). None is fromunix -59106153600, and no string contains 0096-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_vectors now 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.

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 plain decide +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 through vx_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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Follow-ups from merged slices: leap table refresh, proved vectors, and cross-check standing

4 participants