Skip to content

Commit 0bbeb1d

Browse files
Copilotfermga
andcommitted
Update legacy C1-C3/RC1-RC4 references to unified U1-U4 grammar
Co-authored-by: fermga <203334638+fermga@users.noreply.github.com>
1 parent 77400bd commit 0bbeb1d

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

src/tnfr/operators/algebra.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,10 @@ def validate_identity_property(
9292
9393
Notes
9494
-----
95-
Due to TNFR grammar constraints (C1: must end with terminator,
96-
C2: must include stabilizer), we test identity by comparing:
95+
Due to TNFR grammar constraints (U1b: must end with closure,
96+
U2: must include stabilizer), we test identity by comparing:
97+
98+
[Legacy note: Previously referenced C1-C2. See docs/grammar/DEPRECATION-INDEX.md]
9799
98100
- Path 1: operator → Coherence → Dissonance (OZ terminator)
99101
- Path 2: operator → Coherence → Silence (SHA terminator)

src/tnfr/operators/preconditions/__init__.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def validate_coupling(G: "TNFRGraph", node: "NodeId") -> None:
286286
Minimum EPI magnitude required for coupling
287287
UM_MIN_VF : float, default 0.01
288288
Minimum structural frequency required for coupling
289-
UM_STRICT_PHASE_CHECK : bool, default True (changed from False per RC3)
289+
UM_STRICT_PHASE_CHECK : bool, default True (changed from False per U3)
290290
Enable strict phase compatibility checking with existing neighbors.
291291
**MANDATORY per AGENTS.md Invariant #5**: "no coupling is valid without
292292
explicit phase verification (synchrony)"
@@ -312,7 +312,9 @@ def validate_coupling(G: "TNFRGraph", node: "NodeId") -> None:
312312
Notes
313313
-----
314314
**IMPORTANT**: Phase compatibility check is now MANDATORY by default
315-
(UM_STRICT_PHASE_CHECK=True) to align with AGENTS.md Invariant #5 and RC3.
315+
(UM_STRICT_PHASE_CHECK=True) to align with AGENTS.md Invariant #5 and U3.
316+
317+
[Legacy note: Previously referenced RC3. See docs/grammar/DEPRECATION-INDEX.md]
316318
317319
Set UM_STRICT_PHASE_CHECK=False to disable (NOT RECOMMENDED - violates
318320
canonical physics requirements).
@@ -334,7 +336,9 @@ def validate_coupling(G: "TNFRGraph", node: "NodeId") -> None:
334336
--------
335337
Coupling : UM operator that uses this validation
336338
AGENTS.md : Invariant #5 (phase check mandatory)
337-
EMERGENT_GRAMMAR_ANALYSIS.md : RC3 derivation
339+
UNIFIED_GRAMMAR_RULES.md : U3 derivation
340+
341+
[Legacy: Previously referenced EMERGENT_GRAMMAR_ANALYSIS.md RC3]
338342
"""
339343
import math
340344

@@ -361,7 +365,7 @@ def validate_coupling(G: "TNFRGraph", node: "NodeId") -> None:
361365
"Coupling", f"Structural frequency too low (νf={vf:.3f} < {min_vf:.3f})"
362366
)
363367

364-
# RC3: Phase compatibility check
368+
# U3: Phase compatibility check (was RC3)
365369
# Per AGENTS.md Invariant #5: "no coupling is valid without explicit phase verification"
366370
# Changed from False to True to align with canonical physics requirements
367371
strict_phase = bool(G.graph.get("UM_STRICT_PHASE_CHECK", True))

src/tnfr/validation/rules.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,15 +230,18 @@ def _check_compatibility(ctx: "GrammarContext", n, cand: Glyph | str) -> Glyph |
230230
"""Verify canonical transition compatibility based on TNFR structural dynamics.
231231
232232
Note: Frequency-based validation (R5) has been removed as it was not a
233-
fundamental physical constraint. Only C1-C3 constraints remain:
234-
- C1: EXISTENCE & CLOSURE (valid start/end)
235-
- C2: BOUNDEDNESS (stabilizers required)
236-
- C3: THRESHOLD PHYSICS (bifurcations need context)
233+
fundamental physical constraint. Only U1-U4 constraints remain:
234+
- U1: STRUCTURAL INITIATION & CLOSURE (valid start/end)
235+
- U2: CONVERGENCE & BOUNDEDNESS (stabilizers required)
236+
- U3: RESONANT COUPLING (phase compatibility)
237+
- U4: BIFURCATION DYNAMICS (bifurcations need context)
238+
239+
[Legacy note: Previously referenced C1-C3. See docs/grammar/DEPRECATION-INDEX.md]
237240
238241
These are validated in grammar.py, not here. This function now simply
239242
allows all transitions - validation happens at sequence level.
240243
"""
241-
# All transitions allowed - validation at sequence level via C1-C3
244+
# All transitions allowed - validation at sequence level via U1-U4
242245
return cand
243246

244247

tests/unit/operators/test_sha_algebra.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
- Identity property with Emission and complex sequences
3333
- Idempotence through consistent SHA behavior across contexts
3434
- Commutativity with Contraction operator
35-
- All tests respect TNFR grammar constraints (C1, C2, C3)
35+
- All tests respect TNFR grammar constraints (U1-U4)
36+
Note: Legacy reference to C1-C3 constraints - see docs/grammar/DEPRECATION-INDEX.md
3637
"""
3738

3839
from __future__ import annotations

0 commit comments

Comments
 (0)