phino-0.0.134: resources/normalize/dot.yaml
# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# Dispatch π1 on a formation: contextualize the dispatched body π1 and decorate
# it with the whole formation as Ο. The contextualization context is the
# formation WITHOUT the dispatched binding β β¦π΅1, π΅2β§, not β¦π΅1, π1 β¦ π1, π΅2β§ β
# so a self-referential ΞΎ inside π1 (as in β¦ a β¦ ΞΎ β§.a or β¦ a β¦ ΞΎ.a β§.a) no
# longer sees π1. Such a self-reference then dispatches on a formation that
# lacks π1 and collapses to β₯ via stop/null/dd instead of rebuilding the same
# β¦β¦, π1 β¦ π1, β¦β§.π1 term and looping forever. Ο on line 'result' still binds
# the full formation, so sibling and Ο-decoration references stay intact β only
# the self-ΞΎ path narrows, keeping normalization (near-)total.
# The formation the dispatch stands on is the whole program here and not a part
# of it; the 'dotg' sibling writes that one, and the two together cover every
# dispatch this one covered alone. Where no universe is known β the 'rewrite'
# command, and 'isNF' asking about a term on its own β π1 binds nothing, the
# guard cannot hold, and this rule answers every dispatch as it always did.
name: dot
pattern: β¦π΅1, π1 β¦ π1, π΅2β§.π1
e-match: π1
when:
not:
eq:
- β¦π΅1, π1 β¦ π1, π΅2β§
- π1
result: π2(Ο β¦ β¦π΅1, π1 β¦ π1, π΅2β§)
where:
- meta: π2
function: contextualize
args:
- π1
- β¦π΅1, π΅2β§