File size: 1,750 Bytes
d7b24f0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
/*
 * Copyright (C) 2026 HCALC / Foundry J contributors
 * SPDX-License-Identifier: AGPL-3.0-only
 *
 * Module: Transform — production T_p = diag(α), α_j = 1/(1+log p_{j mod 64}).
 * Cite: PRODUCTION.md §2 Gap-Tp-from-P64 CLOSED.
 * Numeric log not required in Alloy — SpecAlphaLaw flag + diagonal Tp.
 * Provenance: SpecDefined
 */

module modules/Transform

open modules/State
open modules/PrimeIndex

sig MultimodalInput {
  encodes: one State
}

sig TensorSpace {
  support: set State
}

/* α law kind — Spec law α_j=1/(1+log p_{j mod 64}) encoded as SpecAlphaLaw. */
abstract sig AlphaLawKind {}
one sig SpecAlphaLaw extends AlphaLawKind {}

/* T_p — diagonal prime-indexed map under SpecAlphaLaw.
 * Provenance: SpecDefined — PRODUCTION.md §2.
 * (Tp x)_j = α_j · x_j; φ = id on coordinates. */
sig TpMap {
  index: one PrimeLabel,
  apply: State -> lone State,
  /* isDiagonal=1 encodes diag(α) action */
  isDiagonal: Int,
  alphaLaw: one AlphaLawKind
}

fact fact_P2_tp_diag_spec_alpha {
  all tp: TpMap |
    tp.isDiagonal = 1 and tp.alphaLaw = SpecAlphaLaw
}

pred tp_diag_spec_alpha_ok {
  all tp: TpMap |
    tp.isDiagonal = 1 and tp.alphaLaw = SpecAlphaLaw
}

assert P2_tp_diag_spec_alpha {
  /* Production assert P2 — Tp diagonal + SpecAlphaLaw */
  tp_diag_spec_alpha_ok
}

fact INV_Tp_index_in_P64_or_extension {
  all tp: TpMap |
    tp.index in P64Carrier.primes or
    (some e: PrimeExtension | tp.index in e.extra)
}

fact INV_Tp_unique_per_index {
  all disj a, b: TpMap | a.index != b.index
}

pred multimodal_wired {
  all m: MultimodalInput | some ts: TensorSpace | m.encodes in ts.support
}

fact fact_multimodal_wired {
  multimodal_wired
}

assert INV_multimodal_tensor_wiring {
  multimodal_wired
}