packages feed

phino-0.0.155: test-resources/evaluate-packs/fires-what-a-rewrite-line-unwrapped.yaml

# SPDX-FileCopyrightText: Copyright (c) 2025 Objectionary.com
# SPDX-License-Identifier: MIT
---
# yamllint disable rule:line-length
# The lines of an entry run in the order of the metas they read, not of their
# blocks: the 'evaluate' line fires what the 'rewrite' line unwrapped, so the
# 'rewrite' line runs first, although its block comes later (#1903).
symbolic: |
  - Ξ»: L_inner
    𝑛: ⟦ Ο† ↦ ⟦ Ξ» ‍ 𝜎 ⟧ ⟧
  - Ξ»: L_pick
    morph:
      𝑛1: $.x
    rewrite:
      𝑛2:
        of: 𝑛1
        rules:
          - name: unwrap
            pattern: ⟦ Ο† ↦ 𝑒1 ⟧
            result: 𝑒1
    evaluate:
      𝑛3: 𝑛2
    𝑛: 𝑛3
location: 'Q.y'
input: '⟦ y ↦ ⟦ x ↦ ⟦ Ο† ↦ ⟦ Ξ» ‍ L_inner ⟧ ⟧, Ξ» ‍ L_pick ⟧.Ο† ⟧'
result: '𝜎1:λ'
protocol: |
  𝕄(Ξ¦.y):
    𝔼(L_pick):
      𝑛1Β·1 := L_inner:Ξ»:Ο†  # 𝕄(ΞΎ.x)
      𝑛2Β·1 := L_inner:Ξ»  # 𝑛1
      𝔼(L_inner):  # 𝔼(𝑛2)
        𝑛·2Β·1 := 𝜎1:Ξ»:Ο†  # 𝑛
        𝑛·2Β·2 := 𝜎1:Ξ»:Ο†  # 𝕄(𝑛·2Β·1)
      𝑛3Β·1 := 𝑛·2Β·2  # 𝔼(𝑛2)
      𝑛·1Β·1 := 𝑛3Β·1  # 𝑛
      𝑛·1Β·2 := 𝑛3Β·1  # 𝕄(𝑛·1Β·1)