# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com# SPDX-License-Identifier: MIT---# Dataization π» β applied top-to-bottom, first matching clause wins. It is# ternary, π»(n, e, s): the second argument e is the global universe, the same# expression that π takes as its second argument (π» forwards it to π), and the# third argument s is the mutable state, threaded through and returned possibly# changed. Only the 'fire' rule changes it, by firing an atom through πΌ. The# first argument is always a normal form: a non-NF expression matches no clause.## Each rule is an inference rule: when 'match' matches the term and 'e-match'# matches the universe (binding the meta e), the rule yields the conclusion# 'd-result' (a premise bytes meta or a literal), provided 'when' holds and the# ordered 'premises' reduce as stated. A premise binds its 'n-result'/'d-result'# to one judgment β π» ('dataize'), π ('morph'), π© ('normalize'), πΌ ('evaluate')# or π ('contextualize'). 'e-match' is the universe-argument matcher of# π»(n, e); it is always the e meta. The single bytes result is named Ξ΄; derived# terms are π, π1, β¦ in premise order, skipping the bare π only when 'match'# already binds it.## The clauses are disjoint, so their relative order does not change behavior.# 'norm' matches the bare meta π, which unifies with any expression, so it is# guarded to fire only when π is neither a formation ('not (formation π)',# carving out 'delta', 'box', 'fire' and 'none') nor the termination β₯# ('not (π = β₯)', carving out 'end'). Without the guard 'norm' would behave# correctly only by being declared last; with it the clauses no longer rely on# their order.- name: delta label: \Delta match: β¦π΅1, Ξ β€ Ξ΄, π΅2β§ e-match: π d-result: Ξ΄- name: box match: β¦π΅1, Ο β¦ π1, π΅2β§ e-match: π d-result: Ξ΄ when: disjoint: - [Ξ, Ξ»] - [π΅1, π΅2] premises: - n-result: π contextualize: - π1 - β¦π΅1, Ο β¦ π1, π΅2β§ - n-result: π1 normalize: π - d-result: Ξ΄ dataize: π1- name: fire match: β¦π΅1, Ξ» β€ π, π΅2β§ e-match: π d-result: Ξ΄ premises: - n-result: π evaluate: - β¦π΅1, Ξ» β€ π, π΅2β§ - π - n-result: π1 normalize: π - d-result: Ξ΄ dataize: π1- name: none match: β¦π΅β§ e-match: π d-result: '--' when: disjoint: - [Ξ, Ξ», Ο] - [π΅]- name: end match: β₯ e-match: π d-result: '--'- name: norm match: π e-match: π d-result: Ξ΄ when: and: - not: formation: π - not: eq: - π - β₯ premises: - n-result: π1 morph: π - d-result: Ξ΄ dataize: π1