# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# Contextualization π β applied top-to-bottom, first matching clause wins. It is# binary, π(n, c): n is the term being contextualized and c is the context (the# expression that every free ΞΎ inside n stands for). π walks the term# structurally, replacing each ΞΎ with the context c, descending through# dispatches and applications and stopping at formations β which introduce their# own scope and are returned untouched β and at the global Ξ¦ and termination β₯.# The context c is supplied by the caller: DOT dispatching π on a formation# passes that formation WITHOUT the dispatched binding (β¦π΅1, π΅2β§), so a# self-referential ΞΎ resolves to an object that lacks π and collapses to β₯# rather than re-deriving the dispatch and diverging.## Each rule is an inference rule: when 'match' matches the term and 'c-match'# matches the context (binding the meta c), the rule yields the conclusion# 'c-result' (a premise meta or a literal), provided the ordered 'premises'# reduce as stated. A premise binds its 'n-result' to one π ('contextualize')# judgment. 'c-match' is the context-argument matcher of π(n, c); it is always# the c meta. Derived terms are named π, π1, β¦ in premise order; the bare π is# skipped only when 'match' already binds it.- name: cg match: Ξ¦ c-match: π c-result: Ξ¦- name: cxi match: ΞΎ c-match: π c-result: π- name: ct match: β₯ c-match: π c-result: β₯- name: cf match: β¦π΅β§ c-match: π c-result: β¦π΅β§- name: cd match: 'π.π' c-match: π c-result: 'π1.π' premises: - n-result: π1 contextualize: - π - π- name: ca match: 'π(π β¦ π1)' c-match: π c-result: 'π1(π β¦ π2)' premises: - n-result: π1 contextualize: - π - π - n-result: π2 contextualize: - π1 - π- name: caa match: 'π(Ξ±π β¦ π1)' c-match: π c-result: 'π1(Ξ±π β¦ π2)' premises: - n-result: π1 contextualize: - π - π - n-result: π2 contextualize: - π1 - π