STEP 1577 — 単一マスタ位相 primitive v0.1

目的: chat-Claude Antikythera 4 構造 の 2 番目 = 単一マスタ位相からの全出力導出。 1 本のクランクから 全 channel が 派生する pure TS シミュレータ。 STEP 1575 antikythera-ratio-synth (歯車列 solver) と 直接 bridge。

対応: 機械 = ラインシャフト / 電子カム (バーチャルマスタ軸) / 回路 = 単一クロックドメイン + 派生イネーブル (CDC 問題が消える) / 現代応用 = 包装機、 輪転機 (現役の設計思想)。

chat-Claude 分析 (2026-08-30、 引用)

「単一マスタ位相からの全出力導出: 1本のクランクから全部が派生するので、 出力どうしの位相整合が構造的に保証される。 回路では単一クロックドメイン+派生イネーブル (CDC問題が消える)、 機械ではラインシャフト/電子カム (バーチャルマスタ軸) に対応します。 これは今も包装機や輪転機で現役の設計思想です。」

API

interface DerivedChannel {
  name:  string;
  ratio: { p: number; q: number };  // master が q tick 進む間に channel が p tick 進む
  phaseOffset?: number;              // [0, 1) 初期位相
}

createPhaseSystem(masterPeriod: number, channels: DerivedChannel[]): MasterPhaseSystem
validateSystem(sys)  → { valid, reason? }
tick(sys, count)     → PhaseSample[]
verifyCoherence(sys, samples, tolerance?) → CoherenceVerdict

// STEP 1575 bridge
channelFromRatioSynth(name, RatioSynthResult, phaseOffset?) → DerivedChannel | null

D-FUMT₈ verdict

verdict意味条件
TRUE全 channel coherentdrift ≤ tolerance ∧ 全 channel 一意 ratio
BOTHduplicate ratio 検出 = LCM 崩壊drift ≤ tolerance ∧ 2 以上 channel が 同 ratio (aliasing、 冗長)
NEITHERdrift 検知 (数値誤差 蓄積 or sample 不足)drift > tolerance、 or sample < 2
FALSEmisconfiguredmasterPeriod ≤ 0 or 非整数 or 非整数 tooth or ratio 分母 0

test 結果 (23/23 PASS)

sectiontestverdict
1. config validation5 case (正常 + 4 invalid)全 PASS
2. tick 基本動作same 1/1 + half 1/2 で t=0..8期待 phase 一致
3. coherence TRUE2 channel 100 tickTRUE, max drift 1.11e-16
4. duplicate ratioMeton × 2 (同 235/19)BOTH (LCM 崩壊 検出)
5. invalid configmasterPeriod = -1FALSE (validation 失敗)
6. STEP 1575 bridgeMeton (235/19) + Saros (32112/144) + Callippic (auto→235/19)BOTH (Meton + Callippic 同 ratio 検出)
7. phaseOffset同 1/1 で offset 0 vs 0.5BOTH (offset 違い でも 同 ratio 検出)

STEP 1575 との bridge = arc 内 chain 成立

import { synthesizeRatio } from './antikythera-ratio-synth';
import { channelFromRatioSynth, createPhaseSystem, tick, verifyCoherence }
  from './master-phase-primitive';

// STEP 1575 solver で 歯車列 を 導出
const metonResult = synthesizeRatio(
  { name: 'Meton', targetRatio: 235 / 19, tolerance: 1e-6 },
  { minTeeth: 12, maxTeeth: 300, maxStages: 4 },
);
// → stages: [{ driverTeeth: 235, drivenTeeth: 19 }]、 verdict: TRUE

// STEP 1577 で channel に 変換 して 位相 system 構築
const metonCh = channelFromRatioSynth('Meton', metonResult);
// → { name: 'Meton', ratio: { p: 235, q: 19 } }

const sys = createPhaseSystem(360, [metonCh!]);
const samples = tick(sys, 100);
const verdict = verifyCoherence(sys, samples);
// → verdict: TRUE, maxDrift: 1.11e-16 (数値限界)

Honest scope

関連 (arc chain)

次候補 (defer、 藤本さん judgment 待ち)