Skip to content

Commit 201cd2d

Browse files
feat(epac): find the hat behind the interchangeable group/valence pair
- The pair wears one hat: the main-group column index (outermost-shell electron count) - Outermost-shell count computed from the declared electron configurations equals the declared valence_electrons for all nine required symbols - group = column + 10 for every p-block element (B,C,N,O,F,Si,P,S); H is the 1s exception with group 1 equal to column 1 - The collapsed coordinate (B, layer, period, column) separates the full frozen surface with zero collisions, replacing both group and valence - Verdict: two coordinates were wearing one hat; the hat is the outermost-shell electron count, and the minimal carrier is (B, layer, period, column) - Receipt 72ff51d61eeac8e464322464629f47d56ac683a5b5de63797c53611c0f26b88c
1 parent f64a2aa commit 201cd2d

2 files changed

Lines changed: 108 additions & 0 deletions

File tree

‎research/epac/epac_carrier_falsification.py‎

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,12 @@
4949
# then: every single-component drop must break separation, the tuple must be strictly finer than sigma at molecule scale, and the electron-occupancy alternative must fail
5050
# class: correctness
5151
# since: 2026-09-17
52+
#
53+
# id: carrier_falsification_pair_primitive
54+
# given: the interchangeable {group, valence} pair
55+
# then: both coordinates collapse to one declared primitive, the outermost-shell electron count, and the collapsed coordinate separates the frozen surface
56+
# class: correctness
57+
# since: 2026-09-17
5258
# === END CONTRACTS ===
5359

5460
"""Falsify the constitutive carrier and its coordinates.
@@ -291,6 +297,88 @@ def occupancy_sum(formula: str) -> tuple[int, ...]:
291297
}
292298

293299

300+
def _pair_primitive_audit(states: dict[str, ConstitutivePoint]) -> dict[str, Any]:
301+
"""Determine whether the interchangeable {group, valence} pair wears a
302+
single more primitive EPAC hat: the main-group column index (outermost
303+
shell electron count)."""
304+
305+
import re
306+
307+
def outermost_shell_count(symbol: str) -> int:
308+
import re
309+
config = _BY_SYMBOL[symbol]["electron_configuration"]
310+
config = config.replace("[Ne].", "1s2.2s2.2p6.")
311+
totals: dict[int, int] = {}
312+
for part in config.split("."):
313+
shell = int(re.match(r"\d+", part).group())
314+
occ = int(re.findall(r"\d+$", part)[0])
315+
totals[shell] = totals.get(shell, 0) + occ
316+
return totals[max(totals)]
317+
318+
column = {symbol: outermost_shell_count(symbol) for symbol in ATOMIC_NUMBER}
319+
valence_matches = all(
320+
_BY_SYMBOL[symbol]["valence_electrons"] == column[symbol]
321+
for symbol in ATOMIC_NUMBER
322+
)
323+
group_relation = {}
324+
for symbol in ATOMIC_NUMBER:
325+
entry = _BY_SYMBOL[symbol]
326+
if entry["period"] >= 2:
327+
group_relation[symbol] = {
328+
"group": entry["group"],
329+
"column_plus_ten": column[symbol] + 10,
330+
"matches": entry["group"] == column[symbol] + 10,
331+
}
332+
else:
333+
group_relation[symbol] = {
334+
"group": entry["group"],
335+
"column_plus_ten": None,
336+
"matches": None,
337+
"note": "H is the 1s exception: group 1 equals column 1",
338+
}
339+
340+
def column_for(name: str) -> int:
341+
point = states[name]
342+
if name.startswith("molecule:"):
343+
formula = name.split(":", 1)[1]
344+
return sum(column[s] for s in dict(LOCKED_FORMULAS)[formula])
345+
return column[name.split(":", 1)[1]]
346+
347+
def period_for(name: str) -> int:
348+
if name.startswith("molecule:"):
349+
formula = name.split(":", 1)[1]
350+
return sum(_BY_SYMBOL[s]["period"] for s in dict(LOCKED_FORMULAS)[formula])
351+
return _BY_SYMBOL[name.split(":", 1)[1]]["period"]
352+
353+
def collapsed_point(name: str) -> tuple:
354+
point = states[name]
355+
return point.b_projection() + (point.coordinates[3], period_for(name), column_for(name))
356+
357+
collapsed = {name: collapsed_point(name) for name in states}
358+
groups: dict[tuple, list[str]] = {}
359+
for name, coords in collapsed.items():
360+
groups.setdefault(coords, []).append(name)
361+
collisions = {str(k): v for k, v in sorted(groups.items()) if len(v) > 1}
362+
363+
return {
364+
"hat": "main-group column index (outermost-shell electron count)",
365+
"column_equals_declared_valence_electrons": valence_matches,
366+
"group_is_column_plus_ten_for_p_block": all(
367+
entry["matches"] is not False for entry in group_relation.values()
368+
),
369+
"group_relation": group_relation,
370+
"collapsed_coordinate_separates": not collisions,
371+
"collapsed_collisions": collisions,
372+
"verdict": (
373+
"the interchangeable pair wears one hat: the outermost-shell "
374+
"electron count (main-group column). group is column + 10 for "
375+
"p-block elements (H is the 1s exception), so both coordinates "
376+
"collapse to the single declared primitive valence_electrons; "
377+
"the minimal carrier is (B, layer, period, column)"
378+
),
379+
}
380+
381+
294382
def _transition_closure_beyond_nine() -> dict[str, Any]:
295383
return {
296384
"status": "UNRESOLVED",
@@ -431,6 +519,7 @@ def build_carrier_falsification() -> dict[str, Any]:
431519
sigma_replacement = _sigma_replacement(states)
432520
sigma_identity = _sigma_identity_serialization_audit(states)
433521
replacement_minimality = _replacement_minimality_audit(states)
522+
pair_primitive = _pair_primitive_audit(states)
434523
minkowski = _minkowski_field_work(states)
435524

436525
payload = {
@@ -441,6 +530,7 @@ def build_carrier_falsification() -> dict[str, Any]:
441530
"sigma_replacement": sigma_replacement,
442531
"sigma_identity_serialization_audit": sigma_identity,
443532
"replacement_minimality_audit": replacement_minimality,
533+
"pair_primitive_audit": pair_primitive,
444534
"transition_closure_beyond_nine": _transition_closure_beyond_nine(),
445535
"unseen_states_independent_b": _unseen_states_independent_b(),
446536
"minkowski_field_work": minkowski,

‎research/epac/tests/test_epac_carrier_falsification.py‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@
3838
# timeout: 10
3939
# mutates: none
4040
# cleanup: none
41+
#
42+
# id: check_carrier_falsification_pair_primitive
43+
# proves: carrier_falsification_pair_primitive
44+
# call: self::test_pair_primitive
45+
# requires: python3
46+
# timeout: 10
47+
# mutates: none
48+
# cleanup: none
4149
# === END CHECKS ===
4250

4351
from __future__ import annotations
@@ -95,3 +103,13 @@ def test_replacement_minimality() -> None:
95103
assert audit["component_drops"]["period"]["separation_survives"] is False
96104
assert audit["strictly_finer_than_sigma_at_molecule_scale"] is True
97105
assert audit["alternative_electron_occupancy_separates"] is False
106+
107+
108+
def test_pair_primitive() -> None:
109+
report = build_carrier_falsification()
110+
audit = report["pair_primitive_audit"]
111+
assert audit["column_equals_declared_valence_electrons"] is True
112+
assert audit["group_is_column_plus_ten_for_p_block"] is True
113+
assert audit["collapsed_coordinate_separates"] is True
114+
assert audit["collapsed_collisions"] == {}
115+
assert "outermost-shell" in audit["hat"]

0 commit comments

Comments
 (0)