packages feed

phino-0.0.0.75: resources/morphing.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# Morphing 𝕄 β€” applied top-to-bottom, first matching clause wins.

- name: Mprim
  description: '𝕄(e) ⟿ e if e ∈ 𝒫'
  match: 𝑒
  when:
    primitive: 𝑒
  then: 𝑒

- name: Mnmz
  description: '𝕄(e) ⟿ 𝕄(𝒩(e)) if e βˆ‰ NF'
  match: 𝑒
  when:
    not:
      nf: 𝑒
  then:
    morph:
      normalize: 𝑒

- name: Mlambda
  description: '𝕄(⟦𝐡1, Ξ» ‍ F, 𝐡2⟧ * t) ⟿ 𝕄(F(⟦𝐡1, 𝐡2⟧) * t)'
  match: '⟦𝐡1, λ ‍ !F, 𝐡2⟧ * !t'
  where:
    - meta: 𝑒
      function: lambda
      args:
        - '⟦𝐡1, λ ‍ !F, 𝐡2⟧'
  then:
    morph: '𝑒 * !t'

- name: Mphi
  description: '𝕄(Ξ¦.Ο„ * t) ⟿ 𝕄(e * t) if Ξ¦ ↦ ⟦𝐡1, Ο„ ↦ e, 𝐡2⟧'
  match: 'Φ.𝜏 * !t'
  where:
    - meta: 𝑒
      function: global
      args:
        - 𝜏
  then:
    morph: '𝑒 * !t'

- name: Mstuck
  description: '𝕄(e) ⟿ βŠ₯ otherwise'
  match: 𝑒
  then: βŠ₯