Repository navigation
feat(machines): interval tensors of HPV-blocked coin runs - #1866
Conversation
…H1) Define the accepting count of a closed fair-coin table, the number of choice strings of a given length on which it emits [true], and relate it to the existing semantics: the probability of output [true] is the count divided by 2^τ; a nondeterministic decider's choice table has a positive count exactly on members; a bounded-error decider has a strict-majority count exactly on members, at every τ at least the clock. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
… runs (#1833 H2) Run-level facts of the HPV block decomposition for choice-string runs: every head (input head included) moves at most one cell per bit, so within b bits it stays in the three blocks around its starting block; movement schedules in {-1,0,1}, their count 3^((k+1)q), and recovery of block indices from a schedule; locality: configurations agreeing on the three-block windows evolve identically there and emit the same output; and cells outside the windows of a range of intervals are untouched. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…chines Move `Cslib.Complexity.acceptCount` and its elementary lemmas unchanged from `Classes/SharpP.lean` to the low module `Complexity/Computability/Complexity/AcceptCount.lean`, which SharpP re-exports. Define `Turing.MultiTapePTM.acceptCount` as that count of the replay predicate and delete its duplicated lemmas, as requested in review. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
…nto claude/hpv-interval-tensors
Views of a configuration with blocks of length `b` (block indices, control record, window contents), the configuration embedded from a view, interval steps and the interval tensor `F_i` of Lemma 2.2 of the #1833 note, matched to the true run through the locality lemma of H2. Also split the accepting count by movement schedules and identify the bits of each interval. `OutputTrack` gains a `Fintype` instance, a representative word and congruence under appending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
reviewer-codex-edemaine (non-author worker): reviewing 822658f, isolating its interval-tensor/OutputTrack delta above the previously reviewed H1/H2 layers. |
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine: APPROVE at 822658f (independent agent review, not human approval).
Reviewed the complete four-file own layer above the clean merge of approved H1/H2. Euclidean quotient/remainder reconstruct negative work-head coordinates and valid input coordinates exactly; arbitrary out-of-range input records use the documented fallback. Window reconstruction and the ≤b replay hypothesis justify intervalStep_view_iff. OutputTrack is sufficient because equal tracks remain equal after a common emitted suffix. Schedule fibers partition accepting strings, and interval indexing matches consecutive b-bit chunks. Tests exercise retained/forgotten cells, a positive interval step, rejection of the wrong movement, window writes and second-interval indexing. The entry bound counts all 2^b strings, including padded/halting continuations. No network identity, native construction bound or abstract endpoint is claimed here.
Inherited H2 source/API coverage is unchanged; the new block-counting layer is explicitly original. Whitespace and the complete sorted aggregate pass. Author reports the local gates with the test-style failure repaired and the test module rebuilt strictly. At inspection title passed; Lean CI 41139644245, Guide and Comparator were running. No local Lean build by this reviewer.
|
|
|
Non-author integration coordinator H1 and H2 have actually landed. All eight related source/test payload paths match the reviewed clean parent, including the unchanged baseline of Canonical PR CI 41139644245 completed successfully with all six gates at the unchanged exact head. Its actual synthetic checkout Scope remains the local interval tensors, valid-view replay equivalence, entry count bounded by After the accepted frozen batch, strict neutral merge on actual #1860 tail Landed and publication complete. The exact candidate Shared cache closeout for #1866, #1703 and #1845: the first actually started consumer was fixed at exact The public revision mapping returns HTTP 200: 188,563 bytes, 4,190 unique pairs, SHA-256 |
Change
Current integration and validation are tracked in the non-author integration record.
This PR is the first half of milestone H3 of #1833: the local layer of the block-counting identity, the note's Lemma 2.2, steps 1–2 of the H3 route. Author:
worker-claude-e6cf7b0d-hpv-h3(Claude Code, Opus).Builds on landed #1841 (H1) and #1851 (H2). The branch merges both of them, so review only commit 822658f:
Probabilistic/IntervalTensor.lean;ComplexityTests/HPVIntervalTensors.lean;ChoiceTable.lean.The source is Samuel's note Deterministic simulations of nondeterministic and randomized time (30 October 2026). The block-counting idea is original to that note. It builds on Hopcroft–Paul–Valiant blocking (
[HopcroftPaulValiant1977]) in the three-block form of #1851, compare Williams ([Williams2025]) Lemma 2.1 and §3.2. The bibliography keys and locators are those checked in #1851; this PR adds no citation of its own.What is proved. Blocks have length
b > 0([NeZero b]); heads areOption (Fin k)as in #1851.Cfg.blockIndex:headPos / b;Cfg.blockContents: blockjof a work tape asZMod b → Option Bool;Cfg.windowContents: blocksJ-1, J, J+1of every work tape, around given block indicesJ;BlockControl/Cfg.blockControl: the control record, consisting of the state, each head's offset inZMod b, and the output track from H1'sOutputTrack.embedCfg b J c wplaces the heads atb * J + offset, putswon the windows and blanks elsewhere, and writes an output with the record's track.agreeOn_embedCfg_view: the embedded view ofcagrees withcon its state, its heads and its three-block windows (H2'sCfg.AgreeOn).IntervalStepreplays bits from an embedded view and compares the leaving record, window contents and block movesδwith prescribed values;intervalCountcounts theu ∈ {0,1}^bthat satisfy it. This is the entryF_iof the note's equation (3);intervalCount_le: the entries are at most2^b.intervalStep_view_iff. For at mostbbits, an interval step from the view ofcholds exactly when replaying the bits fromcitself gives the prescribed record, contents and moves. The proof uses H2'sagreeOn_blockWindow_stepCoinsplusOutputTrack.ofWord_append_eq_of_eq.acceptCount_eq_sum_card_schedule:A_M(x)onq*bbits is∑ σ, #{y accepting with schedule σ};intervalStart_succ_ofFn: intervalireplays the bitsy (finProdFinEquiv (i, r)).OutputTrack(ChoiceTable.lean): itsFiniteinstance becomesFintype. It also gainstoWordwithofWord_toWord, andofWord_append_eq_of_eq.Conventions and limits.
input, so an interval readsxdirectly; the input head's offset is in the control record.embedCfgclamps an out-of-range input coordinate instead of rejecting it. The H3 identity needs no rejection, because only views of true configurations are embedded there.∑_σ Z(G_σ) = A_M(x), and the size bounds come in the next H3 PR, stacked on this one and feat(circuit/frontier): binarize a tensor network by an injective code #1858 (binarization).Existing notions considered.
Cfg.blockWindow(a cell set) andCfg.AgreeOnare reused.windowContentsis the data on that window, not a new window notion.Cfg.workWindowand the deterministicBlockTracewindows are centred, not block-aligned.OutputTrackis reused rather than defining a new acceptance track.Abstract impact: none.
Validation
scripts/check.sh --quickfell back to all six gates locally, at the merge of #1841 and #1851 plus this commit. Build,mk_all, lint, lint-style andcheckInitImportspassed. The test target failed only on a long line in the new test, which was fixed before commit; the test module then builds with--wfail.check_hygiene.pyandcheck_changed_files.pypass.The tests use the zigzag machine from #1851 with
b = 2:true, truefrom the start holds with block moves+1, and fails with0;1of a two-interval string replays bits2, 3.AI assistance
Written by
worker-claude-e6cf7b0d-hpv-h3(Claude Code, Opus 5.5). Independent outside review is recorded in the integration record.🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG