packages feed

phino-0.0.156: test-resources/evaluate-packs/remints-a-datum-as-a-known-symbol.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# A 'remint' step given a term whose Ο† chain ends in data answers a fresh
# symbol and writes it as a known one, the way 'symbolize' does, so the head
# of the pair below becomes '𝜎1' standing for '01-' and the tail '𝜎2' standing
# for '02-' (#1923).
symbolic: |
  - Ξ»: L_shrink
    morph:
      𝑛1: $.x
    rewrite:
      𝑛2:
        of: 𝑛1
        rules:
          - name: small-pair
            pattern: ⟦ !B1, head ↦ 𝑒1, tail ↦ 𝑒2, !B2 ⟧
            result: ⟦ !B1, head ↦ 𝑒3, tail ↦ 𝑒4, !B2 ⟧
            where:
              - meta: 𝑒3
                function: remint
                args: [𝑒1]
              - meta: 𝑒4
                function: remint
                args: [𝑒2]
    𝑛: 𝑛2
location: 'Q.y'
input: '⟦ y ↦ ⟦ x ↦ ⟦ head ↦ ⟦ Ξ” ‍ 01- ⟧, tail ↦ ⟦ Ο† ↦ ⟦ Ξ” ‍ 02- ⟧ ⟧ ⟧, Ξ» ‍ L_shrink ⟧.tail ⟧'
result: '𝜎2:λ'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_shrink):
      𝑛1Β·1 := ⟦ head ↦ 01-:Ξ”, tail ↦ 02-:Ξ”:Ο† ⟧  # 𝕄(ΞΎ.x)
      𝔻(𝜎1:Ξ») == 01-
      𝔻(𝜎2:Ξ») == 02-
      𝑛2Β·1 := ⟦ head ↦ 𝜎1:Ξ», tail ↦ 𝜎2:Ξ» ⟧  # 𝑛1
      𝑛·1Β·1 := ⟦ head ↦ 𝜎1:Ξ», tail ↦ 𝜎2:Ξ» ⟧  # 𝑛
      𝑛·1Β·2 := ⟦ head ↦ 𝜎1:Ξ», tail ↦ 𝜎2:Ξ» ⟧  # 𝕄(𝑛·1Β·1)