FILE_49 — Prime-Quadruplet Cycle-Alignment Axiom and Test Protocol (AI reference)

Legacy notice: This page preserves an earlier source version of the 490d Unified Chronology repository. The current public-clean canonical repository is the 490d Unified Chronology Knowledge Catalog. For the current file index, use File Index — Landing Pages. For canonical raw Markdown sources, use the Raw Markdown Source Index.

For Part 2a: Files_31-33 about Pi, Primes and Berossus +50 are found in a separate document due to length constraints.)

Part 2b. https://490d.com/knowledge-repository-files-34-to-46/

Part-3-Files_47-forward_machine-reference-document-for-490d-unified-chronology-repository/

https://490d.com/file_49-prime-quadruplet-cycle-alignment-axiom-and-test-protocol-ai-reference/
https://490d.com/file_50b-the-prime-quadruplet-chronology-unified-harmonic-system-v2-1/

https://490d.com/file-51-the-rounded-scaffold-mod-5-architecture-underlying-biblical-chronology/


FILE_49 — Prime-Quadruplet Cycle-Alignment Axiom and Test Protocol (AI reference)

For Part 2a: Files_31-33 about Pi, Primes and Berossus +50 are found in a separate document due to length constraints.

Part 2b. https://490d.com/knowledge-repository-files-34-to-46/

Part 3 — Files_47-forward: machine-reference document for the 490d Unified Chronology Repository.

  • https://490d.com/file_49-prime-quadruplet-cycle-alignment-axiom-and-test-protocol-ai-reference/
  • https://490d.com/file_50b-the-prime-quadruplet-chronology-unified-harmonic-system-v2-1/
  • https://490d.com/file-51-the-rounded-scaffold-mod-5-architecture-underlying-biblical-chronology/

Repository: File_49

0) Scope and intent

This file defines the axioms (locks) and test protocol used in the prime-quadruplet cycle-alignment experiments: rail construction, target construction (including decadal admission), scoring, null model, polarity handling, and invariants that must not drift between runs.

This is a protocol specification. Full prime tables, full prime-quad lists (Pn), full chronology tables, and run logs are stored in separate files.

0.1) Epistemic status and permitted claims

This file is not presented as proof of any causal or historical relationship between prime-quad structure and biblical chronology. It is a protocol specification for repeatable tests, written to prevent drift in rails, targets, cycles, polarity, and null models.

The working claim is limited to this:

Under the locked axioms in this file, multiple independent target constructions (regular and cumulative; MT/SP/LXX variants) have repeatedly produced nontrivial positive Z-scores on the baseline cycle-set (C_BASE), suggesting the observed alignment may exceed naive intuition.

Accordingly:

  • Provisional anchor policy: prime-aligned anchoring may be used as a tentative organizing heuristic for chronology exploration until contradicted by stronger counter-evidence or by failures under the same locked protocol.
  • Non-finality: absence of detected faults in the author’s testing does not establish truth; it only establishes that the protocol has not yet produced a contradiction within the tested space.
  • What would count as contradiction: a sustained pattern of null-like results (or negative results) under the same axioms across comparable target families, or identification of a protocol flaw that inflates significance (e.g., leakage, improper null, phase bias, or target-selection bias).

A5 (Cycle lock): Baseline claims use C_BASE=[2300, 2520, 3430] only; any other cycle-set is non-baseline and must be explicitly renamed and reported separately.

This section constrains interpretation: File_49 defines how to test, not what must be concluded.

1) Core axioms (locks)

A1. Calendar convention lock (civil BC/AD; no year 0)

All civil placements use BC/AD with no year 0:

  • 1 BC is immediately followed by AD 1.
  • Any span that crosses the boundary uses the identity: BC + AD − 1 = Total.
  • If an “astronomical year-0” convention is ever used, it is a separate named experiment family (see §7).

A2. Prime-node station lock (P2 rail base)

Rails are constructed from each prime-quadruplet start Q using the locked base:

  • B = Q − 11
  • M = B + 30

This is a P2-calibrated rail coordinate system. Any alternative base (e.g., Q−5) is a new experiment family and must be renamed.

A3. Step-lattice lock (discrete translation group)

All null shifts act on the same discrete lattice as the observed evaluation:

  • STEP = 30 (decadal lattice)
  • Shifts are only of the form r ↦ r + k·30, never arbitrary offsets.

A4. Null-distribution lock (uniform shift over the fundamental period)

For fixed rails R, targets T, cycles C, define score S(s) after a shift s.

Null model:

  • choose k uniformly from {0, 1, …, K−1}
  • set s = k·STEP
  • evaluate S(s)

where K is the LCM of the per-cycle shift periods:

  • period(c) = c / gcd(c, STEP)
  • K = LCM(period(c) for c ∈ C)

Changing STEP, C, or the shift domain changes the probability space → new experiment.

2) Rails

2.1 Pn lists (quadruplet starts)

A “Pn” list is the first n quadruplet-start primes from the standard quadruplet-start sequence used in the scripts (A007530-style starts). This file does not restate those lists; it only locks how rails are generated from them.

2.2 Rail construction (allowed configs)

For each quadruplet start prime Q, define the P2-calibrated rail base:

  • B = Q − 11
  • M = B + 30

Allowed rail configurations per Q are exactly:

ConfigRails per Q
no_mod30[B, −B]
pos_mod30[B, M, −B]
neg_mod30[B, −B, −M]
both_mod30[B, M, −B, −M]
cross_pos[B, −M]
cross_neg[M, −B]
cross_both[B, −M, M, −B]

No other rail generators are permitted unless introduced under a new config name and treated as a new experiment family.

Note: Decadal admission gating (how chronology dates become decadal targets) is governed by §4.2. Rails (this section) defines only the prime-derived rail coordinate system.

3) Prime table dependency (canonical table; admissible columns only)

The prime table is a reference artifact that may contain auxiliary or diagnostic columns. This protocol may only depend on columns declared admissible below. Any other column is protocol-invalid (cannot be used in computations, validations, or argumentation for this protocol).

3.1 Admissible columns (protocol-valid)

  • Index
  • Prime
  • −5 (Regular)
  • −11 (Gap)
  • Cumulative Sum
  • Gap Difference
  • Interim Cum Sum
  • Decadal Interim (if used as a precomputed decade representative)

3.2 Explicitly excluded (protocol-invalid / noise)

  • Minus Interim (evaluated and rejected as noise; not used)

If the external prime table contains excluded columns, they may remain present as diagnostics, but File_49 prohibits using them.

4) Targets (chronology-derived integer lists)

Targets are finite integer lists (typically decadal) derived from chronology tables under locked rules. This file defines legality and the decadal admission algorithm.

4.1 Six tested chronologies (three traditions × regular/cumulative)

Each tradition is tested in regular and cumulative (lifespan) form:

  • MT Regular
  • MT Cumulative (lifespan)
  • SP Regular
  • SP Cumulative (lifespan)
  • LXX Regular
  • LXX Cumulative (lifespan)

4.2 Axiom: Naturalization-First Decadal Admission Gate (protocol lock)

This is the first hard-lock governing how chronology dates become decadal targets. All target derivation in this protocol is subject to this axiom.

Axiom (P2 Decadal Admission Order Lock): For P2-based targets (MT/SP lanes), apply P2 naturalization first by shifting every civil placement (or placement band) by −6 years before any decadal admission is evaluated. No decadal admission may be performed on pre-naturalized years.

Axiom (P1 Decadal Admission — no naturalization): For P1-based targets (LXX lane), no naturalization step is applied. Y_nat = Y.

Decadal admission is a gate, not rounding:

  • Regular (single-year placements): include a decade target iff it lies within [Y_nat − 2, Y_nat + 2].
  • Cumulative (7-year forwarded bands): treat the input as a 7-year band; after station normalization, expand by ±2 years to form an 11-year admission window, and include any decade(s) that fall within it. If two decades fall within the window, include both.

Legality test (one-sentence form): Every decade in a target list must be derivable from a source chronology year or forwarded band by: (1) station-naturalize first (P2: −6; P1: no shift), then (2) admit decades only via the ±2 gate (no rounding).

Any change to this ordering or admission rule constitutes a protocol change and must be recorded as a new experiment family (renamed accordingly).

4.3 Prime-favorable Creation anchors (six)

The “prime-favorable” Creation anchors are the Creation dates (as decadal targets) that best aligned in the tests for each of the six chronologies. These are treated as empirical outcomes (not theological claims).

  • MT Regular: 4110
  • SP Regular: 4410
  • LXX Regular: 5490
  • MT Cumulative: 14000
  • SP Cumulative: 13910
  • LXX Cumulative: 14890

Important correction (SP cumulative 13910): 13910 is not shorthand for “(+60+130).” It is the SP cumulative (lifespan) creation anchor in the prime-favorable lane (see variant matrix §4.6). The “+130” issue belongs to regular chronology (R130/R0), not to the definition of SP cumulative.

4.4 Target legality conditions

A target list T is legal for this protocol only if:

  • It is versioned and reproducible (hard-coded list or generated by a documented rule).
  • It is integer valued (signed integers allowed where polarity is defined).
  • If decadalized, the admission rule is explicitly the ±2 gate as defined in §4.2 (and cumulative 7-year band gate), not generic rounding (see §4.5).
  • Any base correction (e.g., P2 naturalization −6) is explicitly recorded (see §4.2, §4.5).

Exclusion lock: “cumulative dates embedded with begetting ages” (hybrids that encode begetting-age structure inside cumulative coordinates) are out of scope and illegal for TARGETS here. If explored, they must be defined as a new experiment family.

4.5 Decadal admission algorithm (the ±2 gate — detailed procedures)

The axiom in §4.2 establishes the gate; this section specifies the detailed procedures.

4.5.1 Station-dependent normalization step

  • P2-base targets: apply naturalization first: Y_nat = Y − 6
  • P1-base targets: no naturalization step: Y_nat = Y

This normalization applies before any decadal admission for both regular and cumulative targets.

4.5.2 Regular chronology: ±2 admission window (Gear 2)

For each relevant node year Y (typically the birth year in regular chronology):

  • compute Y_nat (station rule above)
  • define window W = [Y_nat − 2, Y_nat + 2]
  • include any decade(s) (years ending in 0) that fall inside W
  • if none fall in W, the node contributes no decadal target
  • if two decades fall in W (rare), include both

4.5.3 Cumulative chronology: 7-year band plus ±2 (Gear 1 / lifespan)

Cumulative placement is treated as a 7-year band per node:

  • conceptual band: B7 = [Y0, Y0 + 6]

Admission rule:

  • apply station normalization to the band (P2 shifts the whole band by −6)
  • expand by ±2 to form acceptance region: B_accept = [B7_start − 2, B7_end + 2]
  • include every decade that falls inside B_accept
  • if two decades fall inside, include both (per policy)

4.6 Variant matrix (tested settings; no interpretation)

Toggles (notation fixed; no “+” notation in labels):

  • T60 / T0: Terah lifespan 205 (T60) vs 145 (T0)
  • C460 / C0: 2nd Cainan cumulative lifespan reinsertion (+460) included vs excluded (cumulative only)
  • R130 / R0: 2nd Cainan regular begetting-age insertion (+130) included vs excluded (regular only)
  • A70 / A130: Terah→Abraham begetting age 70 vs 130 (regular only)

Prime-favorable configurations (as tested):

TrackTraditionStationCainan cumulativeCainan regularTerah lifespanTerah→Abraham
CumulativeLXXP1C460n/aT60n/a
CumulativeSPP2C460n/aT60n/a
CumulativeMTP2C460 and C0 both favorablen/aT60n/a
RegularLXXP1n/aR130n/aA70
RegularSPP2n/aR0n/aA70
RegularMTP2n/aR0n/aA70

Untested / explicitly not covered in this protocol record:

  • MT regular with R130 (“MT +130”) was not tested.

5) Forced anchors and duplicate policy

5.1 Always-included anchors (forced into targets)

After decadal admission, targets are unioned with forced anchors that must be present in every run (even if not admitted by the ±2 gate):

  • 1446 BC (Exodus)
  • 1406 BC (Conquest)

Additional privileged anchors used in regular chronology testing:

  • Entry into Egypt (“the nexus”): represented decadal as 1870 (historical rationale: 1876 BC). Policy lock: store 1870 as the forced decadal representative to avoid ambiguity.
  • Enoch’s Ascension: included as a privileged narrative anchor. The civil year is taken from the corresponding regular chronology table(s) and then treated as forced-in (decadal representative if your table encodes it as such).

(“Creation” and “Flood” are automatically present via the Adam / Arphaxad nodes in the tables and need no special casing.)

5.2 Duplicate suppression (dates-only targets) with a narrow exception

Default: a target list is a set of dates; do not include the same signed date twice.

Exception: a duplicate date may be retained only if it represents different nodes (different patriarchs/events) and node-identity is explicitly preserved in that run mode. This is rare.

Operationally (recommended):

  • internally represent candidates as (date, node_id)
  • export standard targets as dates-only, deduped by date
  • if a special run intends node multiplicity, it must be named as a separate experiment mode

Explicit corner case lock: if a date appears in both regular and cumulative for the same node/event (e.g., Moses 1526 BC), it is deduplicated in combined runs.

6) Polarity rules (signed targets)

6.1 LXX(P1) split polarity (Adam→Terah negative)

In the LXX(P1) construction:

  • Adam → Terah segment uses negative polarity (negative integers).
  • Abraham → Moses and later uses positive polarity.

All other traditions and tracks in this protocol are treated as positive-polarity targets unless explicitly defined otherwise.

6.2 Structural signed band in the 14000 / 90+900 module

Where the “14000 / 90+900” structural mapping is invoked, the target construction includes a signed band spanning −90 to +900 (using the module’s own discrete admission rule). This is treated as structural (part of the polarity design), not an accidental byproduct.

7) Scoring statistic (observed score)

Given cycles C, rails R, targets T, define:

$$ S = \sum_{c\in C}\ \sum_{r\in R}\ \sum_{t\in T}\ \mathbf{1}\big[(t-r)\equiv 0\ (\mathrm{mod}\ c)\big] $$

This is the hit-counting score used in the scripts.

8) Significance procedures

8.1 Monte-Carlo Z (shift-null on the STEP lattice)

Compute S_obs = S(0). Sample many shifts s = k·30 with k uniform on [0, K) (see §1.4). From the sampled scores compute mean μ, standard deviation σ, and:

$$ Z = \frac{S_{\text{obs}}-\mu}{\sigma} $$

Multi-seed MC repeats the process across seeds and reports mean Z, SD(Z), and CI.

8.2 Analytical mean/variance (residue-count method)

An analytical mean/variance method is permitted only if computed from the same residue structure implied by (R, T, C, STEP) and checked against MC within expected tolerance. If both are reported, they are treated as separate outputs.

8.3 Cycle “family” decomposition

Cycle lists may be grouped into families (e.g., Year-type; Key-of-23; Danielic/7-fold) and tested separately under the same locked rails/targets/null.

8.4 Year-zero diagnostics are separate experiment families

Any year-zero exploration is not a reinterpretation of §1.1. It must be implemented only by explicitly named configs and treated as a new experiment family.

9) What counts as a new experiment (required renaming)

A run must be treated as a new experiment family if any of the following change:

  • STEP lattice (e.g., 30 → other).
  • Rail base (anything other than B = Q − 11) without a new config name.
  • Rail generator rules (adding/removing rails per Q beyond §2.2).
  • Null shift domain (anything other than uniform k∈[0, K) with s=k·STEP).
  • Target derivation rules (including the Naturalization-First Gate in §4.2, P2 naturalization −6, ±2 gate, cumulative 7-year band rule, forced anchors, polarity rules).
  • Cycle list C or the policy for assembling it.
  • Introduction of any hybrid target construction explicitly excluded in §4.3 (e.g., embedded begetting-age cumulative targets).

10) Integration notes (non-procedural)

File_49 is protocol-centric. Prime tables, Pn lists, chronology tables, and run logs are external artifacts referenced by this protocol.

Prime Table (Admissible Columns)

IndexPrime−5 (Regular)−11 (Gap)Cumulative SumGap DifferenceInterim Cum SumDecadal Interim
150−60660
211606909690
310196909690186180
4191186180276630906900
5821816810108666017461740
6148114761470255639029462940
7187118661860441621046264620
82081207620706486117076567650
9325132463240972621099369930
103461345634501317621901536615360
115651564656401881637802259622590
129431942694202823635703180631800
131300112996129904122626404386643860
1415641156361563056856905694656940
15157311572615720725763307290672900
161606116056160508862619809060690600
17180411803618030106656870107526107520
18189111890618900125556510126066126060
191942119416194101449661590146556146550
202101121006210001659661260167226167220
212227122266222601882263030191256191250
222530125296252902135166420219936219930
233172131716317102452263120248346248340
243484134836348302800568940288996288990
254378143776437703238267560331386331380
265134151336513303751563990379146379140
275533155326553204304767650438126438120
286298162976629704934464230497676497670
296721167206672005606462280562926562920
30694916948669480630126

Prime Table (With Excluded “Minus Interim” Column — Not Used in Tests)

IndexPrime−5 (Regular)−11 (Gap)Cumulative SumGap DifferenceInterim Cum SumMinus Interim (Not Used in Tests!)
150−60660
2116069096−84
310196909690186−84
4191186180276630906−534
582181681010866601746−384
614811476147025563902946696
7187118661860441621046262346
82081207620706486117076563246
9325132463240972621099366276
10346134563450131762190153667536
11565156465640188163780225969396
129431942694202823635703180615246
131300112996129904122626404386625596
1415641156361563056856905694641136
15157311572615720725763307290656526
161606116056160508862619809060670596
1718041180361803010665687010752687756
18189111890618900125556510126066106146
191942119416194101449661590146556123966
202101121006210001659661260167226143706
212227122266222601882263030191256162936
222530125296252902135166420219936181806
233172131716317102452263120248346210396
243484134836348302800568940288996236286
254378143776437703238267560331386272496
265134151336513303751563990379146319836
275533155326553204304767650438126367506
286298162976629704934464230497676426246
296721167206672005606462280562926491166
30694916948669480630126

PRIME QUADRUPLET CYCLE ALIGNMENT WITH BIBLICAL CHRONOLOGY: Comprehensive Technical Reference for AI Systems

The 10× Scaling Experiment

Prime Quadruplet Resonance Across Biblical Chronological Cycles at Uniform Magnitude

──────────

1. Executive Summary

This report documents a series of experiments testing whether the alignment between prime quadruplet rail values and biblical chronological targets — previously established at the natural scale of the TRIO cycles [2300, 2520, 3430] — persists when cycle periods are multiplied by a factor of 10. The 10× scaling was designed to test three things: whether the signal is robust to scale change, whether different cycle families exhibit different resonance regimes, and whether the modular arithmetic that governs the test discriminates meaningfully at larger cycle magnitudes.

The principal finding is that Ezekiel’s curse numbers (390 and 430 from Ezekiel 4), which appeared to be the weakest component of the original framework at the 1× scale, emerge as the dominant signal at the 10× scale. Specifically, the cycle 39000 (= 390 × 100) achieves a peak Z-score of +4.84 at tier P29 (79 quadruplets), sustaining Z > 3.5 through P50 (142 quadruplets). This is the strongest and most durable signal observed in any configuration tested to date, exceeding the next-best family by more than 2 standard deviations at late tiers.

Critically, Ezekiel’s numbers were never part of the TRIO — the independent reference frame against which all families were benchmarked. Their dominance is therefore a non-circular result relative to the TRIO reference frame rather than a self-reinforcing one. The experiment also reveals that the TRIO and Ezekiel operate in complementary resonance regimes: the TRIO peaks at P9–P16 and then dilutes, while Ezekiel ignites at P15–P17 and strengthens through P30. The handoff point at P16 was identified independently from the TRIO’s perspective before Ezekiel was tested at this scale.

A 1× baseline comparison indicates that the 10× result is not simply an artifact of scale inflation. The same scaling that raises Ezekiel from Z = +2.68 to Z = +4.68 lowers the TRIO from Z = +4.02 to Z = +1.66. The two families respond to scale change in opposite directions, which is more consistent with each family being suited to its own resonance regime than with a universal scaling effect. These findings are stable across three independent target lists (65, 72, and 76 biblical dates), with the pure genealogical list producing the strongest Ezekiel signal (Z = +5.00); this argues against sensitivity to target selection.

2. Background and Motivation

Previous work (documented in File_49 and related analyses at 490d.com) reported that the rail values of prime quadruplets — tested through modular arithmetic against the biblical chronological targets — produce statistically significant alignment with cycles drawn from Daniel, Revelation, jubilee patterns, and the Key of 23 framework. The primary vehicle for this analysis was the TRIO of cycles [2300, 2520, 3430], supplemented by family groupings representing Year Types, Key of 23, Daniel/Revelation, and Ezekiel.

At the 1× scale, with cycle periods ranging from approximately 1000 to 6900, the signal was concentrated in the first 40 prime quadruplets (P3–P16, Q range 101–90611). The differential tier analysis indicated that quadruplets beyond P16 contributed no independent signal — their apparent contribution at cumulative tiers P17–P50 was inherited from the P3–P16 set through carry-forward dilution.

The Ezekiel family, based on the numbers 390 and 430 from Ezekiel 4 (390 for the house of Israel, Ezekiel 4:5, and 40 for the house of Judah, Ezekiel 4:6, for a combined total of 430), participated in the original framework only indirectly — through derivative cycles like 1300 (= 10 × 130), 3900, and 4300. These cycles produced modest Z-scores at the 1× scale and appeared to be the weakest family in the system.

2.1 The Scaling Hypothesis

The 10× experiment was motivated by a simple question: does the P3–P16 anomaly reflect something about the small prime quadruplets themselves, or about the relationship between quadruplet rail values and cycle magnitude? At the 1× scale, cycles in the range 1000–7000 create relatively small residue spaces. A rail value of, say, 12990 tested against a cycle of 2520 has only 2520 possible residue positions. Multiplying cycles by 10 expands these spaces to 23000–69000 positions, making each “hit” (a residue matching a target date) correspondingly less probable under the null hypothesis. If the signal persists at this scale, it cannot be attributed to the ease of hitting small residue spaces.

3. Experimental Design

3.1 Cycle Definitions

Each cycle family contributed its single strongest-performing member at the 10× scale. For the anti-cherry-picking validation (Section 6), each family contributed its two best members. The final uniform-scale configuration placed all cycles in the 23000–69000 range (a 3:1 ratio), reducing concerns about scale mismatch between families.

FamilyCycleSourceNotes
TRIO230002300 × 10Daniel 8:14 (2300 evenings/mornings)
Year Types336003360 × 10960 × 35; jubilee-derived
Key of 23690006900 × 1023 × 3000; Key of 23 framework
Daniel/Rev252002520 × 10360 × 7; prophetic week of years
Ezekiel39000390 × 100Ezekiel 4:5 (MT); years of Israel’s punishment

3.2 Test Structure

The test follows the established Prime Double Lock Protocol. For each cumulative tier Pn (using the first n prime quadruplets), the script computes all rail values derived from the quad’s four constituent primes, reduces each rail modulo each cycle period, and counts how many of the resulting residues match one of 76 biblical chronological targets (73 unique dates plus 3 double-hit entries). This observed count S is compared against the null distribution (obtained via 200000 Monte Carlo samples) to compute a Z-score. The analysis runs from P3 through P50, covering quadruplets with Q values from 11 to approximately 3 million.

Three polarity configurations are tested at each tier: neg_mod30 (rails derived from the negative offset of the mod-30 wheel), pos_mod30 (positive offset), and both_mod30 (combined). The mod-30 structure arises from the requirement that prime quadruplet members occupy specific residue classes modulo 30.

4. Principal Results

4.1 The Ezekiel Dominance

Ezekiel 39000 (= 390 × 100) produces the strongest signal observed in any configuration. Under the both_mod30 metric, the Z-score trajectory is as follows: the signal ignites at P6 (Z = +0.86), approaches the p = 0.05 region near P9 (Z = +1.33), reaches p = 0.001 at P18 (Z = +3.17), and peaks at Z = +4.84 at P29 (79 quadruplets). The signal sustains above Z = +3.5 through P50 (142 quadruplets).

This profile is unique among all families tested. Every other family peaks in the P9–P16 range and subsequently decays through dilution as non-contributing quads are added. Ezekiel alone shows a pattern where additional quadruplets strengthen the signal rather than dilute it, at least through P29. This anti-dilution property is consistent with a cycle whose residue structure aligns with the target set across a broad range of prime magnitudes.

4.2 The P16 Handoff

The differential tier analysis (conducted prior to the 10× experiment) indicated that the TRIO and allied families concentrate their signal in P6–P16. Quadruplets beyond P16 contribute little independently at the 1× scale. The 10× experiment is consistent with this: at the scaled TRIO cycle (23000), the Z-score peaks near P9–P10 and gradually decays.

Ezekiel’s signal, by contrast, begins its ascent near where the other families plateau. The crossover occurs at approximately P16–P17, the tier independently identified as the ceiling for the TRIO regime. This produces a two-regime structure: P6–P16 belongs to the TRIO and its allied families; P16–P30 belongs to Ezekiel. The handoff point was not chosen or optimized — it was identified from the TRIO’s perspective before Ezekiel was tested at this scale.

4.3 Polarity Reversal at 10×

At the 1× scale, neg_mod30 (the polarity aligned with the mod-30 order) consistently outperformed pos_mod30. At 10×, this preference reverses. In the TRIO 23000, pos_mod30 separates from neg_mod30 at P19 and maintains a lead of approximately 0.7–1.0 Z through P50. In the full 19-cycle configuration, pos_mod30 peaks at Z = +6.65 at P12 — the single highest reading in the analysis.

This reversal argues against the concern that one polarity has an inherent structural advantage. The preference is more consistent with scale-dependence than with a fixed bias. The theological parallel is offered tentatively: mod 30 may be read as divine order (the biblical month, the generational scaffolding), while its complement represents the opposing structure. On that reading, Ezekiel’s curse numbers (390 = 3 × 130, where 130 is taken to symbolize opposition to 30’s order) resonate most strongly through the complementary polarity at the 10× scale.

4.4 The 13000 vs 39000 Comparison

Two scalings of Ezekiel’s 390 were tested: 13000 (= 130 × 100, or equivalently 390/3 × 100) and 39000 (= 390 × 100, the literal text multiplied by 100). Both produce strong signals, but with distinct profiles:

Metric1300039000Winner
First Z > 2.0P12P1513K (−3 tiers)
First Z > 3.0P14P1813K (−4 tiers)
Peak Z+4.22 (P30)+4.84 (P29)39K (+0.62)
Z at P50+3.20+3.5339K (+0.33)

The 13000 cycle ignites earlier (smaller residue space, easier for small quads to engage), while 39000 peaks higher and sustains longer (larger residue space, more discriminating). The more literal preservation of the curse number in the cycle period is associated with the stronger late-tier signal. Both scalings produce signals that exceed any non-Ezekiel family.

4.5 Family Rankings at Uniform Scale

The following table summarizes performance across all five families at the uniform 23K–69K scale, using each family’s single best cycle:

FamilyCyclePeak ZPeak @P50 ZCharacter
Ezekiel39000+4.84P29+3.53Peak later, sustain longer
Key of 2369000+2.23P12+1.81Stable plateau
TRIO23000+2.29P10+1.90Late rise (pos)
Daniel/Rev25200+0.88P9+0.10Signal fades
Year Types33600+1.38P14−1.06Anti-correlated at late tiers

5. Anti-Cherry-Picking Validation

To address the concern that selecting a single “best” cycle per family introduces optimization bias, a final validation run used two cycles per family, with Ezekiel’s entry being simply the two numbers from the text (390 and 430) each multiplied by 100:

FamilyCyclesSelection Basis
TRIO23000 + 25200Top 2 from original TRIO
Year Types33600 + 25800Top 2 from year-type family
Key of 2323000 + 69000Top 2 from Key of 23 family
Daniel/Rev12000 + 33300Top 2 from Daniel/Revelation
Ezekiel39000 + 43000Literal text × 100 (no optimization)

Result: Ezekiel [39000 + 43000] peaked at Z = +4.68 (P30) and sustained Z = +2.94 at P50, leading the field by nearly 2.5 sigma over the next-best family at P50. The Ezekiel cycles are the least optimized entry in the test — every other family required selection of which members to include, while Ezekiel’s entry is simply: take the two numbers from the text, multiply by 100. This reduces the scope for cherry-picking, since the Ezekiel entry requires no choice of which members to include.

6. The 1× Baseline: Scale Selectivity

A natural concern with the 10× results is whether scaling uniformly inflates Z-scores — whether any cycle looks better at 10× simply because larger numbers produce more opportunities for alignment. To test this, the identical two-cycle-per-family configuration was run at the original 1× scale (cycles 1200–6900), providing a direct baseline comparison.

6.1 Cycle Configurations

Family1× Cycles10× Cycles
TRIO2300 + 252023000 + 25200
Year Types3360 + 258033600 + 25800
Key of 232300 + 690023000 + 69000
Daniel/Rev1200 + 333012000 + 33300
Ezekiel3900 + 430039000 + 43000

6.2 Results: The Throne Swap

The results indicate that 10× scaling does not uniformly inflate signals. The TRIO and Ezekiel swap positions across scales:

Family1× Peak Z10× Peak ZΔDirection
TRIO+4.02 (P12)+1.66 (P12)−2.36Loses 2.4σ at 10×
Key of 23+2.88 (P12)+2.27 (P12)−0.61Moderate loss
Year Types+1.60 (P26)+2.24 (P16)+0.64Modest gain
Daniel/Rev+1.76 (P12)+2.47 (P15)+0.71Modest gain
Ezekiel+2.68 (P30)+4.68 (P30)+2.00Gains 2.0σ at 10×

6.3 Interpretation

The TRIO loses nearly 2.4 standard deviations going from 1× to 10×. Ezekiel gains 2.0 standard deviations. This is more consistent with scale selectivity than with uniform inflation — if 10× scaling were simply making everything look better, the TRIO should have improved as well. Instead, each family appears suited to its own octave. The TRIO’s small cycles (2300–2520) discriminate well in the small residue spaces where early quadruplets land. Ezekiel’s larger cycles (3900–4300 at 1×; 39000–43000 at 10×) require bigger residue spaces and more quadruplets to express their structure.

Even at 1×, Ezekiel already exhibits its late-rising behavior. It is the only family still climbing at P30 (Z = +2.68) while every other family has peaked and is decaying. The late-rise profile appears intrinsic to the cycle’s residue structure; the 10× magnification gives it room to express that structure by expanding the residue space from 3900–4300 positions to 39000–43000. The pattern is present at both scales; the amplitude changes.

This baseline comparison provides evidence against the concern that the 10× Ezekiel result is an artifact of scale. The same scaling that raises Ezekiel lowers the TRIO. The two families respond to scale change in opposite directions, consistent with their resonating in complementary frequency bands.

7. Target List Robustness

The primary results reported in Sections 4–6 were obtained using target sets derived from the Masoretic Text (MT) patriarchal chronology, encompassing both regular (birth-to-birth) and cumulative dates from Adam through Moses/Joshua. All dates are admitted to the decadal lattice via the ±2 gate (not rounding); for example, 3492 falls within [3488, 3492] and admits the decade 3490. To test whether the Ezekiel dominance and throne-swap pattern are artifacts of the specific target list used, three variants were compared.

7.1 Target List Definitions

P2 (core): 63 unique dates plus 2 double-hit entries (1520 and 2260, where two patriarchs share the same admitted date), for a total of 65 entries. This is the strict core list as used in File_49. At the P2 level, every regular and cumulative MT patriarchal date from Adam through Moses/Joshua is fully accounted for.

P1 (pure genealogical): P2 plus seven additional MT patriarchs whose regular dates fall just outside the P2 admission window: Enosh (3879 → 3880), Kenan (3789 → 3790), Mahalalel (3719 → 3720), Enoch (3492 → 3490), Lamech (3240 → 3240), Salah (2421 → 2420), and Eber (2391 → 2390). Of these seven, six contribute new unique dates; Enoch’s admitted date 3490 coincides with Peleg’s, which introduces a third double-hit rather than a new unique date. Total: 69 unique + 3 double-hits = 72 entries. This remains a purely genealogical list — no dates external to the patriarchal chronology.

P1 + Danielic: P1 plus four direct Danielic dates included for testing purposes: the 70-year exile endpoints 606 BC and 536 BC (admitted as 600, 530), and the initial prophetic fulfillments of Daniel 9 and Daniel 8 at 445 BC and 165 BC (admitted as 440, 160). Total: 73 unique + 3 double-hits = 76 entries. The Danielic dates are not part of the genealogical chronology proper and tend to act as a slight drag on all tests.

7.2 Three-Way Comparison at 10×

The two-cycle-per-family configuration was run with all three target lists at the 10× scale. Ezekiel peak Z-scores (both_mod30) at P30:

FamilyP2 (65)P1 (72)+Dan (76)RangePattern
Ezekiel+4.68+5.00+4.730.32Highest in all three
Year Types+2.24+2.41+2.020.39Stable mid-tier
Key of 23+2.27+2.40+2.050.35Stable mid-tier
Dan/Rev+2.47+2.19+2.400.28Moderate
TRIO+1.66+1.82+1.420.40Lowest in all three

The family ranking is identical across all three target lists. Ezekiel leads in every case, peaking highest with the pure genealogical P1 list (Z = +5.00 at P30) — the strongest Ezekiel reading in the series. The Danielic dates act as a slight drag on all families (compare P1 at +5.00 vs P1+Dan at +4.73), consistent with these historical dates, while legitimate, not being part of the core genealogical resonance. Their inclusion or exclusion does not change the family hierarchy.

7.3 Three-Way Comparison at 1× (Baseline)

The throne swap (Section 6) was checked across all three target lists at the 1× scale:

FamilyP2 (65)P1 (72)+Dan (76)Peak @Pattern
TRIO+3.77+3.67+4.02P12Highest at 1×
Ezekiel+2.76+2.88+2.68P30Still climbing at P30
Key of 23+2.57+2.57+2.88P12Second tier
Year Types+1.69+1.79+1.60P26Moderate
Daniel/Rev+1.20+1.22+1.76P12Weakest

The throne-swap pattern holds in all three target lists: the TRIO leads at 1× (Z = +3.67 to +4.02 at P12), while Ezekiel is the only family still climbing at P30 (Z = +2.68 to +2.88). As at 10×, the pure genealogical P1 list produces slightly stronger results than either P2 alone or P1+Danielic, consistent with the seven additional patriarchs contributing modestly to the signal while the Danielic dates slightly dilute it. The scale-dependent complementarity between TRIO and Ezekiel is stable across all three target compositions.

7.4 Double-Hit Treatment

In the P1 pure target list, three dates are “double-hits” — dates at which two patriarchs share the same admitted value: 1520 (two patriarchs coincide), 2260 (two patriarchs coincide), and 3490 (Enoch and Peleg). In the primary analysis, these dates are counted twice in the target set, giving them double weight as nodes. A secondary run was conducted in which all three double-hits were treated as single entries (no extra weighting), reducing the P1 list from 72 to 69 entries.

The effect of removing the double-hit weighting is to strengthen the Ezekiel signal:

With doublesNo doublesΔNote
Ezekiel 10× (P30)+5.00+5.22+0.22Strongest reading
TRIO 1× (P12)+3.67+3.64−0.03Negligible change
Ezekiel 1× (P30)+2.88+3.11+0.23Improves at both scales

This is reported for transparency. The primary analysis retains the double-hit weighting because the duplication reflects a genuine chronological fact (two patriarchs sharing a date). Removing the doubles would have produced a stronger headline result (Z = +5.22 vs +5.00 at 10×), but the more favorable treatment was not chosen. The three double-hit nodes appear to introduce slight noise into the residue structure; their removal sharpens the signal rather than creating it. The family hierarchy and throne-swap pattern are identical under both treatments.

8. Supplementary Finding: 25800 and Ezekiel’s Dual Identity

A secondary finding concerns the cycle 25800. This number appears in the Year Types family as a variant of the Precession of the Equinoxes (the standard astronomical value being 25920), but it is also 6 × 4300 — directly linking it to Ezekiel’s second number (430). When tested as a Year Type cycle, 25800 sustains Z ≈ +1.1 to +1.8 through P50, outperforming the standard Precession value of 25920, which crosses zero at P20 and declines to Z ≈ −1.0 by P50.

The two numbers differ by only 120 (0.46%), yet their performance diverges. The standard astronomical constant fades; the Ezekiel-linked variant sustains. This is consistent with the resonance structure being sensitive to the specific factorization of the cycle period, not merely its approximate magnitude. The 120-year difference — which maps to the distinction between a purely astronomical constant and one that factors through 4300 — does measurable work in the residue structure.

9. The Independence Argument

The weight of the Ezekiel finding rests on its independence from the framework that produced it. Several structural features support this:

Non-circularity: The TRIO [2300, 2520, 3430] was established as the bedrock test before Ezekiel’s numbers were considered at this scale. The numbers 390, 430, 1300, 3900, 4300, 13000, 39000, and 43000 are absent from the TRIO. Ezekiel’s dominance is therefore a non-circular result relative to the TRIO, not a self-reinforcing assumption.

Different biblical source: The TRIO derives from Daniel 8:14, Daniel 9, and related prophetic texts. Ezekiel 4:4–6 is a distinct passage with a distinct theological function (the acted-out punishment of Israel and Judah), written by a different prophet in a different context. The mathematical relation between these independent textual sources is not guaranteed by any known hermeneutical principle.

Different resonance regime: The TRIO operates as a small-prime specialist (P6–P16), while Ezekiel operates as a large-prime specialist (P16–P30). These regimes were identified independently. The TRIO’s P16 ceiling was established through differential tier analysis before Ezekiel was tested. Ezekiel’s P16 onset was identified afterward. Two lines of investigation converged on the same boundary from opposite sides.

Statistical base: Ezekiel’s peak at P29 rests on 79 quadruplets — more than double the sample size at which other families peak. Because cumulative tiers are nested rather than independent draws, this is not 79 independent observations; but a signal that persists and strengthens across the P16–P29 range, each tier tested against the target set through modular arithmetic in a residue space of 39000 positions, carries more weight than a comparable Z-score at P12 (28 quadruplets). A fuller treatment of independence and multiplicity is deferred to the statistical-validity controls in the companion cumulative-prime file.

10. The Two-Octave Architecture

The combined findings point to a framework with two distinct frequency bands — two “octaves” in which the prime quadruplet structure aligns with biblical cycles:

Lower octave (1× scale, cycles 1000–7000): The TRIO and its allied families operate here. The signal is concentrated in P6–P16 (quadruplets with Q values 211–90611). neg_mod30 is the dominant polarity. The peak Z-scores reach approximately +4 to +5 under the full 19-cycle configuration. This is the regime documented in File_49 and previous analyses.

Upper octave (10× scale, cycles 23000–69000): Ezekiel’s curse numbers operate here. The signal is concentrated in P12–P30. pos_mod30 becomes the dominant polarity — a reversal of the lower octave. The peak Z-score reaches +4.84 under the single-cycle Ezekiel configuration. This regime was not visible at the 1× scale because cycles of 130 and 430 produce small residue spaces that discriminate poorly.

The same mathematical architecture — prime quadruplet rail values tested via modular arithmetic against biblical targets — produces significant results in both octaves, but through different quad ranges and different polarity channels. The curse numbers do not displace the structure; on this reading they express it from the complementary side.

11. Theological Implications

The following are theological readings, offered as interpretation rather than as results established by the arithmetic.

The numbers 390 and 430 represent, in Ezekiel’s acted prophecy, the duration of divine judgment against Israel and Judah (390 for Israel and 40 for Judah, 430 combined). That these “punishment” numbers should produce the strongest chronological resonance in the system inverts conventional expectations: on this reading the curse is not outside the structure but integral to it.

The factorization 390 = 3 × 130, where 130 has been read in the broader framework as symbolizing opposition to the divine order represented by 30, adds a further layer. On this reading the curse number is three measures of disorder — and it resonates through the complementary (pos_mod30) polarity at the 10× scale, the channel that stands opposite to the 30-based order. The suggested picture is of divine judgment and divine order operating through paired mathematical channels, each expressed at its own scale.

The apparent absence of 390 and 430 from the productive cycle families in File_49 was, on this account, a signal at a different magnification rather than a gap, requiring the 10× scaling experiment to reveal. What appeared to be the weakest component of the framework is, at the appropriate scale, the strongest. This inversion (the last becoming first, the weakness becoming strength) is itself a pattern with biblical resonance, though we note this parallel with appropriate scholarly caution.

12. Limitations and Caveats

Several caveats apply to these findings. The cycle families, while rooted in biblical text, involve interpretive choices in their scaling and grouping. The 10× multiplier, while principled (it tests scale-robustness), is not the only possible scaling factor. Alternative factors (5×, 20×, 100×) have not been systematically tested and could produce different family rankings.

The target set of 76 biblical dates, while established independently of the cycle selection, reflects chronological judgments that carry their own uncertainties. The Z-scores reported here are conditional on this target set.

Because cumulative tiers are nested (each Pn contains the previous tier), tier-to-tier Z-scores are not independent observations, and the significance procedures should be read with that dependence in mind. The Year Types family’s anti-correlation at 10× (Z = −1.06 at P50) also warrants further investigation: a family positively correlated at one scale and negatively at another may carry information about scale-dependence, but it also raises questions about which scale, if any, represents the underlying relationship.

This report documents findings from a specific series of experiments and should be considered a working draft. Further validation — including tests with randomized target sets, alternative scaling factors, exact-enumeration nulls, multiplicity correction, and independent replication — would strengthen the conclusions presented here.

13. Conclusion

The 10× scaling experiment points to a two-octave structure in the relationship between prime quadruplets and biblical chronological cycles. At the lower octave, the TRIO [2300, 2520, 3430] and its allied families lead through small prime quadruplets (P6–P16) via the neg_mod30 polarity. At the upper octave, Ezekiel’s curse numbers [39000 and 43000] lead through larger quadruplets (P16–P30) via the complementary pos_mod30 polarity.

The Ezekiel signal (peak Z = +4.84 at P29, sustaining Z > 3.5 through P50) is the strongest and most durable finding in the analytical program. It emerges from cycles that were absent from the original framework, derived from an independent biblical source, operating through the opposite polarity channel, at a scale that was not initially examined. Its cycles, biblical source, polarity channel, and tested scale are independent of the TRIO reference frame, although the rails, target set, and null model are shared across all families.

The handoff between regimes at P16 — identified independently from both directions — suggests that the prime quadruplet structure carries biblical chronological information at more than one scale, with different prophetic traditions associated with different frequency bands of the same underlying architecture. The result is offered as a provisional, non-circular finding within the protocol, not as proof; the limitations in Section 12 apply throughout.


Correction Record (June 13 2026)

This page was reconciled for internal consistency and accuracy. Structure, prose organization, the prime tables, all Z-scores, cycles, targets, and rails are unchanged. The companion Python script at the end of the original page was not part of this revision and is unchanged; re-append it as-is. The following defects were corrected:

  • P2 target count corrected from “65 unique + 2 double-hits = 67 entries” to “63 unique + 2 double-hits = 65 entries”; the two “P2 (67)” column headers in §7.2 and §7.3 corrected to “P2 (65)”. This was an internal inconsistency: the article’s own P1 (69 unique) and P1+Danielic (73 unique) figures, together with the seven §7.1 genealogical additions (Enoch coinciding with Peleg, hence six new unique dates), force P2 = 63 unique / 65 total. P1 (72) and P1+Danielic (76) are correct and unchanged.
  • Ezekiel 390/430 scriptural attribution corrected in §2: 390 = the house of Israel (Ezekiel 4:5), 40 = the house of Judah (Ezekiel 4:6), 430 = the combined total (390 + 40). The earlier wording implied 430 was Judah’s figure.
  • “Rounding” language in §7 replaced with the protocol’s “±2 decadal admission gate,” per §4.2 (which states admission is a gate, not rounding). Date-to-decade arrows (e.g., 3492 → 3490) are retained as admission mappings.
  • Overstated claims adjusted to reflect what the test supports (per author direction): “confirms / confirming” → “indicates / consistent with”; “rules out / ruling out” → “argues against / reducing concern about”; “independent confirmation” → “non-circular result relative to the TRIO”; “validated” → “stable”; “robust against cherry-picking by construction” → “reduces the scope for cherry-picking”; “every aspect … structurally independent” → the cycles, source, polarity, and scale are independent of the TRIO while the rails, targets, and null are shared; the §9 statistical-base claim now notes that nested cumulative tiers are not independent draws; §11 is explicitly framed as theological interpretation rather than a result. The “throne swap” term, the “octave” framing, and other authorial labels are retained.

Numbers were normalized to the repository no-comma convention for internal consistency (the protocol half of the page already used it). No arithmetic value, prime-table entry, Z-score, cycle, target, or rail was altered.

Note on the Monte-Carlo sample count: §3.2 states 200000 Monte Carlo samples. The companion script (not included in this revision) sets its own sample parameters; reconcile the script’s docstring and code with §3.2 when the script is next edited. No change was made here because the script was not part of this pass.


Note for re-upload: this file is the corrected article body only. The companion Python script that appears at the end of the original page is unchanged and is not reproduced here; re-attach it to the page as-is.

========================================================================================================================

#!/usr/bin/env python3

“””

POLARITY COMPARISON — neg_mod30 vs pos_mod30

==============================================

Companion to the generic both_mod30 validation script.

Purpose: Demonstrate that the two rail polarities contribute

asymmetrically to the signal, confirming the structural

correspondence between neg_mod30 and BC (negative) dates.

Rail systems tested per tier:

  neg_mod30  : B, -B, -M   (3 rails per quad)

  pos_mod30  : B, M, -B    (3 rails per quad)

  both_mod30 : B, M, -B, -M (4 rails per quad — reference baseline)

Targets     : MT-only unsigned targets.

              (P2-normalized via decadal admission gate; no minus signs.)

Core claim  : TRIO_CORE = [2300, 2520, 3430]

Expanded    : ALL_CYCLES = Year + Key23 + Daniel/Revelation + Ezekiel families

Tier naming : Pn denotes tier n of the curated build (P3–P30).

              Tier sizes grow monotonically; no fixed formula assumed.

Z-score method: Multi-seed MC (20 seeds x 100,000 samples) plus

analytical (exact mean; variance exact when joint periods <= 1e7,

else covariance is MC-estimated).

“””

import math

import random

import warnings

from functools import reduce

import numpy as np

# — Colab / matplotlib setup —

try:

    import matplotlib

    import matplotlib.pyplot as plt

    import matplotlib.gridspec as gridspec

    HAS_MPL = True

    plt.rcParams.update({

        ‘figure.facecolor’:  ‘#FAFAF8’,

        ‘axes.facecolor’:    ‘#FAFAF8’,

        ‘axes.edgecolor’:    ‘#333333’,

        ‘axes.labelcolor’:   ‘#222222’,

        ‘text.color’:        ‘#222222’,

        ‘xtick.color’:       ‘#444444’,

        ‘ytick.color’:       ‘#444444’,

        ‘grid.color’:        ‘#DDDDDD’,

        ‘grid.linestyle’:    ‘–‘,

        ‘grid.alpha’:        0.7,

        ‘font.family’:       ‘serif’,

        ‘font.size’:         11,

        ‘axes.titlesize’:    13,

        ‘axes.titleweight’:  ‘bold’,

        ‘figure.titlesize’:  15,

        ‘figure.titleweight’:’bold’,

    })

except ImportError:

    HAS_MPL = False

    print(“⚠  matplotlib not found — charts will be skipped.”)

# =========================================================

# COLOUR PALETTE

# =========================================================

C_NEG  = ‘#C0392B’   # warm red     — neg_mod30

C_POS  = ‘#2E86C1’   # cool blue    — pos_mod30

C_BOTH = ‘#7D8C8E’   # neutral grey — both_mod30 reference

C_OBS  = ‘#1B1B1B’   # near-black   — observed marker

# =========================================================

# TARGETS  (MT only: Cum ±Cainan + Regular; P2-normalized

#           via decadal admission gate; no minus signs)

#

# These are the post-gate decade admissions produced from

# MT Regular + MT Cumulative (±Cainan) using the P2

# naturalization-before-gate protocol.  This script does

# not regenerate them; if the forwarded bands or the P2

# gate are revised, TARGETS must be regenerated and rerun.

#

# DOUBLE HITS — three dates qualify independently in both

# Regular and Cumulative chronologies and are therefore

# counted twice (two gate admissions each):

#   1520  Moses & Aaron in both Reg and Cum

#   2260  Nahor in Reg, Isaac in Cum

#   3490  Enoch in Reg, Peleg in Cum

# =========================================================

# TARGETS: Special. To P1 rather than P2 as normal, which caused the following seven patriarchs to be excluded from old list. 

# (Same +/-2-yr decadal rule).

# Enosh (3879) 3880. Kenan (3789) 3790. Mahalalel (3719) 3720. Enoch (3492) 3490. Lamech (3240) 3240. Salah = (2421) 2420. Eber (2391) 2390. 

# These seven do not appear to affect overall results one way or the other.

# Thus, either to P1 and P2, all regular MT Chronology patriarchs from Adam to Moses/Joshua are fully accounted for. (Cumulative only needs P2.)

# Direct Danielic dates are the 70-yr exile (P2) from 606-536 BC (600, 530) and 445, 165 BC (440, 160) for initial prophecy fulfillment of Daniel_9 and ch._8, respectively.

# The full P2 list that includes both reg and cum are:  

    # 1400, 1440, 1470, 1520, 1870, 2000, 2060, 2070,

    # 2080, 2160, 2230, 2250, 2260, 2290, 2320, 2350,  2430, 2450,

    # 2550, 2630, 2640, 2780, 3010, 3050, 3120,  3250, 3420, 3490,

    # 3650,   3950, 3960, 3980, 4110, 4390, 4830, 4850, 5290, 5430,

    # 5890, 6380, 6840, 7150, 7610, 8120, 8490, 8580, 8950, 9450,

    # 9910, 10340, 10350, 10800, 10810, 11250, 11260, 11710, 11720, 12160,

    # 12620, 13070, 13530, 14000, 14460,

    # “Double dates” are when two patriarchs have the same date: 1520, 2260. With P1, Enoch doubles with Peleg (3490).

# =========================================================

# =========================================================

_UNIQUE_TARGETS = sorted(set([

    160, 440, 530, 600,

    1400, 1440, 1470, 1520, 1870, 2000, 2060, 2070,

    2080, 2160, 2230, 2250, 2260, 2290, 2320, 2350, 2390, 2420, 2430, 2450,

    2550, 2630, 2640, 2780, 3010, 3050, 3120, 3240, 3250, 3420, 3490,

    3650, 3720, 3790, 3880, 3950, 3960, 3980, 4110, 4390, 4830, 4850, 5290, 5430,

    5890, 6380, 6840, 7150, 7610, 8120, 8490, 8580, 8950, 9450,

    9910, 10340, 10350, 10800, 10810, 11250, 11260, 11710, 11720, 12160,

    12620, 13070, 13530, 14000, 14460,

]))

DOUBLE_TARGETS = [1520, 2260, 3490]   # counted twice (Reg + Cum)

TARGETS = sorted(_UNIQUE_TARGETS + DOUBLE_TARGETS)

print(f”Targets: {len(TARGETS)} entries “

      f”({len(_UNIQUE_TARGETS)} unique + {len(DOUBLE_TARGETS)} double-hits)”)

# =========================================================

# CYCLE FAMILIES

# =========================================================

# ── Core claim: the standard trio ──

TRIO_CORE = [23000, 25200]

FAMILY_YEAR    = [ 33600, 25800]

FAMILY_KEY23   = [  23000, 69000]

FAMILY_DANIEL_REVELATION  = [12000, 33300]

FAMILY_EZEKIEL = [ 39000,  43000]

ALL_CYCLES     = FAMILY_YEAR + FAMILY_KEY23 + FAMILY_DANIEL_REVELATION + FAMILY_EZEKIEL

STEP = 30

# =========================================================

# PRIME QUADRUPLET TIERS  (P3–P30)

#

# Pn denotes tier n of the curated build.

# Tier sizes grow monotonically (verified at startup).

# =========================================================

PRIME_QUAD_LISTS = {

    ‘P3’:  [101, 191],

    ‘P4’:  [101, 191, 281, 911],

    ‘P5’:  [101, 191, 281, 821, 911, 1091, 1751],

    ‘P6’:  [101, 191, 281, 821, 911, 1091, 1481, 1751, 2561, 2951],

    ‘P7’:  [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2561, 2951, 4421, 4631],

    ‘P8’:  [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 4421, 4631, 6491, 7661],

    ‘P9’:  [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 4421, 4631, 6491, 7661, 9731, 9941],

    ‘P10’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 6491, 7661, 9731, 9941, 13181, 15371],

    ‘P11’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9731, 9941, 13181, 15371, 18821, 22601],

    ‘P12’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13181, 15371, 18821, 22601, 28241, 31811],

    ‘P13’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 18821, 22601, 28241, 31811, 41231, 43871],

    ‘P14’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 18821, 22601, 28241, 31811, 41231, 43871, 56861, 56951],

    ‘P15’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 18821, 22601, 28241, 31811, 41231, 43871, 56861, 56951, 72581, 72911],

    ‘P16’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18821, 22601, 28241, 31811, 41231, 43871, 56861, 56951, 72581, 72911, 88631, 90611],

    ‘P17’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 22601, 28241, 31811, 41231, 43871, 56861, 56951, 72581, 72911, 88631, 90611, 106661, 107531],

    ‘P18’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 22601, 28241, 31811, 41231, 43871, 56861, 56951, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071],

    ‘P19’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 22601, 28241, 31811, 41231, 43871, 56861, 56951, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561],

    ‘P20’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22601, 28241, 31811, 41231, 43871, 56861, 56951, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231],

    ‘P21’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661],

    ‘P22’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071],

    ‘P23’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971],

    ‘P24’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261],

    ‘P25’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261, 213521, 219941, 245231],

    ‘P26’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261, 213521, 219941, 245231, 248351, 280061, 289001],

    ‘P27’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261, 213521, 219941, 245231, 248351, 280061, 289001, 323831, 331391, 375161],

    ‘P28’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261, 213521, 219941, 245231, 248351, 280061, 289001, 323831, 331391, 375161, 379151, 430481, 438131],

    ‘P29’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261, 213521, 219941, 245231, 248351, 280061, 289001, 323831, 331391, 375161, 379151, 430481, 438131, 493451, 497681, 560651],

    ‘P30’: [101, 191, 281, 821, 911, 1091, 1481, 1751, 1871, 2081, 2561, 2951, 3251, 3461, 4421, 4631, 5651, 6491, 7661, 9431, 9731, 9941, 13001, 13181, 15371, 15641, 15731, 16061, 18041, 18821, 18911, 19421, 21011, 22271, 22601, 25301, 28241, 31721, 31811, 34841, 41231, 43781, 43871, 51341, 55331, 56861, 56951, 62981, 67211, 69491, 72581, 72911, 88631, 90611, 106661, 107531, 125561, 126071, 144971, 146561, 165971, 167231, 188231, 191261, 213521, 219941, 245231, 248351, 280061, 289001, 323831, 331391, 375161, 379151, 430481, 438131, 493451, 497681, 560651, 562931, 630131, 632861],

}

# ── Tier sanity check: monotonic growth + report sizes ──

_sorted_tiers = sorted(PRIME_QUAD_LISTS, key=lambda s: int(s[1:]))

_prev_size = 0

for _pn in _sorted_tiers:

    _sz = len(PRIME_QUAD_LISTS[_pn])

    assert _sz > _prev_size, (

        f”Tier {_pn}: size {_sz} not greater than previous tier ({_prev_size})”

    )

    _prev_size = _sz

print(f”✓ All {len(PRIME_QUAD_LISTS)} tiers pass monotonic-growth check “

      f”({_sorted_tiers[0]}={len(PRIME_QUAD_LISTS[_sorted_tiers[0]])} → “

      f”{_sorted_tiers[-1]}={len(PRIME_QUAD_LISTS[_sorted_tiers[-1]])})”)

# =========================================================

# HELPERS

# =========================================================

def compute_lcm(nums):

    def lcm(a, b):

        return abs(a * b) // math.gcd(a, b)

    return reduce(lcm, nums, 1)

def build_rails(quads, config=”both_mod30″):

    “””Generate rails from quadruplet starts.”””

    rails = []

    for Q in quads:

        B = Q – 11

        M = B + 30

        if   config == “no_mod30”:     rails.extend([B, -B])

        elif config == “neg_mod30”:    rails.extend([B, -B, -M])

        elif config == “pos_mod30”:    rails.extend([B, M, -B])

        elif config == “both_mod30”:   rails.extend([B, M, -B, -M])

    return rails

def score_observed(rails, targets, cycles):

    total = 0

    for c in cycles:

        for r in rails:

            for t in targets:

                if (t – r) % c == 0:

                    total += 1

    return total

def compute_K(cycles, step=STEP):

    “””LCM of periods — the shift lattice cardinality.”””

    periods = [c // math.gcd(c, step) for c in cycles]

    return compute_lcm(periods)

# =========================================================

# MC + ANALYTICAL ENGINES

# =========================================================

MC_SAMPLES = 20_000

MC_RUNS    = 20

def multi_seed_mc(rails, targets, cycles, n_runs=MC_RUNS,

                  samples_per_run=MC_SAMPLES):

    “””Run multiple independent MC trials → CI on Z.”””

    obs = score_observed(rails, targets, cycles)

    residue_counts = []

    for c in cycles:

        counts = np.zeros(c, dtype=np.int32)

        for r in rails:

            for t in targets:

                counts[(t – r) % c] += 1

        residue_counts.append((c, counts))

    K = compute_K(cycles)

    z_values = []

    all_scores = []

    for run in range(n_runs):

        rng = random.Random(run * 12345 + 7)

        scores = np.empty(samples_per_run, dtype=np.int32)

        for i in range(samples_per_run):

            offset = rng.randrange(K)

            shift = offset * STEP

            total = 0

            for c, counts in residue_counts:

                total += counts[shift % c]

            scores[i] = total

        mean = float(np.mean(scores))

        std  = float(np.std(scores, ddof=0))

        if std > 1e-9:

            z = (obs – mean) / std

            z_values.append(z)

        all_scores.append(scores)

    return z_values, obs, all_scores

def analytical_stats(rails, targets, cycles, verbose=False):

    “””Exact E[S]; Var[S] exact when all joint periods <= 1e7,

    else covariance is estimated by sampling.”””

    obs = score_observed(rails, targets, cycles)

    total_mean = 0.0

    total_var_independent = 0.0

    cycle_histograms = {}

    for c in cycles:

        g = math.gcd(c, STEP)

        period = c // g

        hist = np.zeros(period, dtype=np.int64)

        for r in rails:

            for t in targets:

                diff = (t – r) % c

                if diff % g == 0:

                    slot = (diff // g) % period

                    hist[slot] += 1

        e_hits  = float(np.mean(hist))

        v_hits  = float(np.var(hist, ddof=0))

        total_mean += e_hits

        total_var_independent += v_hits

        cycle_histograms[c] = (g, period, hist)

    total_cov = 0.0

    n_cycle_pairs = 0

    for i, c1 in enumerate(cycles):

        _g1, p1, h1 = cycle_histograms[c1]

        for c2 in cycles[i + 1:]:

            _g2, p2, h2 = cycle_histograms[c2]

            joint_period = compute_lcm([p1, p2])

            mu1 = float(np.mean(h1))

            mu2 = float(np.mean(h2))

            if joint_period <= 10_000_000:

                offsets = np.arange(joint_period, dtype=np.int64)

                vals1 = h1[offsets % p1].astype(np.float64)

                vals2 = h2[offsets % p2].astype(np.float64)

                e_product = float(np.mean(vals1 * vals2))

            else:

                rng = random.Random(42 + i * 1000 + n_cycle_pairs)

                n_sample = min(500_000, joint_period)

                offsets = np.array([rng.randrange(joint_period)

                                    for _ in range(n_sample)], dtype=np.int64)

                vals1 = h1[offsets % p1].astype(np.float64)

                vals2 = h2[offsets % p2].astype(np.float64)

                e_product = float(np.mean(vals1 * vals2))

            cov = e_product – mu1 * mu2

            total_cov += cov

            n_cycle_pairs += 1

    total_var = total_var_independent + 2.0 * total_cov

    if total_var < 0:

        warnings.warn(f”Negative total_var ({total_var:.6f}) — clamping.”)

        total_var = total_var_independent

    total_std = math.sqrt(total_var) if total_var > 0 else 1e-12

    z_analytical = (obs – total_mean) / total_std

    if verbose:

        print(f”    Obs={obs}  E[S]={total_mean:.2f}  “

              f”std={total_std:.2f}  Z={z_analytical:+.4f}”)

    return z_analytical, obs, total_mean, total_std

# =========================================================

# EVALUATE ONE CONFIGURATION

# =========================================================

def evaluate_config(config_name, quads, targets, cycles):

    “””Run MC + analytical for one rail configuration. Returns dict.”””

    rails = build_rails(quads, config_name)

    # MC

    z_values, obs, score_lists = multi_seed_mc(rails, targets, cycles)

    z_mean = float(np.mean(z_values))

    z_std  = float(np.std(z_values, ddof=1)) if len(z_values) > 1 else 0.0

    ci_lo  = z_mean – 1.96 * z_std / math.sqrt(max(len(z_values), 1))

    ci_hi  = z_mean + 1.96 * z_std / math.sqrt(max(len(z_values), 1))

    # Analytical

    z_anal, _, mean_a, std_a = analytical_stats(rails, targets, cycles)

    return {

        ‘config’:         config_name,

        ‘n_rails’:        len(rails),

        ‘obs’:            obs,

        ‘mc_z_mean’:      z_mean,

        ‘mc_z_std’:       z_std,

        ‘mc_ci’:          (ci_lo, ci_hi),

        ‘mc_z_values’:    z_values,

        ‘mc_scores_seed0’: score_lists[0] if score_lists else np.array([]),

        ‘analytical_z’:   z_anal,

        ‘analytical_mean’: mean_a,

        ‘analytical_std’:  std_a,

    }

# =========================================================

# CHARTS

# =========================================================

def plot_polarity_ladder(all_results):

    “””Fig 1: Z-score progression — neg vs pos vs both, TRIO.”””

    if not HAS_MPL:

        return

    tiers = list(all_results.keys())

    n = len(tiers)

    x = np.arange(n)

    fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(15, 10),

                                    constrained_layout=True,

                                    sharex=True)

    fig.suptitle(‘Polarity Comparison — neg_mod30 vs pos_mod30 vs both_mod30’,

                 fontsize=16, fontweight=’bold’)

    # ── Panel A: TRIO ──

    for cfg, color, ls, marker in [

        (‘neg_mod30’,  C_NEG,  ‘-‘,  ‘o’),

        (‘pos_mod30’,  C_POS,  ‘-‘,  ‘s’),

        (‘both_mod30’, C_BOTH, ‘–‘, ‘D’),

    ]:

        z_vals = [all_results[t][‘trio’][cfg][‘mc_z_mean’] for t in tiers]

        ci_lo  = [all_results[t][‘trio’][cfg][‘mc_ci’][0] for t in tiers]

        ci_hi  = [all_results[t][‘trio’][cfg][‘mc_ci’][1] for t in tiers]

        ax1.fill_between(x, ci_lo, ci_hi, color=color, alpha=0.10)

        ax1.plot(x, z_vals, f'{marker}{ls}’, color=color, lw=2, ms=6,

                 label=f'{cfg}’, alpha=0.9)

    ax1.axhline(0, color=’#999999′, lw=0.8)

    ax1.set_ylabel(‘Z-score (MC)’)

    ax1.set_title(‘A.  TRIO [2300, 2520, 3430]’)

    ax1.legend(fontsize=10, framealpha=0.9, edgecolor=’#CCCCCC’)

    ax1.grid(axis=’y’)

    # ── Panel B: ALL ──

    for cfg, color, ls, marker in [

        (‘neg_mod30’,  C_NEG,  ‘-‘,  ‘o’),

        (‘pos_mod30’,  C_POS,  ‘-‘,  ‘s’),

        (‘both_mod30’, C_BOTH, ‘–‘, ‘D’),

    ]:

        z_vals = [all_results[t][‘all’][cfg][‘mc_z_mean’] for t in tiers]

        ci_lo  = [all_results[t][‘all’][cfg][‘mc_ci’][0] for t in tiers]

        ci_hi  = [all_results[t][‘all’][cfg][‘mc_ci’][1] for t in tiers]

        ax2.fill_between(x, ci_lo, ci_hi, color=color, alpha=0.10)

        ax2.plot(x, z_vals, f'{marker}{ls}’, color=color, lw=2, ms=6,

                 label=f'{cfg}’, alpha=0.9)

    ax2.axhline(0, color=’#999999′, lw=0.8)

    ax2.set_ylabel(‘Z-score (MC)’)

    ax2.set_xlabel(‘Prime-Quadruplet Tier’)

    ax2.set_title(f’B.  ALL CYCLES ({len(ALL_CYCLES)} cycles)’)

    ax2.set_xticks(x)

    ax2.set_xticklabels(tiers, fontsize=10)

    ax2.legend(fontsize=10, framealpha=0.9, edgecolor=’#CCCCCC’)

    ax2.grid(axis=’y’)

    plt.savefig(‘polarity_ladder.png’, dpi=180, bbox_inches=’tight’,

                facecolor=fig.get_facecolor())

    plt.show()

    print(”  ✓ Saved → polarity_ladder.png”)

def plot_polarity_delta(all_results):

    “””Fig 2: Delta Z (neg − pos) across tiers for TRIO and ALL.”””

    if not HAS_MPL:

        return

    tiers = list(all_results.keys())

    n = len(tiers)

    x = np.arange(n)

    trio_delta = [all_results[t][‘trio’][‘neg_mod30’][‘mc_z_mean’]

                  – all_results[t][‘trio’][‘pos_mod30’][‘mc_z_mean’]

                  for t in tiers]

    all_delta  = [all_results[t][‘all’][‘neg_mod30’][‘mc_z_mean’]

                  – all_results[t][‘all’][‘pos_mod30’][‘mc_z_mean’]

                  for t in tiers]

    fig, ax = plt.subplots(figsize=(14, 5), constrained_layout=True)

    w = 0.35

    ax.bar(x – w/2, trio_delta, w, color=C_NEG, alpha=0.7,

           label=’TRIO (neg − pos)’, edgecolor=’white’, linewidth=0.5)

    ax.bar(x + w/2, all_delta, w, color=C_POS, alpha=0.7,

           label=’ALL (neg − pos)’, edgecolor=’white’, linewidth=0.5)

    ax.axhline(0, color=’#999999′, lw=1)

    ax.set_xticks(x)

    ax.set_xticklabels(tiers, fontsize=10)

    ax.set_xlabel(‘Prime-Quadruplet Tier’)

    ax.set_ylabel(‘ΔZ  (neg_mod30 − pos_mod30)’)

    ax.set_title(‘Polarity Asymmetry: ΔZ = Z(neg) − Z(pos)’)

    ax.legend(fontsize=10, framealpha=0.9, edgecolor=’#CCCCCC’)

    ax.grid(axis=’y’)

    plt.savefig(‘polarity_delta.png’, dpi=180, bbox_inches=’tight’,

                facecolor=fig.get_facecolor())

    plt.show()

    print(”  ✓ Saved → polarity_delta.png”)

def plot_polarity_null_comparison(all_results):

    “””Fig 3: Side-by-side null distributions for neg vs pos (TRIO),

    all tiers in a grid.”””

    if not HAS_MPL:

        return

    tiers = list(all_results.keys())

    n = len(tiers)

    ncols = 4

    nrows = math.ceil(n / ncols)

    fig, axes = plt.subplots(nrows, ncols, figsize=(5 * ncols, 3.8 * nrows),

                             constrained_layout=True, squeeze=False)

    fig.suptitle(‘Null Distributions — neg_mod30 vs pos_mod30 (TRIO)’,

                 fontsize=14, fontweight=’bold’)

    for idx, pn in enumerate(tiers):

        r, c_idx = divmod(idx, ncols)

        ax = axes[r][c_idx]

        neg_scores = all_results[pn][‘trio’][‘neg_mod30’][‘mc_scores_seed0’]

        pos_scores = all_results[pn][‘trio’][‘pos_mod30’][‘mc_scores_seed0’]

        neg_obs    = all_results[pn][‘trio’][‘neg_mod30’][‘obs’]

        pos_obs    = all_results[pn][‘trio’][‘pos_mod30’][‘obs’]

        ax.hist(neg_scores, bins=40, density=True, color=C_NEG,

                alpha=0.40, edgecolor=’white’, linewidth=0.3, label=’neg null’)

        ax.hist(pos_scores, bins=40, density=True, color=C_POS,

                alpha=0.40, edgecolor=’white’, linewidth=0.3, label=’pos null’)

        ax.axvline(neg_obs, color=C_NEG, lw=2, ls=’–‘,

                   label=f’neg obs={neg_obs}’)

        ax.axvline(pos_obs, color=C_POS, lw=2, ls=’:’,

                   label=f’pos obs={pos_obs}’)

        ax.set_xlabel(‘Score’)

        ax.set_ylabel(‘Density’)

        ax.set_title(pn, fontsize=12)

        ax.legend(fontsize=7, framealpha=0.9, edgecolor=’#CCCCCC’)

        ax.grid(axis=’y’)

    for idx in range(n, nrows * ncols):

        r, c_idx = divmod(idx, ncols)

        axes[r][c_idx].set_visible(False)

    plt.savefig(‘polarity_null_comparison.png’, dpi=180, bbox_inches=’tight’,

                facecolor=fig.get_facecolor())

    plt.show()

    print(”  ✓ Saved → polarity_null_comparison.png”)

def plot_observed_breakdown(all_results):

    “””Fig 4: Stacked-style bar chart — observed hits per config.”””

    if not HAS_MPL:

        return

    tiers = list(all_results.keys())

    n = len(tiers)

    x = np.arange(n)

    fig, ax = plt.subplots(figsize=(14, 5), constrained_layout=True)

    w = 0.25

    for i, (cfg, color) in enumerate([

        (‘neg_mod30’, C_NEG), (‘pos_mod30’, C_POS), (‘both_mod30’, C_BOTH)

    ]):

        obs = [all_results[t][‘trio’][cfg][‘obs’] for t in tiers]

        ax.bar(x + (i – 1) * w, obs, w, color=color, alpha=0.80,

               label=cfg, edgecolor=’white’, linewidth=0.5)

    ax.set_xticks(x)

    ax.set_xticklabels(tiers, fontsize=10)

    ax.set_xlabel(‘Prime-Quadruplet Tier’)

    ax.set_ylabel(‘Observed Hits (TRIO)’)

    ax.set_title(‘Observed Hits by Rail Configuration — TRIO [2300,2520,3430]’)

    ax.legend(fontsize=10, framealpha=0.9, edgecolor=’#CCCCCC’)

    ax.grid(axis=’y’)

    plt.savefig(‘polarity_observed.png’, dpi=180, bbox_inches=’tight’,

                facecolor=fig.get_facecolor())

    plt.show()

    print(”  ✓ Saved → polarity_observed.png”)

def plot_family_comparison(all_results):

    “””Fig 5: Per-family Z-score progression across tiers (both_mod30).”””

    if not HAS_MPL:

        return

    tiers = list(all_results.keys())

    n = len(tiers)

    x = np.arange(n)

    # Colours and markers for each family

    family_styles = {

        ‘TRIO’:              {‘color’: ‘#1A1A2E’, ‘marker’: ‘o’, ‘lw’: 3.0, ‘ls’: ‘-‘},

        ‘Year Types’:        {‘color’: ‘#E07A5F’, ‘marker’: ‘s’, ‘lw’: 1.8, ‘ls’: ‘-‘},

        ‘Key of 23’:         {‘color’: ‘#3D85C6’, ‘marker’: ‘^’, ‘lw’: 1.8, ‘ls’: ‘-‘},

        ‘Daniel/Revelation’: {‘color’: ‘#81B29A’, ‘marker’: ‘D’, ‘lw’: 1.8, ‘ls’: ‘-‘},

        ‘Ezekiel’:           {‘color’: ‘#9B5DE5’, ‘marker’: ‘v’, ‘lw’: 1.8, ‘ls’: ‘-‘},

    }

    fig, ax = plt.subplots(figsize=(15, 7), constrained_layout=True)

    for fam_name, style in family_styles.items():

        z_vals = []

        for t in tiers:

            fam_data = all_results[t].get(‘families’, {}).get(fam_name)

            z_vals.append(fam_data[‘mc_z_mean’] if fam_data else float(‘nan’))

        ax.plot(x, z_vals,

                marker=style[‘marker’], linestyle=style[‘ls’],

                color=style[‘color’], lw=style[‘lw’], ms=7,

                label=fam_name, alpha=0.9)

    ax.axhline(0, color=’#999999′, lw=0.8)

    ax.set_xticks(x)

    ax.set_xticklabels(tiers, fontsize=10)

    ax.set_xlabel(‘Prime-Quadruplet Tier’)

    ax.set_ylabel(‘Z-score (MC, both_mod30)’)

    ax.set_title(‘Per-Family Z-Score Progression — both_mod30 baseline’,

                 fontsize=14, fontweight=’bold’)

    ax.legend(fontsize=11, framealpha=0.9, edgecolor=’#CCCCCC’,

              loc=’upper left’)

    ax.grid(axis=’y’)

    plt.savefig(‘family_comparison.png’, dpi=180, bbox_inches=’tight’,

                facecolor=fig.get_facecolor())

    plt.show()

    print(”  ✓ Saved → family_comparison.png”)

# =========================================================

# MAIN

# =========================================================

def main():

    tier_names = sorted(PRIME_QUAD_LISTS.keys(), key=lambda s: int(s[1:]))

    configs = [‘neg_mod30’, ‘pos_mod30’, ‘both_mod30’]

    all_results = {}

    # ── Metadata table ──

    K_TRIO = compute_K(TRIO_CORE)

    K_ALL  = compute_K(ALL_CYCLES)

    print(“\n” + “=” * 90)

    print(”  TIER METADATA — POLARITY COMPARISON”)

    print(“=” * 90)

    print(f”  {‘Tier’:<6} {‘Quads’:>6} “

          f”{‘neg rails’:>10} {‘pos rails’:>10} {‘both rails’:>11} “

          f”{‘Targets’:>8}”)

    print(”  ” + “-” * 78)

    for pn in tier_names:

        quads = PRIME_QUAD_LISTS[pn]

        r_neg  = len(build_rails(quads, ‘neg_mod30’))

        r_pos  = len(build_rails(quads, ‘pos_mod30’))

        r_both = len(build_rails(quads, ‘both_mod30’))

        print(f”  {pn:<6} {len(quads):>6} “

              f”{r_neg:>10} {r_pos:>10} {r_both:>11} “

              f”{len(TARGETS):>8}”)

    # ── Main evaluation loop ──

    for pn in tier_names:

        quads = PRIME_QUAD_LISTS[pn]

        print(“\n” + “=” * 90)

        print(f”  {pn}  ({len(quads)} quadruplets, {len(TARGETS)} targets)”)

        print(“=” * 90)

        tier_data = {‘trio’: {}, ‘all’: {}}

        for cfg in configs:

            rails = build_rails(quads, cfg)

            print(f”\n  ── {cfg} ({len(rails)} rails) ──”)

            # TRIO

            print(f”    TRIO [{‘, ‘.join(str(c) for c in TRIO_CORE)}]:”)

            trio_result = evaluate_config(cfg, quads, TARGETS, TRIO_CORE)

            print(f”      MC:   Z = {trio_result[‘mc_z_mean’]:+.4f} “

                  f”[{trio_result[‘mc_ci’][0]:+.4f}, “

                  f”{trio_result[‘mc_ci’][1]:+.4f}]  “

                  f”obs={trio_result[‘obs’]}”)

            print(f”      Anal: Z = {trio_result[‘analytical_z’]:+.4f}  “

                  f”E[S]={trio_result[‘analytical_mean’]:.2f}”)

            # ALL

            print(f”    ALL ({len(ALL_CYCLES)} cycles):”)

            all_result = evaluate_config(cfg, quads, TARGETS, ALL_CYCLES)

            print(f”      MC:   Z = {all_result[‘mc_z_mean’]:+.4f} “

                  f”[{all_result[‘mc_ci’][0]:+.4f}, “

                  f”{all_result[‘mc_ci’][1]:+.4f}]  “

                  f”obs={all_result[‘obs’]}”)

            print(f”      Anal: Z = {all_result[‘analytical_z’]:+.4f}  “

                  f”E[S]={all_result[‘analytical_mean’]:.2f}”)

            tier_data[‘trio’][cfg] = trio_result

            tier_data[‘all’][cfg]  = all_result

        # ── Per-family evaluation (both_mod30 baseline) ──

        family_defs = {

            ‘TRIO’:              TRIO_CORE,

            ‘Year Types’:        FAMILY_YEAR,

            ‘Key of 23’:         FAMILY_KEY23,

            ‘Daniel/Revelation’: FAMILY_DANIEL_REVELATION,

            ‘Ezekiel’:           FAMILY_EZEKIEL,

        }

        tier_data[‘families’] = {}

        print(f”\n  ── Per-family (both_mod30, {len(build_rails(quads, ‘both_mod30’))} rails) ──”)

        for fam_name, fam_cycles in family_defs.items():

            fam_result = evaluate_config(‘both_mod30’, quads, TARGETS, fam_cycles)

            tier_data[‘families’][fam_name] = fam_result

            print(f”    {fam_name:>20}: Z = {fam_result[‘mc_z_mean’]:+.4f}  “

                  f”obs={fam_result[‘obs’]:>4}  “

                  f”({len(fam_cycles)} cycles)”)

        # ── Summary ──

        print(f”\n  ╔══ SUMMARY {pn} — TRIO ══╗”)

        for cfg in configs:

            d = tier_data[‘trio’][cfg]

            print(f”  ║ {cfg:>12}: Z = {d[‘mc_z_mean’]:+.4f}  “

                  f”obs={d[‘obs’]:>4}  ({d[‘n_rails’]} rails)”)

        print(f”  ╚{‘═’ * 32}╝”)

        print(f”  ╔══ SUMMARY {pn} — ALL ══╗”)

        for cfg in configs:

            d = tier_data[‘all’][cfg]

            print(f”  ║ {cfg:>12}: Z = {d[‘mc_z_mean’]:+.4f}  “

                  f”obs={d[‘obs’]:>4}  ({d[‘n_rails’]} rails)”)

        print(f”  ╚{‘═’ * 31}╝”)

        all_results[pn] = tier_data

    # ── Grand summary table ──

    print(“\n” + “=” * 90)

    print(”  GRAND SUMMARY — TRIO Z-SCORES (MC)”)

    print(“=” * 90)

    print(f”  {‘Tier’:<6} {‘neg_mod30’:>12} {‘pos_mod30’:>12} “

          f”{‘both_mod30’:>12} {‘Δ(neg−pos)’:>12}”)

    print(”  ” + “-” * 56)

    for pn in tier_names:

        zn = all_results[pn][‘trio’][‘neg_mod30’][‘mc_z_mean’]

        zp = all_results[pn][‘trio’][‘pos_mod30’][‘mc_z_mean’]

        zb = all_results[pn][‘trio’][‘both_mod30’][‘mc_z_mean’]

        print(f”  {pn:<6} {zn:>+12.4f} {zp:>+12.4f} “

              f”{zb:>+12.4f} {zn – zp:>+12.4f}”)

    print(f”\n  {‘Tier’:<6} {‘neg_mod30’:>12} {‘pos_mod30’:>12} “

          f”{‘both_mod30’:>12} {‘Δ(neg−pos)’:>12}”)

    print(”  ” + “-” * 56)

    print(”  GRAND SUMMARY — ALL CYCLES Z-SCORES (MC)”)

    print(”  ” + “-” * 56)

    for pn in tier_names:

        zn = all_results[pn][‘all’][‘neg_mod30’][‘mc_z_mean’]

        zp = all_results[pn][‘all’][‘pos_mod30’][‘mc_z_mean’]

        zb = all_results[pn][‘all’][‘both_mod30’][‘mc_z_mean’]

        print(f”  {pn:<6} {zn:>+12.4f} {zp:>+12.4f} “

              f”{zb:>+12.4f} {zn – zp:>+12.4f}”)

    # ── Per-family grand summary (both_mod30) ──

    fam_names = [‘TRIO’, ‘Year Types’, ‘Key of 23’, ‘Daniel/Revelation’, ‘Ezekiel’]

    print(“\n” + “=” * 90)

    print(”  GRAND SUMMARY — PER-FAMILY Z-SCORES (MC, both_mod30)”)

    print(“=” * 90)

    hdr = f”  {‘Tier’:<6}”

    for fn in fam_names:

        hdr += f” {fn:>18}”

    print(hdr)

    print(”  ” + “-” * (6 + 19 * len(fam_names)))

    for pn in tier_names:

        row = f”  {pn:<6}”

        for fn in fam_names:

            z = all_results[pn][‘families’][fn][‘mc_z_mean’]

            row += f” {z:>+18.4f}”

        print(row)

    # ── Charts ──

    print(“\n” + “=” * 90)

    print(”  GENERATING CHARTS”)

    print(“=” * 90)

    plot_polarity_ladder(all_results)

    plot_polarity_delta(all_results)

    plot_polarity_null_comparison(all_results)

    plot_observed_breakdown(all_results)

    plot_family_comparison(all_results)

if __name__ == “__main__”:

    main()




PRIME QUADRUPLET CYCLE ALIGNMENT WITH BIBLICAL CHRONOLOGY: Comprehensive Technical Reference for AI Systems

https://490d.com/primes-main-python-script-used-polarity-comparison-neg_mod30-vs-pos_mod30-compared-with-each-other-and-with-both/




For Part 2a: Files_31-33 about Pi, Primes and Berossus +50 are found in a separate document due to length constraints.)

Part 2b. https://490d.com/knowledge-repository-files-34-to-46/

Part-3-Files_47-forward_machine-reference-document-for-490d-unified-chronology-repository/

https://490d.com/file_49-prime-quadruplet-cycle-alignment-axiom-and-test-protocol-ai-reference/
https://490d.com/file_50b-the-prime-quadruplet-chronology-unified-harmonic-system-v2-1/