packages feed

phino-0.0.128 / resources / contextualization.yaml

# 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 π‘˜0 meta. Derived terms are named 𝑛1, 𝑛2, … in premise order; the term π’ž is# handed is 𝑛0, leaving that numbering to the premises alone. A meta the rule# never reads back is written bare: it matches whatever stands in its place,# binds nothing and cannot be referenced.- name: cg  match: Ξ¦  c-match: π‘˜0  c-result: Ξ¦- name: cxi  match: ΞΎ  c-match: π‘˜0  c-result: π‘˜0- name: ct  match: βŠ₯  c-match: π‘˜0  c-result: βŠ₯- name: cf  match: ⟦𝐡0⟧  c-match: π‘˜0  c-result: ⟦𝐡0⟧- name: cd  match: '𝑛0.𝜏0'  c-match: π‘˜0  c-result: '𝑛1.𝜏0'  premises:    - n-result: 𝑛1      contextualize:        - 𝑛0        - π‘˜0- name: ca  match: '𝑛0(𝜏0 ↦ 𝑒1)'  c-match: π‘˜0  c-result: '𝑛1(𝜏0 ↦ 𝑛2)'  premises:    - n-result: 𝑛1      contextualize:        - 𝑛0        - π‘˜0    - n-result: 𝑛2      contextualize:        - 𝑒1        - π‘˜0- name: caa  match: '𝑛0(α𝑖0 ↦ 𝑒1)'  c-match: π‘˜0  c-result: '𝑛1(α𝑖0 ↦ 𝑛2)'  premises:    - n-result: 𝑛1      contextualize:        - 𝑛0        - π‘˜0    - n-result: 𝑛2      contextualize:        - 𝑒1        - π‘˜0