Appendix B

The code (logigram.py)

4 min read
In-depth:

The logigram encodes the constraints as predicates, runs the variable space out, and yields the windows, the kill matrix and the costs for run A, run B-strict and run B-consistent. Reproduced verbatim below. The deposit (https://doi.org/10.5281/zenodo.22944959) carries the same logigram — the same predicates, the same constants, the same three runs — with the identifiers spelled out in full and the output path taken from the environment variable `LOGIGRAM_OUT`; running it prints the figures of Appendix A.1 and Appendix C.

```python # -- coding: utf-8 -- """The logigram. Machine-computed. Encodes the constraint list v2 as predicates, runs out the variable space, and yields the kill matrix and the cost function, for run A (freestanding) and run B (coupled).

Anchored to the dossier's own figures: - the three chains and their L/T/P/V/U profile from the ledger; - the eclipse scan (Espenak): a visible umbral eclipse only in 5, 4, 1 BC; - the count-back table (age at baptism AD 27), against which it is validated.

BC years as positive integers (5 = 5 BC); larger = earlier. 'before': a before b <=> a_bc > b_bc. No year 0: age = baptism_AD + birth_bc - 1. """ import itertools, json, collections

# ---------------------------------------------------------------- the axes DEATH_YEAR = [5,4,3,2,1] # BC DEATH_SEASON = ['spring','summer','autumn','winter'] BIRTH_YEAR = [9,8,7,6,5,4,3,2,1] # BC BIRTH_SEASON = ['spring','summer','autumn(Sukkot)','winter'] COUNTING_RULE= ['inclusive','non-inclusive','pre-dating'] YEAR_BEGIN = ['Nisan','Tishri'] INVEST = [40,39] CAPTURE = [37,36]

SEASON_ORDER = {'spring':1,'summer':2,'autumn':3,'autumn(Sukkot)':3,'winter':4}

# ---------------------------------------------------------------- the three chains (ledger) CHAINS = { 'C' : dict(inv=40, inn=37, count='inclusive', yb='Nisan', death_year=4, seasons=['spring','winter']), 'SY': dict(inv=39, inn=36, count='non-inclusive', yb='Tishri', death_year=1, seasons=['winter']), 'CA': dict(inv=40, inn=37, count='pre-dating', yb='Nisan', death_year=4, seasons=['spring','winter']), 'HV': dict(inv=40, inn=37, count='inclusive', yb='free', death_year=4, seasons=['spring','winter']), } # chain profiles (for validation), letters over the 20 data CHAIN_PROFILE = { 'C' : dict(L=10,T=5,P=2,V=0,E=0,U=3), 'SY': dict(L=7, T=2,P=8,V=3,E=0,U=0), 'CA': dict(L=9, T=4,P=0,V=1,E=0,U=6), }

# ---------------------------------------------------------------- eclipse (Espenak) # umbral eclipses whose umbra was visible from Jerusalem/Jericho within the window, # as (year BC, month, day); 1 BC has two (10 January total, 29 December partial at moonrise) ECLIPSES_VISIBLE = [(5,3,23), (5,9,15), (4,3,13), (1,1,10), (1,12,29)] # 7, 6, 3, 2 BC: no visible umbral eclipse

# ---------------------------------------------------------------- the constraints as predicates # Each constraint yields, per cell, one of: 'ok' (reads/counts legitimately), or a cost letter, # or 'DEAD' (hard exclusion -> kill matrix).

def constraint_eclipse(death_year): """V-1: a visible umbral eclipse must precede the death: in the year of death, or in the December before a death early in the next year. On the eclipse date, not on the calendar year.""" for (y, m, d) in ECLIPSES_VISIBLE: if y == death_year or (y == death_year + 1 and m == 12): return 'ok' return 'DEAD'

def constraint_matthew2_hard(birth_year, birth_season, death_year, death_season): "G-1 hard part: birth before Herod's death. Interpretive at the lower bound, hard at 'not after'." if birth_year > death_year: return 'ok' # clearly before if birth_year == death_year: # same year: the season decides return 'ok' if SEASON_ORDER[birth_season] < SEASON_ORDER[death_season] else 'DEAD' return 'DEAD' # birth_year < death_year = born after the death

def constraint_matthew2_early_edge(birth_year, death_year): """G-1 early edge (how early the birth may be). Matthew 2:16 "two years old and under". distance = years before the death. Herod's cutoff ~2 years, taken GENEROUSLY (HV 16 Sep: Herod reckons generously to be sure the messiah is killed, and may have discounted the possibility that the star marked the conception within his margin). <=2: within the cutoff. 3: 1 year margin (the dossier edge, 7 BC with death 4). 4: 2 years margin (dear, a postulate). >=5: age 5+, clashes plainly with "two years old and under" -> DEAD. The late edge (close to the death) is SOFT: through Herod's generous margin the child can be younger than the cutoff, so the birth may lie just before the death.""" distance = birth_year - death_year if distance < 0: return 'ok' # born after: already caught by the hard constraint if distance <= 2: return 'ok' if distance == 3: return 'soft' if distance == 4: return 'P' return 'DEAD' # >=5 years before the death

BAPTISM_FLOOR = 27 # Tiberius' 15th year, inclusively counted = the earliest possible baptism (HV 16 Sep) BAPTISM_OPTIONS = [27,28,29] # Hoehner: the 15th year falls, by reckoning, between AD 27 and 29

def constraint_tiberius(baptism_AD): "B-1a compound: the baptism cannot be before Tiberius' 15th year. AD 27 is the lower bound (inclusive)." return 'ok' if baptism_AD >= BAPTISM_FLOOR else 'DEAD'

def constraint_luke323(birth_year, baptism_AD=27, strict=True): """G-3 (run B): Hoehner. Age = baptism_AD + birth_year - 1 (no year 0). Luke 3:23 "about thirty": hosei marks a round number with modest latitude; +/-2 (Plummer, ICC on Luke 3:23) -> age 28..32. (Hoehner's +/-3, 27..33, is too wide: then the test cannot fail.) Hoehner's own floor: birth 'no earlier than 5 B.C.' -> NOT earlier than 5 BC -> birth_year <= 5.""" age = baptism_AD + birth_year - 1 within_age = 28 <= age <= 32 if strict: return 'ok' if (within_age and birth_year <= 5) else 'DEAD' return 'ok' if within_age else 'DEAD'

# ---------------------------------------------------------------- the sweep def sweep(run, strict=True): """run 'A' (freestanding) or 'B' (coupled, + baptism 27 + Luke 3:23/Hoehner). strict=True -> G-3 with Hoehner's imported floor birth_year<=5 (specific to baptism AD 29); strict=False -> G-3 with only the Luke-3:23 age band 28..32, consistent per baptism year (on HV's own baptism AD 27, age 32 gives 6 BC, not 5).""" alive=[]; dead=[] baptismset = BAPTISM_OPTIONS if run=='B' else [None] for chain,cv in CHAINS.items(): death_year=cv['death_year'] for death_season in cv['seasons']: for birth_year in BIRTH_YEAR: for birth_season in BIRTH_SEASON: for baptism in baptismset: causes=[]; costs=[] # hard constraints if constraint_eclipse(death_year)=='DEAD': causes.append('V-1 eclipse (no visible umbral eclipse before the death)') mh=constraint_matthew2_hard(birth_year,birth_season,death_year,death_season) if mh=='DEAD': causes.append('G-1 Matthew 2 (born after the death)') mv=constraint_matthew2_early_edge(birth_year,death_year) if mv=='DEAD': causes.append('G-1 Matthew 2 (>=5 years before the death; age clashes with "two years old and under")') if run=='B': if constraint_tiberius(baptism)=='DEAD': causes.append('B-1a Tiberius 15th year (baptism before the floor)') l=constraint_luke323(birth_year,baptism_AD=baptism,strict=strict) if l=='DEAD': causes.append('G-3 Luke 3:23/Hoehner (outside ~30, or earlier than 5 BC)') # costs (soft/interpretive constraints) if mv=='soft': costs.append('G-1 generous margin (3 years before: 1 year margin)') if mv=='P': costs.append('G-1 postulate (4 years before: 2 years margin)') costs.append('G-2 season of birth undetermined (postulate: %s)'%birth_season) cell=dict(chain=chain, death_year=death_year, death_season=death_season, birth_year=birth_year, birth_season=birth_season, baptism=baptism) if causes: dead.append({cell,'by':causes}) else: alive.append({cell,'costs':costs}) return alive,dead

# ---------------------------------------------------------------- validation against the count-back table def validate_countback(): """Age at a Sukkot birth, baptism AD 27. 7->33, 6->32, 5->31, 4->30, 3->29, 2->28. And the check/~/x per death scenario.""" ok=True for bc,expected in [(7,33),(6,32),(5,31),(4,30),(3,29),(2,28)]: age=27+bc-1 if age!=expected: ok=False; print(f" MISMATCH age {bc} BC: {age} != {expected}") print(" age sum reproduces the count-back table:", "YES" if ok else "NO") # Matthew 2 hard: under death in spring 4 BC a birth in 3, 2, 1 BC is excluded (after the death) for by in [3,2,1]: mh=constraint_matthew2_hard(by,'autumn(Sukkot)',4,'spring') assert mh=='DEAD', f"expected DEAD for birth {by} with death spring 4" print(" Matthew 2 hard excludes birth after the death: YES")

# ---------------------------------------------------------------- report def window_per_chain(alive): per=collections.defaultdict(set) for c in alive: per[c['chain']].add(c['birth_year']) return {k:sorted(v,reverse=True) for k,v in per.items()}

def kill_count(dead): c=collections.Counter() for d in dead: for cause in d['by']: c[cause]+=1 return c

if __name__=='__main__': print("== VALIDATION ==") validate_countback() runs=[('A',True,'freestanding'), ('B',True,'coupled, G-3 STRICT (Hoehner floor birth_year<=5, specific to baptism AD 29)'), ('B',False,'coupled, G-3 CONSISTENT (only the Luke 3:23 band 28..32 per baptism year)')] for run,strict,label in runs: alive,dead=sweep(run,strict=strict) tag=f"{run}{'' if run=='A' else ('-strict' if strict else '-consistent')}" print(f"\n== RUN {tag} — {label} ==") print(f" living cells: {len(alive)} | dead cells: {len(dead)}") for k,yr in window_per_chain(alive).items(): print(f" {k}: birth year {yr} BC") for cause,n in kill_count(dead).most_common(): print(f" DEAD {n:4d} {cause}") outA=sweep('A'); outBs=sweep('B',strict=True); outBc=sweep('B',strict=False) json.dump(dict( A=dict(alive=outA[0],dead=outA[1]), B_strict=dict(alive=outBs[0],dead=outBs[1]), B_consistent=dict(alive=outBc[0],dead=outBc[1]), windowA=window_per_chain(outA[0]), windowB_strict=window_per_chain(outBs[0]), windowB_consistent=window_per_chain(outBc[0]), ), open('logigram_out_en.json','w'), ensure_ascii=False) print("\nlogigram_out_en.json written")

```