phino-0.0.88: 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 β₯.
#
# 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: cglobe
match: Ξ¦
c-match: π
c-result: Ξ¦
- name: cxi
match: ΞΎ
c-match: π
c-result: π
- name: cdead
match: β₯
c-match: π
c-result: β₯
- name: cprim
match: β¦π΅β§
c-match: π
c-result: β¦π΅β§
- name: cdispatch
match: 'π.π'
c-match: π
c-result: 'π1.π'
premises:
- n-result: π1
contextualize:
- π
- π
- name: capplication
match: 'π(π β¦ π1)'
c-match: π
c-result: 'π1(π β¦ π2)'
premises:
- n-result: π1
contextualize:
- π
- π
- n-result: π2
contextualize:
- π1
- π
- name: capplicationa
match: 'π(Ξ±π β¦ π1)'
c-match: π
c-result: 'π1(Ξ±π β¦ π2)'
premises:
- n-result: π1
contextualize:
- π
- π
- n-result: π2
contextualize:
- π1
- π